text:
/*!  \file kfbxshape.h
 */

#ifndef FBXFILESDK_KFBXPLUGINS_KFBXSHAPE_H
#define FBXFILESDK_KFBXPLUGINS_KFBXSHAPE_H

/**************************************************************************************

 Copyright © 2001 - 2008 Autodesk, Inc. and/or its licensors.
 All Rights Reserved.

 The coded instructions, statements, computer programs, and/or related material
 (collectively the "Data") in these files contain unpublished information
 proprietary to Autodesk, Inc. and/or its licensors, which is protected by
 Canada and United States of America federal copyright law and by international
 treaties.

 The Data may not be disclosed or distributed to third parties, in whole or in
 part, without the prior written consent of Autodesk, Inc. ("Autodesk").

 THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
 ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
 WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR ARISING
 BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES OF TITLE,
 NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR USE.
 WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT WARRANT THAT THE OPERATION
 OF THE DATA WILL BE UNINTERRUPTED OR ERROR FREE.

 IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
 OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR EXPENSES
 OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE DAMAGES OR OTHER
 SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS OF PROFITS, REVENUE
 OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR DAMAGES OF ANY KIND),
 HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF LIABILITY, WHETHER DERIVED
 FROM CONTRACT, TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE), OR OTHERWISE,
 ARISING OUT OF OR RELATING TO THE DATA OR ITS USE OR ANY OTHER PERFORMANCE,
 WHETHER OR NOT AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS
 OR DAMAGE.

**************************************************************************************/

#include <fbxfilesdk/components/kbaselib/kaydaradef_h.h>
#include <fbxfilesdk/components/kbaselib/kaydara.h>

#include <fbxfilesdk/kfbxplugins/kfbxgeometrybase.h>

#include <fbxfilesdk/fbxfilesdk_nsbegin.h>

class KFbxSdkManager;

/** A shape describes the deformation on a set of control points.
  * \nosubgrouping
  * Shapes are associated with instances of class KFbxGeometry.
  */
class KFBX_DLL KFbxShape : public KFbxGeometryBase
{
	KFBXOBJECT_DECLARE(KFbxShape,KFbxGeometryBase);

public:

///////////////////////////////////////////////////////////////////////////////
//
//  WARNING!
//
//	Anything beyond these lines may not be documented accurately and is
// 	subject to change without notice.
//
///////////////////////////////////////////////////////////////////////////////

#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
	// Clone
	virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType = eDEEP_CLONE) const;

protected:

	/** Return the type of node attribute which is EAttributeType::eUNIDENTIFIED.
	  * EAttributeType::eUNIDENTIFIED is returned because this class derives
	  * accidentally from KFbxNodeAttribute but its instances are not meant to
	  * be assigned to nodes.
	  */
	virtual EAttributeType GetAttributeType() const;

	KFbxShape(KFbxSdkManager& pManager, char const* pName);
	virtual ~KFbxShape();

	virtual void Destruct(bool pRecursive, bool pDependents);

	//! Assignment operator.
	KFbxShape& operator=(KFbxShape const& pShape);

	friend class KFbxGeometry;

#endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS

};

typedef KFbxShape* HKFbxShape;

#include <fbxfilesdk/fbxfilesdk_nsend.h>

#endif // FBXFILESDK_KFBXPLUGINS_KFBXSHAPE_H


text:
package org.apache.flex.forks.batik.ext.awt;

import java.awt.RenderingHints;

/**
 * TranscodingHint as to what the destination of the drawing is.
 *
 * @author Thomas DeWeese
 * @version $Id: ColorSpaceHintKey.java 475477 2006-11-15 22:44:28Z cam $
 */
public final class ColorSpaceHintKey extends RenderingHints.Key {

    /**
     * Notice to source that we prefer an Alpha RGB Image.
     */
    public static Object VALUE_COLORSPACE_ARGB  = new Object();

    /**
     * Notice to source that we will not use Alpha Channel but
     * we still want RGB data.
     */
    public static Object VALUE_COLORSPACE_RGB   = new Object();

    /**
     * Notice to source that we only want Greyscale data (no Alpha).
     */
    public static Object VALUE_COLORSPACE_GREY  = new Object();

    /**
     * Notice to source that we only want Greyscale data with
     * an alpha channel.
     */
    public static Object VALUE_COLORSPACE_AGREY = new Object();

    /**
     * Notice to source that we only want an alpha channel.
     * The source should simply render alpha (no conversion)
     */
    public static Object VALUE_COLORSPACE_ALPHA = new Object();

    /**
     * Notice to source that we only want an alpha channel.
     * The source should follow the SVG spec for how to
     * convert ARGB, RGB, Grey and AGrey to just an Alpha channel.
     */
    public static Object VALUE_COLORSPACE_ALPHA_CONVERT = new Object();

    public static final String PROPERTY_COLORSPACE =
        "org.apache.flex.forks.batik.gvt.filter.Colorspace";

    /**
     * Note that this is package private.
     */
    ColorSpaceHintKey(int number) { super(number); }

    public boolean isCompatibleValue(Object val) {
        if (val == VALUE_COLORSPACE_ARGB)          return true;
        if (val == VALUE_COLORSPACE_RGB)           return true;
        if (val == VALUE_COLORSPACE_GREY)          return true;
        if (val == VALUE_COLORSPACE_AGREY)         return true;
        if (val == VALUE_COLORSPACE_ALPHA)         return true;
        if (val == VALUE_COLORSPACE_ALPHA_CONVERT) return true;
        return false;
    }
}

redpajama_set_name: RedPajamaGithub


text:
package server

import (
	"reflect"
	"testing"

	"github.com/micro/go-micro/registry"
	"golang.org/x/net/context"
)

type testHandler struct{}

type testRequest struct{}

type testResponse struct{}

func (t *testHandler) Test(ctx context.Context, req *testRequest, rsp *testResponse) error {
	return nil
}

func TestExtractAddress(t *testing.T) {
	data := []struct {
		Input  string
		Output string
	}{
		{"10.0.0.1", "10.0.0.1"},
	}

	for _, d := range data {
		addr, err := extractAddress(d.Input)
		if err != nil {
			t.Errorf("Expected %s: %v", d.Output, err)
		}
		if addr != d.Output {
			t.Errorf("Expected %s, got %s", d.Output, addr)
		}
	}
}

func TestExtractEndpoint(t *testing.T) {
	handler := &testHandler{}
	typ := reflect.TypeOf(handler)

	var endpoints []*registry.Endpoint

	for m := 0; m < typ.NumMethod(); m++ {
		if e := extractEndpoint(typ.Method(m)); e != nil {
			endpoints = append(endpoints, e)
		}
	}

	if i := len(endpoints); i != 1 {
		t.Errorf("Expected 1 endpoint, have %d", i)
	}

	if endpoints[0].Name != "Test" {
		t.Errorf("Expected handler Test, got %s", endpoints[0].Name)
	}

	if endpoints[0].Request == nil {
		t.Error("Expected non nil request")
	}

	if endpoints[0].Response == nil {
		t.Error("Expected non nil request")
	}

	if endpoints[0].Request.Name != "testRequest" {
		t.Errorf("Expected testRequest got %s", endpoints[0].Request.Name)
	}

	if endpoints[0].Response.Name != "testResponse" {
		t.Errorf("Expected testResponse got %s", endpoints[0].Response.Name)
	}

	if endpoints[0].Request.Type != "testRequest" {
		t.Errorf("Expected testRequest type got %s", endpoints[0].Request.Type)
	}

	if endpoints[0].Response.Type != "testResponse" {
		t.Errorf("Expected testResponse type got %s", endpoints[0].Response.Type)
	}

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OpenSMIL.Server.SimpleFeature.GeomtryTypes
{
    public class Point : ISimpleGeometry
    {

        public Point() { }

        public Point(double lon, double lat)
        {
            Lat = lat;
            Lon = lon;
        }

        public GeometryTypes GeometryType
        {
            get
            {
                return GeometryTypes.Point;
            }
        }

        public Point Centroid
        {
            get { return this; }
        }

        public double Lon { get; set; }

        public double Lat { get; set; }

    }
}


text:
#include <rscap_includes.h>
#include <rscap_common.h>

struct rscap_stack * rscap_stack_init(int type)
{
 struct rscap_stack * ret;

 ret = rscap_alloc(sizeof(*ret));
 if ( ret == NULL ) return NULL;
 ret->type = type;
 ret->stack = NULL;
 ret->columns = NULL;
 ret->n_col = 0;
 ret->col_name = NULL;
 return ret;
}

void rscap_stack_add_column(struct rscap_stack * stack)
{
 assert ( stack->stack == NULL );
 if ( stack->n_col == 0 )
 {
  stack->n_col = 2;
  stack->columns = rscap_zalloc(sizeof(struct rscap_stack*) * stack->n_col);
  stack->columns[0] = stack;
  stack->columns[1] = rscap_stack_init(stack->type);
  return;
 }

 stack->n_col ++;
 stack->columns = rscap_realloc(stack->columns, sizeof(struct rscap_stack*) * stack->n_col);
 stack->columns[stack->n_col-1] = rscap_stack_init(stack->type);
}

void rscap_stack_set_column_name(struct rscap_stack * stack, int idx, const char * col_name)
{
 if ( stack == NULL );

 if ( idx == 0 && stack->n_col == 0 )
 {
  stack->n_col = 1;
  stack->columns = rscap_zalloc(sizeof(struct rscap_stack*));
  stack->columns[0] = stack;
 }

 if ( idx >= stack->n_col || idx < 0 )  return;

 if ( stack->columns[idx]->col_name != NULL )
	rscap_free(stack->columns[idx]->col_name);

  stack->columns[idx]->col_name = rscap_strdup(col_name);
}

const char * rscap_stack_get_column_name(struct rscap_stack * stack, int idx)
{
 if ( stack == NULL || idx >= stack->n_col || idx < 0 )  return NULL;
 return stack->columns[idx]->col_name;
}

int rscap_stack_push_index(struct rscap_stack * stack, const char * str, int column)
{
 if ( column >= stack->n_col ) abort();

 return rscap_stack_push(stack->columns[column], str);
}

char * rscap_stack_pop_index(struct rscap_stack * stack, int column)
{
 if ( column >= stack->n_col ) abort();

 return rscap_stack_pop(stack->columns[column]);
}

void rscap_stack_free(struct rscap_stack * stack)
{
 int i;

 if ( stack == NULL ) return;
 if ( stack->col_name != NULL ) rscap_free(stack->col_name);
 while ( stack->stack != NULL )
 {
   struct rscap_stack_content * nxt = stack->stack->next;

   rscap_free(stack->stack->item);
   rscap_free(stack->stack);
   stack->stack = nxt;
 }
 for ( i = 1 ; i < stack->n_col ; i ++ )
	rscap_stack_free(stack->columns[i]);

 if ( stack->columns != NULL ) rscap_free(stack->columns);
 rscap_free(stack);
}

int rscap_stack_push(struct rscap_stack * stack, const char * str)
{
 struct rscap_stack_content * item;

 if ( stack == NULL || str == NULL ) return -1;

 item = rscap_zalloc(sizeof(*item));
 item->item = rscap_strdup(str);
 item->next = stack->stack;
 stack->stack = item;
 return 0;
}

char * rscap_stack_pop(struct rscap_stack * stack)
{
 struct rscap_stack_content * ret;
 char * str;
 if ( stack == NULL ) return NULL;
 if ( stack->stack == NULL ) return NULL;
 ret = stack->stack;
 stack->stack = ret->next;
 str = ret->item;
 rscap_free(ret);
 return str;
}

int rscap_stack_pending(struct rscap_stack * stack)
{
 if ( stack == NULL ) return 0;
 if ( stack->stack == NULL ) return 0;
 if ( stack->stack != NULL ) return 1;
 return 0;
}

struct rscap_stack * rscap_lines2stack(const char * txt)
{
 struct rscap_stack * ret;
 char * tmp = NULL;
 const char  *p, *q;
 size_t tmp_sz = 0;

 if ( txt == NULL ) return NULL;
 ret = rscap_stack_init(0);
 p = txt;
 q = strchr(p, '\n');
 while ( q != NULL )
 {
  size_t len = (size_t)(q - p);

  if ( len >= tmp_sz )
  {
 	tmp_sz = len + 1;
	tmp = rscap_realloc(tmp, tmp_sz);
  }

  memcpy(tmp, p, len);
  tmp[len] = '\0';
  if ( len > 0 && tmp[len-1] == '\r' ) tmp[len-1] = '\0';
  rscap_stack_push(ret, tmp);
  p = q + 1;
  q = strchr(p, '\n');
 }

 if ( tmp != NULL ) rscap_free(tmp);

 if ( p != NULL && strlen(p) > 0 ) rscap_stack_push(ret, p);
 return ret;
}


text:
<snippet id='creating-listpicker-html'/>
<snippet id='creating-listpicker-code'/>


text:
import React from 'react'
import PropTypes from 'prop-types'
import cx from 'classnames'
import { mapToCssModules } from '../../lib/'

const propTypes = {
  tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
  className: PropTypes.string,
  cssModule: PropTypes.object,
}

const defaultProps = {
  tag: 'h6',
}

const CardSubtitle = (props) => {
  const {
    className,
    cssModule,
    tag: Tag,
    ...attributes
  } = props
  const classes = mapToCssModules(cx(
    className,
    'card-subtitle',
  ), cssModule)

  return (
    <Tag {...attributes} className={classes} />
  )
}

CardSubtitle.propTypes = propTypes
CardSubtitle.defaultProps = defaultProps

export default CardSubtitle


text:
class AddLockableToDevise < ActiveRecord::Migration[5.0]
  def change
    add_column :users, :failed_attempts, :integer, default: 0, null: false # Only if lock strategy is :failed_attempts
    add_column :users, :unlock_token, :string # Only if unlock strategy is :email or :both
    add_column :users, :locked_at, :datetime
    add_index :users, :unlock_token, unique: true
  end
end


text:
package org.alien4cloud.tosca.catalog.index;

import alien4cloud.dao.IGenericSearchDAO;
import alien4cloud.dao.model.FacetedSearchResult;
import alien4cloud.exception.NotFoundException;
import alien4cloud.utils.VersionUtil;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.alien4cloud.tosca.model.CSARDependency;
import org.alien4cloud.tosca.model.Csar;
import org.alien4cloud.tosca.model.types.AbstractToscaType;
import org.alien4cloud.tosca.model.types.NodeType;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.sort.FieldSortBuilder;
import org.elasticsearch.search.sort.SortOrder;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Set;

import static alien4cloud.dao.FilterUtil.fromKeyValueCouples;
import static alien4cloud.dao.FilterUtil.singleKeyFilter;

@Slf4j
@Component
@Primary
public class ToscaTypeSearchService extends AbstractToscaIndexSearchService<AbstractToscaType> implements IToscaTypeSearchService {

    @Resource(name = "alien-es-dao")
    private IGenericSearchDAO searchDAO;

    @Value("${components.search.boost.name_query_similitude:100}")
    private Integer nameQuerySimilitudeBoost;

    @Override
    public Csar getArchive(String archiveName, String archiveVersion) {
        return searchDAO.findById(Csar.class, Csar.createId(archiveName, archiveVersion));
    }

    @Override
    public boolean hasTypes(String archiveName, String archiveVersion) {
        return searchDAO.buildQuery(AbstractToscaType.class).setFilters(fromKeyValueCouples("archiveName", archiveName, "archiveVersion", archiveVersion))
                .count() > 0;
    }

    @Override
    public AbstractToscaType[] getArchiveTypes(String archiveName, String archiveVersion) {
        return searchDAO.buildQuery(AbstractToscaType.class).setFilters(fromKeyValueCouples("archiveName", archiveName, "archiveVersion", archiveVersion))
                .prepareSearch().search(0, Integer.MAX_VALUE).getData();
    }

    @Override
    public <T extends AbstractToscaType> T find(Class<T> elementType, String elementId, String version) {
        return searchDAO.buildQuery(elementType).setFilters(fromKeyValueCouples("rawElementId", elementId, "archiveVersion", version)).prepareSearch().find();
    }

    public <T extends AbstractToscaType> T findByIdOrFail(Class<T> elementType, String toscaTypeId) {
        T type = searchDAO.findById(elementType, toscaTypeId);
        if (type == null) {
            throw new NotFoundException(String.format("[%s] [%s] does not exists.", elementType.getSimpleName(), toscaTypeId));
        }
        return type;
    }

    @Override
    public <T extends AbstractToscaType> T findOrFail(Class<T> elementType, String elementId, String version) {
        T type = find(elementType, elementId, version);
        if (type == null) {
            throw new NotFoundException(String.format("[%s] [%s] does not exists with version [%s].", elementType.getSimpleName(), elementId, version));
        }
        return type;
    }

    @Override
    public <T extends AbstractToscaType> T findMostRecent(Class<T> elementType, String elementId) {
        return searchDAO.buildQuery(elementType).setFilters(fromKeyValueCouples("rawElementId", elementId)).prepareSearch()
                .alterSearchRequestBuilder(
                        searchRequestBuilder -> searchRequestBuilder.addSort(new FieldSortBuilder("nestedVersion.majorVersion").order(SortOrder.DESC))
                                .addSort(new FieldSortBuilder("nestedVersion.minorVersion").order(SortOrder.DESC))
                                .addSort(new FieldSortBuilder("nestedVersion.incrementalVersion").order(SortOrder.DESC))
                                .addSort(new FieldSortBuilder("nestedVersion.qualifier").order(SortOrder.DESC).missing("_first")))
                .find();
    }

    @Override
    public <T extends AbstractToscaType> T[] findAll(Class<T> elementType, String elementId) {
        return searchDAO.buildQuery(elementType).setFilters(singleKeyFilter("rawElementId", elementId)).prepareSearch().search(0, Integer.MAX_VALUE).getData();
    }

    /**
     * Build an elasticsearch query to get data tosca elements based on a set of dependencies.
     *
     * @param dependencies The set of dependencies.
     * @param keyValueFilters List of key1, value1, key2, value2 to add term filters to the query for each dependency.
     * @return
     */
    private BoolQueryBuilder getDependencyQuery(Set<CSARDependency> dependencies, String... keyValueFilters) {
        BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
        for (CSARDependency dependency : dependencies) {
            BoolQueryBuilder dependencyQuery = QueryBuilders.boolQuery();
            dependencyQuery.must(QueryBuilders.termQuery("archiveName", dependency.getName()))
                    .must(QueryBuilders.termQuery("archiveVersion", dependency.getVersion()));
            if (keyValueFilters != null) {
                for (int i = 0; i < keyValueFilters.length; i += 2) {
                    dependencyQuery.must(QueryBuilders.termQuery(keyValueFilters[i], keyValueFilters[i + 1]));
                }
            }
            boolQueryBuilder.should(dependencyQuery);
        }
        return boolQueryBuilder;
    }

    @Override
    public boolean isElementExistInDependencies(@NonNull Class<? extends AbstractToscaType> elementClass, @NonNull String elementId,
            Set<CSARDependency> dependencies) {
        if (dependencies == null || dependencies.isEmpty()) {
            return false;
        }
        return searchDAO.count(elementClass, getDependencyQuery(dependencies, "rawElementId", elementId)) > 0;
    }

    private <T extends AbstractToscaType> T getLatestVersionOfElement(Class<T> elementClass, QueryBuilder queryBuilder) {
        List<T> elements = searchDAO.customFindAll(elementClass, queryBuilder);
        if (elements != null && !elements.isEmpty()) {
            Collections.sort(elements,
                    (left, right) -> VersionUtil.parseVersion(left.getArchiveVersion()).compareTo(VersionUtil.parseVersion(right.getArchiveVersion())));
            return elements.get(elements.size() - 1);
        } else {
            return null;
        }
    }

    @Override
    public <T extends AbstractToscaType> T getElementInDependencies(Class<T> elementClass, Set<CSARDependency> dependencies, String... keyValues) {
        if (dependencies == null || dependencies.isEmpty()) {
            return null;
        }
        BoolQueryBuilder boolQueryBuilder = getDependencyQuery(dependencies, keyValues);
        return getLatestVersionOfElement(elementClass, boolQueryBuilder);
    }

    @Override
    public <T extends AbstractToscaType> T getElementInDependencies(Class<T> elementClass, String elementId, Set<CSARDependency> dependencies) {
        if (dependencies == null || dependencies.isEmpty()) {
            return null;
        }
        BoolQueryBuilder boolQueryBuilder = getDependencyQuery(dependencies, "rawElementId", elementId);
        return getLatestVersionOfElement(elementClass, boolQueryBuilder);
    }

    @Override
    public <T extends AbstractToscaType> T getRequiredElementInDependencies(Class<T> elementClass, String elementId, Set<CSARDependency> dependencies)
            throws NotFoundException {
        T element = getElementInDependencies(elementClass, elementId, dependencies);
        if (element == null) {
            throw new NotFoundException(
                    "Element elementId: [" + elementId + "] of type [" + elementClass.getSimpleName() + "] cannot be found in dependencies " + dependencies);
        }
        return element;
    }

    // we need to override for aspect purpose
    @Override
    public FacetedSearchResult search(Class<? extends AbstractToscaType> clazz, String query, Integer size, Map<String, String[]> filters) {
        FacetedSearchResult result = super.search(clazz, query, size, filters);
        reorderIfNodeType(clazz, query, result);
        return result;
    }

    private void reorderIfNodeType(Class<? extends AbstractToscaType> clazz, String query, FacetedSearchResult result) {
        if (NodeType.class.isAssignableFrom(clazz)) {
            Arrays.sort(result.getData(), Comparator.comparingLong(value -> {
                NodeType nodeType = (NodeType)value;
                String normalizedElementId = nodeType.getElementId().toLowerCase();
                String simplifiedNodeType = normalizedElementId.substring(normalizedElementId.lastIndexOf('.') + 1);
                if (query != null && simplifiedNodeType.equals(query.toLowerCase())) {
                    return nameQuerySimilitudeBoost * 2 * nodeType.getAlienScore();
                } else if (query != null && normalizedElementId.contains(query.toLowerCase())) {
                    return nameQuerySimilitudeBoost * nodeType.getAlienScore();
                } else {
                    return nodeType.getAlienScore();
                }
            }).reversed());
        }
    }

    @Override
    protected AbstractToscaType[] getArray(int size) {
        return new AbstractToscaType[size];
    }

    @Override
    protected String getAggregationField() {
        return "rawElementId";
    }
}


text:
<!doctype html>

        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

        <title>Plantilla con control de audio</title>

        <link rel="stylesheet" href="../../../components/reveal.js/css/reveal.css">

        <link rel="stylesheet" href="assets/css/plantilla_02.css">

            <audio id="entrevista" controls="controls">
              <source src="assets/audios/prestamista-bronx.mp3" type="audio/mpeg">
            </audio>

Plantilla con
cambio de slide automático

"I went over there
 to provide those people
 with basic human freedoms."

                    Comenzar

I know that many people have strong opinions about America's involvement in Iraq and Afghanistan. But as we meet the individuals behind the uniforms, and seek to understand their stories, I'm hoping we can momentarily put those politics aside. This is a great group of people who served and sacrificed at the request of their country. And I'm very thankful that they've volunteered to share their stories.

My father was a platoon sergeant in the Pennsylvania National Guard. But nobody ever thought I'd join the military. I was too sensitive. I was into painting and illustration and theater. Plus I was a total goofball. I barely finished high school. I didn't have any direction.

"I was an art student. I loved the human body. I always thought it was so beautiful."


text:
namespace gfx {
class Size;
}  // namespace gfx

namespace media {
class VideoFrame;
}  // namespace media

namespace tracked_objects {
class Location;
}  // namespace tracked_objects

namespace content {
class GpuChannelHost;

// This class is the renderer-side host for the VideoEncodeAccelerator in the
// GPU process, coordinated over IPC.
class GpuVideoEncodeAcceleratorHost
    : public IPC::Listener,
      public media::VideoEncodeAccelerator,
      public CommandBufferProxyImpl::DeletionObserver,
      public base::NonThreadSafe {
 public:
  // |this| is guaranteed not to outlive |channel| and |impl|.  (See comments
  // for |channel_| and |impl_|.)
  GpuVideoEncodeAcceleratorHost(GpuChannelHost* channel,
                                CommandBufferProxyImpl* impl);

  // IPC::Listener implementation.
  bool OnMessageReceived(const IPC::Message& message) override;
  void OnChannelError() override;

  // media::VideoEncodeAccelerator implementation.
  SupportedProfiles GetSupportedProfiles() override;
  bool Initialize(media::VideoPixelFormat input_format,
                  const gfx::Size& input_visible_size,
                  media::VideoCodecProfile output_profile,
                  uint32 initial_bitrate,
                  Client* client) override;
  void Encode(const scoped_refptr<media::VideoFrame>& frame,
              bool force_keyframe) override;
  void UseOutputBitstreamBuffer(const media::BitstreamBuffer& buffer) override;
  void RequestEncodingParametersChange(uint32 bitrate,
                                       uint32 framerate_num) override;
  void Destroy() override;

  // CommandBufferProxyImpl::DeletionObserver implementation.
  void OnWillDeleteImpl() override;

 private:
  // Only Destroy() should be deleting |this|.
  ~GpuVideoEncodeAcceleratorHost() override;

  // Notify |client_| of an error.  Posts a task to avoid re-entrancy.
  void PostNotifyError(const tracked_objects::Location& location,
                       Error error, const std::string& message);

  void Send(IPC::Message* message);

  // IPC handlers, proxying media::VideoEncodeAccelerator::Client for the GPU
  // process.  Should not be called directly.
  void OnRequireBitstreamBuffers(uint32 input_count,
                                 const gfx::Size& input_coded_size,
                                 uint32 output_buffer_size);
  void OnNotifyInputDone(int32 frame_id);
  void OnBitstreamBufferReady(int32 bitstream_buffer_id,
                              uint32 payload_size,
                              bool key_frame);
  void OnNotifyError(Error error);

  // Unowned reference to the GpuChannelHost to send IPC messages to the GPU
  // process.  |channel_| outlives |impl_|, so the reference is always valid as
  // long as it is not NULL.
  GpuChannelHost* channel_;

  // Route ID for the associated encoder in the GPU process.
  int32 encoder_route_id_;

  // The client that will receive callbacks from the encoder.
  Client* client_;

  // Unowned reference to the CommandBufferProxyImpl that created us.  |this|
  // registers as a DeletionObserver of |impl_|, so the reference is always
  // valid as long as it is not NULL.
  CommandBufferProxyImpl* impl_;

  // media::VideoFrames sent to the encoder.
  // base::IDMap not used here, since that takes pointers, not scoped_refptr.
  typedef base::hash_map<int32, scoped_refptr<media::VideoFrame> > FrameMap;
  FrameMap frame_map_;

  // ID serial number for the next frame to send to the GPU process.
  int32 next_frame_id_;

  // WeakPtr factory for posting tasks back to itself.
  base::WeakPtrFactory<GpuVideoEncodeAcceleratorHost> weak_this_factory_;

  DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAcceleratorHost);
};

}  // namespace content

#endif  // CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_


text:
<?php

namespace FileD\UserBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use FOS\UserBundle\Entity\User as BaseUser;

/**
 * FileD\FileBundle\Entity\User
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="FileD\UserBundle\Entity\UserRepository")
 * @author epidoux <eric.pidoux@gmail.com>
 * @version 1.0
 */
class User extends BaseUser {
	/**
	 * @var integer $id
	 *
	 * @ORM\Column(name="id", type="integer")
	 * @ORM\Id
	 * @ORM\GeneratedValue(strategy="AUTO")
	 */
	protected $id;

	/**
	 * List of added files
	 * @ORM\OneToMany(targetEntity="FileD\FileBundle\Entity\File", mappedBy="author", fetch="LAZY")
	 * @ORM\OrderBy({"mime" = "ASC", "name" = "ASC"})
	 */
	protected $addedFiles;

	/**
	 * List of files available
	 * @ORM\ManyToMany(targetEntity="FileD\FileBundle\Entity\File", cascade={"persist"}, inversedBy="usersShare", fetch="LAZY")
     * @ORM\JoinTable(name="users_files_shared")
	 * @ORM\OrderBy({"mime" = "ASC", "name" = "ASC"})
	 */
	protected $files;

	/**
	 * List of files seen/marked as seen
	 * @ORM\ManyToMany(targetEntity="FileD\FileBundle\Entity\File", inversedBy="usersSeen", fetch="LAZY")
     * @ORM\JoinTable(name="users_files_seen")
	 * @ORM\OrderBy({"mime" = "ASC", "name" = "ASC"})
	 */
	protected $seenFiles;

	public function __construct() {
		parent::__construct();
		$this->seenFiles = new \Doctrine\Common\Collections\ArrayCollection();
		$this->files = new \Doctrine\Common\Collections\ArrayCollection();
		$this->addedFiles = new \Doctrine\Common\Collections\ArrayCollection();
		$this->downloadedFiles = new \Doctrine\Common\Collections\ArrayCollection();
	}

	/**
	 * Get id
	 *
	 * @return integer
	 */
	public function getId() {
		return $this->id;
	}

	/**
	 * @return the unknown_type
	 */
	public function getAddedFiles() {
		return $this->addedFiles;
	}

	/**
	 * @param unknown_type $addedFiles
	 */
	public function setAddedFiles($addedFiles) {
		$this->addedFiles = $addedFiles;
	}

	/**
	 * Add Files to addedFiles
	 * @param array of File $files
	 */
	public function addAddedFiles($files){
		foreach($files as $file){
			$this->addedFiles->add($file);
		}
	}

	/**
	 * Remove Files to addedFiles
	 * @param array of File $files
	 */
	public function removeAddedFiles($files){
		foreach($files as $file){
			$this->addedFiles->removeElement($file);
		}
	}

	/**
	 * @return the unknown_type
	 */
	public function getFiles() {
		return $this->files;
	}

	/**
	 * @param unknown_type $files
	 */
	public function setFiles($files) {
		$this->files = $files;
	}

	/**
	 * Add Files to files
	 * @param array of File $files
	 */
	public function addFiles($files){
		foreach($files as $file){
			$this->files->add($file);
		}
	}

	/**
	 * Remove Files to Files
	 * @param array of File $files
	 */
	public function removeFiles($files){
		foreach($files as $file){
			$this->files->removeElement($file);
		}
	}

	/**
	 * @return the unknown_type
	 */
	public function getSeenFiles() {
		return $this->seenFiles;
	}

	/**
	 * @param unknown_type $seenFiles
	 */
	public function setSeenFiles($seenFiles) {
		$this->seenFiles = $seenFiles;
	}

	/**
	 * Add Files to seenFiles
	 * @param array of File $files
	 */
	public function addSeenFiles($files){
		foreach($files as $file){
			$this->seenFiles->add($file);
		}
	}

	/**
	 * Remove Files to seenFiles
	 * @param array of File $files
	 */
	public function removeSeenFiles($files){
		foreach($files as $file){
			$this->seenFiles->removeElement($file);
		}
	}

	/**
	 * Define if the user given is the same as the current
	 * @param User the user to match
	 * @return true or false
	 */
	public function equals($user)
	{
		return $user->getId() == $this->id;
	}

	/**
	 * String representation of the entity
	 * @return string the representation
	 */
	public function __toString(){
		return "User ( id=".$this->id." , username=".$this->username." )";
	}

}


text:
package student_system.entity.helper;

public enum ContentType {
    PDF("pdf"),
    ZIP("zip"),
    RAR("rar");

    private String name;

    ContentType(String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }

}