text:
using IntelliTect.Coalesce.Api.DataSources;
using IntelliTect.Coalesce.TypeDefinition;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Options;
using Microsoft.AspNetCore.Mvc;
using IntelliTect.Coalesce.Api.Behaviors;
using IntelliTect.Coalesce.Api.Controllers;
using Microsoft.AspNetCore.Mvc.ApiExplorer;

namespace IntelliTect.Coalesce
{
    public static class CoalesceServiceCollectionExtensions
    {
        public static IServiceCollection AddCoalesce(this IServiceCollection services, Action<CoalesceServiceBuilder> builder)
        {
            if (services == null) throw new ArgumentNullException(nameof(services));
            if (builder == null) throw new ArgumentNullException(nameof(builder));

#if NETCOREAPP
            services.AddOptions<CoalesceOptions>().Configure<IWebHostEnvironment>((opts, hosting) =>
            {
                opts.DetailedExceptionMessages =
                    Microsoft.Extensions.Hosting.HostEnvironmentEnvExtensions.IsDevelopment(hosting);
            });
#else
            services.AddOptions<CoalesceOptions>().Configure<IHostingEnvironment>((opts, hosting) =>
            {
                opts.DetailedExceptionMessages = hosting.IsDevelopment();
            });
#endif

            builder(new CoalesceServiceBuilder(services));

            // Needed for CrudContext to access the current user.
            services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
            services.TryAddSingleton(_ => ReflectionRepository.Global);

            services.AddTransient<IConfigureOptions<MvcOptions>, ConfigureMvc>();

            services.TryAddScoped<IApiActionFilter, ApiActionFilter>();

            void AddFactoryDefaultTypes(IDictionary<Type, Type> types)
            {
                foreach (var type in types) services.TryAddScoped(type.Key, type.Value);
            }

            services.TryAddScoped<IDataSourceFactory, DataSourceFactory>();
            AddFactoryDefaultTypes(DataSourceFactory.DefaultTypes);

            services.TryAddScoped<IBehaviorsFactory, BehaviorsFactory>();
            AddFactoryDefaultTypes(BehaviorsFactory.DefaultTypes);

            services.TryAddScoped<IBehaviorsFactory, BehaviorsFactory>();
            services.TryAddScoped<ITimeZoneResolver>(_ => new StaticTimeZoneResolver(TimeZoneInfo.Local));

            services.TryAddScoped(sp => new CrudContext(
                 () => sp.GetRequiredService<Microsoft.AspNetCore.Http.IHttpContextAccessor>().HttpContext?.User,
                 sp.GetService<ITimeZoneResolver>()?.GetTimeZoneInfo() ?? TimeZoneInfo.Local,
                 sp.GetRequiredService<Microsoft.AspNetCore.Http.IHttpContextAccessor>().HttpContext?.RequestAborted ?? default
             ));

            // Workaround for https://github.com/dotnet/aspnetcore/issues/43815
            services.TryAddEnumerable(
                ServiceDescriptor.Transient<IApiDescriptionProvider, FromFormNameFixingApiDescriptionProvider>());

            return services;
        }

        public static IServiceCollection AddCoalesce<TContext>(this IServiceCollection services)
            where TContext : DbContext
        {
            if (services == null) throw new ArgumentNullException(nameof(services));

            services.AddCoalesce(builder => builder.AddContext<TContext>());

            return services;
        }

        private class ConfigureMvc : IConfigureOptions<MvcOptions>
        {
            public void Configure(MvcOptions options)
            {
                options.ModelBinderProviders.Insert(0, new DataSourceModelBinderProvider());
                options.ModelBinderProviders.Insert(0, new BehaviorsModelBinderProvider());
            }
        }

        /// <summary>
        /// Workaround for https://github.com/dotnet/aspnetcore/issues/43815
        /// </summary>
        private class FromFormNameFixingApiDescriptionProvider : IApiDescriptionProvider
        {
            public int Order => -999; // one after DefaultApiDescriptionProvider

            public void OnProvidersExecuting(ApiDescriptionProviderContext context)
            {
                foreach (var result in context.Results)
                {
                    foreach (var parameter in result.ParameterDescriptions)
                    {
                        if (
                            parameter.Source == Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource.Form &&
                            parameter.ParameterDescriptor.BindingInfo?.BinderModelName is string prefix &&
                            parameter.ModelMetadata.ContainerType is not null &&
                            !parameter.Name.StartsWith(prefix + ".", StringComparison.InvariantCultureIgnoreCase)
                        )
                        {
                            parameter.Name = prefix + "." + parameter.Name;
                        }
                    }
                }
            }

            public void OnProvidersExecuted(ApiDescriptionProviderContext context)
            {
            }
        }
    }
}


text:
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <gst/check/gstcheck.h>

static void
handoff_cb (GstElement * fakesink, GstBuffer * buf, GstPad * pad,
    GstBuffer ** p_outbuf)
{
  GST_LOG ("handoff, buf = %p", buf);
  if (*p_outbuf == NULL)
    *p_outbuf = gst_buffer_ref (buf);
}

GST_START_TEST (test_first_buffer_has_offset)
{
  GstStateChangeReturn ret;
  GstElement *pipe, *src, *sink;
  GstBuffer *buf = NULL;
  gchar **cookies;

  pipe = gst_pipeline_new (NULL);

  src = gst_element_factory_make ("neonhttpsrc", NULL);
  fail_unless (src != NULL);

  sink = gst_element_factory_make ("fakesink", NULL);
  fail_unless (sink != NULL);

  gst_bin_add (GST_BIN (pipe), src);
  gst_bin_add (GST_BIN (pipe), sink);
  fail_unless (gst_element_link (src, sink));

  g_object_set (src, "location", "http://gstreamer.freedesktop.org/", NULL);
  g_object_set (src, "automatic-redirect", TRUE, NULL);

  /* set some cookies (shouldn't hurt) */
  cookies = g_strsplit ("foo=1234,bar=9871615348162523726337x99FB", ",", -1);
  g_object_set (src, "cookies", cookies, NULL);
  g_strfreev (cookies);

  g_object_set (sink, "signal-handoffs", TRUE, NULL);
  g_signal_connect (sink, "preroll-handoff", G_CALLBACK (handoff_cb), &buf);

  ret = gst_element_set_state (pipe, GST_STATE_PAUSED);
  if (ret != GST_STATE_CHANGE_ASYNC) {
    GST_DEBUG ("failed to start up neon http src, ret = %d", ret);
    goto done;
  }

  /* don't wait for more than 10 seconds */
  ret = gst_element_get_state (pipe, NULL, NULL, 10 * GST_SECOND);
  GST_LOG ("ret = %u", ret);

  if (buf == NULL) {
    /* we want to test the buffer offset, nothing else; if there's a failure
     * it might be for lots of reasons (no network connection, whatever), we're
     * not interested in those */
    GST_DEBUG ("didn't manage to get data within 10 seconds, skipping test");
    goto done;
  }

  GST_DEBUG ("buffer offset = %" G_GUINT64_FORMAT, GST_BUFFER_OFFSET (buf));

  /* first buffer should have a 0 offset */
  fail_unless (GST_BUFFER_OFFSET (buf) == 0);
  gst_buffer_unref (buf);

done:

  gst_element_set_state (pipe, GST_STATE_NULL);
  gst_object_unref (pipe);
}

GST_END_TEST;

GST_START_TEST (test_icy_stream)
{
  GstElement *pipe, *src, *sink;
  GstMessage *msg;

  pipe = gst_pipeline_new (NULL);

  src = gst_element_factory_make ("neonhttpsrc", NULL);
  fail_unless (src != NULL);

  sink = gst_element_factory_make ("fakesink", NULL);
  fail_unless (sink != NULL);

  gst_bin_add (GST_BIN (pipe), src);
  gst_bin_add (GST_BIN (pipe), sink);
  fail_unless (gst_element_link (src, sink));

  /* First try Virgin Radio Ogg stream, to see if there's connectivity and all
   * (which is an attempt to work around the completely horrid error reporting
   * and that we can't distinguish different types of failures here).
   * Note that neonhttpsrc does the whole connect + session initiation all in
   * the state change function. */

  g_object_set (src, "location", "http://ogg2.smgradio.com/vr32.ogg", NULL);
  g_object_set (src, "automatic-redirect", FALSE, NULL);
  g_object_set (src, "num-buffers", 1, NULL);
  gst_element_set_state (pipe, GST_STATE_PLAYING);

  msg = gst_bus_poll (GST_ELEMENT_BUS (pipe),
      GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1);
  if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
    GST_INFO ("looks like there's no net connectivity or sgmradio.com is "
        "down. In any case, let's just skip this test");
    gst_message_unref (msg);
    goto done;
  }
  gst_message_unref (msg);
  msg = NULL;
  gst_element_set_state (pipe, GST_STATE_NULL);

  /* Now, if the ogg stream works, the mp3 shoutcast stream should work as
   * well (time will tell if that's true) */

  /* Virgin Radio 32kbps mp3 shoutcast stream */
  g_object_set (src, "location", "http://mp3-vr-32.smgradio.com:80/", NULL);
  g_object_set (src, "automatic-redirect", FALSE, NULL);

  /* g_object_set (src, "neon-http-debug", TRUE, NULL); */

  /* EOS after the first buffer */
  g_object_set (src, "num-buffers", 1, NULL);

  gst_element_set_state (pipe, GST_STATE_PLAYING);
  msg = gst_bus_poll (GST_ELEMENT_BUS (pipe),
      GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1);

  if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_EOS) {
    GST_DEBUG ("success, we're done here");
    gst_message_unref (msg);
    goto done;
  }

  {
    GError *err = NULL;

    gst_message_parse_error (msg, &err, NULL);
    gst_message_unref (msg);
    g_error ("Error with ICY mp3 shoutcast stream: %s", err->message);
    g_error_free (err);
  }

done:

  gst_element_set_state (pipe, GST_STATE_NULL);
  gst_object_unref (pipe);
}

GST_END_TEST;

static Suite *
neonhttpsrc_suite (void)
{
  Suite *s = suite_create ("neonhttpsrc");
  TCase *tc_chain = tcase_create ("general");

  suite_add_tcase (s, tc_chain);
  tcase_set_timeout (tc_chain, 5);
  tcase_add_test (tc_chain, test_first_buffer_has_offset);
  tcase_add_test (tc_chain, test_icy_stream);

  return s;
}

GST_CHECK_MAIN (neonhttpsrc);

redpajama_set_name: RedPajamaGithub


text:
    Är talet $x$ udda eller jämnt?

Input

    Indatan består av ett tal, $x$. Talet $x$ ligger mellan $1$ och $1\,000\,000$.

Output

    Du ska skriva ut udda om $x$ är udda, och jämnt om $x$ är jämnt.


text:
namespace Swarm {
    namespace VHE {
        namespace Environment {

            std::set<MemoryInternal*> _static_registered_memory;

            void Memory::cleanup() {
                for(MemoryInternal* mem : _static_registered_memory)
                    delete mem;
                _static_registered_memory.clear();
            }

            Memory::Memory(size_t mem_size, MemoryPrefix prefix) {
                _memory = new MemoryInternal(mem_size, prefix);
                _static_registered_memory.insert(_memory);
            }

            vbyte* Memory::allocMemChunk(size_t size, size_t *begin, size_t *end) {

                // Start with the smallest and iterate bigger
                MemoryInternal::FreeSet::iterator it = _memory->_free_set.begin();
                while(it != _memory->_free_set.end()) {
                    MemoryInternal::FreeSector* sect = (*it);

                    // Select the first free region that can fit the requested size
                    if((sect->end - sect->begin) >= size) {

                        // Save/output the begin/end indices
                        vbyte* resultByte = &_memory->_data[sect->begin];
                        if(begin != nullptr) *begin = sect->begin;
                        if(end != nullptr)   *end   = sect->begin+size-1;

                        // Change free region begin index to match up to remaining size
                        size_t newBegin = sect->begin+size;
                        if(newBegin < sect->end) { // Redirect references of the prev/next to the new section
                            MemoryInternal::FreeSector* newSect = new MemoryInternal::FreeSector(newBegin, sect->end, sect->prev, sect->next);
                            if(sect->prev != nullptr) sect->prev->next = newSect;
                            if(sect->next != nullptr) sect->next->prev = newSect;
                            if(_memory->_free_start == sect) _memory->_free_start = newSect;
                            if(_memory->_free_end == sect) _memory->_free_end = newSect;
                            _memory->_free_set.insert(newSect);
                        } else { // Close the reference gap between the prev/next of this removed section
                            if(sect->prev != nullptr) sect->prev->next = sect->next;
                            if(sect->next != nullptr) sect->next->prev = sect->prev;
                            if(_memory->_free_start == sect) _memory->_free_start = sect->next;
                            if(_memory->_free_end == sect) _memory->_free_end = sect->prev;
                        }

                        _memory->_free_set.erase(it);
                        delete sect;

                        // Return a pointer to the beginning of the allocated region
                        return resultByte;
                    }
                    it++;
                }

                throw Exception::EnvironmentException::MemoryOutOfSpace(size);
            }

            void Memory::freeMemChunk(size_t begin, size_t end) {

                // Swap indices if they are out of order
                if(begin > end) {
                    size_t t = end;
                    end = begin;
                    begin = t;
                }

                // Range Check
                if(begin < 0 || end >= _memory->_size_in_bytes)
                    throw Exception::EnvironmentException::MemoryFreeOutOfRange(begin, end, _memory->_size_in_bytes);

                if(_memory->_free_start == nullptr) {
                    // No existing free space, make a hole
                    _memory->_free_start = _memory->_free_end = new MemoryInternal::FreeSector( begin, end, nullptr, nullptr );
                    _memory->_free_set.insert(_memory->_free_start);
                } else {

                    // Cache variables
                    MemoryInternal::FreeSector* prev = nullptr;
                    MemoryInternal::FreeSector* next = nullptr;
                    bool lookingForBegin = true;

                    // Start iteration through in physical location order
                    MemoryInternal::FreeSector* it = _memory->_free_start;
                    while(it != nullptr) {
                        if(lookingForBegin) {

                            // Look for a section after or encompassing the begin index
                            if (begin <= it->begin) {
                                prev = it->prev;
                                lookingForBegin = false;
                                continue;
                            } else if (begin <= it->end) {
                                begin = it->begin;
                                prev = it->prev;
                            } else {
                                it = it->next;
                                continue;
                            }
                            lookingForBegin = false;
                        } else {

                            // Look for a section after or encompassing the end index
                            if (end < it->begin) {
                                next = it;
                                break;
                            } else if(end <= it->end) {
                                next = it->next;
                                end = it->end;
                                _memory->removeFromFreeSet(it);
                                break;
                            }
                        }

                        MemoryInternal::FreeSector* n = it->next;
                        // Remove section from the free set (note: does not update references)
                        _memory->removeFromFreeSet(it);
                        it = n;
                    }

                    MemoryInternal::FreeSector* newSect = new MemoryInternal::FreeSector( begin, end, prev, next );

                    // Update boundary references
                    if(prev == nullptr) _memory->_free_start = newSect;
                    else prev->next = newSect;
                    if(next == nullptr) _memory->_free_end = newSect;
                    else next->prev = newSect;

                    _memory->_free_set.insert(newSect);
                }
            }

            size_t Memory::sizeInBytes() const { return _memory->_size_in_bytes; }

            std::string Memory::printFreeSectionsChronological() const {
                if(_memory->_free_start == nullptr) {
                    return "No Free Sections";
                } else {
                    MemoryInternal::FreeSector* it = _memory->_free_start;
                    std::string result("");
                    while (it != nullptr) {
                        result += "[" + std::to_string(it->begin) + ":" + std::to_string(it->end) + "|" + std::to_string(it->end - it->begin) + "]-";
                        it = it->next;
                    }
                    return result;
                }
            }

            std::string Memory::printFreeSectionsOrdered() const {
                if(_memory->_free_start == nullptr) {
                    return "No Free Sections";
                } else {
                    MemoryInternal::FreeSet::iterator it = _memory->_free_set.begin();
                    std::string result("");
                    while(it != _memory->_free_set.end()) {
                        MemoryInternal::FreeSector* sect = *it;
                        result += "[" + std::to_string(sect->begin) + ":" + std::to_string(sect->end) + "|" + std::to_string(sect->end - sect->begin) + "]-";
                        it++;
                    }
                    return result;
                }
            }

        }
    }
}


text:
package v1

import (
	api "github.com/openshift/origin/pkg/deploy/api"
	v1 "github.com/openshift/origin/pkg/deploy/api/v1"
	"k8s.io/kubernetes/pkg/api/errors"
	"k8s.io/kubernetes/pkg/client/cache"
	"k8s.io/kubernetes/pkg/labels"
)

// DeploymentConfigLister helps list DeploymentConfigs.
type DeploymentConfigLister interface {
	// List lists all DeploymentConfigs in the indexer.
	List(selector labels.Selector) (ret []*v1.DeploymentConfig, err error)
	// DeploymentConfigs returns an object that can list and get DeploymentConfigs.
	DeploymentConfigs(namespace string) DeploymentConfigNamespaceLister
	DeploymentConfigListerExpansion
}

// deploymentConfigLister implements the DeploymentConfigLister interface.
type deploymentConfigLister struct {
	indexer cache.Indexer
}

// NewDeploymentConfigLister returns a new DeploymentConfigLister.
func NewDeploymentConfigLister(indexer cache.Indexer) DeploymentConfigLister {
	return &deploymentConfigLister{indexer: indexer}
}

// List lists all DeploymentConfigs in the indexer.
func (s *deploymentConfigLister) List(selector labels.Selector) (ret []*v1.DeploymentConfig, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1.DeploymentConfig))
	})
	return ret, err
}

// DeploymentConfigs returns an object that can list and get DeploymentConfigs.
func (s *deploymentConfigLister) DeploymentConfigs(namespace string) DeploymentConfigNamespaceLister {
	return deploymentConfigNamespaceLister{indexer: s.indexer, namespace: namespace}
}

// DeploymentConfigNamespaceLister helps list and get DeploymentConfigs.
type DeploymentConfigNamespaceLister interface {
	// List lists all DeploymentConfigs in the indexer for a given namespace.
	List(selector labels.Selector) (ret []*v1.DeploymentConfig, err error)
	// Get retrieves the DeploymentConfig from the indexer for a given namespace and name.
	Get(name string) (*v1.DeploymentConfig, error)
	DeploymentConfigNamespaceListerExpansion
}

// deploymentConfigNamespaceLister implements the DeploymentConfigNamespaceLister
// interface.
type deploymentConfigNamespaceLister struct {
	indexer   cache.Indexer
	namespace string
}

// List lists all DeploymentConfigs in the indexer for a given namespace.
func (s deploymentConfigNamespaceLister) List(selector labels.Selector) (ret []*v1.DeploymentConfig, err error) {
	err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
		ret = append(ret, m.(*v1.DeploymentConfig))
	})
	return ret, err
}

// Get retrieves the DeploymentConfig from the indexer for a given namespace and name.
func (s deploymentConfigNamespaceLister) Get(name string) (*v1.DeploymentConfig, error) {
	obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
	if err != nil {
		return nil, err
	}
	if !exists {
		return nil, errors.NewNotFound(api.Resource("deploymentconfig"), name)
	}
	return obj.(*v1.DeploymentConfig), nil
}


text:
/**
* @private
* @type {WeakMap}
*/
const ENVIRONMENT = new WeakMap();

/**
 * @private
 * @type {WeakMap}
 */
const PATTERN_CACHE = new WeakMap();

/**
 * @class
 */
class ConfigStringResolver {
    /**
     * @constructor
     * @param {ConfigEnvironment} environment
     * @param {ConfigPatternCache} patternCache
     */
    constructor(environment, patternCache) {
        ENVIRONMENT.set(this, environment);
        PATTERN_CACHE.set(this, patternCache);
    }

    /**
     * @readonly
     * @type {ConfigEnvironment}
     */
    get environment() {
        return ENVIRONMENT.get(this);
    }

    /**
     * @readonly
     * @type {ConfigPatternCache}
     */
    get patternCache() {
        return PATTERN_CACHE.get(this);
    }

    /**
     * @param {String} value
     * @returns {String}
     */
    resolve(value) {
        const options = {};

        for (const key of this.environment.keys()) {
            options[key] = this.environment.valueOf(key);
        }

        let resolvedValue;

        try {
            resolvedValue = this.patternCache.eval(value, options);
        } catch (err) {
            resolvedValue = value;
        }

        return resolvedValue;
    }
}

export default ConfigStringResolver;


text:
@class CMHCareEvent;
@class CMHCareActivity;
@class CMHCarePlanStore;

@interface CMHCareSyncQueue : NSObject

- (null_unspecified instancetype)init NS_UNAVAILABLE;
- (nonnull instancetype)initWithCMHIdentifier:(nonnull NSString *)cmhIdentifer;

- (void)incrementPreQueueCount;
- (void)enqueueUpdateEvent:(nonnull CMHCareEvent *)event;
- (void)enqueueUpdateActivity:(nonnull CMHCareActivity *)activity;
- (void)enqueueDeleteActivity:(nonnull CMHCareActivity *)activity;
- (void)decrementPreQueueCount;

- (void)enqueueFetchForStore:(nonnull CMHCarePlanStore *)store completion:(nullable CMHRemoteSyncCompletion)block;

@end


text:
package com.javaeye.lonlysky.lforum.entity.forum;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

/**
 * 主题提问
 *
 * @author 黄磊
 *
 */
@Entity
@Table(name = "bonuslog")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Bonuslog implements java.io.Serializable {

	// Fields
	private static final long serialVersionUID = -3769966194024374540L;
	private Integer id;
	private Users usersByAnswerid;
	private Topics topics;
	private Users usersByAuthorid;
	private Postid postid;
	private String answername;
	private String dateline;
	private Integer bonus;
	private Integer extid;
	private Integer isbest;

	// Property accessors
	@Id
	@GeneratedValue(generator = "paymentableGenerator")
	@GenericGenerator(name = "paymentableGenerator", strategy = "increment")
	@Column(name = "tid", unique = true, nullable = false, insertable = true, updatable = true)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "answerid", unique = false, nullable = true, insertable = true, updatable = true)
	public Users getUsersByAnswerid() {
		return usersByAnswerid;
	}

	public void setUsersByAnswerid(Users usersByAnswerid) {
		this.usersByAnswerid = usersByAnswerid;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "tid", unique = true, nullable = false, insertable = false, updatable = false)
	public Topics getTopics() {
		return topics;
	}

	public void setTopics(Topics topics) {
		this.topics = topics;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "authorid", unique = false, nullable = false, insertable = true, updatable = true)
	public Users getUsersByAuthorid() {
		return usersByAuthorid;
	}

	public void setUsersByAuthorid(Users usersByAuthorid) {
		this.usersByAuthorid = usersByAuthorid;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "pid", unique = false, nullable = false, insertable = true, updatable = true)
	public Postid getPostid() {
		return postid;
	}

	public void setPostid(Postid postid) {
		this.postid = postid;
	}

	@Column(name = "answername", unique = false, nullable = false, insertable = true, updatable = true, length = 20)
	public String getAnswername() {
		return answername;
	}

	public void setAnswername(String answername) {
		this.answername = answername;
	}

	@Column(name = "dateline", unique = false, nullable = false, insertable = true, updatable = true, length = 23)
	public String getDateline() {
		return dateline;
	}

	public void setDateline(String dateline) {
		this.dateline = dateline;
	}

	@Column(name = "bonus", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getBonus() {
		return bonus;
	}

	public void setBonus(Integer bonus) {
		this.bonus = bonus;
	}

	@Column(name = "extid", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getExtid() {
		return extid;
	}

	public void setExtid(Integer extid) {
		this.extid = extid;
	}

	@Column(name = "isbest", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getIsbest() {
		return isbest;
	}

	public void setIsbest(Integer isbest) {
		this.isbest = isbest;
	}

}


text:
<!doctype html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="../../assets/ico/favicon.ico">

    <title>Sticky Footer Navbar Template for Bootstrap</title>

    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">

    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap-theme.min.css">

    <link href="css/sticky-footer-navbar.css" rel="stylesheet">

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    Toggle navigation

                </button>
                Device Management

Person

Device

Log Data

Settings

Help

Signed in as Super User

Copyright mUzima team 2014.


text:
import proton_tests.codec
import proton_tests.engine
import proton_tests.message
import proton_tests.messenger
import proton_tests.sasl
import proton_tests.transport
import proton_tests.ssl
import proton_tests.interop
import proton_tests.soak


text:
// Copyright (c) Microsoft. All rights reserved.

#pragma once

#include "Scenario4_Snapshot.g.h"
#include "MainPage.xaml.h"
#include "DisplayHelpers.h"

namespace SDKTemplate
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    [Windows::Foundation::Metadata::WebHostHidden]
    [Windows::UI::Xaml::Data::Bindable]
    public ref class Scenario4 sealed
    {
    public:
        Scenario4();

        property Windows::Foundation::Collections::IObservableVector<DeviceInformationDisplay^>^ ResultCollection;

    protected:
        virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;

    private:
        void FindButton_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);

        SDKTemplate::MainPage^ rootPage;
    };
}


text:
/**
 *
 */
package com.privatecloud.users.service;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.privatecloud.constants.AppConstants;
import com.privatecloud.users.dao.UserDao;
import com.privatecloud.users.model.UserRoles;
import com.privatecloud.users.model.Users;

/**
 * @author Rohan
 *
 */
@Service
@Transactional
public class UsersService {

	@Autowired
	private UserDao userDao;

	public void registerUser(Users user) {

		PasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
		String hashedPassword = passwordEncoder.encode(user.getPassword());
		user.setPassword(hashedPassword);
		user.setEnabled(true);
		user.setCreated(new Date());
		user.setModified(new Date());
		user.setLastlogin(new Date());
		user.assignUserRole(new UserRoles(user,AppConstants.ROLE_USER));

		userDao.persist(user);
	}

	public boolean isUserNameAvailable(String uname) {
		Users user = userDao.findByUserName(uname);
		return (user == null);
	}
}


text:
package org.jetbrains.jps.model.java.impl;

import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.Bitness;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.CharsetToolkit;
import com.intellij.util.io.BaseOutputReader;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.model.java.JdkVersionDetector;
import org.jetbrains.jps.service.SharedThreadPool;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Properties;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
import java.util.jar.JarFile;
import java.util.jar.Manifest;

/**
 * @author nik
 */
public class JdkVersionDetectorImpl extends JdkVersionDetector {
  private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.projectRoots.impl.SdkVersionUtil");
  private static final ActionRunner ACTION_RUNNER = new ActionRunner() {
    @Override
    public Future<?> run(Runnable runnable) {
      return SharedThreadPool.getInstance().executeOnPooledThread(runnable);
    }
  };

  @Override
  @Nullable
  public String detectJdkVersion(@NotNull String homePath) {
    return detectJdkVersion(homePath, ACTION_RUNNER);
  }

  @Nullable
  public String detectJdkVersion(@NotNull String homePath, @NotNull ActionRunner runner) {
    File rtFile = new File(homePath, "jre/lib/rt.jar");
    if (rtFile.isFile()) {
      try {
        JarFile rtJar = new JarFile(rtFile, false);
        try {
          Manifest manifest = rtJar.getManifest();
          if (manifest != null) {
            String version = manifest.getMainAttributes().getValue("Implementation-Version");
            if (version != null) {
              return "java version \"" + version + "\"";
            }
          }
        }
        finally {
          rtJar.close();
        }
      }
      catch (IOException e) {
        LOG.info(e);
      }
    }

    JdkVersionInfo info = detectJdkVersionInfo(homePath, runner);
    return info != null ? info.getVersion() : null;
  }

  @Override
  public JdkVersionInfo detectJdkVersionInfo(@NotNull String homePath) {
    return detectJdkVersionInfo(homePath, ACTION_RUNNER);
  }

  @Override
  public JdkVersionInfo detectJdkVersionInfo(@NotNull String homePath, @NotNull ActionRunner runner) {
    File releaseFile = new File(homePath, "release");
    if (releaseFile.isFile()) {
      try {
        Properties p = new Properties();
        p.load(new FileInputStream(releaseFile));
        String version = p.getProperty("JAVA_FULL_VERSION", p.getProperty("JAVA_VERSION"));
        if (version != null) {
          version = StringUtil.unquoteString(version);
          int i = version.indexOf('+');
          if (i > 0) {
            version = version.substring(0, i);
          }
          String arch = StringUtil.unquoteString(p.getProperty("OS_ARCH", ""));
          boolean x64 = "x86_64".equals(arch) || "amd64".equals(arch);
          return new JdkVersionInfo("java version \"" + version + "\"", x64 ? Bitness.x64 : Bitness.x32);
        }
      }
      catch (IOException e) {
        LOG.info(e);
      }
    }

    String javaExe = homePath + File.separator + "bin" + File.separator + (SystemInfo.isWindows ? "java.exe" : "java");
    if (new File(javaExe).canExecute()) {
      try {
        Process process = new ProcessBuilder(javaExe, "-version").redirectErrorStream(true).start();
        VersionOutputReader reader = new VersionOutputReader(process.getInputStream(), runner);
        try {
          reader.waitFor();
        }
        catch (InterruptedException e) {
          LOG.info(e);
          process.destroy();
        }
        return reader.getVersionInfo();
      }
      catch (IOException e) {
        LOG.info(e);
      }
    }

    return null;
  }

  private static class VersionOutputReader extends BaseOutputReader {
    private static final BaseOutputReader.Options OPTIONS = new BaseOutputReader.Options() {
      @Override public SleepingPolicy policy() { return SleepingPolicy.BLOCKING; }
      @Override public boolean splitToLines() { return true; }
      @Override public boolean sendIncompleteLines() { return false; }
      @Override public boolean withSeparators() { return false; }
    };

    private final ActionRunner myRunner;
    private final List<String> myLines;

    public VersionOutputReader(@NotNull InputStream stream, @NotNull ActionRunner runner) {
      super(stream, CharsetToolkit.getDefaultSystemCharset(), OPTIONS);
      myRunner = runner;
      myLines = new CopyOnWriteArrayList<>();
      start("java -version");
    }

    @NotNull
    @Override
    protected Future<?> executeOnPooledThread(@NotNull Runnable runnable) {
      return myRunner.run(runnable);
    }

    @Override
    protected void onTextAvailable(@NotNull String text) {
      myLines.add(text);
      LOG.debug("text: " + text);
    }

    @Nullable
    public JdkVersionInfo getVersionInfo() {
      String version = null;
      Bitness arch = Bitness.x32;

      for (String line : myLines) {
        if (line.contains("version")) {
          if (version == null) {
            version = line;
          }
        }
        else if (line.contains("64-Bit") || line.contains("x86_64") || line.contains("amd64")) {
          arch = Bitness.x64;
        }
      }

      LOG.debug("Returning " + version + " " + arch);
      return version != null ? new JdkVersionInfo(version, arch) : null;
    }
  }
}


text:
namespace _02.StudentsAndWorkers
{
	public abstract class Human
	{
		// Fields
		private string firstName;
		private string lastName;

		// Constructors
		protected Human()
			: this("Unknown", "Unknown")
		{
		}

		protected Human(string firstName, string lastName)
		{
			this.FirstName = firstName;
			this.LastName = lastName;
		}

		// Properties
		public string FirstName { get; set; }

		public string LastName { get; set; }
	}
}


text:
<?xml version="1.0"?>
<data>
    <result>
        <id>2</id>
        <itemGroupId>2</itemGroupId>
    </result>
    <result>
        <id>1</id>
        <itemGroupId>1</itemGroupId>
    </result>
    <result>
        <id>3</id>
        <itemGroupId>3</itemGroupId>
    </result>
    <meta>
        <totalResultsFound>3</totalResultsFound>
        <typeOfQuery>WILDCARD_AND</typeOfQuery>
        <paginationStartFrom>0</paginationStartFrom>
        <noOfResults>9</noOfResults>
    </meta>
    <filters>
        <filter type="other" label="CATEGORY" key="category">
            <option name="Default Category " value="category:shirts" count="3" selected="false"/>
        </filter>
        <filter type="other" label="PRICE RANGE" key="Price Range">
            <option name="0 - 49" value="klevu_price:0 - 49" count="3" selected="false" />
            <option name="0 - 49" value="klevu_price:50 - 99" count="4" selected="false" />
        </filter>
    </filters>
</data>


text:
package io.permazen.core.type;

import com.google.common.reflect.TypeParameter;
import com.google.common.reflect.TypeToken;

import io.permazen.core.FieldType;
import io.permazen.tuple.Tuple2;

public class Tuple2FieldType<V1, V2> extends TupleFieldType<Tuple2<V1, V2>> {

    private static final long serialVersionUID = 8336238765491523439L;

    @SuppressWarnings("serial")
    public Tuple2FieldType(FieldType<V1> value1Type, FieldType<V2> value2Type) {
        super(new TypeToken<Tuple2<V1, V2>>() { }
           .where(new TypeParameter<V1>() { }, value1Type.getTypeToken().wrap())
           .where(new TypeParameter<V2>() { }, value2Type.getTypeToken().wrap()),
          value1Type, value2Type);
    }

    @Override
    @SuppressWarnings("unchecked")
    protected Tuple2<V1, V2> createTuple(Object[] values) {
        assert values.length == 2;
        return new Tuple2<>((V1)values[0], (V2)values[1]);
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OCBinaryStream: BaseStream Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css"/>

OCBinaryStream 1.0.0-dev

Objective-C Binary Stream

Main Page

Data Structures

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Data Structures

Data Structure Index

Class Hierarchy

Data Fields

Protected Attributes |
Properties

BaseStream Class Reference

BaseStream - Base class to read and write streams.
 More...

#import <BaseStream.h>

Inheritance diagram for BaseStream:

  <map id="BaseStream_map" name="BaseStream_map">
<area href="interface_input_stream.html" title="Class to read a binary file." alt="InputStream" shape="rect" coords="0,56,88,80"/>
<area href="interface_output_stream.html" title="OutputStream - Class to write into a stream and save later as a file." alt="OutputStream" shape="rect" coords="98,56,186,80"/>
</map>

Protected Attributes

NSString * 	_path

FILE * 	_file

char * 	_buffer

unsigned long 	_currentOffset

unsigned long 	_fileLen

NSStringEncoding 	_stringEncoding

Properties

NSString * 	path

 	Path to file.

unsigned long 	offset

 	Current offset.

unsigned long 	len

 	File len.

BOOL 	isOpen

 	Return YES if the file is open and ready.

NSStringEncoding 	stringEncoding

 	Sets or gets the string enconding.

Detailed Description

BaseStream - Base class to read and write streams.

BaseStream is used as base class for both classes InputStream and OutputStream. It shouldn't be used directly, you must make use of InputStream and OutputStream (or inherit from it).

Author:

Víctor Berga <victor@victorberga.com>

Field Documentation

          - (char*) _buffer [protected]

          - (unsigned long) _currentOffset [protected]

          - (FILE*) _file [protected]

          - (unsigned long) _fileLen [protected]

          - (NSString*) _path [protected]

          - (NSStringEncoding) _stringEncoding [protected]

Property Documentation

          - (BOOL) isOpen [read, assign]

Return YES if the file is open and ready.

          - (unsigned long) len [read, assign]

File len.

          - (unsigned long) offset [read, assign]

Current offset.

          - (NSString*) path [read, write, retain]

Path to file.

          - (NSStringEncoding) stringEncoding [read, write, assign]

Sets or gets the string enconding.

Default is NSUTF8StringEncoding

The documentation for this class was generated from the following files:

/Users/vbergae/Documents/Cocoa/BinaryStream/BaseStream.h

/Users/vbergae/Documents/Cocoa/BinaryStream/BaseStream.m

 All Data Structures Files Functions Variables Properties

<address class="footer">Generated on Thu Jul 21 2011 22:57:37 for OCBinaryStream by

 1.7.4 </address>


text:
@interface PNOperationStatus ()

#pragma mark - Properties

@property (nonatomic, getter = isSuccessful) BOOL successful;
@property (nonatomic, strong) PNError *error;
@property (nonatomic, copy) NSString *statusDescription;
@property (nonatomic, strong) NSNumber *timeToken;

@end

#pragma mark - Public interface methods

@implementation PNOperationStatus

#pragma mark - Instance methods

- (NSString *)description {

    return [[NSString alloc] initWithFormat:@"%@ (%p) <successful: %@, time token: %@, description: %@, error: %@>",
            NSStringFromClass([self class]), self, self.isSuccessful?@"YES":@"NO", self.timeToken,
            self.statusDescription, self.error];
}

- (NSString *)logDescription {

    #pragma clang diagnostic push
    #pragma clang diagnostic ignored "-Wundeclared-selector"
    return [[NSString alloc] initWithFormat:@"<%@|%@|%@|%@>", @(self.isSuccessful), self.timeToken,
            (self.statusDescription ? self.statusDescription : [NSNull null]),
            (self.error ? [self.error performSelector:@selector(logDescription)] : [NSNull null])];
    #pragma clang diagnostic pop
}

#pragma mark -

@end


text:
@interface Scene : NSObject
@property (nonatomic, assign) int level;
@property (nonatomic, assign) float price;
@property (nonatomic, strong) NSMutableArray *animals; //Chứa các con vật
@property (nonatomic, strong) NSMutableArray *backgrounds; //Chứa các ảnh nền nối tiếp nhau

@property (nonatomic, strong) NSString * currentBackground; // Background cảnh hiện tại
@property (nonatomic, strong) NSString * currentPlayer; // Nhân vật chơi hiện tại
@property (nonatomic, strong) NSString * currentEnemy; // Kẻ địch hiện tại
-(id) initScene; // khởi tạo cảnh , các con vật , background
-(id) currentScene:(int) level; // trả về cảnh với level tương ứng
@end


text:
[![NPM version][npm-image]][npm-url]
[![Build status][circleci-image]][circleci-url]
[![Dependency Status][david-image]][david-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

# Lock

[Auth0](https://auth0.com) is an authentication broker that supports social identity providers as well as enterprise identity providers such as Active Directory, LDAP, Google Apps, Salesforce.

## Install

From CDN

```html
<!-- Latest patch release (recommended for production) -->
<script src="http://cdn.auth0.com/js/lock/10.16.0/lock.min.js"></script>
```

From [bower](http://bower.io)

```sh
bower install auth0-lock
```

```html
<script src="bower_components/auth0-lock/build/lock.min.js"></script>
```

From [npm](https://npmjs.org)

```sh
npm install auth0-lock
```

After installing the `auth0-lock` module, you'll need bundle it up along with all of its dependencies. We have examples for [browserify](examples/bundling/browserify/) and [webpack](examples/bundling/webpack/).

If you are targeting mobile audiences, it's recommended that you add:

```html
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
```

## API

### new Auth0Lock(clientID, domain, options)

Initializes a new instance of `Auth0Lock` configured with your application `clientID` and your account's `domain` at [Auth0](https://manage.auth0.com/). You can find this information at your [application settings](https://manage.auth0.com/#/applications).

- **clientId {String}**: Your application _clientId_ in Auth0.
- **domain {String}**: Your Auth0 _domain_. Usually _your-account.auth0.com_.
- **options {Object}**: Allows to customize the dialog's appearance and behavior. See [below](#customization) for the details.

#### Example

```js
var clientId = "YOUR_AUTH0_APP_CLIENTID";
var domain = "YOUR_DOMAIN_AT.auth0.com";
var lock = new Auth0Lock(clientId, domain);

lock.on("authenticated", function(authResult) {
  lock.getUserInfo(authResult.accessToken, function(error, profile) {
    if (error) {
      // Handle error
      return;
    }

    localStorage.setItem("accessToken", authResult.accessToken);
    localStorage.setItem("profile", JSON.stringify(profile));

    // Update DOM
  });
});
```

### getProfile(idToken, callback)

> *Note:* this method is soon to be deprecated, use `getUserInfo` instead.

Once the user has logged in and you are in possesion of an id token, you can obtain the profile with `getProfile`.

- **idToken {String}**: User id token.
- **callback {Function}**: Will be invoked after the user profile been retrieved.

### getUserInfo(accessToken, callback)

Once the user has logged in and you are in possesion of an access token, you can obtain the profile with `getUserInfo`.

- **accessToken {String}**: User access token.
- **callback {Function}**: Will be invoked after the user profile been retrieved.

#### Example

```js
lock.getUserInfo(accessToken, function(error, profile) {
  if (!error) {
    alert("hello " + profile.name);
  }
});
```

### on(event, callback)

Lock will emit events during its lifecycle.

- `show`: emitted when Lock is shown. Has no arguments.
- `hide`: emitted when Lock is hidden. Has no arguments.
- `unrecoverable_error`: emitted when there is an unrecoverable error, for instance when no connection is available. Has the error as the only argument.
- `authenticated`: emitted after a successful authentication. Has the authentication result as the only argument.
- `authorization_error`: emitted when authorization fails. Has error as the only argument.
- `hash_parsed`: every time a new Auth0Lock object is initialized in redirect mode (the default), it will attempt to parse the hash part of the url looking for the result of a login attempt. This is a _low level_ event for advanced use cases and _authenticated_ and _authorization_error_ should be preferred when possible. After that this event will be emitted with `null` if it couldn't find anything in the hash. It will be emitted with the same argument as the `authenticated` event after a successful login or with the same argument as `authorization_error` if something went wrong. This event won't be emitted in popup mode because there is no need to parse the url's hash part.

### show(options)

Displays the widget, allowing to override some options.

- **options {Object}**: Allows to customize some aspect of the dialog's appearance and behavior. The options allowed in here are subset of the options allowed in the constructor and will override them: `allowedConnections`, `auth.params`, `allowLogin`, `allowSignUp`, `allowForgotPassword`, `initialScreen`, `rememberLastLogin` and `flashMessage`. See [below](#customization) for the details. Keep in mind that `auth.params` will be fully replaced and not merged.

#### Example

```js
// without options
lock.show();

// will override the allowedConnections option passed to the constructor, if any
lock.show({allowedConnections: ["twitter", "facebook"]})

// will override the entire auth.params object passed to the constructor, if any
lock.show({auth: {params: {state: 'auth_state'}}})
```

### resumeAuth(hash, callback)

If you set the [auth.autoParseHash](#authentication-options) option to `false`, you'll need to call this method to complete the authentication flow. This method is useful when you're using a client-side router that uses a `#` to handle urls (angular2 with `useHash` or react-router with `hashHistory`).
- **hash {String}**: The hash fragment received from the redirect.
- **callback {Function}**: Will be invoked after the parse is done. Has an error (if any) as the first argument and the authentication result as the second one. If there is no hash available, both arguments will be `null`.

#### Example

```js
lock.resumeAuth(hash, function(error, authResult) {
  if (error) {
    alert("Could not parse hash");
  }
  console.log(authResult.accessToken);
});
```

### logout(options)

Logs out the user

- **options {Object}**: This is optional and follows the same rules as [this](https://auth0.com/docs/libraries/auth0js#logout)

#### Example

```js
lock.logout({ returnTo: 'https://myapp.com/bye-bye' });
```

### Customization

The appearance of the widget and the mechanics of authentication can be customized with an `options` object which has one or more of the following properties. Each method that opens the dialog can take an `options` object as its first argument.

#### UI options

- **allowedConnections {Array}**: List of connection that will be available to perform the authentication. It defaults to all enabled connections.
- **autoclose {Boolean}**: Determines whether or not the Lock will be closed automatically after a successful sign in. If the Lock is not `closable` it won't be closed even if this option is set to `true`. Defaults to `false`.
- **autofocus {Boolean}**: Determines whether or not the first input on the screen, that is the email or phone number input, should have focus when the Lock is displayed. Defaults to `false` when a `container` option is provided or the Lock is being render on a mobile device. Otherwise it defaults to `true`.
- **avatar {Object}**: Determines whether or not an avatar and a user name should be displayed on the Lock's header once an email or username has been entered and how to obtain it. By default avatars are fetched from [Gravatar](http://gravatar.com/). Supplying `null` will disable the functionality. To fetch avatar from other provider see [below](#avatar-provider).
- **container {String}**: The `id` of the html element where the Lock will be rendered. This makes the Lock appear inline instead of in a modal window.
- **language {String}**: Specifies the language of the widget. Defaults to `"en"`. Supported languages are:
  - `de`: German
  - `en`: English
  - `es`: Spanish
  - `it`: Italian
  - `nb`: Norwegian bokmål
  - `pt-BR`: Brazilian Portuguese
  - `ru`: Russian
  - `zh`: Chinese
  - `ja`: Japanese
  - [Check all the available languages](https://github.com/auth0/lock/tree/master/src/i18n)
- **languageDictionary {Object}**: Allows to customize every piece of text displayed in the Lock. Defaults to `{}`. See below [Language Dictionary Specification](#language-dictionary-specification) for the details.
- **closable {Boolean}**: Determines whether or not the Lock can be closed. When a `container` option is provided its value is always `false`, otherwise it defaults to `true`.
- **popupOptions {Object}**: Allows to customize the location of the popup in the screen. Any [position and size feature](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#Position_and_size_features) allowed by `window.open` is accepted. Defaults to `{}`.
- **rememberLastLogin {Boolean}**: Determines whether or not to show a screen that allows you to quickly log in with the account you used the last time when the `initialScreen` option is set to to `"login"` (the default). Defaults to `true`.
- **flashMessage {Object}**: Shows an `error` or `success` flash message when Lock is shown.
  + **type {String}**: The message type, it should be `error` or `success`.
  + **text {String}**: The text to show.

#### Theming options

Theme options are grouped in the `theme` property of the `options` object.

```js
var options = {
  theme: {
    labeledSubmitButton: false,
    logo: "https://example.com/assets/logo.png",
    primaryColor: "green",
    authButtons: {
      connectionName: {
        displayName: "...",
        primaryColor: "...",
        foregroundColor: "...",
        icon: "http://.../logo.png"
      }
    }
  }
};
```

- **labeledSubmitButton {Boolean}**: Indicates whether or not the submit button should have a label. Defaults to `true`. When set to `false` a icon will be shown. The labels can be customized through the `languageDictionary`.
- **logo {String}**: Url for an image that will be placed in the Lock's header. Defaults to Auth0's logo.
- **primaryColor {String}**: Defines the primary color of the Lock, all colors used in the widget will be calculated from it. This option is useful when providing a custom `logo` to ensure all colors go well together with the logo's color palette. Defaults to `"#ea5323"`.
- **authButtons {Object}**: Allows the customization of the custom oauth2 login buttons.
  + **displayName {String}**: The name to show instead of the connection name.
  + **primaryColor {String}**: The button's background color. Defaults to `"#eb5424"`.
  + **foregroundColor {String}**: The button's text color. Defaults to `"#FFFFFF"`.
  + **icon {String}**: The icon's url for the connection. For example:`"http://site.com/logo.png"`.

#### Authentication options

Authentication options are grouped in the `auth` property of the `options` object.

```js
var options = {
  auth: {
   params: {param1: "value1"},
   autoParseHash: true,
   redirect: true,
   redirectUrl: "some url",
   responseMode: "form_post",
   responseType: "token",
   sso: true,
   connectionScopes: {
    connectionName: [ 'scope1', 'scope2' ]
   }
  }
};
```

- **params {Object}**: Specifies extra parameters that will be sent when starting a login. Defaults to `{}`.
- **autoParseHash {Boolean}**: When set to `true`, Lock will parse the `window.location.hash` string when instantiated. If set to `false`, you'll have to manually resume authentication using the [resumeAuth](#resumeauthhash-callback) method.
- **redirect {Boolean}**: When set to `true`, the default, _redirect mode_ will be used. Otherwise, _popup mode_ is chosen. See [below](#popup-mode) for more details.
- **redirectUrl {String}**: The url Auth0 will redirect back after authentication. Defaults to the empty string `""` (no redirect URL).
- **responseMode {String}**:  Should be set to `"form_post"` if you want the code or the token to be transmitted via an HTTP POST request to the `redirectUrl` instead of being included in its query or fragment parts. Otherwise, it should be ommited.
- **responseType {String}**:  Should be set to `"token"` for Single Page Applications, and `"code"` otherwise. Also, `"id_token"` is supported for the first case. Defaults to `"code"` when `redirectUrl` is provided, and to `"token"` otherwise.
- **sso {Boolean}**:  Determines whether Single Sign On is enabled or not in **Lock**. The Auth0 SSO session will be created regardless of this option if SSO is enabled for your client or tenant.
- **connectionScopes {Object}**:  Allows to set scopes to be sent to the oauth2/social connection for authentication.

#### Social options

- **socialButtonStyle {String}**: Determines the size of the buttons for the social providers. Possible values are `"big"` and `"small"`. The default style depends on the connections that are available:
  - If only social connections are available, it will default to `"big"` when there are 5 connections at most, and default to `"small"` otherwise.
  - If connections from types other than social are also available, it will default to `"big"` when there are 3 social connections at most, and default to `"small"` otherwise.

#### Database options

- **additionalSignUpFields {Array}**: Allows to provide extra input fields during sign up. See [below](#additional-sign-up-fields) more for details. Defaults to `[]`.
- **allowLogin {Boolean}**: When set to `false` the widget won't display the _login screen_. This is useful if you want to use the widget just for sign ups (the _login and sign up tabs_ in the _sign up screen_ will be hidden) or to reset passwords (the _back button_ in the _forgot password screen_ will be hidden). In such cases you may also need to specify the `initialScreen`, `allowForgotPassword` and `allowSignUp` options. It defaults to `true`.
- **allowForgotPassword {Boolean}**: When set to `false` hides the _"Don't remember your password?"_ link in the _login screen_, making the _forgot password screen_ unreachable. Defaults to `true`. Keep in mind that if you are using a database connection with a _custom database_ which doesn't have a _change password script_ the forgot password screen won't be available.
- **allowSignUp {Boolean}**: When set to `false` hides the _login and sign up tabs_ in the _login screen_, making the _sign up screen_ unreachable. Defaults to `true`. Keep in mind that if the database connection has sign ups _disabled_ or you are using a _custom database_ with coesn't have a _create script_, then the sign up screen won't be available.
- **defaultDatabaseConnection {String}**: Specifies the database connection that will be used when there is more than one available.
- **initialScreen {String}**: Name of the screen that will be shown when the widget is opened. Valid values are `"login"`, `"signUp"`, and `"forgotPassword"`. If this option is left unspecified, the widget will pick the first screen that is available from the previous list. Is recommended that you set `allowLogin` to `"false"` when you set `initialScreen` to `"forgotPassword"`, otherwise a back button will be shown in the forgot password screen and it might not be clear to the user where is she/he going back.
- **loginAfterSignUp {Boolean}**: Determines whether or not the user will be automatically signed in after a successful sign up. Defaults to `true`.
- **forgotPasswordLink {String}**: URL for a page that allows the user to reset her password. When set to a non-empty string, the user will be linked to the provided URL when clicking the _"Don't remember your password?"_ link in the _login screen_.
- **mustAcceptTerms {Boolean}**: When set to `true` displays a checkbox input along the terms and conditions that must be checked before signing up. The terms and conditions can be specified via the `languageDictionary` option, see the example below. Defaults to `false`.
- **prefill {Object}**: Allows to set the initial value for the _email_ and/or _username_ inputs, e.g. `{prefill: {email: "someone@auth0.com", username: "someone"}}`. When omitted no initial value will be provided.
- **signUpLink {String}**: URL for a page that allows the user to sign up. When set to a non-empty string, the user will be linked to the provided URL when clicking the _sign up_ tab in the _login screen_.
- **usernameStyle {String}**: Determines what will be used to identify the user for a Database connection that has the `requires_username` flag set, otherwise it will be ignored. Possible values are `"username"` and `"email"` and by default both `username` and `email` are allowed.

#### Enterprise options

- **defaultEnterpriseConnection {String}**: Specifies the enterprise connection which allows to login using an username and a password that will be used when there is more than one available or there is a database connection. If a `defaultDatabaseConnection` is provided the database connection will be used and this option will be ignored.

#### Example

```js
var options = {
  container: "myContainer",
  closable: false,
  languageDictionary: {
    signUpTerms: "I agree to the <a href='/terms' target='_new'>terms of service</a> and <a href='/privacy' target='_new'>privacy policy</a>.",
    title: "My Company",
  },
  autofocus: false
};
```

#### Other options

- **configurationBaseUrl {String}**: Overrides client settings base url. By default it uses Auth0's CDN url when `domain` has the format `*.auth0.com`. Otherwise, it uses the provided `domain`.
- **languageBaseUrl {String}**: Overrides the language source url for Auth0's provided translations. By default it uses to Auth0's CDN url `https://cdn.auth0.com`.
- **hashCleanup {Boolean}**: When enabled, it will remove the hash part of the callback url after the user authentication. Defaults to `true`.

#### Language Dictionary Specification

A language dictionary is an object that allows you to customize every piece of text the Lock needs to display. For instance, the following code will change the title displayed in the header and the placeholder for the email field.

```js
var options = {
  languageDictionary: {
    emailInputPlaceholder: "please enter you email",
    title: "My Company"
  },
};
```

#### Additional sign up fields

Extra input fields can be added to the sign up screen with the `additionalSignUpFields` option. Every input must have a `name` and a `placeholder`, and an `icon` url can also be provided. Also, the initial value can be provided with the `prefill` option, which can be a **string** with the value or a **function** that obtains it. Other options depend on the type of the field, which is defined via the `type` option and defaults to `"text"`.

The new fields are rendered below the regular sign up input fields in the order they are provided.

##### Text field

A `validator` function can also be provided.

```js
var options = {
  additionalSignUpFields: [{
    name: "address",
    placeholder: "enter your address",
    // The following properties are optional
    icon: "https://example.com/assests/address_icon.png",
    prefill: "street 123",
    validator: function(address) {
      return {
         valid: address.length >= 10,
         hint: "Must have 10 or more chars" // optional
      };
    }
  }]
}
```

##### Select field

To specify a select field `type: "select"` needs to be provided along with the `options` property.

```js
var options = {
  additionalSignUpFields: [{
    type: "select",
    name: "location",
    placeholder: "choose your location",
    options: [
      {value: "us", label: "United States"},
      {value: "fr", label: "France"},
      {value: "ar", label: "Argentina"}
    ],
    // The following properties are optional
    icon: "https://example.com/assests/location_icon.png",
    prefill: "us"
  }]
}
```

The `options` and the `prefill` value can be provided through a function.

```js
var options = {
  additionalSignUpFields: [{
    type: "select",
    name: "location",
    placeholder: "choose your location",
    options: function(cb) {
      // obtain options, in case of error you call cb with the error in the
      // first arg instead of null
      cb(null, options);
    },
    icon: "https://example.com/assests/location_icon.png",
    prefill: function(cb) {
      // obtain prefill, in case of error you call cb with the error in the
      // first arg instead of null
      cb(null, prefill);
    }
  }]
}
```

##### Checkbox field

To specify a checkbox field use: `type: "checkbox"`
The `prefill` value can determine the default state of the checkbox and it is required.

```js
var options = {
  additionalSignUpFields: [{
    type: "checkbox",
    name: "newsletter",
    prefill: "true",
    placeholder: "I hereby agree that I want to receive marketing emails from your company",
  }]
}
```

#### Avatar provider

Lock can show avatars fetched from anywhere. A custom avatar provider can be specified with the `avatar` option by passing an object with the keys `url` and `displayName`. Both properties are functions that take an email and a callback function.

```js
var options = {
  avatar: {
    url: function(email, cb) {
      // obtain url for email, in case of error you call cb with the error in
      // the first arg instead of null
      cb(null, url);
    },
    displayName: function(email, cb) {
      // obtain displayName for email, in case of error you call cb with the
      // error in the first arg instead of null
      cb(null, displayName);
    }
  }
};
```

### Popup mode

A popup window can be displayed instead of redirecting the user to a social provider website. While this has the advantage of preserving page state, it has some issues. Often times users have popup blockers that prevent the login page from even displaying. There are also known issues with mobile browsers. For example, in recent versions of Chrome on iOS, the login popup does not get [closed properly](https://github.com/auth0/lock/issues/71) after login. For these reasons, we encourage developers to avoid this mode, even with Single Page Apps.

If you nevertheless decide to use it, you can activate popup mode by passing the option `auth: {redirect: false}` when constructing `Auth0Lock`.

```js
var clientId = "YOUR_AUTH0_APP_CLIENTID";
var domain = "YOUR_DOMAIN_AT.auth0.com";
var options = {
  auth: {
    redirect: false
  }
};

var lock = new Auth0Lock(clientId, domain, options);
lock.show();
```

More information can be found in [Auth0's documentation](https://auth0.com/docs/libraries/lock/v10/popup-mode).

## Browser Compatibility

We ensure browser compatibility in Chrome, Safari, Firefox and IE >= 10. We currently use [zuul](https://github.com/defunctzombie/zuul) along with [Saucelabs](https://saucelabs.com) to run integration tests on each push.

## Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues.

## Author

[Auth0](auth0.com)

## License

This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.

[circleci-image]: https://img.shields.io/circleci/project/github/auth0/lock.svg?style=flat-square
[circleci-url]: https://circleci.com/gh/auth0/lock/tree/master
[npm-image]: https://img.shields.io/npm/v/auth0-lock.svg?style=flat-square
[npm-url]: https://npmjs.org/package/auth0-lock
[david-image]: http://img.shields.io/david/auth0/lock.svg?style=flat-square
[david-url]: https://david-dm.org/auth0/lock
[license-image]: http://img.shields.io/npm/l/auth0-lock.svg?style=flat-square
[license-url]: #license
[downloads-image]: http://img.shields.io/npm/dm/auth0-lock.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/auth0-lock


text:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/scrollView"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true">
    <RelativeLayout
        android:layout_height="match_parent"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin"
        android:paddingBottom="@dimen/activity_vertical_margin"
        tools:context="com.bvmiste.vision16.Eventactivity.civil1"
        android:layout_width="wrap_content">

        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_centerHorizontal="true"
            android:id="@+id/id1">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:gravity="center"
                android:textAppearance="?android:attr/textAppearanceLarge"
                android:text="WAREHOUSE 13"
                android:textColor="@color/primary"
                android:id="@+id/textView1" />

        </LinearLayout>

        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_centerHorizontal="true"
            android:id="@+id/id2"
            android:layout_below="@+id/id1">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:textAppearance="?android:attr/textAppearanceLarge"
                android:text="
Event Description:

Round 1: Know the Workshop

This round will contain questions related to the workshop. Students will be given time to
answer some simple questions.

Round 2: PRESENTECHION

In this round the participants will be given a topic after first round on which they have to
deliver a presentation. The topics will be related to the Latest Technological Development.

Round 3: Tech Hunt

This round will be surprise to check your workshop compatibility."
                android:textColor="@color/colorPrimary"
                android:id="@+id/textView2" />
        </LinearLayout>

        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_centerHorizontal="true"
            android:layout_below="@+id/id2">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:textAppearance="?android:attr/textAppearanceLarge"
                android:text="Event Managers:
(1)Krushal Kakdiya (8690777933)
(2)Mohit Raina (8758131184)
            "
                android:textColor="@color/colorAccent"
                android:id="@+id/textView3" />

        </LinearLayout>

    </RelativeLayout>

</ScrollView>


text:
RSpec.feature "Taxon Search" do
  include PublishingApiHelper
  include ContentItemHelper

  scenario "User navigates using pagination links" do
    given_there_are_multiple_pages_of_taxons
    when_i_visit_the_taxonomy_page
    then_i_can_see_the_first_page_of_taxons
    and_i_can_see_pagination_links
    when_i_visit_the_next_page
    then_i_can_see_the_second_page_of_taxons
  end

  scenario "User searches for taxons" do
    given_there_are_taxons_for_search
    when_i_visit_the_taxonomy_page
    then_i_can_see_all_the_taxons
    when_i_search_for_taxons
    then_i_can_see_my_search_results
  end

  def given_there_are_multiple_pages_of_taxons
    @taxon1 = content_item_with_details(
      "I Am A Taxon 1",
      other_fields: {
        content_id: "ID-1",
        base_path: "/foo",
        publication_state: "published",
      },
    )
    @taxon2 = content_item_with_details(
      "I Am Another Taxon 2",
      other_fields: {
        content_id: "ID-2",
        base_path: "/bar",
        publication_state: "published",
      },
    )
    @taxon3 = content_item_with_details(
      "I Am Yet Another Taxon 3",
      other_fields: {
        content_id: "ID-3",
        base_path: "/bar",
        publication_state: "published",
      },
    )

    publishing_api_has_taxons(
      [@taxon1, @taxon2, @taxon3],
      page: 1,
      per_page: 2,
    )
    publishing_api_has_taxons(
      [@taxon1, @taxon2, @taxon3],
      page: 2,
      per_page: 2,
    )
  end

  def given_there_are_taxons_for_search
    @taxon1 = content_item_with_details(
      "Taxon 1",
      other_fields: {
        content_id: "ID-1",
        base_path: "/foo",
        publication_state: "published",
      },
    )
    @taxon2 = content_item_with_details(
      "Taxon 2",
      other_fields: {
        content_id: "ID-2",
        base_path: "/bar",
        publication_state: "published",
      },
    )

    publishing_api_has_taxons(
      [@taxon1, @taxon2],
      document_type: "taxon",
      page: 1,
      per_page: 2,
    )

    publishing_api_has_taxons(
      [@taxon2],
      document_type: "taxon",
      page: 1,
      per_page: 50,
      q: "Taxon 2",
    )
  end

  def when_i_visit_the_taxonomy_page
    visit taxons_path(per_page: 2)
  end

  def then_i_can_see_the_first_page_of_taxons
    expect(page).to have_text(@taxon1[:title])
    expect(page).to have_text(@taxon2[:title])

    expect(page).not_to have_text(@taxon3[:title])
  end

  def and_i_can_see_pagination_links
    pagination_list = find(".pagination")
    page_links = pagination_list.all("li.page").map(&:text)

    # We can see 2 pages
    expect(page_links).to include("1")
    expect(page_links).to include("2")

    # There is no 3rd page
    expect(page_links).not_to include("3")

    # We start on the first page
    expect(find("li.page.active").text).to eq("1")

    # We also have Next and Last links
    expect(pagination_list).to have_selector("li.next_page", text: /next/i)
    expect(pagination_list).to have_selector("li.last", text: /last/i)
  end

  def when_i_visit_the_next_page
    pagination_list = find(".pagination")

    within pagination_list do
      click_link "Next"
    end
  end

  def then_i_can_see_the_second_page_of_taxons
    expect(page).to have_text(@taxon3[:title])

    expect(page).not_to have_text(@taxon1[:title])
    expect(page).not_to have_text(@taxon2[:title])
  end

  def then_i_can_see_all_the_taxons
    expect(page).to have_text(@taxon1[:title])
    expect(page).to have_text(@taxon2[:title])
  end

  def when_i_search_for_taxons
    find("#taxon_search_query").set("Taxon 2")
    click_button "Search"
  end

  def then_i_can_see_my_search_results
    expect(page).to have_text(@taxon2[:title])

    expect(page).not_to have_text(@taxon1[:title])
  end
end


text:
namespace Pegasus.Compiler
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using Pegasus.Expressions;

    /// <summary>
    /// Provides mutual left-recursion detection services for Pegasus <see cref="Grammar">Grammars</see>.
    /// </summary>
    public static class MutualRecursionDetector
    {
        /// <summary>
        /// Detects which rules in a <see cref="Grammar"/> are mutually left-recursive.
        /// </summary>
        /// <param name="leftAdjacentExpressions">The set of left-adjacent <see cref="Expression">expressions</see> to inspect.</param>
        /// <returns>A collection containing the mutually left-recursive rules.</returns>
        public static List<List<Rule>> Detect(ILookup<Rule, Expression> leftAdjacentExpressions)
        {
            var ruleLookup = leftAdjacentExpressions.ToDictionary(i => i.Key.Identifier.Name, i => i.Key);
            var mutuallyRecursive = new List<List<Rule>>();

            var index = 0;
            var stack = new Stack<Rule>();
            var ruleData = new Dictionary<Rule, RuleData>();

            RuleData StrongConnect(Rule v)
            {
                var vData = ruleData[v] = new RuleData
                {
                    Index = index,
                    LowLink = index,
                };

                index++;
                stack.Push(v);

                foreach (var w in leftAdjacentExpressions[v]
                                    .OfType<NameExpression>()
                                    .Select(n => n.Identifier.Name)
                                    .Where(n => n != v.Identifier.Name)
                                    .Select(n => ruleLookup[n]))
                {
                    if (!ruleData.TryGetValue(w, out var wData))
                    {
                        wData = StrongConnect(w);
                        vData.LowLink = Math.Min(vData.LowLink, wData.LowLink);
                    }
                    else if (stack.Contains(w))
                    {
                        vData.LowLink = Math.Min(vData.LowLink, wData.Index);
                    }
                }

                if (vData.LowLink == vData.Index)
                {
                    var components = new List<Rule>();

                    Rule w;
                    do
                    {
                        w = stack.Pop();
                        components.Add(w);
                    }
                    while (w != v);

                    if (components.Count > 1)
                    {
                        components.Reverse();
                        mutuallyRecursive.Add(components);
                    }
                }

                return vData;
            }

            foreach (var v in ruleLookup.Values)
            {
                if (!ruleData.ContainsKey(v))
                {
                    StrongConnect(v);
                }
            }

            return mutuallyRecursive;
        }

        private class RuleData
        {
            public int Index { get; set; }

            public int LowLink { get; set; }
        }
    }
}


text:
jQuery(document).ready(function ($) {
            var options = {
                $AutoPlay: true,                                    //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
                $AutoPlaySteps: 4,                                  //[Optional] Steps to go for each navigation request (this options applys only when slideshow disabled), the default value is 1
                $AutoPlayInterval: 4000,                            //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
                $PauseOnHover: 1,                               //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, 4 freeze for desktop, 8 freeze for touch device, 12 freeze for desktop and touch device, default value is 1

                $ArrowKeyNavigation: true,   			            //[Optional] Allows keyboard (arrow key) navigation or not, default value is false
                $SlideDuration: 160,                                //[Optional] Specifies default duration (swipe) for slide in milliseconds, default value is 500
                $MinDragOffsetToSlide: 20,                          //[Optional] Minimum drag offset to trigger slide , default value is 20
                $SlideWidth: 200,                                   //[Optional] Width of every slide in pixels, default value is width of 'slides' container
                //$SlideHeight: 150,                                //[Optional] Height of every slide in pixels, default value is height of 'slides' container
                $SlideSpacing: 3, 					                //[Optional] Space between each slide in pixels, default value is 0
                $DisplayPieces: 4,                                  //[Optional] Number of pieces to display (the slideshow would be disabled if the value is set to greater than 1), the default value is 1
                $ParkingPosition: 0,                              //[Optional] The offset position to park slide (this options applys only when slideshow disabled), default value is 0.
                $UISearchMode: 1,                                   //[Optional] The way (0 parellel, 1 recursive, default value is 1) to search UI components (slides container, loading screen, navigator container, arrow navigator container, thumbnail navigator container etc).
                $PlayOrientation: 1,                                //[Optional] Orientation to play slide (for auto play, navigation), 1 horizental, 2 vertical, 5 horizental reverse, 6 vertical reverse, default value is 1
                $DragOrientation: 1,                                //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)

                $BulletNavigatorOptions: {                                //[Optional] Options to specify and enable navigator or not
                    $Class: $JssorBulletNavigator$,                       //[Required] Class to create navigator instance
                    $ChanceToShow: 2,                               //[Required] 0 Never, 1 Mouse Over, 2 Always
                    $AutoCenter: 0,                                 //[Optional] Auto center navigator in parent container, 0 None, 1 Horizontal, 2 Vertical, 3 Both, default value is 0
                    $Steps: 1,                                      //[Optional] Steps to go for each navigation request, default value is 1
                    $Lanes: 1,                                      //[Optional] Specify lanes to arrange items, default value is 1
                    $SpacingX: 0,                                   //[Optional] Horizontal space between each item in pixel, default value is 0
                    $SpacingY: 0,                                   //[Optional] Vertical space between each item in pixel, default value is 0
                    $Orientation: 1                                 //[Optional] The orientation of the navigator, 1 horizontal, 2 vertical, default value is 1
                },

                $ArrowNavigatorOptions: {
                    $Class: $JssorArrowNavigator$,              //[Requried] Class to create arrow navigator instance
                    $ChanceToShow: 1,                               //[Required] 0 Never, 1 Mouse Over, 2 Always
                    $AutoCenter: 2,                                 //[Optional] Auto center navigator in parent container, 0 None, 1 Horizontal, 2 Vertical, 3 Both, default value is 0
                    $Steps: 4                                       //[Optional] Steps to go for each navigation request, default value is 1
                }
            };

            var jssor_slider1 = new $JssorSlider$("slider1_container", options);

            //responsive code begin
            //you can remove responsive code if you don't want the slider scales while window resizes
            function ScaleSlider() {
                var bodyWidth = document.body.clientWidth;
                if (bodyWidth)
                    jssor_slider1.$ScaleWidth(Math.min(bodyWidth, 809));
                else
                    window.setTimeout(ScaleSlider, 30);
            }
            ScaleSlider();

            $(window).bind("load", ScaleSlider);
            $(window).bind("resize", ScaleSlider);
            $(window).bind("orientationchange", ScaleSlider);
            //responsive code end
        });

$('#mainNav').hide();
$(window).scroll(function() {
    if ($(this).scrollTop() > 750)
     {
        $('#mainNav').fadeIn();
     }
    else
     {
      $('#mainNav').fadeOut();
     }
 });


text:
const _css = `
body > .weex-div {
  min-height: 100%;
}
`

function getDiv (weex) {
  const {
    extractComponentStyle,
    trimTextVNodes
  } = weex

  return {
    name: 'weex-div',
    render (createElement) {
      return createElement('html:div', {
        attrs: { 'weex-type': 'div' },
        staticClass: 'weex-div weex-ct',
        staticStyle: extractComponentStyle(this)
      }, trimTextVNodes(this.$slots.default))
    },
    _css
  }
}

export default {
  init (weex) {
    const div = getDiv(weex)
    weex.registerComponent('div', div)
    weex.registerComponent('container', div)
  }
}


text:
( function () {

	class FontLoader extends THREE.Loader {

		constructor( manager ) {

			super( manager );

		}
		load( url, onLoad, onProgress, onError ) {

			const scope = this;
			const loader = new THREE.FileLoader( this.manager );
			loader.setPath( this.path );
			loader.setRequestHeader( this.requestHeader );
			loader.setWithCredentials( this.withCredentials );
			loader.load( url, function ( text ) {

				const font = scope.parse( JSON.parse( text ) );
				if ( onLoad ) onLoad( font );

			}, onProgress, onError );

		}
		parse( json ) {

			return new Font( json );

		}

	}

	//

	class Font {

		constructor( data ) {

			this.isFont = true;
			this.type = 'Font';
			this.data = data;

		}
		generateShapes( text, size = 100 ) {

			const shapes = [];
			const paths = createPaths( text, size, this.data );
			for ( let p = 0, pl = paths.length; p < pl; p ++ ) {

				shapes.push( ...paths[ p ].toShapes() );

			}

			return shapes;

		}

	}
	function createPaths( text, size, data ) {

		const chars = Array.from( text );
		const scale = size / data.resolution;
		const line_height = ( data.boundingBox.yMax - data.boundingBox.yMin + data.underlineThickness ) * scale;
		const paths = [];
		let offsetX = 0,
			offsetY = 0;
		for ( let i = 0; i < chars.length; i ++ ) {

			const char = chars[ i ];
			if ( char === '\n' ) {

				offsetX = 0;
				offsetY -= line_height;

			} else {

				const ret = createPath( char, scale, offsetX, offsetY, data );
				offsetX += ret.offsetX;
				paths.push( ret.path );

			}

		}

		return paths;

	}

	function createPath( char, scale, offsetX, offsetY, data ) {

		const glyph = data.glyphs[ char ] || data.glyphs[ '?' ];
		if ( ! glyph ) {

			console.error( 'THREE.Font: character "' + char + '" does not exists in font family ' + data.familyName + '.' );
			return;

		}

		const path = new THREE.ShapePath();
		let x, y, cpx, cpy, cpx1, cpy1, cpx2, cpy2;
		if ( glyph.o ) {

			const outline = glyph._cachedOutline || ( glyph._cachedOutline = glyph.o.split( ' ' ) );
			for ( let i = 0, l = outline.length; i < l; ) {

				const action = outline[ i ++ ];
				switch ( action ) {

					case 'm':
						// moveTo

						x = outline[ i ++ ] * scale + offsetX;
						y = outline[ i ++ ] * scale + offsetY;
						path.moveTo( x, y );
						break;
					case 'l':
						// lineTo

						x = outline[ i ++ ] * scale + offsetX;
						y = outline[ i ++ ] * scale + offsetY;
						path.lineTo( x, y );
						break;
					case 'q':
						// quadraticCurveTo

						cpx = outline[ i ++ ] * scale + offsetX;
						cpy = outline[ i ++ ] * scale + offsetY;
						cpx1 = outline[ i ++ ] * scale + offsetX;
						cpy1 = outline[ i ++ ] * scale + offsetY;
						path.quadraticCurveTo( cpx1, cpy1, cpx, cpy );
						break;
					case 'b':
						// bezierCurveTo

						cpx = outline[ i ++ ] * scale + offsetX;
						cpy = outline[ i ++ ] * scale + offsetY;
						cpx1 = outline[ i ++ ] * scale + offsetX;
						cpy1 = outline[ i ++ ] * scale + offsetY;
						cpx2 = outline[ i ++ ] * scale + offsetX;
						cpy2 = outline[ i ++ ] * scale + offsetY;
						path.bezierCurveTo( cpx1, cpy1, cpx2, cpy2, cpx, cpy );
						break;

				}

			}

		}

		return {
			offsetX: glyph.ha * scale,
			path: path
		};

	}

	THREE.Font = Font;
	THREE.FontLoader = FontLoader;

} )();


text:
class AddInvitableToEvent < ActiveRecord::Migration
  def change
    add_column :events, :invitable, :boolean, default: false
  end
end


text:
#pragma once
#include <aws/redshift/Redshift_EXPORTS.h>
#include <aws/redshift/RedshiftRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace Redshift
{
namespace Model
{

  /**
   */
  class AWS_REDSHIFT_API DescribePartnersRequest : public RedshiftRequest
  {
  public:
    DescribePartnersRequest();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "DescribePartners"; }

    Aws::String SerializePayload() const override;

  protected:
    void DumpBodyToUrl(Aws::Http::URI& uri ) const override;

  public:

    /**
     *
The Amazon Web Services account ID that owns the cluster.

     */
    inline const Aws::String& GetAccountId() const{ return m_accountId; }

    /**
     *
The Amazon Web Services account ID that owns the cluster.

     */
    inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }

    /**
     *
The Amazon Web Services account ID that owns the cluster.

     */
    inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; }

    /**
     *
The Amazon Web Services account ID that owns the cluster.

     */
    inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); }

    /**
     *
The Amazon Web Services account ID that owns the cluster.

     */
    inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); }

    /**
     *
The Amazon Web Services account ID that owns the cluster.

     */
    inline DescribePartnersRequest& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;}

    /**
     *
The Amazon Web Services account ID that owns the cluster.

     */
    inline DescribePartnersRequest& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;}

    /**
     *
The Amazon Web Services account ID that owns the cluster.

     */
    inline DescribePartnersRequest& WithAccountId(const char* value) { SetAccountId(value); return *this;}

    /**
     *
The cluster identifier of the cluster whose partner integration is being
     * described.

     */
    inline const Aws::String& GetClusterIdentifier() const{ return m_clusterIdentifier; }

    /**
     *
The cluster identifier of the cluster whose partner integration is being
     * described.

     */
    inline bool ClusterIdentifierHasBeenSet() const { return m_clusterIdentifierHasBeenSet; }

    /**
     *
The cluster identifier of the cluster whose partner integration is being
     * described.

     */
    inline void SetClusterIdentifier(const Aws::String& value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier = value; }

    /**
     *
The cluster identifier of the cluster whose partner integration is being
     * described.

     */
    inline void SetClusterIdentifier(Aws::String&& value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier = std::move(value); }

    /**
     *
The cluster identifier of the cluster whose partner integration is being
     * described.

     */
    inline void SetClusterIdentifier(const char* value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier.assign(value); }

    /**
     *
The cluster identifier of the cluster whose partner integration is being
     * described.

     */
    inline DescribePartnersRequest& WithClusterIdentifier(const Aws::String& value) { SetClusterIdentifier(value); return *this;}

    /**
     *
The cluster identifier of the cluster whose partner integration is being
     * described.

     */
    inline DescribePartnersRequest& WithClusterIdentifier(Aws::String&& value) { SetClusterIdentifier(std::move(value)); return *this;}

    /**
     *
The cluster identifier of the cluster whose partner integration is being
     * described.

     */
    inline DescribePartnersRequest& WithClusterIdentifier(const char* value) { SetClusterIdentifier(value); return *this;}

    /**
     *
The name of the database whose partner integration is being described. If
     * database name is not specified, then all databases in the cluster are
     * described.

     */
    inline const Aws::String& GetDatabaseName() const{ return m_databaseName; }

    /**
     *
The name of the database whose partner integration is being described. If
     * database name is not specified, then all databases in the cluster are
     * described.

     */
    inline bool DatabaseNameHasBeenSet() const { return m_databaseNameHasBeenSet; }

    /**
     *
The name of the database whose partner integration is being described. If
     * database name is not specified, then all databases in the cluster are
     * described.

     */
    inline void SetDatabaseName(const Aws::String& value) { m_databaseNameHasBeenSet = true; m_databaseName = value; }

    /**
     *
The name of the database whose partner integration is being described. If
     * database name is not specified, then all databases in the cluster are
     * described.

     */
    inline void SetDatabaseName(Aws::String&& value) { m_databaseNameHasBeenSet = true; m_databaseName = std::move(value); }

    /**
     *
The name of the database whose partner integration is being described. If
     * database name is not specified, then all databases in the cluster are
     * described.

     */
    inline void SetDatabaseName(const char* value) { m_databaseNameHasBeenSet = true; m_databaseName.assign(value); }

    /**
     *
The name of the database whose partner integration is being described. If
     * database name is not specified, then all databases in the cluster are
     * described.

     */
    inline DescribePartnersRequest& WithDatabaseName(const Aws::String& value) { SetDatabaseName(value); return *this;}

    /**
     *
The name of the database whose partner integration is being described. If
     * database name is not specified, then all databases in the cluster are
     * described.

     */
    inline DescribePartnersRequest& WithDatabaseName(Aws::String&& value) { SetDatabaseName(std::move(value)); return *this;}

    /**
     *
The name of the database whose partner integration is being described. If
     * database name is not specified, then all databases in the cluster are
     * described.

     */
    inline DescribePartnersRequest& WithDatabaseName(const char* value) { SetDatabaseName(value); return *this;}

    /**
     *
The name of the partner that is being described. If partner name is not
     * specified, then all partner integrations are described.

     */
    inline const Aws::String& GetPartnerName() const{ return m_partnerName; }

    /**
     *
The name of the partner that is being described. If partner name is not
     * specified, then all partner integrations are described.

     */
    inline bool PartnerNameHasBeenSet() const { return m_partnerNameHasBeenSet; }

    /**
     *
The name of the partner that is being described. If partner name is not
     * specified, then all partner integrations are described.

     */
    inline void SetPartnerName(const Aws::String& value) { m_partnerNameHasBeenSet = true; m_partnerName = value; }

    /**
     *
The name of the partner that is being described. If partner name is not
     * specified, then all partner integrations are described.

     */
    inline void SetPartnerName(Aws::String&& value) { m_partnerNameHasBeenSet = true; m_partnerName = std::move(value); }

    /**
     *
The name of the partner that is being described. If partner name is not
     * specified, then all partner integrations are described.

     */
    inline void SetPartnerName(const char* value) { m_partnerNameHasBeenSet = true; m_partnerName.assign(value); }

    /**
     *
The name of the partner that is being described. If partner name is not
     * specified, then all partner integrations are described.

     */
    inline DescribePartnersRequest& WithPartnerName(const Aws::String& value) { SetPartnerName(value); return *this;}

    /**
     *
The name of the partner that is being described. If partner name is not
     * specified, then all partner integrations are described.

     */
    inline DescribePartnersRequest& WithPartnerName(Aws::String&& value) { SetPartnerName(std::move(value)); return *this;}

    /**
     *
The name of the partner that is being described. If partner name is not
     * specified, then all partner integrations are described.

     */
    inline DescribePartnersRequest& WithPartnerName(const char* value) { SetPartnerName(value); return *this;}

  private:

    Aws::String m_accountId;
    bool m_accountIdHasBeenSet;

    Aws::String m_clusterIdentifier;
    bool m_clusterIdentifierHasBeenSet;

    Aws::String m_databaseName;
    bool m_databaseNameHasBeenSet;

    Aws::String m_partnerName;
    bool m_partnerNameHasBeenSet;
  };

} // namespace Model
} // namespace Redshift
} // namespace Aws


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Essai Crypt. Exot. (Paris) 1: 64 (1825)

#### Original name
Chiodecton paradoxum Fée

### Remarks
null