text:
package com.intel.hadoop.graphbuilder.pipeline.output.titan;

import com.intel.hadoop.graphbuilder.graphelements.SerializedGraphElement;
import com.intel.hadoop.graphbuilder.pipeline.output.GraphElementWriter;
import com.intel.hadoop.graphbuilder.types.EncapsulatedObject;
import com.intel.hadoop.graphbuilder.types.PropertyMap;
import com.intel.hadoop.graphbuilder.util.GraphBuilderExit;
import com.intel.hadoop.graphbuilder.util.GraphDatabaseConnector;
import com.intel.hadoop.graphbuilder.util.StatusCode;
import com.thinkaurelius.titan.core.TitanGraph;
import org.apache.commons.configuration.BaseConfiguration;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.log4j.Logger;

import java.io.IOException;

/**
 * This class reads edges from HDFS by IntermediateEdgeWriterReducer. The
 * Titan ID of both source and target vertices are written along with
 * the edge properties in the previous step. In this map-only job,
 * the map function fetches the reference to the source and target vertices
 * from Titan and adds the edges to Titan using the Blueprints addEdge() API.
 * The edge properties are also written to Titan
 */

public class EdgesIntoTitanMapper extends Mapper<IntWritable,
        SerializedGraphElement, NullWritable, NullWritable> {
    private static final Logger LOG = Logger.getLogger(
            EdgesIntoTitanMapper.class);

    private static enum Counters {
        EDGE_PROPERTIES_WRITTEN,
        NUM_EDGES
    }

    TitanGraph graph;

    private TitanGraph getTitanGraphInstance (Context context) throws
            IOException {
        BaseConfiguration titanConfig = new BaseConfiguration();
        return GraphDatabaseConnector.open("titan",
                titanConfig,
                context.getConfiguration());
    }

    /**
     * Sets up the Titan connection.
     *
     * @param {@code context}  The reducer context provided by Hadoop.
     * @throws IOException
     * @throws InterruptedException
     */
    @Override
    public void setup(Context context) throws IOException,
            InterruptedException {

        this.graph = getTitanGraphInstance(context);
    }

    /**
     * The map function reads the references of the source and target
     * vertices of a given edge and writes the edge and its properties to
     * Titan using the Blueprints addEdge() call
     *
     * @param key The data structure of the input file is every record
     *            per line is a serialized edge. Input of this
     *            map comes from the output directory written by
     *            IntermediateEdgeWriterReducer.java
     * @param value A serialized edge
     * @param context Hadoop Job context
     */

    @Override
    public void map(IntWritable key, SerializedGraphElement value,
                    Context context) throws IOException, InterruptedException {

        SerializedGraphElement serializedGraphElement = value;

        if (serializedGraphElement.graphElement().isVertex()) {
            // This is a strange case, throw an exception
            throw new IllegalArgumentException("GRAPHBUILDER_ERROR: " +
                    "Found unexpected Vertex element in the edge write " +
                    "mapper. Please recheck the logic to create vertices and " +
                    "edges.");
        }

        com.tinkerpop.blueprints.Vertex srcBlueprintsVertex =
                    this.graph.getVertex(serializedGraphElement.graphElement
                            ().getProperty(GraphElementWriter
                            .PROPERTY_KEY_SRC_TITAN_ID));
        com.tinkerpop.blueprints.Vertex tgtBlueprintsVertex =
                    this.graph.getVertex(serializedGraphElement.graphElement
                            ().getProperty(GraphElementWriter
                            .PROPERTY_KEY_TGT_TITAN_ID));
        PropertyMap propertyMap = (PropertyMap) serializedGraphElement
                .graphElement().getProperties();

        // Add the edge to Titan graph

        com.tinkerpop.blueprints.Edge bluePrintsEdge = null;
        String edgeLabel = serializedGraphElement.graphElement().getLabel()
                .toString();
        try {

            bluePrintsEdge = this.graph.addEdge(null,
                        srcBlueprintsVertex,
                        tgtBlueprintsVertex,
                        edgeLabel);

        } catch (IllegalArgumentException e) {

            GraphBuilderExit.graphbuilderFatalExitException(
                        StatusCode.TITAN_ERROR,
                        "Could not add edge to Titan; likely a schema error. " +
                        "The label on the edge is  " + edgeLabel, LOG, e);
        }

        // The edge is added to the graph; now add the edge properties.

        // The "srcTitanID" property was added during this MR job to
        // propagate the Titan ID of the edge's source vertex to this
        // reducer ... we can remove it now.

        propertyMap.removeProperty(GraphElementWriter
                .PROPERTY_KEY_SRC_TITAN_ID);
        propertyMap.removeProperty(GraphElementWriter
                .PROPERTY_KEY_TGT_TITAN_ID);

        for (Writable propertyKey : propertyMap.getPropertyKeys()) {
           EncapsulatedObject mapEntry = (EncapsulatedObject)
                        propertyMap.getProperty(propertyKey.toString());

           try {
               bluePrintsEdge.setProperty(propertyKey.toString(),
                       mapEntry.getBaseObject());
           } catch (IllegalArgumentException e) {
               LOG.fatal("GRAPHBUILDER_ERROR: Could not add edge " +
                            "property; probably a schema error. The label on " +
                            "the edge is  " + edgeLabel);
               LOG.fatal("GRAPHBUILDER_ERROR: The property on the edge " +
                            "is " + propertyKey.toString());
               LOG.fatal(e.getMessage());
               GraphBuilderExit.graphbuilderFatalExitException
                            (StatusCode.INDESCRIBABLE_FAILURE, "", LOG, e);
           }
        }

        context.getCounter(Counters.NUM_EDGES).increment(1L);
    }   // End of map function

    /**
     * Performs cleanup tasks after the reducer finishes.
     *
     * In particular, closes the Titan graph.
     * @param {@code context}  Hadoop provided reducer context.
     * @throws IOException
     * @throws InterruptedException
     */
    @Override
    public void cleanup(Context context) throws IOException,
            InterruptedException {
        this.graph.shutdown();
    }

    public  Enum getEdgeCounter(){
        return Counters.NUM_EDGES;
    }

    public Enum getEdgePropertiesCounter(){
        return Counters.EDGE_PROPERTIES_WRITTEN;
    }
}


text:
package com.drmilk.nbawrapper.domain.utils.team;

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

import com.drmilk.nbawrapper.domain.utils.player.Internal;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
    "_internal",
    "league"
})
public class TeamScheduleResponse {

    @JsonProperty("_internal")
    private Internal internal;
    @JsonProperty("league")
    private GameContainer league;
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();

    @JsonProperty("_internal")
    public Internal getInternal() {
        return internal;
    }

    @JsonProperty("_internal")
    public void setInternal(Internal internal) {
        this.internal = internal;
    }

    @JsonProperty("league")
    public GameContainer getLeague() {
        return league;
    }

    @JsonProperty("league")
    public void setLeague(GameContainer league) {
        this.league = league;
    }

    @JsonAnyGetter
    public Map<String, Object> getAdditionalProperties() {
        return this.additionalProperties;
    }

    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
    }

}

redpajama_set_name: RedPajamaGithub


text:
class SessionsController < ApplicationController
  def create
    auth = request.env["omniauth.auth"]
     user = User.find_by_provider_and_uid(auth["provider"], auth["uid"]) || User.create_with_omniauth(auth)
     # user = User.create_with_omniauth(auth)
    # user.token = auth["credentials"]["token"]        #in case token changes after account is created
     user.update_attributes(:token => auth["credentials"]["token"])

     session[:user_id] = user.id
    # redirect_to root_url, :notice => "Signed in!"
    redirect_to session[:redirect_to] || root_path
    session[:redirect_to] = nil
      end

      def failure
        flash[:error] = 'There was an error at the remote authentication service. You have not been signed in.'
        redirect_to "http://catsinyourhats.com", :notice => "Failed to sign in!"
      end

      def destroy
        session[:user_id]=nil
        redirect_to root_url, :notice => "Signed out!"

      end

end


text:
define(
"dojox/editor/plugins/nls/fr/PageBreak", //begin v1.x content
({
	"pageBreak": "Saut de page"
})

//end v1.x content
);


text:
basepath=$(cd `dirname $0`; pwd)
#echo $basepath
echo "****************************************** starting *****************************************"
#jvm启动参数
#GC_OPTS="-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -Xloggc:/data/dbus-canal-auto/logs/gc/gc.log"
LOG_CONF="-Dlogs.base.path=$basepath -Duser.dir=$basepath"
OOM_OPTS="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$basepath/logs/oom"
JVM_OPTS="-server -Xmx80m -Xms40m -XX:NewRatio=1"
CLASS_PATH=""
MAIN="com.creditease.dbus.ogg.auto.Start"
if [ "x$1" = "xmaster" ]
then
        MAIN="com.creditease.dbus.ogg.auto.OGGDeploy"
fi

#导入jar和config进入classpath
for i in $basepath/lib/*.jar;
        do CLASS_PATH=$i:"$CLASS_PATH";
done
export CLASS_PATH=.:$CLASS_PATH

java $JVM_OPTS $LOG_CONF $OOM_OPTS -classpath $CLASS_PATH $MAIN


text:
export default {
    DEFAULT_LAYER_VALUE: 0,
    DEFAULT_OBJECT_POSITION: [0, 0]
}


text:
// -*- C++ -*-
// Module:  Log4CPLUS
// File:    internal.h
// Created: 1/2009
// Author:  Vaclav Haisman
//
//
//  Copyright (C) 2009-2015, Vaclav Haisman. All rights reserved.
//
//  Redistribution and use in source and binary forms, with or without modifica-
//  tion, are permitted provided that the following conditions are met:
//
//  1. Redistributions of  source code must  retain the above copyright  notice,
//     this list of conditions and the following disclaimer.
//
//  2. Redistributions in binary form must reproduce the above copyright notice,
//     this list of conditions and the following disclaimer in the documentation
//     and/or other materials provided with the distribution.
//
//  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
//  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
//  FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
//  APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
//  INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
//  DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
//  OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
//  ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
//  (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
//  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

/** @file
 * This header contains declaration internal to log4cplus. They must never be
 * visible from user accesible headers or exported in DLL/shared libray.
 */

#ifndef LOG4CPLUS_INTERNAL_INTERNAL_HEADER_
#define LOG4CPLUS_INTERNAL_INTERNAL_HEADER_

#include <log4cplus/config.hxx>

#if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
#pragma once
#endif

#if ! defined (INSIDE_LOG4CPLUS)
#  error "This header must not be be used outside log4cplus' implementation files."
#endif

#include <memory>
#include <vector>
#include <sstream>
#include <cstdio>
#include <log4cplus/tstring.h>
#include <log4cplus/streams.h>
#include <log4cplus/ndc.h>
#include <log4cplus/mdc.h>
#include <log4cplus/spi/loggingevent.h>
#include <log4cplus/thread/impl/tls.h>
#include <log4cplus/helpers/snprintf.h>

namespace log4cplus {

namespace internal {

//! Canonical empty string. It is used when the need to return empty string
//! by reference arises.
extern log4cplus::tstring const empty_str;

struct gft_scratch_pad
{
    gft_scratch_pad ();
    ~gft_scratch_pad ();

    void
    reset ()
    {
        uc_q_str_valid = false;
        q_str_valid = false;
        s_str_valid = false;
        ret.clear ();
    }

    log4cplus::tstring q_str;
    log4cplus::tstring uc_q_str;
    log4cplus::tstring s_str;
    log4cplus::tstring ret;
    log4cplus::tstring fmt;
    log4cplus::tstring tmp;
    std::vector<tchar> buffer;
    bool uc_q_str_valid;
    bool q_str_valid;
    bool s_str_valid;
};

struct appender_sratch_pad
{
    appender_sratch_pad ();
    ~appender_sratch_pad ();

    tostringstream oss;
    tstring str;
    std::string chstr;
};

//! Per thread data.
struct per_thread_data
{
    per_thread_data ();
    ~per_thread_data ();

    tstring macros_str;
    tostringstream macros_oss;
    tostringstream layout_oss;
    DiagnosticContextStack ndc_dcs;
    MappedDiagnosticContextMap mdc_map;
    log4cplus::tstring thread_name;
    log4cplus::tstring thread_name2;
    gft_scratch_pad gft_sp;
    appender_sratch_pad appender_sp;
    log4cplus::tstring faa_str;
    log4cplus::tstring ll_str;
    spi::InternalLoggingEvent forced_log_ev;
    std::FILE * fnull;
    log4cplus::helpers::snprintf_buf snprintf_buf;
};

per_thread_data * alloc_ptd ();

// TLS key whose value is pointer struct per_thread_data.
extern log4cplus::thread::impl::tls_key_type tls_storage_key;

#if ! defined (LOG4CPLUS_SINGLE_THREADED) \
    && defined (LOG4CPLUS_THREAD_LOCAL_VAR)

extern LOG4CPLUS_THREAD_LOCAL_VAR per_thread_data * ptd;

inline
void
set_ptd (per_thread_data * p)
{
    ptd = p;
}

inline
per_thread_data *
get_ptd (bool alloc = true)
{
    if (LOG4CPLUS_UNLIKELY (! ptd && alloc))
        return alloc_ptd ();

    // The assert() does not belong here. get_ptd() might be called by
    // cleanup code that can handle the returned NULL pointer.
    //assert (ptd);

    return ptd;
}

#else // defined (LOG4CPLUS_THREAD_LOCAL_VAR)

inline
void
set_ptd (per_thread_data * p)
{
    thread::impl::tls_set_value (tls_storage_key, p);
}

inline
per_thread_data *
get_ptd (bool alloc = true)
{
    per_thread_data * ptd
        = reinterpret_cast<per_thread_data *>(
            thread::impl::tls_get_value (tls_storage_key));

    if (LOG4CPLUS_UNLIKELY (! ptd && alloc))
        return alloc_ptd ();

    return ptd;
}

#endif // defined (LOG4CPLUS_THREAD_LOCAL_VAR)

inline
tstring &
get_thread_name_str ()
{
    return get_ptd ()->thread_name;
}

inline
tstring &
get_thread_name2_str ()
{
    return get_ptd ()->thread_name2;
}

inline
gft_scratch_pad &
get_gft_scratch_pad ()
{
    return get_ptd ()->gft_sp;
}

inline
appender_sratch_pad &
get_appender_sp ()
{
    return get_ptd ()->appender_sp;
}

} // namespace internal {

namespace detail
{

LOG4CPLUS_EXPORT void clear_tostringstream (tostringstream &);

} // namespace detail

} // namespace log4cplus {

#endif // LOG4CPLUS_INTERNAL_INTERNAL_HEADER_


text:
package serviceaccount

import (
	"k8s.io/kubernetes/pkg/api"
	"k8s.io/kubernetes/pkg/api/rest"
	"k8s.io/kubernetes/pkg/watch"
)

// Registry is an interface implemented by things that know how to store ServiceAccount objects.
type Registry interface {
	ListServiceAccounts(ctx api.Context, options *api.ListOptions) (*api.ServiceAccountList, error)
	WatchServiceAccounts(ctx api.Context, options *api.ListOptions) (watch.Interface, error)
	GetServiceAccount(ctx api.Context, name string) (*api.ServiceAccount, error)
	CreateServiceAccount(ctx api.Context, ServiceAccount *api.ServiceAccount) error
	UpdateServiceAccount(ctx api.Context, ServiceAccount *api.ServiceAccount) error
	DeleteServiceAccount(ctx api.Context, name string) error
}

// storage puts strong typing around storage calls
type storage struct {
	rest.StandardStorage
}

// NewRegistry returns a new Registry interface for the given Storage. Any mismatched
// types will panic.
func NewRegistry(s rest.StandardStorage) Registry {
	return &storage{s}
}

func (s *storage) ListServiceAccounts(ctx api.Context, options *api.ListOptions) (*api.ServiceAccountList, error) {
	obj, err := s.List(ctx, options)
	if err != nil {
		return nil, err
	}
	return obj.(*api.ServiceAccountList), nil
}

func (s *storage) WatchServiceAccounts(ctx api.Context, options *api.ListOptions) (watch.Interface, error) {
	return s.Watch(ctx, options)
}

func (s *storage) GetServiceAccount(ctx api.Context, name string) (*api.ServiceAccount, error) {
	obj, err := s.Get(ctx, name)
	if err != nil {
		return nil, err
	}
	return obj.(*api.ServiceAccount), nil
}

func (s *storage) CreateServiceAccount(ctx api.Context, serviceAccount *api.ServiceAccount) error {
	_, err := s.Create(ctx, serviceAccount)
	return err
}

func (s *storage) UpdateServiceAccount(ctx api.Context, serviceAccount *api.ServiceAccount) error {
	_, _, err := s.Update(ctx, serviceAccount.Name, rest.DefaultUpdatedObjectInfo(serviceAccount, api.Scheme))
	return err
}

func (s *storage) DeleteServiceAccount(ctx api.Context, name string) error {
	_, err := s.Delete(ctx, name, nil)
	return err
}


text:
#include "dcmtk/config/osconfig.h"
#include "dcmtk/dcmiod/iodutil.h"
#include "dcmtk/dcmfg/fgfact.h"
#include "dcmtk/dcmfg/fgderimg.h"
#include "dcmtk/dcmfg/fgfracon.h"
#include "dcmtk/dcmfg/fgframevoilut.h"
#include "dcmtk/dcmfg/fgimagedatatype.h"
#include "dcmtk/dcmfg/fgpixmsr.h"
#include "dcmtk/dcmfg/fgplanor.h"
#include "dcmtk/dcmfg/fgplanorvol.h"
#include "dcmtk/dcmfg/fgplanpo.h"
#include "dcmtk/dcmfg/fgplanposvol.h"
#include "dcmtk/dcmfg/fgseg.h"
#include "dcmtk/dcmfg/fgusimagedescription.h"
#include "dcmtk/dcmfg/fgrealworldvaluemapping.h"

FGFactory* FGFactory::m_Instance = NULL;

FGFactory::FGFactory()
{
  // noting to do (private constructor)
}

FGFactory& FGFactory::instance()
{
  if (m_Instance == NULL)
  {
    m_Instance = new FGFactory();
  }
  return *m_Instance;
}

FGBase* FGFactory::create(const DcmFGTypes::E_FGType fgtype)
{
  switch(fgtype)
  {
    case DcmFGTypes::EFG_PIXELMEASURES:
      return new FGPixelMeasures();
      break;
    case DcmFGTypes::EFG_FRAMECONTENT:
      return new FGFrameContent();
      break;
    case DcmFGTypes::EFG_FRAMEVOILUTMETA:      // Frame VOI LUT and Frame VOI LUT with LUT
      return new FGFrameVOILUT();
    case DcmFGTypes::EFG_PLANEPOSPATIENT:
      return new FGPlanePosPatient();
      break;
    case DcmFGTypes::EFG_PLANEPOSITIONVOLUME:
      return new FGPlanePositionVolume();
    case DcmFGTypes::EFG_PLANEORIENTPATIENT:
      return new FGPlaneOrientationPatient();
      break;
    case DcmFGTypes::EFG_PLANEORIENTVOLUME:
      return new FGPlaneOrientationVolume();
    case DcmFGTypes::EFG_DERIVATIONIMAGE:
      return new FGDerivationImage();
      break;
    case DcmFGTypes::EFG_IMAGEDATATYPE:
      return new FGImageDataType();
      break;
    case DcmFGTypes::EFG_REALWORLDVALUEMAPPING:
      return new FGRealWorldValueMapping();
      break;
    case DcmFGTypes::EFG_SEGMENTATION:
      return new FGSegmentation();
      break;
    case DcmFGTypes::EFG_USIMAGEDESCRIPTION:
      return new FGUSImageDescription();
      break;
    case DcmFGTypes::EFG_CARDIACSYNC:
    case DcmFGTypes::EFG_FRAMEANATOMY:
    case DcmFGTypes::EFG_PIXELVALUETRANSMETA:  // Pixel Value Transformation Macro or Identity Pixel Value Transformation Macro
    case DcmFGTypes::EFG_CONTRASTBOLUSUSAGE:
    case DcmFGTypes::EFG_PIXELINTENSITYRELLUT:
    case DcmFGTypes::EFG_FRAMEPIXELSHIFT:
    case DcmFGTypes::EFG_PATIENTORIENTINFRAME:
    case DcmFGTypes::EFG_FRAMEDISPLAYSHUTTER:
    case DcmFGTypes::EFG_RESPIRATORYSYNC:
    case DcmFGTypes::EFG_IRRADIATIONEVENTIDENT:
    case DcmFGTypes::EFG_RADIOPHARAMAUSAGE:
    case DcmFGTypes::EFG_PATIENTPHYSIOSTATE:
    case DcmFGTypes::EFG_TEMPORALPOSITION:
    {
      DCMFG_DEBUG("Encountered functional group that is not explicitly supported yet:" << DcmFGTypes::FGType2OFString(fgtype));
      return NULL;
      break;
    }
    default:
    {
      DCMFG_DEBUG("Encountered unknown functional group");
      return NULL;
      break;
    }
  }
  return NULL;
}

FGBase* FGFactory::create(const DcmTagKey& fgSequenceKey)
{
  if (!DcmIODUtil::isSequenceTag(fgSequenceKey))
  {
    DCMFG_ERROR("Cannot create functional group from non-sequence tag");
    return NULL;
  }
  FGBase* fg = NULL;
  DcmFGTypes::E_FGType fgType = DcmFGTypes::tagKey2FGType(fgSequenceKey);
  if (fgType != DcmFGTypes::EFG_UNKNOWN)
  {
    fg = create(fgType);
  }
  /* if the sequence is know but there is no specific implementation, create generic functional group */
  if (fg == NULL)
  {
    DCMFG_DEBUG("Encountered unknown functional group, started by tag key: " << fgSequenceKey);
    fg = new FGUnknown(fgSequenceKey);
  }
  return fg;
}


text:
{{#and price.price_range (if theme_settings.price_ranges '==' true)}}
    {{> components/products/price-range price_range=price.price_range schema_org=schema_org}}
{{else}}
    {{#if price.with_tax}}

            {{#if price.rrp_with_tax}}
                {{price.rrp_with_tax.formatted}}
            {{/if}}
            {{price.with_tax.formatted}}
            {{#if schema_org}}
                <meta itemprop="availability" content="{{product.availability}}">
                <meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/{{product.condition}}Condition">

                    <meta itemprop="price" content="{{price.with_tax.value}}">
                    <meta itemprop="priceCurrency" content="{{currency_selector.active_currency_code}}">
                    <meta itemprop="valueAddedTaxIncluded" content="true">

            {{/if}}
            {{#if price.without_tax}}
                {{lang 'products.price_with_tax' tax_label=price.tax_label}}
            {{/if}}

    {{/if}}
    {{#if price.without_tax}}

            {{#if price.rrp_without_tax}}
                {{price.rrp_without_tax.formatted}}
            {{/if}}
            {{price.without_tax.formatted}}
            {{#if schema_org}}
                <meta itemprop="availability" content="{{product.availability}}">
                <meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/{{product.condition}}Condition">

                    <meta itemprop="price" content="{{price.without_tax.value}}">
                    <meta itemprop="priceCurrency" content="{{currency_selector.active_currency_code}}">
                    <meta itemprop="valueAddedTaxIncluded" content="false">

            {{/if}}
            {{#if price.with_tax}}
                {{lang 'products.price_without_tax' tax_label=price.tax_label}}
            {{/if}}

    {{/if}}
    {{#if page_type '===' 'product'}}
        {{#if price.saved}}

                    {{lang 'products.you_save' amount=price.saved.formatted}}

        {{/if}}
    {{/if}}
{{/and}}


text:
/** @module */

import { insertNode, deleteNode, trigger } from './topo'
import { getFaceByPoint } from './face'
import SpatialError from './SpatialError'

/**
 * Node definition
 *
 * @typedef {Object} Node
 * @property {number} id Node ID
 * @property {module:face~Face} face Containing face
 * @property {module:coordinate~Coordinate} coordinate Coordinate
 * @property {number} minX Minimum X of bounds
 * @property {number} maxY Maximum Y of bounds
 * @property {number} minX Minimum X of bounds
 * @property {number} maxY Maximum Y of bounds
 */

/**
 * Find the node at a point location.
 *
 * @param {module:topo~Topo} topo
 * @param {module:coordinate~Coordinate} coordinate
 * @return {module:node~Node}
 */
export function getNodeByPoint (topo, coordinate) {
  const result = topo.nodesTree.search({
    minX: coordinate[0],
    minY: coordinate[1],
    maxX: coordinate[0],
    maxY: coordinate[1]
  })
  if (result.length === 0) return
  if (result.length === 1) return result[0]
  throw Error('getNodeByPoint: unexpected search result')
}

/**
 * Adds an isolated node to a face in a topology and returns the new node. If face is null, the node is still created.
 *
 * @param {module:topo~Topo} topo
 * @param {module:coordinate~Coordinate} coordinate
 * @return {module:node~Node}
 */
export function addIsoNode (topo, coordinate) {
  const { nodesTree: tree, faces } = topo

  const containingFaces = getFaceByPoint(topo, coordinate, 0)

  const node = {
    id: topo.nodesSeq,
    face: containingFaces.length === 0 ? faces[0] : containingFaces[0],
    coordinate,
    minX: coordinate[0],
    minY: coordinate[1],
    maxX: coordinate[0],
    maxY: coordinate[1]
  }

  if (!tree.collides(node)) {
    insertNode(topo, node)
    trigger(topo, 'addnode', node)
    return node
  } else {
    throw new SpatialError('coincident node')
  }
}

export function removeIsoNode (topo, node) {
  if (!node.face) throw new SpatialError('not isolated node')
  deleteNode(topo, node)
  trigger(topo, 'removenode', node)
}


text:
title: Ends With Template Filter
linkText: Ends With
description: Ends With Template Filter
---

# Ends With Template Filter

Returns a boolean condition based on if the input value ends with the value passed to the filter

## Example

```text
{% raw %}
{% if TestValue|endsWith:'test' %}Ends With Test{% else %}Does NOT End With Test{% endif %}
{% endraw %}
```


text:
<?php

class SiteController extends Controller
{
	/**
	 * Declares class-based actions.
	 */
	public function actions()
	{
		return array(
			// captcha action renders the CAPTCHA image displayed on the contact page
			'captcha'=>array(
				'class'=>'CCaptchaAction',
				'backColor'=>0xFFFFFF,
			),
			// page action renders "static" pages stored under 'protected/views/site/pages'
			// They can be accessed via: index.php?r=site/page&view=FileName
			'page'=>array(
				'class'=>'CViewAction',
			),
		);
	}

	/**
	 * This is the default 'index' action that is invoked
	 * when an action is not explicitly requested by users.
	 */
	public function actionIndex()
	{
		// renders the view file 'protected/views/site/index.php'
		// using the default layout 'protected/views/layouts/main.php'
		$this->render('index');
	}

	/**
	 * This is the action to handle external exceptions.
	 */
	public function actionError()
	{
		if($error=Yii::app()->errorHandler->error)
		{
			if(Yii::app()->request->isAjaxRequest)
				echo $error['message'];
			else
				$this->render('error', $error);
		}
	}

	/**
	 * Displays the contact page
	 */
	public function actionContact()
	{
		$model=new ContactForm;
		if(isset($_POST['ContactForm']))
		{
			$model->attributes=$_POST['ContactForm'];
			if($model->validate())
			{
				$name='=?UTF-8?B?'.base64_encode($model->name).'?=';
				$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';
				$headers="From: $name <{$model->email}>\r\n".
					"Reply-To: {$model->email}\r\n".
					"MIME-Version: 1.0\r\n".
					"Content-Type: text/plain; charset=UTF-8";

				mail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);
				Yii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');
				$this->refresh();
			}
		}
		$this->render('contact',array('model'=>$model));
	}

	/**
	 * Displays the login page
	 */
	public function actionLogin()
	{
		$model=new LoginForm;

		// if it is ajax validation request
		if(isset($_POST['ajax']) && $_POST['ajax']==='login-form')
		{
			echo CActiveForm::validate($model);
			Yii::app()->end();
		}

		// collect user input data
		if(isset($_POST['LoginForm']))
		{
			$model->attributes=$_POST['LoginForm'];
			// validate user input and redirect to the previous page if valid
			if($model->validate() && $model->login()) {
                $user_id = Yii::app()->user->id;
                $user = Users::model()->findByPk($user_id);
                $role = $user->attributes['role'];
                if($role == 0) {
                    $url = Yii::app()->createUrl('/admin/users/');
                } elseif($role == 1) {
                    $url = Yii::app()->createUrl('/booker/');
                } elseif($role == 2) {
                    $url = Yii::app()->createUrl('/entrepreneur/');
                }

                $this->redirect($url);
            }
		}
		// display the login form
		$this->render('login',array('model'=>$model));
	}

	/**
	 * Logs out the current user and redirect to homepage.
	 */
	public function actionLogout()
	{
		Yii::app()->user->logout();
		$this->redirect(Yii::app()->homeUrl);
	}

    public function actionUpload()
    {

        Yii::import("ext.EAjaxUpload.qqFileUploader");

        $folder=Yii::getPathOfAlias('webroot').'/upload/';// folder for uploaded files
        $allowedExtensions = array("jpg","jpeg","gif","exe","mov","mp4");//array("jpg","jpeg","gif","exe","mov" and etc...
        $sizeLimit = 100 * 1024 * 1024;// maximum file size in bytes
        $uploader = new qqFileUploader($allowedExtensions, $sizeLimit);
        $result = $uploader->handleUpload($folder);
        $return = htmlspecialchars(json_encode($result), ENT_NOQUOTES);

        $fileSize=filesize($folder.$result['filename']);//GETTING FILE SIZE
        $fileName=$result['filename'];//GETTING FILE NAME
        //$img = CUploadedFile::getInstance($model,'image');

        echo $return;// it's array
    }

    public function actionGetfile($id) {
        $modelFiles = Files::model()->findByPk($id);
        $file_url = $modelFiles->attributes['file'];
        $url = $_SERVER['DOCUMENT_ROOT'] . '/upload/' . $file_url;

        if (is_file($url)) {
            header("Content-Type: application/octet-stream");
            header("Accept-Ranges: bytes");
            header("Content-Length: " . filesize($url));
            header("Content-Disposition: attachment; filename=" . $modelFiles->attributes['file']);
            readfile($url);
        }
        exit;
    }

}


text:
select 1 as id
union all
select * from {{ ref('node_0') }}
union all
select * from {{ ref('node_3') }}
union all
select * from {{ ref('node_6') }}
union all
select * from {{ ref('node_8') }}
union all
select * from {{ ref('node_10') }}
union all
select * from {{ ref('node_12') }}
union all
select * from {{ ref('node_336') }}
union all
select * from {{ ref('node_1186') }}


text:
Using the control pin to adjust duty cycle of a 555 Timer astable oscillator.

![Build](./assets/ControlAdjust_build.jpg?raw=true)

## Notes

The standard 555 astable configuration uses a built-in 2/3 x VCC upper threshold reference.

Given R1 = 4.7kΩ, R2 = 47kΩ and C1 = 1µF this produces an oscillation at
[14.590 Hz](https://visual555.tardate.com/?mode=astable&r1=4.7&r2=47&c=1) with a 52.38% duty cycle.

The control pin (5) provides the opportunity to adjust the upper threshold,
allowing the duty cycle to be vary above and below 50%.

While this provides access to duty cycles below 50% (unlike the standard astable configuration),
the disadvantage of this approach is that both duty cycle and frequency are affected.

## Construction

The circuit is essentially the standard astable, but with the addition of adjustable control reference voltage.

![Breadboard](./assets/ControlAdjust_bb.jpg?raw=true)

![Schematic](./assets/ControlAdjust_schematic.jpg?raw=true)

![Build](./assets/ControlAdjust_build.jpg?raw=true)

## Test Results

When adjusted to 52.3% duty cycle, the actual frequency is 14.4 Hz - very close to the predicted value. This is essentially the same as having the control pin bypassed/disconnected in the standard astable configuration.

![scope_mid](./assets/scope_mid.gif?raw=true)

The minimum duty cycle possible with this astable configuration is 34.4%, at a frequency of 19.92 Hz:

![scope_34pc](./assets/scope_34pc.gif?raw=true)

The minimum duty cycle possible with this astable configuration is 62.1%, at a frequency of 11.42 Hz:

![scope_62pc](./assets/scope_62pc.gif?raw=true)

| Duty | Frequency | Note           |
|------|-----------|----------------|
| 34.4% | 19.92 Hz | Min duty cycle |
| 52.3% | 14.4 Hz  |                |
| 62.1% | 11.42 Hz | Max duty cycle |

## Credits and References

* [LM555 Datasheet](https://www.futurlec.com/Linear/LM555CN.shtml)
* [Designing 555 Astables](http://www.learnabout-electronics.org/Oscillators/osc44.php) - learnabout-electronics


text:
<!DOCTYPE html>

    <title>Classes  Reference</title>
    <link rel="stylesheet" type="text/css" href="css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="css/highlight.css" />
    <meta charset='utf-8'>

CPMobileSDK Docs

        CPMobileSDK Reference

        Classes  Reference

            Classes

                CPMobileSDK

                CPMobileSDKOptions

                CPSecureDocumentInteractionController

                CPSecureFetchRequest

                CPSecurePasteboard

                CPSecureUserDefaults

                CPSecureValueTransformer

            Global Variables

                CPMobileSDKDidLockApplicationNotification

                CPMobileSDKDidUnlockApplicationNotification

                CPMobileSDKDisableSecurityNotification

                CPMobileSDKEncryptionKeyAvailableNotification

                CPMobileSDKEncryptionKeyUnavailableNotification

                CPMobileSDKEncryptionKeyUserInfoKey

                CPMobileSDKVersion

            Extensions

                NSManagedObjectContext

            Functions

                CPMobileSDKApplicationMain(_:_:_:_:_:)

Classes

The following classes are available globally.

                    CPMobileSDK

The main mobile SDK class. Use this class’ methods to start the mobile SDK, pass URLs to the SDK and obtain the application encryption key.

Before starting the SDK, add observers for at least CPMobileSDKEncryptionKeyAvailableNotification and CPMobileSDKDidUnlockApplicationNotification. Start the SDK by calling CPMobileSDK.startSDKWithOptions(_:) like so:

Swift

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    // Override point for customization after application launch.
    NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppDelegate.mobileSDKEncryptionKeyAvailable(_:)), name: CPMobileSDKEncryptionKeyAvailableNotification, object: nil)
    NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppDelegate.mobileSDKDidUnlockApplication(_:)), name: CPMobileSDKDidUnlockApplicationNotification, object: nil)

    CPMobileSDK.startSDKWithOptions(nil)

    return true
}

internal func mobileSDKEncryptionKeyAvailable(note: NSNotification) {
    if let encryptionKey = note.userInfo?[CPMobileSDKEncryptionKeyUserInfoKey] as? NSData {
        //Use encryption key to start I/O related API.
    }
}

internal func mobileSDKDidUnlockApplication(note: NSNotification) {
    //Present the app's UI here if not already presented.
}

UI can be presented before the application is unlocked by the SDK, but this may cause unexpected results, such as starting network requests or disk access. It is best to present the UI only once the application is first unlocked. For projects which start their UI in code, this is very simple – move the UI code to the CPMobileSDKDidUnlockApplicationNotification observer method. For UI loaded from a Storyboard or a NIB/XIB, the simplest solution is to introduce a landing view controller, and present the real UI in the CPMobileSDKDidUnlockApplicationNotification observer method. The included demo project demonstrates how to achieve this.

Once the application is locked, it is generally safe to operate the UI normally, even if hidden. However, it is advised to close all work and discard the UI once a CPMobileSDKEncryptionKeyUnavailableNotification notification is posted.

                        See more

Declaration

Swift

public class CPMobileSDK : NSObject

                    CPMobileSDKOptions

A CPMobileSDKOptions object defines the behavior and policies to use when starting the mobile SDK.

                        See more

Declaration

Swift

public class CPMobileSDKOptions : NSObject

                    CPSecureDocumentInteractionController

The CPSecureDocumentInteractionController class is a secure, encrypted UIDocumentInteractionController subclass. Using instances of this class, only secure applications may open the provided files.

                        See more

Declaration

Swift

public class CPSecureDocumentInteractionController : UIDocumentInteractionController

                    CPSecureFetchRequest

A subclass of NSFetchRequest for performing searches with predicates referencing secure properties.

Secure fetch requests contain two predicates; predicate for constraining non-secure properties, and securePredicate, for constraining secure properties.

Swift

let secureFetchRequest = CPSecureFetchRequest(entityName: "Entity")
secureFetchRequest.predicate = NSPredicate(format: "integerProperty >= 5")
secureFetchRequest.securePredicate = NSPredicate(format: "secureStringProperty CONTAINS '7'")

                        See more

Declaration

Swift

public class CPSecureFetchRequest : NSFetchRequest

                    CPSecurePasteboard

The CPSecurePasteboard class is a secure, encrypted UIPasteboard subclass. Once encryption key is set, objects stored using instances of CPSecurePasteboard are encrypted before storage. An external message is provided for the users if they paste content outside of secured applications.

                        See more

Declaration

Swift

public class CPSecurePasteboard : UIPasteboard

                    CPSecureUserDefaults

The CPSecureUserDefaults class is a secure, encrypted NSUserDefaults subclass. Once encryption key is set, objects stored using instances of CPSecureUserDefaults are encrypted before storage.

                        See more

Declaration

Swift

public class CPSecureUserDefaults : NSUserDefaults

                    CPSecureValueTransformer

A secure subclass of NSValueTransformer, for use with Core Data models. Instances of CPSecureValueTransformer are used to transform Core Data types to and from encrypted binary data in Core Data stores.

Note

    When subclassing, make sure to call the super implementation of transformedValue(_:) and reverseTransformedValue(_:).

                        See more

Declaration

Swift

public class CPSecureValueTransformer : NSValueTransformer

© 2016 Check Point Software Technologies. All rights reserved.


text:
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
    switch (arguments.length) {
        case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
        case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
        case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);
    }
};
define(["require", "exports", './view', './view-slot', './content-selector', './resource-registry'], function (require, exports, view_1, view_slot_1, content_selector_1, resource_registry_1) {
    function elementContainerGet(key) {
        if (key === Element) {
            return this.element;
        }
        if (key === BoundViewFactory) {
            return this.boundViewFactory || (this.boundViewFactory = new BoundViewFactory(this, this.instruction.viewFactory, this.executionContext));
        }
        if (key === view_slot_1.ViewSlot) {
            if (this.viewSlot === undefined) {
                this.viewSlot = new view_slot_1.ViewSlot(this.element, this.instruction.anchorIsContainer, this.executionContext);
                this.children.push(this.viewSlot);
            }
            return this.viewSlot;
        }
        if (key === resource_registry_1.ViewResources) {
            return this.viewResources;
        }
        return this.superGet(key);
    }
    function createElementContainer(parent, element, instruction, executionContext, children, resources) {
        var container = parent.createChild(), providers, i;
        container.element = element;
        container.instruction = instruction;
        container.executionContext = executionContext;
        container.children = children;
        container.viewResources = resources;
        providers = instruction.providers;
        i = providers.length;
        while (i--) {
            container.registerSingleton(providers[i]);
        }
        container.superGet = container.get;
        container.get = elementContainerGet;
        return container;
    }
    function applyInstructions(containers, executionContext, element, instruction, behaviors, bindings, children, contentSelectors, resources) {
        var behaviorInstructions = instruction.behaviorInstructions, expressions = instruction.expressions, elementContainer, i, ii, current, instance;
        if (instruction.contentExpression) {
            bindings.push(instruction.contentExpression.createBinding(element.nextSibling));
            element.parentNode.removeChild(element);
            return;
        }
        if (instruction.contentSelector) {
            contentSelectors.push(new content_selector_1.ContentSelector(element, instruction.selector));
            return;
        }
        if (behaviorInstructions.length) {
            containers[instruction.injectorId] = elementContainer =
                createElementContainer(containers[instruction.parentInjectorId], element, instruction, executionContext, children, resources);
            for (i = 0, ii = behaviorInstructions.length; i < ii; ++i) {
                current = behaviorInstructions[i];
                instance = current.type.create(elementContainer, current, element, bindings);
                if (instance.contentView) {
                    children.push(instance.contentView);
                }
                behaviors.push(instance);
            }
        }
        for (i = 0, ii = expressions.length; i < ii; ++i) {
            bindings.push(expressions[i].createBinding(element));
        }
    }
    var BoundViewFactory = (function () {
        function BoundViewFactory(parentContainer, viewFactory, executionContext) {
            this.parentContainer = parentContainer;
            this.viewFactory = viewFactory;
            this.executionContext = executionContext;
            this.factoryOptions = { behaviorInstance: false };
        }
        BoundViewFactory.prototype.create = function (executionContext) {
            var childContainer = this.parentContainer.createChild(), context = executionContext || this.executionContext;
            this.factoryOptions.systemControlled = !executionContext;
            return this.viewFactory.create(childContainer, context, this.factoryOptions);
        };
        return BoundViewFactory;
    })();
    exports.BoundViewFactory = BoundViewFactory;
    var defaultFactoryOptions = {
        systemControlled: false,
        suppressBind: false
    };
    var ViewFactory = (function () {
        function ViewFactory(template, instructions, resources) {
            this.template = template;
            this.instructions = instructions;
            this.resources = resources;
        }
        ViewFactory.prototype.create = function (container, executionContext, options) {
            if (options === void 0) { options = defaultFactoryOptions; }
            var fragment = this.template.cloneNode(true), instructables = fragment.querySelectorAll('.au-target'), instructions = this.instructions, resources = this.resources, behaviors = [], bindings = [], children = [], contentSelectors = [], containers = { root: container }, i, ii, view;
            for (i = 0, ii = instructables.length; i < ii; ++i) {
                applyInstructions(containers, executionContext, instructables[i], instructions[i], behaviors, bindings, children, contentSelectors, resources);
            }
            view = new view_1.View(fragment, behaviors, bindings, children, options.systemControlled, contentSelectors);
            view.created(executionContext);
            if (!options.suppressBind) {
                view.bind(executionContext);
            }
            return view;
        };
        return ViewFactory;
    })();
    exports.ViewFactory = ViewFactory;
});


text:
package de.iritgo.aktera.base.tools.jvmmemory;

import de.iritgo.aktera.ui.AbstractUIController;
import de.iritgo.aktera.ui.UIControllerException;
import de.iritgo.aktera.ui.UIRequest;
import de.iritgo.aktera.ui.UIResponse;
import de.iritgo.simplelife.math.NumberTools;

/**
 * This controller displays the current memory consumption of the JVM.
 */
public class ShowJvmMemoryHistory extends AbstractUIController
{
	/** The JVM memory manager */
	private AkteraJvmMemoryManager jvmMemoryManager;

	/**
	 * Set the JVM memory manager.
	 *
	 * @param jvmMemoryManager The JVM memory manager
	 */
	public void setJvmMemoryManager(AkteraJvmMemoryManager jvmMemoryManager)
	{
		this.jvmMemoryManager = jvmMemoryManager;
	}

	/**
	 * @see de.iritgo.aktera.ui.UIController#execute(de.iritgo.aktera.ui.UIRequest, de.iritgo.aktera.ui.UIResponse)
	 */
	public void execute(UIRequest request, UIResponse response) throws UIControllerException
	{
		jvmMemoryManager.setStartTime(NumberTools.toInt(request.getParameter("startTime"), 10));
	}
}


text:
<?php

class AM_RevSlider_Block_Adminhtml_Slider_Css extends Mage_Adminhtml_Block_Template{
    public function _construct(){
        parent::_construct();
        $this->setTemplate('am/revslider/css.phtml');
    }

    public function _prepareLayout(){
        $this->setChild('save', $this->getLayout()->createBlock('adminhtml/widget_button', '', array(
            'label'     => Mage::helper('revslider')->__('Save'),
            'type'      => 'button',
            'class'     => 'save',
            'id'        => 'btnCssSave',
            'onclick'   => "revLayer.saveCss('{$this->getUrl('*/*/saveCss')}', 'editCssWindow');"
        )));
        $this->setChild('reset', $this->getLayout()->createBlock('adminhtml/widget_button', '', array(
            'label'     => Mage::helper('revslider')->__('Reset to Default'),
            'type'      => 'button',
            'class'     => 'default',
            'onclick'   => sprintf('revLayer.resetCss(\'%s\');',
                $this->getUrl('revslider/index/getCssCaptions', array('reset' => 1))
            )
        )));
        return parent::_prepareLayout();
    }

    public function getCssContent(){
        $css = Mage::getStoreConfig('revslider/config/css');
        if (!$css){
            $file = Mage::getBaseDir().'/js/am/revslider/rs-plugin/css/captions.css';
            if (is_file($file)) $css = file_get_contents($file);
        }
        return $css;
    }
}


text:
using System;
using System.Collections.Generic;
using AllReady.Models;
using AllReady.UnitTest.Extensions;
using AllReady.ViewModels.Event;
using AllReady.ViewModels.Task;
using Xunit;

namespace AllReady.UnitTest.ViewModels.Event
{
    using Campaign = AllReady.Models.Campaign;
    using Event = AllReady.Models.Event;

    public class EventViewModelShould
    {
        //happy path test. set up data to get all possible properties populated when EventViewModel is returned from handler
        [Fact]
        public void ConstructEventViewModel_WithTheCorrectData()
        {
            var campaign = new Campaign { Id = 1, Name = "Campaignname", TimeZoneId = "CampaignTimeZoneId" };
            var location = new AllReady.ViewModels.Shared.LocationViewModel { City = "Amsterdam" };
            var skills = new List<SkillViewModel> { new SkillViewModel { Name = "F sharp" } };
            var userSkills = new List<SkillViewModel> { new SkillViewModel { Name = "Medic", Description = "first aid helper", HierarchicalName = "med01", Id = 1 } };
            var signup =  new AllReady.ViewModels.Shared.TaskSignupViewModel { Name = "task1", TaskId = 1 };
            var @event = new Event { Campaign = campaign, TimeZoneId = "EventTimeZoneId" };

            var sut = new EventViewModel(@event);
            var task = new TaskViewModel { CampaignName = sut.CampaignName, CampaignId = sut.CampaignId, eventName = sut.Title, Name = "tasks" };
            var tasks = new List<TaskViewModel> { task };

            sut.Description = "Testing the allReady from htbox";
            sut.EndDateTime = DateTimeOffset.Now.AddDays(3650);
            sut.EventType = EventType.Rally;
            sut.HasPrivacyPolicy = false;
            sut.Headline = "the Already test campaing";
            sut.Id = 1;
            sut.ImageUrl = "http://www.htbox.org/";
            sut.IsAllowWaitList = false;
            sut.IsClosed = false;
            sut.IsLimitVolunteers = true;
            sut.Location = location;
            sut.OrganizationId = 1;
            sut.OrganizationName = "TestOrg";
            sut.RequiredSkills = skills;
            sut.SignupModel = signup;
            sut.StartDateTime = DateTimeOffset.Now.AddDays(365);
            sut.Tasks = tasks;
            sut.TimeZoneId = "US Mountain Standard Time";
            sut.Title = "Test Event";
            sut.UserId = "99";
            sut.UserSkills = userSkills;
            sut.UserTasks = tasks;

            Assert.Equal(sut.CampaignId, campaign.Id);
            Assert.Equal(sut.CampaignName, campaign.Name);
            Assert.Equal(sut.Location, location);
            Assert.Equal(sut.UserSkills, userSkills);
            Assert.Equal(sut.UserTasks, tasks);
            Assert.Equal(sut.SignupModel, signup);
            Assert.Equal(sut.RequiredSkills, skills);
        }

        [Fact]
        public void SetCampaignIdCampaignNameAndTimeZoneId_WhenConstructingWithNonNullCampaign()
        {
            var campaign = new Campaign { Id = 1, Name = "Campaignname", TimeZoneId = "CampaignTimeZoneId" };
            var @event = new Event { Campaign = campaign, TimeZoneId = "EventTimeZoneId" };
            var sut = new EventViewModel(@event);

            Assert.Equal(sut.CampaignId, campaign.Id);
            Assert.Equal(sut.CampaignName, campaign.Name);
            Assert.Equal(sut.TimeZoneId, @event.TimeZoneId);
        }

        [Fact]
        public void SetOrganizationIdAndOrganizationName_WhenConstructingWithNonNullCampaignAndNonNullManagingOrganization()
        {
            var campaign = new Campaign { ManagingOrganization = new Organization { Id = 1, Name = "OrgName" } };
            var @event = new Event { Campaign = campaign };
            var sut = new EventViewModel(@event);

            Assert.Equal(sut.OrganizationId, campaign.ManagingOrganization.Id);
            Assert.Equal(sut.OrganizationName, campaign.ManagingOrganization.Name);
        }

        [Fact]
        public void SetHasPrivacyPolicyToFalse_WhenEventsCampaignsOrganizationsPrivacyPolicyIsNullOrEmpty_AndConstructingWithNonNullCampaignAndNonNullManagingOrganization()
        {
            var @event = new Event { Campaign = new Campaign { ManagingOrganization = new Organization() } };
            var sut = new EventViewModel(@event);

            Assert.False(sut.HasPrivacyPolicy);
        }

        [Fact]
        public void SetHasPrivacyPolicyToTrue_WhenEventsCampaignsOrganizationsPrivacyPolicyIsNotNullOrEmpty_AndConstructingWithNonNullCampaignAndNonNullManagingOrganization()
        {
            var @event = new Event { Campaign = new Campaign { ManagingOrganization = new Organization { PrivacyPolicy = "PrivacyPolicy" } } };
            var sut = new EventViewModel(@event);

            Assert.True(sut.HasPrivacyPolicy);
        }

        [Fact]
        public void SetLocationToNewLocationViewModelWithCorrectData_WhenEventsLocationIsNotNull_AndConstructingWithNonNullCampaignAndNonNullManagingOrganization()
        {
            var location = new Location { Address1 = "Address1", Address2 = "Address2", City = "City", State = "State", PostalCode = "PostalCode", Country = "Country" };
            var @event = new Event { Location = location };
            var sut = new EventViewModel(@event);

            Assert.Equal(sut.Location.Address1, location.Address1);
            Assert.Equal(sut.Location.Address2, location.Address2);
            Assert.Equal(sut.Location.City, location.City);
            Assert.Equal(sut.Location.State, location.State);
            Assert.Equal(sut.Location.PostalCode, location.PostalCode);
            Assert.Equal(sut.Location.Country, location.Country);
        }

        [Fact]
        public void SetLocationToNull_WhenEventsLocationIstNull_AndConstructingWithNonNullCampaignAndNonNullManagingOrganization()
        {
            var sut = new EventViewModel(new Event());
            Assert.Null(sut.Location);
        }

        [Fact]
        public void SetIsClosedToTrue_WhenEventsEndDateTimeIsLessThanDateTimeOffsetUtcNow()
        {
            var sut = new EventViewModel(new Event { EndDateTime = DateTimeOffset.MinValue });
            Assert.True(sut.IsClosed);
        }

        [Fact]
        public void SetIsClosedToFalse_WhenEventsEndDateTimeIsGreaterThanDateTimeOffsetUtcNow()
        {
            var sut = new EventViewModel(new Event { EndDateTime = DateTimeOffset.MaxValue });
            Assert.False(sut.IsClosed);
        }

        [Fact]
        public void SetTasksToListOfTaskViewModelsInAscendingOrderByStartDateTime_WhenEventsTasksAreNotNull()
        {
            var @event = new Event { Tasks = new List<AllReadyTask> { new AllReadyTask { StartDateTime = DateTimeOffset.UtcNow.AddDays(2) }, new AllReadyTask { StartDateTime = DateTimeOffset.UtcNow.AddDays(1) } } };
            var sut = new EventViewModel(@event);

            Assert.IsType<List<TaskViewModel>>(sut.Tasks);
            Assert.Equal(sut.Tasks.IsOrderedByAscending(x => x.StartDateTime), true);
        }

        [Fact]
        public void SetTasksToEmptyListOfTaskViewModels_WhenEventsTasksAreNull()
        {
            var sut = new EventViewModel(new Event());
            Assert.IsType<List<TaskViewModel>>(sut.Tasks);
            Assert.True(sut.Tasks.Count == 0);
        }

        [Fact]
        public void SetRequiredSkillsToListOfSkillViewModelsForEventsRequiredSkills_WhenEventsRequiredSkillsIsNotNull()
        {
            var @event = new Event { RequiredSkills = new List<EventSkill> { new EventSkill { Skill = new Skill() }, new EventSkill { Skill = new Skill() } } };
            var sut = new EventViewModel(@event);

            Assert.IsType<List<SkillViewModel>>(sut.RequiredSkills);
            Assert.True(sut.RequiredSkills.Count > 0);
        }

        [Fact]
        public void SetRequiredSkillsToNull_WhenEventsRequiredSkillsIsNull()
        {
            var sut = new EventViewModel(new Event { RequiredSkills = null });
            Assert.Null(sut.RequiredSkills);
        }
    }
}


text:
dashclock-cellinfo
==================

A Dashclock plugin that displays information about your current cellular network.


text:
#ifndef DEMO_TCP_SESSION
#define DEMO_TCP_SESSION

// MS compatible compilers support #pragma once

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

#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
#include <boost/bind.hpp>
#include <memory.h>
#include <iostream>
#include <stdint.h>
#include <queue>
#include <boost/asio/streambuf.hpp>
#include "MyBuffer.h"
#include <iostream>
using namespace boost::asio::ip;

//We will use shared_ptr and enable_shared_from_this because we want to
//keep the tcp_connection object alive as long as there is an operation that refers to it.
class ssl_Session;

typedef std::shared_ptr<ssl_Session> TSessionPtr;
typedef std::function<void(const TSessionPtr&)> TConnectedCallback;
typedef std::function<void(const TSessionPtr&)> TDisconnectedCallback;

typedef std::function<void(const TSessionPtr&, const std::string&)> TMessageCallback;//when have message
typedef std::function<void(const TSessionPtr&)> TWriteCompleteCallback;
class ssl_Session
	: public std::enable_shared_from_this<ssl_Session>
{
public:
	typedef boost::asio::streambuf  TStreambuf;
	typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket> TSecureSocket;
	//return current socket refference
	TSecureSocket::lowest_layer_type& socket()
	{
		return m_sslSocket.lowest_layer();
	}
	//private constructor
	explicit ssl_Session(boost::asio::io_service& io_service, boost::asio::ssl::context& sslContext);
	~ssl_Session();
	/// Start the first asynchronous operation for the connection.
	void start();
	/// Stop all asynchronous operations associated with the connection.
	void stop();
	/**
	* @brief Send message to server
	* @param[in] msg Want to send a message.
	*/
	void sslSend(std::shared_ptr<MyBuffer> ptrBuffer);
	//set message callback
	void setMessageCallback(const TMessageCallback& callback)
	{
		messageCallback_ = callback;
	}
	void setConnectionCallback(const TConnectedCallback& callback)
	{
		ConnectedCallback_ = callback;
	}
	void setDisconnectedCallback(const TDisconnectedCallback& callback)
	{
		DisconnectedCallback_ = callback;
	}
	void setWriteCompleteCallback(const TWriteCompleteCallback& callback)
	{
		writeCompleteCallback_ = callback;
	}
private:
	//read && write
	void read();
	/// Handle completion of a read operation.
	void handle_read(const boost::system::error_code& error, uint32_t byte_transferred);
	/// Handle completion of a write operation.
	void handle_write(const boost::system::error_code& error, uint32_t bytes_transferred);
	//SSL handshake
	void handle_handshake(const boost::system::error_code& error);

private:
	/// SSL socket
	TSecureSocket m_sslSocket;

	/// The handler used to process the incoming request.
	TMessageCallback messageCallback_;
	TConnectedCallback ConnectedCallback_;
	TDisconnectedCallback DisconnectedCallback_;
	TWriteCompleteCallback writeCompleteCallback_;

	std::string m_delimiter;
private:
	//connected state
	bool m_isConnected;//ÅжÏÊÇ·ñÁ¬½Ó
	//recvive buffer
	TStreambuf m_buffer;
	//ÏûÏ¢¶ÓÁÐ
	std::queue<std::shared_ptr<MyBuffer>> m_sendMessages;
};

#endif


text:
starWidth = $(document).width();
starHeight = $(document).height();

// set some camera attributes
var VIEW_ANGLE = 45,
  ASPECT = starWidth / starHeight,
  NEAR = 0.1,
  FAR = 10000;

// create a WebGL renderer, camera
// and a scene
var renderer = new THREE.WebGLRenderer({alpha: true});
var params = {
    minFilter: THREE.LinearFilter,
    magFilter: THREE.LinearFilter,
    format: THREE.RGBAFormat,
    stencilBuffer: false
};

var camera = new THREE.PerspectiveCamera(
        VIEW_ANGLE,
        ASPECT,
        NEAR,
        FAR);

var scene = new THREE.Scene();

// add the camera to the scene
scene.add(camera);

// pull it back a bit
camera.position.z = 300;

// create the frustum
var frustum = new THREE.Frustum();
camera.updateMatrixWorld();
frustum.setFromMatrix(new THREE.Matrix4().multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse));

// start the renderer
renderer.setSize(starWidth, starHeight);

// attach the render-supplied DOM element
renderer.domElement.id = 'particles';
$('.partsbg').append(renderer.domElement);


text:
namespace storage {
namespace api {

IMPLEMENT_COMMAND(GetNodeStateCommand, GetNodeStateReply)
IMPLEMENT_REPLY(GetNodeStateReply)
IMPLEMENT_COMMAND(SetSystemStateCommand, SetSystemStateReply)
IMPLEMENT_REPLY(SetSystemStateReply)
IMPLEMENT_COMMAND(ActivateClusterStateVersionCommand, ActivateClusterStateVersionReply)
IMPLEMENT_REPLY(ActivateClusterStateVersionReply)

GetNodeStateCommand::GetNodeStateCommand(lib::NodeState::UP expectedState)
    : StorageCommand(MessageType::GETNODESTATE),
      _expectedState(std::move(expectedState))
{
}

void
GetNodeStateCommand::print(std::ostream& out, bool verbose,
                           const std::string& indent) const
{
    out << "GetNodeStateCommand(";
    if (_expectedState.get() != 0) {
        out << "Expected state: " << *_expectedState;
    }
    out << ")";
    if (verbose) {
        out << " : ";
        StorageCommand::print(out, verbose, indent);
    }
}

GetNodeStateReply::GetNodeStateReply(const GetNodeStateCommand& cmd)
    : StorageReply(cmd),
      _state()
{
}

GetNodeStateReply::GetNodeStateReply(const GetNodeStateCommand& cmd,
                                     const lib::NodeState& state)
    : StorageReply(cmd),
      _state(new lib::NodeState(state))
{
}

void
GetNodeStateReply::print(std::ostream& out, bool verbose,
                         const std::string& indent) const
{
    out << "GetNodeStateReply(";
    if (_state.get()) {
        out << "State: " << *_state;
    }
    out << ")";
    if (verbose) {
        out << " : ";
        StorageReply::print(out, verbose, indent);
    }
}

SetSystemStateCommand::SetSystemStateCommand(const lib::ClusterStateBundle& state)
    : StorageCommand(MessageType::SETSYSTEMSTATE),
      _state(state)
{
}

SetSystemStateCommand::SetSystemStateCommand(const lib::ClusterState& state)
    : StorageCommand(MessageType::SETSYSTEMSTATE),
      _state(state)
{
}

void
SetSystemStateCommand::print(std::ostream& out, bool verbose,
                             const std::string& indent) const
{
    out << "SetSystemStateCommand(" << *_state.getBaselineClusterState() << ")";
    if (verbose) {
        out << " : ";
        StorageCommand::print(out, verbose, indent);
    }
}

SetSystemStateReply::SetSystemStateReply(const SetSystemStateCommand& cmd)
    : StorageReply(cmd),
      _state(cmd.getClusterStateBundle())
{
}

void
SetSystemStateReply::print(std::ostream& out, bool verbose,
                           const std::string& indent) const
{
    out << "SetSystemStateReply()";
    if (verbose) {
        out << " : ";
        StorageReply::print(out, verbose, indent);
    }
}

ActivateClusterStateVersionCommand::ActivateClusterStateVersionCommand(uint32_t version)
    : StorageCommand(MessageType::ACTIVATE_CLUSTER_STATE_VERSION),
      _version(version)
{
}

void ActivateClusterStateVersionCommand::print(std::ostream& out, bool verbose,
                                               const std::string& indent) const
{
    out << "ActivateClusterStateVersionCommand(" << _version << ")";
    if (verbose) {
        out << " : ";
        StorageCommand::print(out, verbose, indent);
    }
}

ActivateClusterStateVersionReply::ActivateClusterStateVersionReply(const ActivateClusterStateVersionCommand& cmd)
    : StorageReply(cmd),
      _activateVersion(cmd.version()),
      _actualVersion(0) // Must be set explicitly
{
}

void ActivateClusterStateVersionReply::print(std::ostream& out, bool verbose,
                                             const std::string& indent) const
{
    out << "ActivateClusterStateVersionReply(activate " << _activateVersion
        << ", actual " << _actualVersion << ")";
    if (verbose) {
        out << " : ";
        StorageReply::print(out, verbose, indent);
    }
}

} // api
} // storage


text:
<?php

namespace Application\Library;
use FuzeWorks\iLibrary;

class TestAddLibraryWithAutoloader implements iLibrary
{

    public function getClassesPrefix(): ?string
    {
        return "FuzeWorks\Test\TestAddLibraryWithAutoloader";
    }

    public function getSourceDirectory(): ?string
    {
        return "";
    }
}


text:
using System;
using Microsoft.Extensions.Logging;
using MigrationTools;
using MigrationTools._EngineV1.Configuration;
using MigrationTools._EngineV1.Configuration.Processing;
using MigrationTools._EngineV1.Processors;

namespace VstsSyncMigrator.Engine
{
    public class TeamMigrationContext : MigrationProcessorBase
    {
        private TeamMigrationConfig _config;

        public TeamMigrationContext(IMigrationEngine engine, IServiceProvider services, ITelemetryLogger telemetry, ILogger<TeamMigrationContext> logger) : base(engine, services, telemetry, logger)
        {
        }

        public override string Name
        {
            get
            {
                return "TeamMigrationContext";
            }
        }

        public override void Configure(IProcessorConfig config)
        {
            _config = (TeamMigrationConfig)config;
        }

        protected override void InternalExecute()
        {
            Log.LogCritical("*************MIGRATION ALERT!!!!!!!!!");
            Log.LogCritical("TeamMigrationContext has been migrated to TfsTeamSettingsProcessor: https://nkdagility.github.io/azure-devops-migration-tools/Reference/Processors/TfsTeamSettingsProcessor.html");
        }
    }
}


text:
from sniffmongo import sniff_mongo
from sniffredis import sniff_redis
from sniffcouch import sniff_couch


text:
<?php
//COPY THIS FILE TO options.inc.php and make changes there to activate your printable action booklet

$options=array(
    'fpdfpath'  => 'fpdf/', // path from the main gtd-php directory to the FPDF installation directory
    'papersize' => 'letter',   // paper size - A4, letter, etc
    'fontname'  => 'Arial',    // typeface name
    'fontsize'  => 8,          // typeface size in points
    'nextonly'  => true        // true to show only *next* actions
);
?>


text:
package org.apache.storm.scheduler;

import java.util.Collection;
import java.util.Map;
import java.util.Set;

import org.apache.storm.generated.Assignment;
import org.apache.storm.generated.WorkerResources;

public interface SchedulerAssignment {
    /**
     * Is this slot part of this assignment or not.
     * @param slot the slot to check.
     * @return true if the slot is occupied by this assignment else false.
     */
    public boolean isSlotOccupied(WorkerSlot slot);

    /**
     * Is the executor assigned or not.
     *
     * @param executor the executor to check it if is assigned.
     * @return true if it is assigned else false
     */
    public boolean isExecutorAssigned(ExecutorDetails executor);

    /**
     * Return the ID of the topology.
     * @return the topology-id this assignment is for.
     */
    public String getTopologyId();

    /**
     * Get the map of executor to WorkerSlot.
     * @return the executor -> slot map.
     */
    public Map<ExecutorDetails, WorkerSlot> getExecutorToSlot();

    /**
     * Get the set of all executors.
     * @return  the executors covered by this assignments
     */
    public Set<ExecutorDetails> getExecutors();

    /**
     * Get the set of all slots that are a part of this.
     * @return the set of all slots.
     */
    public Set<WorkerSlot> getSlots();

    /**
     * Get the mapping of slot to executors on that slot.
     * @return the slot to the executors assigned to that slot.
     */
    public Map<WorkerSlot, Collection<ExecutorDetails>> getSlotToExecutors();

    /**
     * Get the slot to resource mapping.
     * @return The slot to resource mapping
     */
    public Map<WorkerSlot, WorkerResources> getScheduledResources();

    /**
     * Get the total shared off heap memory mapping.
     * @return host to total shared off heap memory mapping.
     */
    public Map<String, Double> getNodeIdToTotalSharedOffHeapMemory();
}


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

<title>JRSqlNotEqualClause (JasperReports 5.6.0 API)</title>
<meta name="date" content="2014-05-27">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

net.sf.jasperreports.engine.query

Class JRSqlNotEqualClause

java.lang.Object

net.sf.jasperreports.engine.query.JRSqlAbstractEqualClause

net.sf.jasperreports.engine.query.JRSqlNotEqualClause

All Implemented Interfaces:

JRClauseFunction

public class JRSqlNotEqualClause
extends JRSqlAbstractEqualClause

SQL "EQUAL" clause function.

Version:

$Id: JRSqlNotEqualClause.java 5878 2013-01-07 20:23:13Z teodord $

Author:

sanda zaharia (shertage@users.sourceforge.net)

See Also:

JRSqlAbstractEqualClause.apply(JRClauseTokens, JRQueryClauseContext)

Field Summary

Fields

Modifier and Type
Field and Description

protected static java.lang.String
OPERATOR_IS_NOT_NULL

protected static java.lang.String
OPERATOR_NOT_EQUAL

protected static JRSqlNotEqualClause
singleton

Fields inherited from class net.sf.jasperreports.engine.query.JRSqlAbstractEqualClause

POSITION_DB_COLUMN, POSITION_PARAMETER

Constructor Summary

Constructors

Constructor and Description

JRSqlNotEqualClause()

Method Summary

Methods

Modifier and Type
Method and Description

protected void
handleEqualOperator(java.lang.StringBuffer sbuffer,
                   java.lang.String param,
                   JRQueryClauseContext queryContext)

static JRSqlNotEqualClause
instance()

Returns the singleton function instance.

Methods inherited from class net.sf.jasperreports.engine.query.JRSqlAbstractEqualClause

apply, finalizeClause

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

OPERATOR_NOT_EQUAL

protected static final java.lang.String OPERATOR_NOT_EQUAL

See Also:

Constant Field Values

OPERATOR_IS_NOT_NULL

protected static final java.lang.String OPERATOR_IS_NOT_NULL

See Also:

Constant Field Values

singleton

protected static final JRSqlNotEqualClause singleton

Constructor Detail

JRSqlNotEqualClause

public JRSqlNotEqualClause()

Method Detail

instance

public static JRSqlNotEqualClause instance()

Returns the singleton function instance.

Returns:

the singleton function instance

handleEqualOperator

protected void handleEqualOperator(java.lang.StringBuffer sbuffer,
                       java.lang.String param,
                       JRQueryClauseContext queryContext)

Specified by:

handleEqualOperator in class JRSqlAbstractEqualClause

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com


text:
package org.apache.ambari.server.state.scheduler;

import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonSerialize;

import java.util.ArrayList;
import java.util.List;

public class Batch {
  private final List<BatchRequest> batchRequests = new ArrayList<BatchRequest>();
  private BatchSettings batchSettings;

  @JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
  @JsonProperty("batch_requests")
  public List<BatchRequest> getBatchRequests() {
    return batchRequests;
  }

  @JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
  @JsonProperty("batch_settings")
  public BatchSettings getBatchSettings() {
    return batchSettings;
  }

  public void setBatchSettings(BatchSettings batchSettings) {
    this.batchSettings = batchSettings;
  }

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <description>
        This is a PDI plugin step that is able to communicate with the Xero cloud accounting
        service in order to extract data from it and use that data in PDI transforms.
    </description>

    <version>1.0.6-SNAPSHOT</version>
    <groupId>net.bulletin</groupId>
    <artifactId>pdi-xero-reactor</artifactId>
    <packaging>pom</packaging>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <inceptionYear>2015</inceptionYear>

    <organization>
        <name>Bulletin.net (NZ) Limited</name>
        <url>http://www.bulletin.net</url>
    </organization>

    <developers>
        <developer>
            <name>Andrew Lindesay</name>
        </developer>
    </developers>

    <modules>
        <module>pdi-xero-parent</module>
        <module>pdi-xero-step</module>
        <module>pdi-xero-marketplace</module>
    </modules>

</project>


text:
For Sale

<select name="selectedPage" class="pull-right" sytle="color:#333">
    onChange="changePage(this.form.selectedPage)">
        <option value = "" selected> Search Categories</option>
        {% for categories in shop_categories -%}
            <option value = "/search/?q={{categories.name }}">{{ categories.name }}</option>
     {% endfor %}
  </select>

{% if not items %}

No items for sale.

{% endif %}

{% for item in items %}

	{% if loop.first %}

	{% endif %}

	{% if loop.index is divisibleby 4 %}

	{% endif %}

{{item.title|title}}

{{item.category|title}}

{{item.price}}.00

		{% if loop.index is divisibleby 3 or loop.last %}

		{% endif %}
		{% if loop.last %}

		{% endif %}
{% endfor %}

   {{ paginator }}


text:
layout: page
title: "Members"
logo: "img/home-bg.jpg"
description: "Contributors to the project"
header-img: "img/home-bg.jpg"
---

***
[__YOU! Join the team!__](https://github.com/CELavecchia/LMG/blob/master/CONTRIBUTING.md)
*Contributor*
Your description, Your affiliation
[![You](/img/member_avatars/question-mark.jpg){:width="150px"}](Your link here)
[![Email](/img/icons/email_icon.png){:width="25px"}](Email address here)
[![ORCID](img/icons/orcid.png){:width="25px"}](orcid link here)
[![Impactstory](img/icons/impactStory.png){:width="25px"}](impactStory link here)
[![GitHub](img/icons/github-icon.png){:width="25px"}](your github profile link here)
[![Twitter](img/icons/twitter.png){:width="25px"}](your twitter page here)

***
__Carolina E. Lavecchia__
*Founder, lead developer*
Biomedical Engineer, University of Birmingham
[![You](/img/member_avatars/cel_avatar.jpg){:width="150px"}](Your link here)
[![Email](/img/icons/email_icon.png){:width="25px"}](mailto:lavecchia.carolina@gmail.com)
[![ORCID](img/icons/orcid.png){:width="25px"}](https://orcid.org/0000-0002-7755-8710)
[![GitHub](img/icons/github-icon.png){:width="25px"}](https://github.com/CELavecchia)
[![Twitter](img/icons/twitter.png){:width="25px"}](https://twitter.com/CarolinaEleo)

***
[__Dr. Kevin M. Moerman__](https://www.kevinmoerman.org)
*Contributor*
Biomechanical & Design Engineer, MIT Media Lab
[![Kevin Moerman](img/member_avatars/kmm_profile_crop.jpg){:width="150px"}](https://www.kevinmoerman.org)
[![Email](/img/icons/email_icon.png){:width="25px"}](mailto:kmoerman@mit.edu)
[![ORCID](img/icons/orcid.png){:width="25px"}](https://orcid.org/0000-0003-3768-4269)
[![Impactstory](img/icons/impactStory.png){:width="25px"}](https://www.impactstory.org/u/0000-0003-3768-4269)
[![GitHub](img/icons/github-icon.png){:width="25px"}](https://github.com/Kevin-Mattheus-Moerman)
[![Twitter](img/icons/twitter.png){:width="25px"}](https://twitter.com/KMMoerman)

***


text:
require 'spec_helper'

describe Qernel::NodeApi::DemandDrivenNodeApi do
  let(:graph) do
    layout = <<-LAYOUT.strip_heredoc
      useable_heat: network(100) == s(0.25) ==> supply_one
      useable_heat: network      == s(0.75) ==> supply_two
    LAYOUT

    Qernel::GraphParser.new(layout).build
  end

  let(:network)    { graph.nodes.detect { |c| c.key == :network    } }
  let(:supply_one) { graph.nodes.detect { |c| c.key == :supply_one } }
  let(:supply_two) { graph.nodes.detect { |c| c.key == :supply_two } }

  before do
    allow(graph.area).to receive(:number_of_residences).and_return(200)

    supply_one.node_api = described_class.new(supply_one)
    supply_two.node_api = described_class.new(supply_two)

    [supply_one, supply_two].each do |node|
      node.graph = graph

      api = node.node_api
      allow(api).to receive(:nominal_capacity_heat_output_per_unit).and_return(20)
      allow(api).to receive(:demand_of_hot_water).and_return(0)
      allow(api).to receive(:demand_of_steam_hot_water).and_return(0)
      allow(api).to receive(:demand_of_useable_heat).and_return(0)
    end
  end

  # ------------------------------------------------------------------------------------------------

  describe '#number_of_units' do
    describe 'when households_supplied_per_unit is 1' do
      it 'is 50.0 when the node has a 25% share' do
        expect(supply_one.node_api.number_of_units).to be(50.0)
      end

      it 'is 150.0 when the node has a 75% share' do
        expect(supply_two.node_api.number_of_units).to be(150.0)
      end
    end

    describe 'when households_supplied_per_unit is 25' do
      before do
        [supply_one, supply_two].each do |node|
          node.dataset_set(:households_supplied_per_unit, 25)
        end
      end

      it 'should be 2.0 when the node has a 25% share' do
        expect(supply_one.node_api.number_of_units).to be(2.0)
      end

      it 'should be 6.0 when the node has a 75% share' do
        expect(supply_two.node_api.number_of_units).to be(6.0)
      end
    end

    describe 'when source data has a `nil` value' do
      before {  supply_one.node_api.dataset_set(:number_of_units, nil) }

      it 'should ignore the nil and compute the value' do
        expect(supply_one.node_api.number_of_units).not_to be_nil
      end
    end
  end

  # ------------------------------------------------------------------------------------------------

  describe '#full_load_seconds' do
    let(:api) { supply_one.node_api }

    context 'when households_supplied_per_unit is 1' do
      it 'should calculate' do
        allow(api).to receive(:demand_of_useable_heat).and_return(50)
        expect(api.full_load_seconds).to be(0.05)
      end

      it 'should scale with demand' do
        allow(api).to receive(:demand_of_useable_heat).and_return(500)
        expect(api.full_load_seconds).to be(0.5)
      end
    end

    context 'when households_supplied_per_unit is 25' do
      before { supply_one.dataset_set(:households_supplied_per_unit, 25) }

      it 'should calculate' do
        allow(api).to receive(:demand_of_useable_heat).and_return(50)
        expect(api.full_load_seconds).to be(1.25)
      end

      it 'should scale with demand' do
        allow(api).to receive(:demand_of_useable_heat).and_return(500)
        expect(api.full_load_seconds).to be(12.5)
      end
    end
  end

  # ------------------------------------------------------------------------------------------------

  describe '#full_load_hours' do
    let(:api) { supply_one.node_api }

    it 'should be based on full_load_seconds' do
      allow(api).to receive(:demand_of_useable_heat).and_return(50)
      seconds = api.full_load_seconds

      expect(api.full_load_hours).to be(seconds / 3600)
    end

    it 'should scale with demand' do
      allow(api).to receive(:demand_of_useable_heat).and_return(500)
      seconds = api.full_load_seconds

      expect(api.full_load_hours).to be(seconds / 3600)
    end
  end
end


text:
package com.sebworks.vaadstrap;

/**
 * @author seb
 */
enum Threshold {
	XS, SM, MD, LG
}


text:
package org.apache.wicket.request.resource;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

import org.apache.wicket.Application;
import org.apache.wicket.core.util.lang.WicketObjects;
import org.apache.wicket.markup.head.HeaderItem;
import org.apache.wicket.util.io.IClusterable;
import org.apache.wicket.util.lang.Args;
import org.apache.wicket.util.lang.Objects;
import org.danekja.java.util.function.serializable.SerializableSupplier;

/**
 * Reference to a resource. Can be used to reference global resources.
 *

 * Even though resource reference is just a factory for resources, it still needs to be identified
 * by a globally unique identifier, combination of scope and name. Those
 * are used to generate URLs for resource references. locale, style and
 * variation are optional fields to allow having specific references for individual
 * locales, styles and variations.
 *
 * @author Matej Knopp
 * @author Juergen Donnerstag
 */
public abstract class ResourceReference implements IClusterable
{
	private static final long serialVersionUID = 1L;

	private final Key data;

	/**
	 * Creates new {@link ResourceReference} instance.
	 *
	 * @param key
	 *            The data making up the resource reference
	 */
	public ResourceReference(final Key key)
	{
		Args.notNull(key, "key");

		data = key;
	}

	/**
	 * Creates new {@link ResourceReference} instance.
	 *
	 * @param scope
	 *            mandatory parameter
	 * @param name
	 *            mandatory parameter
	 * @param locale
	 *            resource locale
	 * @param style
	 *            resource style
	 * @param variation
	 *            resource variation
	 */
	public ResourceReference(Class<?> scope, String name, Locale locale, String style,
		String variation)
	{
		Args.notNull(scope, "scope");
		Args.notNull(name, "name");

		data = new Key(scope.getName(), name, locale, style, variation);
	}

	/**
	 * Creates new {@link ResourceReference} instance.
	 *
	 * @param scope
	 *            mandatory parameter
	 * @param name
	 *            mandatory parameter
	 */
	public ResourceReference(Class<?> scope, String name)
	{
		this(scope, name, null, null, null);
	}

	/**
	 * Construct.
	 *
	 * @param name
	 *            resource name
	 */
	public ResourceReference(String name)
	{
		this(Application.class, name, null, null, null);
	}

	/**
	 * @return Gets the data making up the resource reference. They'll be use by
	 *         ResourceReferenceRegistry to make up the key under which the resource reference gets
	 *         stored.
	 */
	public final Key getKey()
	{
		return data;
	}

	/**
	 * @return name
	 */
	public String getName()
	{
		return data.getName();
	}

	/**
	 * returns extension of the resource reference
	 *
	 * @return extension of the resource's name in lower-case or null if there is no
	 *         extension
	 */
	public final String getExtension()
	{
		String name = getName();

		final int queryAt = name.indexOf('?');

		// remove query string part
		if (queryAt != -1)
		{
			name = name.substring(0, queryAt);
		}

		// get start of extension
		final int extPos = name.lastIndexOf('.');

		if (extPos == -1)
		{
			return null;
		}

		// return extension
		return name.substring(extPos + 1).toLowerCase(Locale.ROOT);
	}

	/**
	 * @return scope
	 */
	public Class<?> getScope()
	{
		return WicketObjects.resolveClass(data.getScope());
	}

	/**
	 * @return locale
	 */
	public Locale getLocale()
	{
		return data.getLocale();
	}

	/**
	 * @return style
	 */
	public String getStyle()
	{
		return data.getStyle();
	}

	/**
	 * @return variation
	 */
	public String getVariation()
	{
		return data.getVariation();
	}

	/**
	 * Can be used to disable registering certain resource references in
	 * {@link ResourceReferenceRegistry}.
	 *
	 * @return true if this reference can be registered, false otherwise.
	 */
	public boolean canBeRegistered()
	{
		return true;
	}

	/**
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
		{
			return true;
		}
		if (obj instanceof ResourceReference == false)
		{
			return false;
		}
		ResourceReference that = (ResourceReference)obj;
		return Objects.equal(data, that.data);
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode()
	{
		return data.hashCode();
	}

	/**
	 * Returns the resource.
	 *
	 * @return resource instance
	 */
	public abstract IResource getResource();

	/**
	 * Allows to specify which locale, style and variation values will the generated URL for this
	 * resource reference have.
	 *
	 * @return url attributes
	 */
	public UrlAttributes getUrlAttributes()
	{
		return new UrlAttributes(getLocale(), getStyle(), getVariation());
	}

	/**
	 * Factory method to build a resource reference that uses the provided supplier to return
	 * the resource.
	 *
	 * @param name
	 * 				The name to use with the resource
	 * @param resourceSupplier
	 * 				Lambda supplier to build the resource
	 * @return the new resource reference
	 */
	public static final ResourceReference of(String name, SerializableSupplier<IResource> resourceSupplier)
	{
		return new LambdaResourceReference(name, resourceSupplier);
	}

	/**
	 * Factory method to build a resource reference that uses the provided supplier to return
	 * the resource.
	 *
	 * @param key
	 * 				The {@link Key} to use with the resource
	 * @param resourceSupplier
	 * 				Lambda supplier to build the resource
	 * @return  the new resource reference
	 */
	public static final ResourceReference of(Key key, SerializableSupplier<IResource> resourceSupplier)
	{
		return new LambdaResourceReference(key, resourceSupplier);
	}

	public static final class LambdaResourceReference extends ResourceReference
	{
		private static final long serialVersionUID = 1826862147241009289L;

		final SerializableSupplier<IResource> resourceBuilder;

		public LambdaResourceReference(String name, SerializableSupplier<IResource> resourceBuilder)
		{
			super(name);
			this.resourceBuilder = Args.notNull(resourceBuilder, "resourceBuilder");
		}

		public LambdaResourceReference(Key key, SerializableSupplier<IResource> resourceBuilder)
		{
			super(key);
			this.resourceBuilder = Args.notNull(resourceBuilder, "resourceBuilder");
		}

		@Override
		public IResource getResource()
		{
			return resourceBuilder.get();
		}
	}

	/**
	 * @see ResourceReference#getUrlAttributes()
	 *
	 * @author Matej Knopp
	 */
	public static class UrlAttributes
	{
		private final Locale locale;
		private final String style;
		private final String variation;

		/**
		 * Construct.
		 *
		 * @param locale
		 *            resource locale
		 * @param style
		 *            resource style
		 * @param variation
		 *            resource variation
		 */
		public UrlAttributes(Locale locale, String style, String variation)
		{
			this.locale = locale;
			this.style = style;
			this.variation = variation;
		}

		/**
		 * @return locale
		 */
		public Locale getLocale()
		{
			return locale;
		}

		/**
		 * @return style
		 */
		public String getStyle()
		{
			return style;
		}

		/**
		 * @return variation
		 */
		public String getVariation()
		{
			return variation;
		}

		@Override
		public boolean equals(Object obj)
		{
			if (this == obj)
			{
				return true;
			}
			if (obj instanceof UrlAttributes == false)
			{
				return false;
			}
			UrlAttributes that = (UrlAttributes)obj;
			return Objects.equal(getLocale(), that.getLocale()) &&
				Objects.equal(getStyle(), that.getStyle()) &&
				Objects.equal(getVariation(), that.getVariation());
		}

		@Override
		public int hashCode() {
			// Not using `Objects.hash` for performance reasons
			int result = locale != null ? locale.hashCode() : 0;
			result = 31 * result + (style != null ? style.hashCode() : 0);
			result = 31 * result + (variation != null ? variation.hashCode() : 0);
			return result;
		}

		/**
		 * @see java.lang.Object#toString()
		 */
		@Override
		public String toString()
		{
			return "locale: " + locale + "; style: " + style + "; variation: " + variation;
		}
	}

	/**
	 * A (re-usable) data store for all relevant ResourceReference data
	 */
	public static class Key implements Serializable
	{
		private static final long serialVersionUID = 1L;

		private final String scope;
		private final String name;
		private final Locale locale;
		private final String style;
		private final String variation;

		/**
		 * Construct.
		 *
		 * @param reference
		 *            resource reference
		 */
		public Key(final ResourceReference reference)
		{
			this(reference.getScope().getName(), reference.getName(), reference.getLocale(),
				reference.getStyle(), reference.getVariation());
		}

		/**
		 * Construct.
		 *
		 * @param scope
		 *            resource scope
		 * @param name
		 *            resource name
		 * @param locale
		 *            resource locale
		 * @param style
		 *            resource style
		 * @param variation
		 *            resource variation
		 */
		public Key(final String scope, final String name, final Locale locale, final String style,
			final String variation)
		{
			Args.notNull(scope, "scope");
			Args.notNull(name, "name");

			this.scope = scope.intern();
			this.name = name.intern();
			this.locale = locale;
			this.style = style != null ? style.intern() : null;
			this.variation = variation != null ? variation.intern() : null;
		}

		@Override
		public boolean equals(final Object obj)
		{
			if (this == obj)
			{
				return true;
			}
			if (obj instanceof Key == false)
			{
				return false;
			}
			Key that = (Key)obj;
			return Objects.equal(scope, that.scope) && //
				Objects.equal(name, that.name) && //
				Objects.equal(locale, that.locale) && //
				Objects.equal(style, that.style) && //
				Objects.equal(variation, that.variation);
		}

		@Override
		public int hashCode() {
			int result = scope != null ? scope.hashCode() : 0;
			result = 31 * result + (name != null ? name.hashCode() : 0);
			result = 31 * result + (locale != null ? locale.hashCode() : 0);
			result = 31 * result + (style != null ? style.hashCode() : 0);
			result = 31 * result + (variation != null ? variation.hashCode() : 0);
			return result;
		}

		/**
		 * Gets scope.
		 *
		 * @return scope
		 */
		public final String getScope()
		{
			return scope;
		}

		/**
		 * @return Assuming scope ist a fully qualified class name, than get the associated class
		 */
		public final Class<?> getScopeClass()
		{
			return WicketObjects.resolveClass(scope);
		}

		/**
		 * Gets name.
		 *
		 * @return name
		 */
		public final String getName()
		{
			return name;
		}

		/**
		 * Gets locale.
		 *
		 * @return locale
		 */
		public final Locale getLocale()
		{
			return locale;
		}

		/**
		 * Gets style.
		 *
		 * @return style
		 */
		public final String getStyle()
		{
			return style;
		}

		/**
		 * Gets variation.
		 *
		 * @return variation
		 */
		public final String getVariation()
		{
			return variation;
		}

		/**
		 * @see java.lang.Object#toString()
		 */
		@Override
		public String toString()
		{
			return "scope: " + scope + "; name: " + name + "; locale: " + locale + "; style: " +
				style + "; variation: " + variation;
		}
	}

	@Override
	public String toString()
	{
		return data.toString();
	}

	/**
	 * @return the resources this ResourceReference depends on.
	 */
	public List<HeaderItem> getDependencies()
	{
		return new ArrayList<>();
	}
}


text:
//
//  HMEmotionPopView.m
//  Kratos微博
//
//  Created by Kratos on 15/12/2.
//  Copyright (c) 2015年 heima. All rights reserved.
//

#import "HMEmotionPopView.h"
#import "HMEmotionView.h"
#import "HMEmotion.h"

@interface HMEmotionPopView ()
@property (weak, nonatomic) IBOutlet HMEmotionView *emotionView;

@end

@implementation HMEmotionPopView

/**
 *  当一个控件显示之前会调用一次(如果控件在显示之前没有尺寸,不会调用这个方法)
 *
 */
- (void)drawRect:(CGRect)rect
{
    [[UIImage imageWithName:@"emoticon_keyboard_magnifier"]drawInRect:rect];
}

- (void)showFromEmotionView:(HMEmotionView *)fromEmotionView
{

    if (fromEmotionView== nil) return;
    self.emotionView.emotion = fromEmotionView.emotion;

    //2添加到窗口上
    UIWindow * window = [[UIApplication sharedApplication].windows lastObject];
    [window addSubview:self];

    //设置位置
    CGFloat centerX = fromEmotionView.centerX;
    CGFloat centerY = fromEmotionView.centerY - (self.height * 0.5);
    CGPoint center  = CGPointMake(centerX, centerY);
    self.center =  [window convertPoint:center fromView:fromEmotionView.superview];

}

+ (instancetype)popView
{
    return [[[NSBundle mainBundle] loadNibNamed:@"HMEmotionPopView" owner:nil options:nil]lastObject];
}

- (void)dismiss
{
    [self removeFromSuperview];
}

@end


text:
package org.pitest.mutationtest.commandline;

import java.util.HashSet;
import java.util.Set;

import org.pitest.functional.F;
import org.pitest.functional.FCollection;
import org.pitest.functional.predicate.Predicate;
import org.pitest.mutationtest.config.PluginServices;

public class PluginFilter implements Predicate<String>{

  private final Set<String> includedClassPathElement = new HashSet<String>();

  public PluginFilter() {
    FCollection.mapTo(PluginServices.findClientClasspathPlugins(), classToLocation(), includedClassPathElement);
  }

  private static F<Object, String> classToLocation() {
    return new F<Object, String>() {
      public String apply(Object a) {
        return a.getClass().getProtectionDomain().getCodeSource().getLocation().getFile();
      }
    };
  }

  public Boolean apply(String a) {
    return includedClassPathElement.contains(a);
  }

}


text:
VCR.configure do |config|
  config.cassette_library_dir = "fixtures/cassettes"
  config.hook_into :webmock
  config.filter_sensitive_data("LOL_KEY") { ENV.fetch("LOL_API_KEY") }
end


text:
/**
 * @author mr.doob / http://mrdoob.com/
 * @author mikael emtinger / http://gomo.se/
 * @author greggman / http://games.greggman.com/
 */

THREE.Camera = function ( fov, aspect, near, far, target ) {

	THREE.Object3D.call( this );

	this.fov = fov || 50;
	this.aspect = aspect || 1;
	this.near = near || 0.1;
	this.far = far || 2000;

	this.target = target || new THREE.Object3D();
	this.useTarget = true;

	this.matrixWorldInverse = new THREE.Matrix4();
	this.projectionMatrix = null;

	this.updateProjectionMatrix();

};

THREE.Camera.prototype = new THREE.Object3D();
THREE.Camera.prototype.constructor = THREE.Camera;
THREE.Camera.prototype.supr = THREE.Object3D.prototype;

THREE.Camera.prototype.translate = function ( distance, axis ) {

	this.matrix.rotateAxis( axis );

	axis.multiplyScalar( distance )

	this.position.addSelf( axis );
	this.target.position.addSelf( axis );

};

THREE.Camera.prototype.updateProjectionMatrix = function () {

	if ( this.fullWidth ) {

		var aspect = this.fullWidth / this.fullHeight;
		var top = Math.tan( this.fov * Math.PI / 360 ) * this.near;
		var bottom = -top;
		var left = aspect * bottom;
		var right = aspect * top;
		var width = Math.abs( right - left );
		var height = Math.abs( top - bottom );

		this.projectionMatrix = THREE.Matrix4.makeFrustum(
			left + this.x * width / this.fullWidth,
			left + ( this.x + this.width ) * width / this.fullWidth,
			top - ( this.y + this.height ) * height / this.fullHeight,
			top - this.y * height / this.fullHeight,
			this.near,
			this.far );

	} else {

		this.projectionMatrix = THREE.Matrix4.makePerspective( this.fov, this.aspect, this.near, this.far );

	}

};

/**
 * Sets an offset in a larger frustum. This is useful for multi-window or
 * multi-monitor/multi-machine setups.
 *
 * For example, if you have 3x2 monitors and each monitor is 1920x1080 and
 * the monitors are in grid like this
 *
 *   +---+---+---+
 *   | A | B | C |
 *   +---+---+---+
 *   | D | E | F |
 *   +---+---+---+
 *
 * then for monitor each monitor you would call it like this
 *
 *   var w = 1920;
 *   var h = 1080;
 *   var fullWidth = w * 3;
 *   var fullHeight = h * 2;
 *
 *   --A--
 *   camera.setOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );
 *   --B--
 *   camera.setOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );
 *   --C--
 *   camera.setOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );
 *   --D--
 *   camera.setOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );
 *   --E--
 *   camera.setOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );
 *   --F--
 *   camera.setOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );
 *
 *   Note there is no reason monitors have to be the same size or in a grid.
 */

THREE.Camera.prototype.setViewOffset = function( fullWidth, fullHeight, x, y, width, height ) {

	this.fullWidth = fullWidth;
	this.fullHeight = fullHeight;
	this.x = x;
	this.y = y;
	this.width = width;
	this.height = height;

	this.updateProjectionMatrix();

};

THREE.Camera.prototype.update = function ( parentMatrixWorld, forceUpdate, camera ) {

	if ( this.useTarget ) {

		// local

		this.matrix.lookAt( this.position, this.target.position, this.up );
		this.matrix.setPosition( this.position );

		// global

		if( parentMatrixWorld ) {

			this.matrixWorld.multiply( parentMatrixWorld, this.matrix );

		} else {

			this.matrixWorld.copy( this.matrix );

		}

		THREE.Matrix4.makeInvert( this.matrixWorld, this.matrixWorldInverse );

		forceUpdate = true;

	} else {

		this.matrixAutoUpdate && this.updateMatrix();

		if ( forceUpdate || this.matrixWorldNeedsUpdate ) {

			if ( parentMatrixWorld ) {

				this.matrixWorld.multiply( parentMatrixWorld, this.matrix );

			} else {

				this.matrixWorld.copy( this.matrix );

			}

			this.matrixWorldNeedsUpdate = false;
			forceUpdate = true;

			THREE.Matrix4.makeInvert( this.matrixWorld, this.matrixWorldInverse );

		}

	}

	// update children

	for ( var i = 0; i < this.children.length; i ++ ) {

		this.children[ i ].update( this.matrixWorld, forceUpdate, camera );

	}

};


text:
<?php
/**
 * extJs sfGuard layout
 *
 */
class afExtjsSfGuardLayout extends afExtjsViewportLayout
{
	public function start($attributes=array())
	{
		$attributes['toolbar']=false;
		$attributes['north']=false;
		$attributes['west']=false;

		$this->afExtjs->setAddons(array ('css' => array($this->afExtjs->getPluginsDir().'layout-browser/Ext.ux.layout.CenterLayout.css'),'js'=>array($this->afExtjs->getPluginsDir().'layout-browser/Ext.ux.layout.CenterLayout.js')));
		$this->layout='ux.center';

		parent::start($attributes);
	}

	public function addCenterComponent($tools,$attributes=array())
	{
		$bgScript = '';
		if(sfConfig::get("app_avatar_login_screen_bg",false)){
			$bgScript = 'Ext.getBody().setStyle("background-image","url('.sfConfig::get("app_avatar_login_screen_bg").')");	Ext.getBody().setStyle("background-position","top center");';
		}
		$attributes=array('id'=>'center_panel',
					      'title'=>isset($attributes['title'])?$attributes['title']:'Panel',
					      'autoScroll'=>true,
					      'width'=>410,
					      'frame'=>true,
					      'layout'=>'column',
					      'height'=>300,
						  'collapsible'=>false,
				          'style'=>'margin-top:150px;',
						  'listeners'=>'{"render":function(comp){'.$bgScript.'}}',
				          'tools'=>$tools->end());

		if(isset($this->attributes['viewport']['center_panel'])&&count($this->attributes['viewport']['center_panel'])>0)
		$attributes=array_merge($attributes,$this->attributes['viewport']['center_panel']);

		$this->addPanel('center',$attributes);

	}

	public function end()
	{
		parent::end();
	}
}
?>