text:
SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source ${SCRIPT_ROOT}/funcs.sh

# ============require_new_version============
# Description: a new version is required when current < required
# Usage: [[ $(require_new_version currentversion requiredversion) ]]
function require_new_version()
{
    local currentv=${1}
    local requiredv=${2}

    if [[ ${currentv} == 0 || -z ${currentv} ]]; then
        echo true # does not exist
        return
    fi

    if [[ -z ${requiredv} ]]; then
        echo false # no specific version required
        return
    fi

    dpkg --compare-versions ${currentv} "lt" ${requiredv}
    if [[ $? == 0 ]]; then
        echo true # current < required
    else
        echo false # current >= required
    fi
}

# ============require_new_version_strict============
# Description: a new version is required when current != required (common depth)
# Usage: [[ $(require_new_version_strict currentversion requiredversion) ]]
function require_new_version_strict()
{
    local currentv=${1}
    local requiredv=${2}

    if [[ ${currentv} == 0 ]]; then
        echo true # does not exist
        return
    fi

    if [[ -z ${requiredv} ]]; then
        echo false # no specific version required
        return
    fi

    # Same version depth
    local n=$(nchar_occurence ${currentv} .)
    local nreq=$(nchar_occurence ${requiredv} .)
    if [[ ${nreq} -lt ${n} ]];then
        n=${nreq}
    fi
    n=$((n+1))
    currentv=$(echo ${currentv} | grep -o -E "[0-9]+" | head -${n})
    requiredv=$(echo ${requiredv} | grep -o -E "[0-9]+" | head -${n})

    currentv=$(echo ${currentv})
    requiredv=$(echo ${requiredv})
    currentv=${currentv// /.}
    requiredv=${requiredv// /.}

    # Compare
    dpkg --compare-versions "${currentv}" "eq" "${requiredv}"
    if [[ $? == 0 ]]; then
        echo false # current == required
    else
        echo true # current != required
    fi
}

# ============get_local_version============
# Description:
# Usage: version=$(get_local_version requiredversion)
function get_local_version()
{
    local requiredv=${1}

    for dirname in $(ls -d */ | sort -V); do
        local version=$(echo ${dirname} | grep -E -o "[0-9\.]+[0-9]")
        if [[ $(require_new_version ${version} ${requiredv}) == false ]]; then
            echo ${version}
            return
        fi
    done
}

# ============get_local_version_strict============
# Description:
# Usage: version=$(get_local_version_strict requiredversion)
function get_local_version_strict()
{
    local requiredv=${1}

    for dirname in $(ls -d */ | sort -V); do
        local version=$(echo ${dirname} | grep -E -o "[0-9\.]+[0-9]")
        if [[ $(require_new_version_strict ${version} ${requiredv}) == false ]]; then
            echo ${version}
            return
        fi
    done
}

# ============easymake_prefix============
# Description:
# Usage: easymake_prefix xraylib 3.3.0
function easymake_prefix()
{
    local program=${1}
    local version=${2}
    echo $(project_opt)/${program}/${version}
}

# ============easymake_prefixstr============
# Description:
# Usage: easymake_prefixstr xraylib 3.3.0
function easymake_prefixstr()
{
    local program=${1}
    local version=${2}
    echo $(project_optstr)/${program}/${version}
}

# ============mmakeinstall============
# Description: Execute make install
# Usage: mmakeinstall pkgname-version
function mmakeinstall()
{
    local name=${1}
    if [[ -z ${name} ]];then
        name=$(randomstring 6)
    fi
    if [[ $(install_systemwide) == true ]]; then
        if [[ $(cmdexists "checkinstall") == true ]]; then
            sudo -E checkinstall -y --pkgname "${name}-checkinstall"
            dpkg -l ${name}-checkinstall
            echo "Remove with \"dpkg -r ${name}-checkinstall\""
        else
            sudo -E make install -s
        fi
    else
        make install -s
    fi
}

# ============mmakepack============
# Description: Execute make install
# Usage: mmakepack pkgname-version
function mmakepack()
{
    local name=${1}
    if [[ -z ${name} ]];then
        name=$(randomstring 6)
    fi
    checkinstall -y --pkgname "${name}-checkinstall" --install=no
}

# ============mdpkg_install============
# Description: dpkg without prompt
# Usage: mdpkg_install package.deb ${prefix}
function mdpkg_install()
{
    local package="$1"
    local prefix="$2"
    local extension=${package: -4}
    if [[ ${extension} == ".deb" ]]; then
        if [[ $(install_systemwide) == true ]]; then
            sudo -E dpkg -i ${package}
        else
            dpkg -x ${package} ${prefix}
        fi
    elif [[ ${extension} == ".rpm" ]]; then
        if [[ $(install_systemwide) == true ]]; then
            sudo -E rpm -i ${package}
        else
            local restorewd=$(pwd)
            cd ${prefix}
            rpm2cpio "${restorewd}/${package}" | cpio -id
            cd ${restorewd}
        fi
    else
        echo "Skip ${package} installation (unknown package extension)"
    fi
}

# ============cprint_makeenv============
# Description:
# Usage:
function cprint_makeenv()
{
    cprint "Binaries: PATH=${PATH}"
    cprint "Headers: CPATH=${CPATH}"
    cprint "Shared libraries: LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"
    cprint "Static libraries: LIBRARY_PATH=${LIBRARY_PATH}"
    cprint "Library metadata: PKG_CONFIG_PATH=${PKG_CONFIG_PATH}"
}

# ============removelocal_path============
# Description:
# Usage:
function removelocal_path()
{
    local _path=${1}
    while [[ "${_path: -1}" == ":" ]];do
        _path=${_path::-1}
    done
    while [[ "${_path:0:1}" == ":" ]];do
        _path=${_path:1}
    done
    echo ${_path}
}

# ============makeenv_removelocal============
# Description:
# Usage:
function makeenv_removelocal()
{
    export PATH=$(removelocal_path ${PATH})
    export CPATH=$(removelocal_path ${CPATH})
    export LD_LIBRARY_PATH=$(removelocal_path ${LD_LIBRARY_PATH})
    export LIBRARY_PATH=$(removelocal_path ${LIBRARY_PATH})
    export PKG_CONFIG_PATH=$(removelocal_path ${PKG_CONFIG_PATH})
}

# ============easymake_makeenv============
# Description:
# Usage:
function easymake_makeenv()
{
    local program=${1}
    local version=${2}
    local prefix=$(easymake_prefix ${program} ${version})
    local prefixstr=$(easymake_prefixstr ${program} ${version})

    addProfile $(project_resource) "# Installed ${program}: ${prefixstr}"
    if [[ -d "${prefix}/bin" ]];then
        addBinPath "${prefix}/bin"
        addBinPathProfile $(project_resource) "${prefixstr}/bin"
    fi
    if [[ -d "${prefix}/bin/${program}" ]];then
        addBinPath "${prefix}/bin/${program}"
        addBinPathProfile $(project_resource) "${prefixstr}/bin/${program}"
    fi
    if [[ -d "${prefix}/lib" ]];then
        addLibPath "${prefix}/lib"
        addLibPathProfile $(project_resource) "${prefixstr}/lib"
    fi
    if [[ -d "${prefix}/lib/${program}" ]];then
        addLibPath "${prefix}/lib/${program}"
        addLibPathProfile $(project_resource) "${prefixstr}/lib/${program}"
    fi
    if [[ -d "${prefix}/include" ]];then
        addInclPath "${prefix}/include"
        addInclPathProfile $(project_resource) "${prefixstr}/include"
    fi
    if [[ -d "${prefix}/include/${program}" ]];then
        addInclPath "${prefix}/include/${program}"
        addInclPathProfile $(project_resource) "${prefixstr}/include/${program}"
    fi
    if [[ -d "${prefix}/lib/pkgconfig" ]];then
        addPkgConfigPath "${prefix}/lib/pkgconfig"
        addPkgConfigPathProfile $(project_resource) "${prefixstr}/lib/pkgconfig"
    fi
    if [[ -d "${prefix}/lib/${program}/pkgconfig" ]];then
        addPkgConfigPath "${prefix}/lib/${program}/pkgconfig"
        addPkgConfigPathProfile $(project_resource) "${prefixstr}/lib/${program}/pkgconfig"
    fi
}

# ============easymake_configure============
# Description:
# Usage:
function easymake_configure()
{
    local program=${1}
    local version=${2}
    local cfgparams="${@:3}"
    local base=${program}-${version}
    local prefix=$(easymake_prefix ${program} ${version})

    if [[ -e "Makefile" ]]; then
        cprint "Configure ${program} (${version}): already configured."
        cprint " --prefix=\"${prefix}\" ${cfgparams}"
    else
        cprint "Configure ${program} (${version}) with options:"
        cprint " --prefix=\"${prefix}\" ${cfgparams}"

        # In case configure file does not exist
        if [[ ! -f "../${base}/configure" && -f "../${base}/configure.ac" ]]; then
            local restorewd=$(pwd)
            cd ../${base}
            #autoreconfig -i
            libtoolize --force
            aclocal
            autoheader
            automake --force-missing --add-missing
            autoconf
            cd ${restorewd}
        fi

        # Configure
        ../${base}/configure --help
        eval "../${base}/configure --prefix="${prefix}" ${cfgparams}"

        if [[ $? != 0 ]]; then
            cerror "Configuring ${program} (${version}) failed"
            LD_LIBRARY_PATH=${keep_LD_LIBRARY_PATH}
        fi
    fi
}

# ============easymake_build============
# Description:
# Usage:
function easymake_build()
{
    local program=${1}
    local version=${2}
    make -s -j$(($(nproc)+1))
    return $?
}

# ============easymake_install============
# Description:
# Usage:
function easymake_install()
{
    local program=${1}
    local version=${2}
    local prefix=$(easymake_prefix ${program} ${version})
    mmakeinstall "${program}-${version}"
    #mmakepack ${prefix}
    #mdpkg_install *.deb ${prefix}
}

# ============easymake============
# Description: Execute typical configure/make/make install
#              Either directory program-version must exist
#              or file program-version.tar.gz (untar and remove)
# Usage: easymake xraylib 3.3.0 --enable-python --enable-python-integration ...
function easymake()
{
    local restorewd=$(pwd)
    local program=${1}
    local version=${2}
    local cfgparams="${@:3}"
    local func_configure="${program}_configure"
    local func_build="${program}_build"
    local func_install="${program}_install"
    local func_post="${program}_post"
    local prefix=$(easymake_prefix ${program} ${version})
    cfgparams=$(eval echo ${cfgparams})

    # Create source directory program-1.2.3
    local base=${program}-${version}
    if [[ ! -d ${base} ]]; then
        mkdir -p ${base}
        tar -xzf ${base}.tar.gz -C ${base}
        while [[ $(ls ${base} -1 | wc -l) == 1 ]];do
            local _subdir=${base}/$(ls ${base} -1)
            mv ${_subdir}/* ${base}
            rm -r ${_subdir}
        done
        rm -f ${base}.tar.gz
    fi

    # Create build directory program-1.2.3-build
    mkdir -p ${base}-build
    cd ${base}-build

    # Make sure destination exists
    mexec mkdir -p ${prefix}

    # Remove local directory env paths
    makeenv_removelocal
    cprint_makeenv

    cprint "Configure ${program} (${version}) with options:"
    local prefix=$(easymake_prefix ${program} ${version})
    cprint "${cfgparams}"
    if [[ $(cmdexists ${func_configure}) == true ]];then
        eval ${func_configure} ${program} ${version} ${cfgparams}
    else
        easymake_configure ${program} ${version} ${cfgparams}
    fi

    cprint "Build ${program} (${version}) ..."
    if [[ $(cmdexists ${func_build}) == true ]];then
        eval ${func_build} ${program} ${version}
    else
        easymake_build ${program} ${version}
    fi
    if [[ $? != 0 ]]; then
        cerror "Building ${program} (${version}) failed"
        cd ${restorewd}
        return
    fi

    cprint "Install ${program} (${version}) ..."
    if [[ $(cmdexists ${func_install}) == true ]];then
        eval ${func_install} ${program} ${version}
    else
        easymake_install ${program} ${version}
    fi

    cprint "Set environment for ${program} (${version}) ..."
    if [[ $(cmdexists ${func_makeenv}) == true ]];then
        eval ${func_makeenv} ${program} ${version}
    else
        easymake_makeenv ${program} ${version}
    fi

    cprint "Post installation ${program} (${version}) ..."
    if [[ $(cmdexists ${func_post}) == true ]];then
        eval ${func_post} ${program} ${version}
    fi

    cd ${restorewd}
}

# ============source_install============
# Description: Build and install with make
# Usage: source_install "xraylib" 3.3.0  --enable-python --enable-python-integration ...
#        Needs functions: xraylib_configure (optional)
#                         xraylib_latest
#                         xraylib_download
#                         xraylib_build_dependencies (optional)
function source_install()
{
    local program=${1}
    local rversion=${2}
    local restorewd=$(pwd)
    local func_latest="${program}_latest"
    local func_download="${program}_download"
    local func_deps="${program}_build_dependencies"
    local cfgparams="${@:3}"

    mkdir -p ${program}
    cd ${program}

    cprint "Determine ${program} version to be installed ..."
    local version=$(get_local_version)
    if [[ -z ${version} || $(require_new_version ${version} ${rversion}) ]]; then
        require_web_essentials
        version=$($func_latest ${rversion})
    fi

    if [[ -z ${version} ]];then
        version="master"
    fi

    local base=${program}-${version}
    if [[ $(dryrun) == false && ! -d ${base} ]]; then
        cprint "Download ${program} (${version}) ..."
        eval $func_download ${base}
    fi

    if [[ $(dryrun) == false ]]; then
        cd ${restorewd}
        eval $func_deps
        cd ${program}
        easymake ${program} ${version} ${cfgparams}
    fi

    cd ${restorewd}
}

# ============require_software============
# Description: Get the latest version
# Usage: require_software "swig" 3
#        Needs functions: swig_version
#                         swig_exists
#                         swig_system_install (optional)
#                         swig_source_install
#                         swig_run_dependencies (optional)
#                         swig_build_dependencies (optional)
#                         swig_configure (optional)
#                         swig_build (optional)
#                         swig_install (optional)
#                         swig_environment (optional)
#                         swig_post (optional)
#                         swig_latest
#                         swig_download
function require_software()
{
    local program=${1}
    local rversion=${2}
    cprintstart "Require ${program} ${rversion}"

    # Check version
    if [[ $(require_new_version $(${program}_version) ${rversion}) == false ]]; then
        cprint "${program} version $(${program}_version) will be used"
        cprintend "Require ${program} ${rversion}"
        return
    fi

    if [[ $(dryrun) == false ]]; then
        # Try system installation
        cprint "System install ${program} ${rversion} ..."
        eval ${program}_system_install ${rversion}

        # Check version
        if [[ $(require_new_version $(${program}_version) ${rversion}) == false ]]; then
            cprint "${program} version $(${program}_version) will be used"
            cprintend "Require ${program} ${rversion}"
            return
        fi

        # Run dependencies
        cprint "Install run dependencies of ${program} ${rversion} ..."
        eval ${program}_run_dependencies

        # Install from source
        cprint "Source install ${program} ${rversion} ..."
        eval ${program}_source_install ${rversion}
    fi

    # Check version
    if [[ $(require_new_version $(${program}_version) ${rversion}) == false ]]; then
        cprint "${program} version $(${program}_version) will be used"
    else
        local _exists
        if [[ $(cmdexists "${program}_exists") == true ]];then
            _exists=$(${program}_exists)
        else
            _exists=$(cmdexists ${program})
        fi
        if [[ ${_exists} == false ]]; then
            cerror "${program} is not installed"
        else
            cerror "${program} version $(${program}_version) will be used but ${rversion} is required"
        fi
    fi

    cprintend "Require ${program} ${rversion}"
}

# ============latest_version============
# Description: Get the latest version
# Usage: latest_version "swig_all_versions" 3
function latest_version()
{
    local lst=($(eval ${1}))
    local rversion=${2}

    # Last version when no version requested
    if [[ -z ${rversion} ]];then
        echo ${lst[-1]}
        return
    fi

    # Last version with the same base
    local _version=""
    for i in ${lst[@]}; do
        if [[ $(require_new_version ${i} ${rversion}) == false ]]; then
            if [[ ${i} == ${rversion} || ${i} =~ ${rversion}[^0-9] ]]; then
                _version=${i}
            fi
        fi
    done

    # Last version equal or better
    if [[ -z ${_version} ]];then
        for i in ${lst[@]}; do
            if [[ $(require_new_version ${i} ${rversion}) == false ]]; then
                _version=${i}
            fi
        done
    fi

    # Last version
    if [[ -z ${_version} ]];then
        _version=${lst[-1]}
    fi

    echo ${_version}
}

# ============versions_from_site============
# Description: Get all releases from site
# Usage: versions_from_site "ftp://xmlsoft.org/libxslt" "libxslt-[0-9\.]+[0-9]\.tar\.gz$"
function versions_from_site()
{
    curl -slL ${1} | grep -E -o ${2} | grep -E -o "[0-9\.]+[0-9]" | sort --version-sort
}

# ============versions_from_github============
# Description: Get all releases on github
# Usage: versions_from_github "tschoonj" "easyRNG" "easyRNG-[0-9\.]+"
function versions_from_github()
{
    local header=""
    if [[ ! -z ${GITHUB_TOKEN} ]];then
        header="Authorization: token ${GITHUB_TOKEN}"
    fi
    curl -H "${header}" --silent "https://api.github.com/repos/${1}/${2}/tags" | grep -o -E "\"name\": \"${3}\"" | grep -E -o "[0-9\.]+[0-9]" | sort --version-sort
}


text:
package xworker.swt.app.editors;

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

import org.xmeta.ActionContext;
import org.xmeta.Thing;
import org.xmeta.World;
import org.xmeta.util.ActionContainer;

import xworker.swt.app.IEditor;
import xworker.workbench.EditorParams;

public class ClassSourceViewer {
	public static void setContent(ActionContext actionContext) {
		ActionContainer sourceViewer = actionContext.getObject("sourceViewer");
		Map<String, Object> params = actionContext.getObject("params");

		Object className = params.get("className");

		if(className instanceof Class){
		    className = ((Class<?>) className).getName();
		}

		//编辑器
		actionContext.g().put("className", className);
		sourceViewer.doAction("setClassName", actionContext, "className", className);

		//概要
		if(actionContext.get("classViewer") != null){
			ActionContainer classViewer = actionContext.getObject("classViewer");
		    classViewer.doAction("setClass", actionContext, "cls", className);
		}
	}

	public static void onOutlineCreated(ActionContext actionContext){
		//概要
		if(actionContext.get("classViewer") != null){
			ActionContainer classViewer = actionContext.getObject("classViewer");
			classViewer.doAction("setClass", actionContext, "cls", actionContext.get("className"));
		}
	}

	public static EditorParams<Class<?>> createParams(ActionContext actionContext){
		Thing self = actionContext.getObject("self");
		Object content = actionContext.getObject("content");
		Class<?> cls = null;
		if(content instanceof  String){
			try{
				cls = Class.forName((String) content);
			}catch(Exception ignore){
			}
		}else if(content instanceof Class){
			cls = (Class<?>) content;
		}

		if(cls != null) {
			final Class<?> c = cls;
			return new EditorParams<Class<?>>(self, "DemoWeb:" + cls.getName(), cls) {
				@Override
				public Map<String, Object> getParams() {
					Map<String, Object> params = new HashMap<>();
					params.put("className", c.getName());

					return params;
				}
			};
		}

		return null;
	}

	public static String getSimpleTitle(ActionContext actionContext) {
		if(actionContext.get("className") != null){
			String className = actionContext.getObject("className");
		    int index = className.lastIndexOf(".");
		    if(index != -1){
		        return className.substring(index + 1, className.length()) + ".class";
		    }else{
		        return className + ".class";
		    }
		}else{
		    return "No class";
		}
	}

	public static String getTitle(ActionContext actionContext) {
		if(actionContext.get("className") != null){
			String className = actionContext.getObject("className");
		    return className + ".class";
		}else{
		    return "No class";
		}
	}

	public static boolean isSameContent(ActionContext actionContext) {
		if(actionContext.get("className") == null){
		    return false;
		}

		String className = actionContext.getObject("className");
		Map<String, Object> params = actionContext.getObject("params");
		Object cName = (String) params.get("className");

		if(cName instanceof Class){
		    cName = ((Class<?>) cName).getName();
		}

		return className.equals(cName);
	}

	public static Map<String, Object> createDataParams(ActionContext actionContext){
		Object data = actionContext.get("data");
		if(data instanceof Class<?>) {
			Class<?> cls = (Class<?>) data;
			Map<String, Object> params = new HashMap<String, Object>();
			params.put("className", data);
			params.put(IEditor.EDITOR_THING, World.getInstance().getThing("xworker.swt.app.editors.ClassSourceViewer"));
			params.put(IEditor.EDITOR_ID, "Class:" + cls.getName());
			return params;
		}

		return null;
	}
}

redpajama_set_name: RedPajamaGithub


text:
@interface RCCreatorObject ()

@property (nonatomic, strong) NSNumber *identifier;
@property (nonatomic, strong) NSString *firstName;
@property (nonatomic, strong) NSString *middleName;
@property (nonatomic, strong) NSString *lastName;
@property (nonatomic, strong) NSString *suffix;
@property (nonatomic, strong) NSString *fullName;
@property (nonatomic, strong) NSDate *lastModified;
@property (nonatomic, strong) NSURL *resourceURI;
@property (nonatomic, strong) NSArray *urls;
@property (nonatomic, strong) RCImageObject *thumbnail;
@property (nonatomic, strong) RCListObject *series;
@property (nonatomic, strong) RCListObject *stories;
@property (nonatomic, strong) RCListObject *comics;
@property (nonatomic, strong) RCListObject *events;

@end

@implementation RCCreatorObject

#pragma mark - RCObjectProtocol

- (id)initWithDictionary:(NSDictionary *)dictionary
{
	if (![self isValidObject:dictionary]) {
		return nil;
	}

	self = [super init];

	if (self) {
		self.identifier = dictionary[RCResponseKeyIdentifier];
		self.firstName = dictionary[RCResponseKeyFirstName];
		self.middleName = dictionary[RCResponseKeyMiddleName];
		self.lastName = dictionary[RCResponseKeyLastName];
		self.suffix = dictionary[RCResponseKeySuffix];
		self.fullName = dictionary[RCResponseKeyFullName];
		self.lastModified = [self dateFromString:dictionary[RCResponseKeyModified]];

		if ([self isValidObject:dictionary[RCResponseKeyResourceURI]]) {
			self.resourceURI = [NSURL URLWithString:dictionary[RCResponseKeyResourceURI]];
		}

		self.urls = [self urlsFromArray:dictionary[RCResponseKeyURLs]];
		self.thumbnail = [[RCImageObject alloc] initWithDictionary:dictionary[RCResponseKeyThumbnail]];
		self.comics = [[RCListObject alloc] initWithDictionary:dictionary[RCResponseKeyComics]];
		self.stories = [[RCListObject alloc] initWithDictionary:dictionary[RCResponseKeyStories]];
		self.series = [[RCListObject alloc] initWithDictionary:dictionary[RCResponseKeySeries]];
		self.events = [[RCListObject alloc] initWithDictionary:dictionary[RCResponseKeyEvents]];
	}

	return self;
}

@end


text:
import * as React from "react";
import { DataType, HeaderType, PropertyType } from "../shared/types";
import { DragSource, DragSourceSpec, DragDropContext, DragSourceMonitor, DragSourceConnector, ConnectDragSource, DropTargetSpec, DropTargetConnector, DropTargetMonitor, ConnectDropTarget, DropTarget } from "react-dnd";
import HTML5Backend from 'react-dnd-html5-backend';
import { TableHeader } from "./table-header";

class TableRow extends React.Component<{ record: DataType, columns: PropertyType[] }, {}>{
    render() {
        const { record, columns } = this.props;

        return (

                {columns.map(y => {record[y]}	)}

)
    }
}

export type TableProps = {data: DataType[], columns: PropertyType[], header: HeaderType, onDrop: (source: PropertyType, target: PropertyType) => void}
class TableComponent extends React.Component<TableProps, {}>{
    getData = (x: PropertyType, y: HeaderType | DataType) => y[x];

    render() {
        const { data, columns, header, onDrop } = this.props;
        return (

                <TableHeader columns={columns} header={header} onDrop={onDrop} />

                    {data.map(x => <TableRow key={x.id} columns={columns} record={x} />)}

)
    }
}

export const Table = DragDropContext(HTML5Backend)(TableComponent)


text: exec nginx -c /etc/nginx/nginx.conf -g "daemon off;"


text:
'use strict';

/*
 * SlickLightbox documentation #

Documentation generated by [CoffeeDoc](http://github.com/omarkhan/coffeedoc)
 */
var SlickLightbox, defaults;

SlickLightbox = (function() {

  /*
  	The one and only class used.
   */
  function SlickLightbox(element, options) {
    var that;
    this.options = options;

    /* Binds the plugin. */
    this.element = $(element);
    this.didInit = false;
    that = this;
    this.element.on('click.slickLightbox', this.options.itemSelector, function(e) {
      e.preventDefault();
      return that.init(that.element.find(that.options.itemSelector).index($(this)));
    });
  }

  SlickLightbox.prototype.init = function(index) {

    /* Creates the lightbox, opens it, binds events and calls `slick`. Accepts `index` of the element, that triggered it (so that we know, on which slide to start slick). */
    this.didInit = true;
    this.detectIE();
    this.createModal(index);
    this.bindEvents();
    this.initSlick();
    return this.open();
  };

  SlickLightbox.prototype.createModalItems = function(index) {
    var a, createItem, links;
    if (this.options.images) {
      links = $.map(this.options.images, function(img) {
        return "

";
      });
    } else {
      createItem = (function(_this) {
        return function(el) {
          var caption;
          caption = _this.getElementCaption(el);
          return "

" + caption + "

";
        };
      })(this);
      a = this.element.find(this.options.itemSelector);
      if (index === 0 || index === -1) {
        links = $.map(a, createItem);
      } else {
        links = $.map(a.slice(index), createItem);
        $.each(a.slice(0, index), function(i, el) {
          return links.push(createItem(el));
        });
      }
    }
    return links;
  };

  SlickLightbox.prototype.createModal = function(index) {

    /* Creates a `slick`-friendly modal. Rearranges the items so that the `index`-th item is placed first. */
    var html, links;
    links = this.createModalItems(index);
    html = "
\n
\n
" + (links.join('')) + "
\n		<button type=\"button\" class=\"slick-lightbox-close\"></button>\n
\n
";
    this.modalElement = $(html);
    return $('body').append(this.modalElement);
  };

  SlickLightbox.prototype.initSlick = function(index) {

    /* Runs slick by default, using `options.slick` if provided. If `options.slick` is a function, it gets fired instead of us initializing slick. */
    if (this.options.slick != null) {
      if (typeof this.options.slick === 'function') {
        this.options.slick(this.modalElement);
      } else {
        this.slick = this.modalElement.find('.slick-lightbox-slick').slick(this.options.slick);
      }
    } else {
      this.slick = this.modalElement.find('.slick-lightbox-slick').slick();
    }
    return this.modalElement.trigger('init.slickLightbox');
  };

  SlickLightbox.prototype.open = function() {

    /* Opens the lightbox. */
    this.element.trigger('show.slickLightbox');
    setTimeout(((function(_this) {
      return function() {
        return _this.element.trigger('shown.slickLightbox');
      };
    })(this)), this.getTransitionDuration());
    return this.modalElement.removeClass('slick-hide-init');
  };

  SlickLightbox.prototype.close = function() {

    /* Closes the lightbox and destroys it, maintaining the original element bindings. */
    this.element.trigger('hide.slickLightbox');
    setTimeout(((function(_this) {
      return function() {
        return _this.element.trigger('hidden.slickLightbox');
      };
    })(this)), this.getTransitionDuration());
    this.modalElement.addClass('slick-hide');
    return this.destroy();
  };

  SlickLightbox.prototype.bindEvents = function() {

    /* Binds global events. */
    var resizeSlides;
    resizeSlides = (function(_this) {
      return function() {
        var h;
        h = _this.modalElement.find('.slick-lightbox-inner').height();
        _this.modalElement.find('.slick-lightbox-slick-item').height(h);
        return _this.modalElement.find('.slick-lightbox-slick-img').css('max-height', Math.round(0.9 * h));
      };
    })(this);
    $(window).on('orientationchange.slickLightbox resize.slickLightbox', resizeSlides);
    this.modalElement.on('init.slickLightbox', resizeSlides);
    this.modalElement.on('destroy.slickLightbox', (function(_this) {
      return function() {
        return _this.destroy();
      };
    })(this));
    this.modalElement.on('click.slickLightbox touchstart.slickLightbox', '.slick-lightbox-close', (function(_this) {
      return function(e) {
        e.preventDefault();
        return _this.close();
      };
    })(this));
    if (this.options.closeOnEscape || this.options.navigateByKeyboard) {
      $(document).on('keydown.slickLightbox', (function(_this) {
        return function(e) {
          var code;
          code = e.keyCode ? e.keyCode : e.which;
          if (_this.options.navigateByKeyboard) {
            if (code === 37) {
              _this.slideSlick('left');
            } else if (code === 39) {
              _this.slideSlick('right');
            }
          }
          if (_this.options.closeOnEscape) {
            if (code === 27) {
              return _this.close();
            }
          }
        };
      })(this));
    }
    if (this.options.closeOnBackdropClick) {
      this.modalElement.on('click.slickLightbox touchstart.slickLightbox', '.slick-lightbox-slick-img', (function(_this) {
        return function(e) {
          return e.stopPropagation();
        };
      })(this));
      return this.modalElement.on('click.slickLightbox touchstart.slickLightbox', '.slick-lightbox-slick-item', (function(_this) {
        return function(e) {
          e.preventDefault();
          return _this.close();
        };
      })(this));
    }
  };

  SlickLightbox.prototype.slideSlick = function(direction) {
    if (direction === 'left') {
      return this.slick.slick('slickPrev');
    } else {
      return this.slick.slick('slickNext');
    }
  };

  SlickLightbox.prototype.detectIE = function() {
    var ieversion;
    this.isIE = false;
    if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
      ieversion = new Number(RegExp.$1);
      if (ieversion < 9) {
        return this.isIE = true;
      }
    }
  };

  SlickLightbox.prototype.getElementCaption = function(el) {
    var c;
    if (!this.options.caption) {
      return '';
    }
    c = (function() {
      switch (typeof this.options.caption) {
        case 'function':
          return this.options.caption(el);
        case 'string':
          return $(el).data(this.options.caption);
      }
    }).call(this);
    return "" + c + "";
  };

  SlickLightbox.prototype.unbindEvents = function() {

    /* Unbinds global events. */
    $(window).off('.slickLightbox');
    $(document).off('.slickLightbox');
    return this.modalElement.off('.slickLightbox');
  };

  SlickLightbox.prototype.destroy = function(unbindAnchors) {
    if (unbindAnchors == null) {
      unbindAnchors = false;
    }

    /* Destroys the lightbox and unbinds global events. If `true` is passed as an argument, unbinds the original element as well. */
    if (this.didInit) {
      this.unbindEvents();
      setTimeout(((function(_this) {
        return function() {
          return _this.modalElement.remove();
        };
      })(this)), this.options.destroyTimeout);
    }
    if (unbindAnchors) {
      return this.element.off('.slickLightbox', this.options.itemSelector);
    }
  };

  SlickLightbox.prototype.destroyPrevious = function() {

    /* Destroys lightboxes currently in DOM. */
    return $('body').children('.slick-lightbox').trigger('destroy.slickLightbox');
  };

  SlickLightbox.prototype.getTransitionDuration = function() {
    var duration;
    if (this.transitionDuration) {
      return this.transitionDuration;
    }
    duration = this.modalElement.css('transition-duration');
    return this.transitionDuration = duration.indexOf('ms') > -1 ? parseFloat(duration) : parseFloat(duration) * 1000;
  };

  return SlickLightbox;

})();

defaults = {
  background: 'rgba(0,0,0,.8)',
  closeOnEscape: true,
  closeOnBackdropClick: true,
  destroyTimeout: 500,
  itemSelector: 'a',
  navigateByKeyboard: true,
  caption: false,
  captionPosition: 'dynamic',
  images: false,
  slick: {}
};

$.fn.slickLightbox = function(options) {
  options = $.extend({}, defaults, options);
  this.slickLightbox = new SlickLightbox(this, options);
  return this;
};

$.fn.unslickLightbox = function() {
  return this.slickLightbox.destroy(true);
};


text:
"""Caches the debian package first version dataframe"""
import requests
import json

from . import cache

CLOUD_API_CACHE_URL_TEMPLATE = (
    'https://storage.googleapis.com/debian-osv/first_package_output/'
    '{version}.json')
CACHE_DURATION_SECONDS = 60 * 60 * 24
TIMEOUT = 30  # Timeout for HTTP(S) requests

debian_version_cache = cache.InMemoryCache()

class ReleaseNotFoundError(Exception):
  """Release cannot be found.

  Most likely a new release that haven't been picked up yet.

  Args:
      release_number: the release number that cannot be found.
  """
  release_number: str

  def __init__(self, release_number):
    super().__init__(release_number)
    self.release_number = release_number

@cache.cached(debian_version_cache, 24 * 60 * 60)
def _get_first_versions_for_release(release_number: str):
  """Gets the first version mapping for specific release number"""
  response = requests.get(
      CLOUD_API_CACHE_URL_TEMPLATE.format(version=release_number),
      timeout=TIMEOUT)
  if response.status_code == 404:
    raise ReleaseNotFoundError(release_number)

  return json.loads(response.text)

def get_first_package_version(package_name: str, release_number: str) -> str:
  """Get first package version"""

  try:
    return _get_first_versions_for_release(release_number)[package_name]
  except KeyError:
    # The package is not added when the image is first seen.
    # So it is safe to leave it as 0, indicating the earliest version
    # given by the snapshot API
    return '0'


text:
using starboard::shared::win32::DebugLogWinError;

bool SbFileClose(SbFile file) {
  if (!SbFileIsValid(file)) {
    return false;
  }

  bool success = CloseHandle(file->file_handle);

  if (!success) {
    DebugLogWinError();
  }

  delete file;

  return success;
}


text:
/**
 @file
 cocos2d (cc) types
*/

#import <Foundation/Foundation.h>
#import "ccMacros.h"

#ifdef __CC_PLATFORM_IOS
#import <CoreGraphics/CGGeometry.h>	// CGPoint
#endif

#import "Platforms/CCGL.h"

/** RGB color composed of bytes 3 bytes
 */

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _ccColor3B
{
	GLubyte	r;
	GLubyte	g;
	GLubyte b;
} ccColor3B;

//! helper macro that creates an ccColor3B type
static inline ccColor3B
ccc3(const GLubyte r, const GLubyte g, const GLubyte b)
{
	ccColor3B c = {r, g, b};
	return c;
}

	//ccColor3B predefined colors
//! White color (255,255,255)
static const ccColor3B ccWHITE = {255,255,255};
//! Yellow color (255,255,0)
static const ccColor3B ccYELLOW = {255,255,0};
//! Blue color (0,0,255)
static const ccColor3B ccBLUE = {0,0,255};
//! Green Color (0,255,0)
static const ccColor3B ccGREEN = {0,255,0};
//! Red Color (255,0,0,)
static const ccColor3B ccRED = {255,0,0};
//! Magenta Color (255,0,255)
static const ccColor3B ccMAGENTA = {255,0,255};
//! Black Color (0,0,0)
static const ccColor3B ccBLACK = {0,0,0};
//! Orange Color (255,127,0)
static const ccColor3B ccORANGE = {255,127,0};
//! Gray Color (166,166,166)
static const ccColor3B ccGRAY = {166,166,166};

/** RGBA color composed of 4 bytes
*/
typedef struct _ccColor4B
{
	GLubyte	r;
	GLubyte	g;
	GLubyte	b;
	GLubyte a;
} ccColor4B;
//! helper macro that creates an ccColor4B type
static inline ccColor4B
ccc4(const GLubyte r, const GLubyte g, const GLubyte b, const GLubyte o)
{
	ccColor4B c = {r, g, b, o};
	return c;
}

/** returns YES if both ccColor4F are equal. Otherwise it returns NO.
 */
static inline BOOL ccc4BEqual(ccColor4B a, ccColor4B b)
{
    return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a;
}

/** RGBA color composed of 4 floats
*/
typedef struct _ccColor4F {
	GLfloat r;
	GLfloat g;
	GLfloat b;
	GLfloat a;
} ccColor4F;

//! helper that creates a ccColor4f type
static inline ccColor4F ccc4f(const GLfloat r, const GLfloat g, const GLfloat b, const GLfloat a)
{
	return (ccColor4F){r, g, b, a};
}

/** Returns a ccColor4F from a ccColor3B. Alpha will be 1.
 */
static inline ccColor4F ccc4FFromccc3B(ccColor3B c)
{
	return (ccColor4F){c.r/255.f, c.g/255.f, c.b/255.f, 1.f};
}

/** Returns a ccColor4F from a ccColor4B.
 */
static inline ccColor4F ccc4FFromccc4B(ccColor4B c)
{
	return (ccColor4F){c.r/255.f, c.g/255.f, c.b/255.f, c.a/255.f};
}

/** returns YES if both ccColor4F are equal. Otherwise it returns NO.
 */
static inline BOOL ccc4FEqual(ccColor4F a, ccColor4F b)
{
	return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a;
}

/**
 * Returns a ccColor4B from a ccColor4F.
 */
static inline ccColor4B ccc4BFromccc4F(ccColor4F c)
{
	return (ccColor4B){
		(GLubyte)(clampf(c.r, 0, 1)*255),
		(GLubyte)(clampf(c.g, 0, 1)*255),
		(GLubyte)(clampf(c.b, 0, 1)*255),
		(GLubyte)(clampf(c.a, 0, 1)*255)
	};
}

/**
 * Returns a ccColor3B from a ccColor4F.
 */
static inline ccColor3B ccc3BFromccc4F(ccColor4F c)
{
	return (ccColor3B){
		(GLubyte)(clampf(c.r, 0, 1)*255),
		(GLubyte)(clampf(c.g, 0, 1)*255),
		(GLubyte)(clampf(c.b, 0, 1)*255),
	};
}

/**
 * Returns a ccColor3B from a ccColor4F.
 */
static inline ccColor4F ccc4FInterpolated(ccColor4F start, ccColor4F end, float t)
{
	start.r = end.r + (start.r - end.r ) * t;
	start.g = end.g	+ (start.g - end.g ) * t;
	start.b = end.b + (start.b - end.b ) * t;
	start.a = end.a	+ (start.a - end.a ) * t;
	return  start;
}

/** A vertex composed of 2 GLfloats: x, y
 */
typedef struct _ccVertex2F
{
	GLfloat x;
	GLfloat y;
} ccVertex2F;

/** A vertex composed of 2 floats: x, y
 */
typedef struct _ccVertex3F
{
	GLfloat x;
	GLfloat y;
	GLfloat z;
} ccVertex3F;

/** A texcoord composed of 2 floats: u, y
 */
typedef struct _ccTex2F {
	 GLfloat u;
	 GLfloat v;
} ccTex2F;

//! Point Sprite component
typedef struct _ccPointSprite
{
	ccVertex2F	pos;		// 8 bytes
	ccColor4B	color;		// 4 bytes
	GLfloat		size;		// 4 bytes
} ccPointSprite;

//!	A 2D Quad. 4 * 2 floats
typedef struct _ccQuad2 {
	ccVertex2F		tl;
	ccVertex2F		tr;
	ccVertex2F		bl;
	ccVertex2F		br;
} ccQuad2;

//!	A 3D Quad. 4 * 3 floats
typedef struct _ccQuad3 {
	ccVertex3F		bl;
	ccVertex3F		br;
	ccVertex3F		tl;
	ccVertex3F		tr;
} ccQuad3;

//! a Point with a vertex point, a tex coord point and a color 4B
typedef struct _ccV2F_C4B_T2F
{
	//! vertices (2F)
	ccVertex2F		vertices;
	//! colors (4B)
	ccColor4B		colors;
	//! tex coords (2F)
	ccTex2F			texCoords;
} ccV2F_C4B_T2F;

//! a Point with a vertex point, a tex coord point and a color 4F
typedef struct _ccV2F_C4F_T2F
{
	//! vertices (2F)
	ccVertex2F		vertices;
	//! colors (4F)
	ccColor4F		colors;
	//! tex coords (2F)
	ccTex2F			texCoords;
} ccV2F_C4F_T2F;

//! a Point with a vertex point, a tex coord point and a color 4F
typedef struct _ccV3F_C4F_T2F
{
	//! vertices (3F)
	ccVertex3F		vertices;
	//! colors (4F)
	ccColor4F		colors;
	//! tex coords (2F)
	ccTex2F			texCoords;
} ccV3F_C4F_T2F;

//! 4 ccV3F_C4F_T2F
typedef struct _ccV3F_C4F_T2F_Quad
{
	//! top left
	ccV3F_C4F_T2F	tl;
	//! bottom left
	ccV3F_C4F_T2F	bl;
	//! top right
	ccV3F_C4F_T2F	tr;
	//! bottom right
	ccV3F_C4F_T2F	br;
} ccV3F_C4F_T2F_Quad;

//! a Point with a vertex point, a tex coord point and a color 4B
typedef struct _ccV3F_C4B_T2F
{
	//! vertices (3F)
	ccVertex3F		vertices;			// 12 bytes
//	char __padding__[4];

	//! colors (4B)
	ccColor4B		colors;				// 4 bytes
//	char __padding2__[4];

	// tex coords (2F)
	ccTex2F			texCoords;			// 8 byts
} ccV3F_C4B_T2F;

//! A Triangle of ccV2F_C4B_T2F
typedef struct _ccV2F_C4B_T2F_Triangle
{
	//! Point A
	ccV2F_C4B_T2F a;
	//! Point B
	ccV2F_C4B_T2F b;
	//! Point B
	ccV2F_C4B_T2F c;
} ccV2F_C4B_T2F_Triangle;

//! A Quad of ccV2F_C4B_T2F
typedef struct _ccV2F_C4B_T2F_Quad
{
	//! bottom left
	ccV2F_C4B_T2F	bl;
	//! bottom right
	ccV2F_C4B_T2F	br;
	//! top left
	ccV2F_C4B_T2F	tl;
	//! top right
	ccV2F_C4B_T2F	tr;
} ccV2F_C4B_T2F_Quad;

//! 4 ccVertex3FTex2FColor4B
typedef struct _ccV3F_C4B_T2F_Quad
{
	//! top left
	ccV3F_C4B_T2F	tl;
	//! bottom left
	ccV3F_C4B_T2F	bl;
	//! top right
	ccV3F_C4B_T2F	tr;
	//! bottom right
	ccV3F_C4B_T2F	br;
} ccV3F_C4B_T2F_Quad;

//! 4 ccVertex2FTex2FColor4F Quad
typedef struct _ccV2F_C4F_T2F_Quad
{
	//! bottom left
	ccV2F_C4F_T2F	bl;
	//! bottom right
	ccV2F_C4F_T2F	br;
	//! top left
	ccV2F_C4F_T2F	tl;
	//! top right
	ccV2F_C4F_T2F	tr;
} ccV2F_C4F_T2F_Quad;

//! Blend Function used for textures
typedef struct _ccBlendFunc
{
	//! source blend function
	GLenum src;
	//! destination blend function
	GLenum dst;
} ccBlendFunc;

static const ccBlendFunc kCCBlendFuncDisable = {GL_ONE, GL_ZERO};

// XXX: If any of these enums are edited and/or reordered, update CCTexture2D.m
//! Vertical text alignment type
typedef NS_ENUM(NSUInteger, CCVerticalTextAlignment)
{
    CCVerticalTextAlignmentTop,
    CCVerticalTextAlignmentCenter,
    CCVerticalTextAlignmentBottom,
};

// XXX: If any of these enums are edited and/or reordered, update CCTexture2D.m
//! Horizontal text alignment type
typedef NS_ENUM(unsigned char, CCTextAlignment)
{
	CCTextAlignmentLeft,
	CCTextAlignmentCenter,
	CCTextAlignmentRight,
};

// XXX: If any of these enums are edited and/or reordered, update CCTexture2D.m
//! Line break modes
    /*
typedef NS_ENUM(NSUInteger, CCLineBreakMode)
{
	CCLineBreakModeWordWrap,
	CCLineBreakModeCharacterWrap,
	CCLineBreakModeClip,
	CCLineBreakModeHeadTruncation,
	CCLineBreakModeTailTruncation,
	CCLineBreakModeMiddleTruncation
};*/

//! delta time type
typedef double CCTime;

//typedef float CCMat4[16];

typedef NS_ENUM(unsigned char, CCPositionUnit)
{
    /// Position is set in points (this is the default)
    CCPositionUnitPoints,

    /// Position is UI points, on iOS this corresponds to the native point system
    CCPositionUnitUIPoints,

    /// Position is a normalized value multiplied by the content size of the parent's container
    CCPositionUnitNormalized,

};

typedef NS_ENUM(unsigned char, CCSizeUnit)
{
    /// Content size is set in points (this is the default)
    CCSizeUnitPoints,

    /// Position is UI points, on iOS this corresponds to the native point system
    CCSizeUnitUIPoints,

    /// Content size is a normalized value multiplied by the content size of the parent's container
    CCSizeUnitNormalized,

    /// Content size is the size of the parents container inset by the supplied value
    CCSizeUnitInsetPoints,

    /// Content size is the size of the parents container inset by the supplied value multiplied by the UIScaleFactor (as defined by CCDirector)
    CCSizeUnitInsetUIPoints,

};

typedef NS_ENUM(unsigned char, CCPositionReferenceCorner)
{
    /// Position is relative to the bottom left corner of the parent container (this is the default)
    CCPositionReferenceCornerBottomLeft,

    /// Position is relative to the top left corner of the parent container
    CCPositionReferenceCornerTopLeft,

    /// Position is relative to the top right corner of the parent container
    CCPositionReferenceCornerTopRight,

    /// Position is relative to the bottom right corner of the parent container
    CCPositionReferenceCornerBottomRight,

};

typedef struct _CCPositionType
{
    CCPositionUnit xUnit;
    CCPositionUnit yUnit;
    CCPositionReferenceCorner corner;
} CCPositionType;

typedef struct _CCSizeType
{
    CCSizeUnit widthUnit;
    CCSizeUnit heightUnit;
} CCSizeType;

//! helper that creates a CCPositionType type
static inline CCPositionType CCPositionTypeMake(CCPositionUnit xUnit, CCPositionUnit yUnit, CCPositionReferenceCorner corner)
{
    CCPositionType pt;
    pt.xUnit = xUnit;
    pt.yUnit = yUnit;
    pt.corner = corner;
    return pt;
}

//! helper that creates a CCContentSizeType type
static inline CCSizeType CCSizeTypeMake(CCSizeUnit widthUnit, CCSizeUnit heightUnit)
{
    CCSizeType cst;
    cst.widthUnit = widthUnit;
    cst.heightUnit = heightUnit;
    return cst;
}

#define CCPositionTypePoints CCPositionTypeMake(CCPositionUnitPoints, CCPositionUnitPoints, CCPositionReferenceCornerBottomLeft)

#define CCPositionTypeUIPoints CCPositionTypeMake(CCPositionUnitUIPoints, CCPositionUnitUIPoints, CCPositionReferenceCornerBottomLeft)

#define CCPositionTypeNormalized CCPositionTypeMake(CCPositionUnitNormalized, CCPositionUnitNormalized, CCPositionReferenceCornerBottomLeft)

#define CCSizeTypePoints CCSizeTypeMake(CCSizeUnitPoints, CCSizeUnitPoints)
#define CCSizeTypeUIPoints CCSizeTypeMake(CCSizeUnitUIPoints, CCSizeUnitUIPoints)
#define CCSizeTypeNormalized CCSizeTypeMake(CCSizeUnitNormalized, CCSizeUnitNormalized)

typedef NS_ENUM(char, CCScaleType) {
    CCScaleTypePoints,
    CCScaleTypeScaled,
};

static inline BOOL CCPositionTypeIsBasicPoints(CCPositionType type)
{
    return (type.xUnit == CCPositionUnitPoints
            && type.yUnit == CCPositionUnitPoints
            && type.corner == CCPositionReferenceCornerBottomLeft);
}

static inline BOOL CCSizeTypeIsBasicPoints(CCSizeType type)
{
    return (type.widthUnit == CCSizeUnitPoints
            && type.heightUnit == CCSizeUnitPoints);
}

#ifdef __cplusplus
}
#endif


text:
html {
  padding: 0px;
  margin: 0px;
  font-family: "Arial";
  height: 100%; }

body {
  margin: 0px;
  height: 100%;
  width: 100%;
  min-width: 1000px; }

body.content_only {
  min-width: 950px; }

.content_only .content_display {
  border: 0px solid #fff; }

a {
  text-decoration: none;
  color: #383539; }

h1 {
  margin: 0;
  padding: 10px;
  text-align: center; }

h2 {
  color: #c1272d;
  margin-left: 15px;
  margin-top: 20px; }

th {
  border-left: solid white 1px;
  border-right: solid white 1px; }

img {
  border: 0px;
  vertical-align: middle;
  color: #018eb9; }

hr {
  height: 1px;
  border: 0px solid #999;
  color: #999;
  background-color: #999; }

.clear {
  position: relative;
  height: 0px;
  clear: both; }

.content_only #site {
  padding: 1px 0px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box; }

#admin_site input[type=submit], #admin_site input[type=button], #admin_site input[type=image], #admin_site .admin_btn {
  padding:0px 8px;
  padding-bottom: 3px;
  cursor: pointer;
  height: 25px;
  line-height:23px;
  background-image: url('../img/admin/btn_background.png');
  background-repeat: repeat-x;
  background-position: center left;
  border: 0px solid #000;
  color: #fff;
  background-color: #919191;
  margin: 0px;
  display: inline-block; }
#admin_site input {
  display: inline;
  vertical-align: middle; }
#admin_site input[type=submit]:hover, #admin_site input[type=button]:hover {
  color: #e6e6e6;
  background-color: #fff; }
#admin_site input[type=text], #admin_site input[type=password] {
  height: 23px;
  line-height: 23px;
  font-size: 12px;
  border: 1px solid #919191;
  padding: 0px;
  margin-top: 0px; }
#admin_site .to_value_0 input[type=submit], #admin_site .to_value_1 input[type=submit] {
  display: block;
  background-color: transparent;
  border: 0px solid #fff;
  height: 16px;
  width: 40px;
  text-ident: -99px;
  overflow: hidden;
  color: transparent;
  background-repeat: no-repeat;
  background-position: center center; }
#admin_site .to_value_0 input[type=submit]:hover, #admin_site .to_value_1 input[type=submit]:hover {
  background-color: transparent; }
#admin_site .to_value_0 input[type=submit] {
  background-image: url('../img/admin/btn_switch_on.png'); }
#admin_site .to_value_1 input[type=submit] {
  background-image: url('../img/admin/btn_switch_off.png'); }
#admin_site .radioswitch .radio_image {
  display: block;
  cursor: pointer;
  background-color: transparent;
  border: 0px solid #fff;
  height: 16px;
  width: 40px;
  text-ident: -99px;
  overflow: hidden;
  color: transparent;
  background-repeat: no-repeat;
  background-position: center center; }
#admin_site .radioswitch label input[type=radio][value='0'] + .radio_image {
  background-image: url('../img/admin/btn_switch_on.png'); }
#admin_site .radioswitch label input[type=radio][value='1'] + .radio_image {
  background-image: url('../img/admin/btn_switch_off.png'); }
#admin_site .radioswitch label input[type=radio]:checked + .radio_image {
  display: none; }
#admin_site .radioswitch label input[type=radio] {
  display: none; }
#admin_site .radioswitch label .radio_label {
  display: none; }
#admin_site .admin_form input[type=text], #admin_site .admin_form input[type=password] {
  height: 20px;
  line-height: 20px; }
#admin_site .admin_form input[type=submit], #admin_site .admin_form input[type=button], #admin_site .admin_form input[type=image] {
  margin-top: 0px; }
#admin_site input.head_field, #admin_site .admin_form input.head_field {
  height: 25px;
  line-height: 25px;
  font-size: 17px;
  padding: 0px 3px; }
#admin_site .admin_form tr.form_spaced > td {
  padding-top: 12px; }
#admin_site .admin_form .show_field {
  font-size: 17px;
  color: #999;
  padding: 0px 3px;
  display: block; }
#admin_site .admin_form .form_value input[type=text], #admin_site .admin_form .admin_form .form_value textarea {
  width: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box; }
#admin_site .admin_form .form_value .form_subline input[type=text], #admin_site .admin_form .form_value input[name=pos] {
  width: auto; }
#admin_site .form_subline {
  padding: 5px 10px;
  margin: 5px 0px;
  background-color: #f2f2f2;
  border: 0px solid #999;
  border-top-width: 1px;
  border-bottom-width: 1px; }
#admin_site .form_subline_elt {
  float: left;
  padding: 5px 15px;
  background-image: url('../img/admin/mediatheque_separateur_vertical.png');
  background-repeat: no-repeat;
  background-position: left center;
  height: 20px;
  line-height: 20px; }
#admin_site .form_subline_elt.first {
  padding-left: 0px;
  background-image: none; }
#admin_site .form_subline_elt input {
  margin-top: -2px; }
#admin_site .submit_bg.update {
  cursor: pointer;
  height: 33px;
  display: block;
  float: left;
  margin-top: 15px;
  background-image: url('../img/admin/btn_update_background.png');
  background-repeat: repeat-x;
  background-position: center left;
  border: 0px solid #000;
  color: #fff;
  background-color: #919191; }
#admin_site .submit_bg.update input {
  padding-left: 30px;
  background-image: url('../img/admin/btn_update_background_tick.png');
  background-repeat: no-repeat;
  background-position: 3px center;
  background-color: transparent;
  min-width: 150px;
  text-align: right;
  font-size: 20px;
  display: block;
  padding-bottom: 0px;
  height: 30px; }
#admin_site .submit_bg.update:hover {
  background-color: #fff; }
#admin_site .submit_bg.update:hover input {
  color: #e6e6e6; }
#admin_site .news_do .submit_bg.update, #admin_site .page_do .submit_bg.update {
  float: right;
  margin-top: 0px; }
#admin_site .news_do .submit_bg.update input, #admin_site .page_do .submit_bg.update input {
  min-width: 200px; }

#site.admin {
  height: 100%;
  min-height: 100%;
  width: 100%;
  display: block; }

#admin_site {
  min-height: 100%;
  padding: 0px; }

#header {
  display: block;
  height: 87px;
  color: #fff;
  background-image: url('../img/admin/header_background.png');
  background-color: #919191;
  background-position: center;
  position: absolute;
  width: 100%;
  min-width: 1000px;
  top: 0px;
  left: 0px; }
#header h1 {
  font-size: 22px;
  text-align: left;
  font-family: "Arial";
  padding: 30px;
  font-weight: normal;
  width: 350px;
  color: #fff;
  padding-right: 0px; }

#header_content {
  background-position: right center;
  background-repeat: no-repeat;
  background-image: url('../img/admin/header_picto.png');
  margin-right: 35px; }

#footer {
  display: block;
  height: 58px;
  margin-top: -58px;
  color: #fff;
  background-image: url('../img/admin/footer_background.png');
  background-color: #919191;
  background-position: center; }

#footer_contact, #footer_website {
  height: 58px;
  line-height: 58px; }

#footer_contact a, #footer_website a {
  color: #fff; }

#footer_contact {
  margin-top: -15px;
  margin-left: 5px;
  padding-top: 15px;
  padding-left: 60px;
  background-position: left top;
  background-repeat: no-repeat;
  background-image: url('../img/admin/footer_picto.png');
  position: absolute;
  float: left; }

#footer_website {
  float: right;
  padding-right: 35px; }

#admin_site_body {
  position: relative;
  padding-top: 87px;
  padding-bottom: 75px; }

#corps {
  position: relative;
  margin-left: 225px;
  font-size: 10pt; }

#content {
  padding: 2px;
  padding-top: 20px;
  margin: 0px 20px;
  margin-left: 10px; }

.navigation span span, .navigation span a {
  border: 1px solid #999;
  padding: 2px;
  margin: 2px;
  color: #999; }
.navigation span span {
  border: 1px solid #000;
  color: #000; }
.navigation span a:hover {
  background-color: #e6e6e6; }
.navigation .navigation_points {
  border: 0px solid #999; }

table.stats {
  width: 700px;
  margin: 20px auto; }

table.stats td {
  vertical-align: top; }

table.stat {
  margin: auto;
  width: 100%; }

table.stat caption {
  background-color: #999;
  font-weight: bold;
  color: #fff; }

.acid_coords {
  float: left; }

.acid_coords_block {
  float: left;
  width: 300px; }

.acid_coords_block h2 {
  margin-top: 0; }

.acid_coords_main {
  float: left;
  height: 150px; }

.acid_coords_annonce {
  float: left;
  height: 150px; }

.acid_coords_persons {
  float: left;
  width: 100%; }

.acid_coords_links {
  float: left;
  margin-top: 30px; }

.fsb_belt_dir:hover, .fsb_belt_file:hover {
  background-repeat: repeat-x;
  background-position: bottom center;
  background-image: url('../img/admin/mediatheque_elt_over_background.png'); }

.fsb_belt_dir, .fsb_belt_file {
  float: left;
  min-width: 140px;
  max-width: 140px;
  height: 140px;
  margin: 5px;
  padding: 5px;
  text-align: center;
  vertical-align: middle;
  position: relative;
  /*
  border:solid 1px #AAAAAA;
  background-color:#FAFAFA;
  */
  overflow: hidden; }

.fsb_window a:hover {
  color: #999; }

.fsb_window a, .fsb_belt_dir a, .fsb_belt_file a {
  color: #000; }

.fsb_belt_img {
  display: table;
  height: 70px;
  margin-top: 30px;
  width: 100%;
  background-repeat: no-repeat;
  background-position: bottom center;
  background-image: url('../img/admin/mediatheque_elt_separateur_horizontal.png'); }

.fsb_belt_img a {
  display: table-cell;
  vertical-align: middle;
  text-align: center; }

.fsb_belt_img img {
  max-width: 100px;
  max-height: 60px;
  min-width: 1px; }

.fsb_belt_file_name {
  display: block;
  height: 40px;
  line-height: 20px;
  overflow: hidden;
  padding-top: 3px;
  word-wrap: break-word; }

.fsb_belt_file_action {
  font-size: 9px;
  color: #fff;
  position: absolute;
  min-height: 25px;
  bottom: 0px;
  line-height: 25px;
  display: none;
  width: 140px; }

.fsb_belt_file_action_eng {
  display: table;
  margin: auto; }

.fsb_belt_dir .fsb_belt_file_action a, .fsb_belt_file .fsb_belt_file_action a, .fsb_belt_dir .fsb_belt_file_action a:link, .fsb_belt_file .fsb_belt_file_action a:link, .fsb_belt_dir .fsb_belt_file_action a:visited, .fsb_belt_file .fsb_belt_file_action a:visited, .fsb_belt_dir .fsb_belt_file_action a:active, .fsb_belt_file .fsb_belt_file_action a:active {
  color: #fff;
  white-space: nowrap; }
.fsb_belt_dir:hover .fsb_belt_file_action, .fsb_belt_file:hover .fsb_belt_file_action {
  display: block; }
.fsb_belt_dir:hover .fsb_belt_img img, .fsb_belt_file:hover .fsb_belt_img img {
  opacity: 0.5;
  filter: alpha(opacity=50); }

.fsb_belt_file_action a {
  color: #fff; }
.fsb_belt_file_action a:hover {
  color: #fff; }

.fsb_path {
  min-height: 48px;
  line-height: 48px;
  padding: 5px 0px;
  float: left; }
.fsb_path img {
  margin-right: 5px; }

.fsb_actions {
  padding: 5px 0px;
  float: right; }
.fsb_actions a {
  padding-right: 15px;
  margin-right: 10px; }
.fsb_actions img {
  margin-right: 5px; }

.fsb_head a {
  font-weight: bold; }
.fsb_head .btn_newdir {
  margin-right : 0px; }
.fsb_head .btn_upload {
  background-image: url('../img/admin/mediatheque_separateur_vertical.png');
  background-position: left center;
  background-repeat: no-repeat;
  padding-right: 0px;
  padding-left: 12px; }

.fsb_window {
  margin-left: 5px;
  margin-right: 5px; }

.admin_preview {
  width: 700px;
  border: solid 1px #e0e0e0;
  padding: 5px;
  min-height: 300px; }

.fsb_img_modeler_form {
  padding: 50px;
  position: relative; }

.fsb_img_modeler_close {
  position: absolute;
  top: 10px;
  right: 10px; }

.fsb_img_modeler_panel {
  padding: 20px 0px;
  position: relative; }

.fsb_img_modeler_panel_group {
  padding: 5px 0px;
  position: relative; }

.generic_elts_list_actions {
  text-align: center; }

.generic_elt_admin {
  padding-top: 17px;
  background-image: url('../img/admin/corps_top_shadow.png');
  background-repeat: no-repeat;
  background-position: center top; }
.generic_elt_admin .generic_elts_footer {
  margin-top: 10px; }
.generic_elt_admin hr {
  margin: 0px;
  margin-bottom: 10px; }

.generic_elt_print table {
  border-collapse: collapse; }
.generic_elt_print th, .generic_elt_print td {
  text-align: left;
  padding: 5px 10px;
  border: 0px solid #000; }
.generic_elt_print th {
  min-width: 100px; }
.admin_list_head_filter {
  padding: 10px 0px;
  line-height: 20px;
  border: 0px solid #ccc;
  border-top-width: 1px; }
.admin_list_head_filter a.selected {
  font-weight: bold; }
.admin_list_head_filter a {
  padding: 2px;
  margin-right: 5px;
  margin-bottom: 5px;
  border: 1px solid #ccc; }
.admin_list_head_filter .admin_list_head_filter_title + a:before {
  content: "";
  padding: 0px 5px;
  font-weight: normal; }
.admin_list_head_filter a:first-child:before {
  content: "";
  padding: 0px; }

.generic_elts_list_bg {
  padding: 14px; }

.generic_elts_list {
  margin: 0px;
  margin-bottom: 0px;
  /*min-height: 400px;*/
  /*padding-top:17px; */
  background-image: url('../img/admin/corps_top_shadow.png');
  background-position: top center;
  background-repeat: no-repeat;
  padding-top: 17px; }
.generic_elts_list table {
  border-collapse: collapse;
  border-spacing: 0px;
  min-width: 600px;
  width: 100%; }
.generic_elts_list th {
  border: 0;
  color: #000;
  padding: 2px 5px;
  text-align: left;
  line-height: 30px;
  font-size: 13px;
  font-weight: 800;
  border-top: 1px solid #999;
  border-bottom: 1px solid #999;
  text-align: center;
  padding-left: 10px;
  background-color: #fff; }
.generic_elts_list th a {
  color: #000;
  display: block;
  text-align: left; }
.generic_elts_list th a img {
  border: 1px solid #68676b; }
.generic_elts_list th a img:hover {
  border: 1px solid #000; }
.generic_elts_list th a:hover {
  color: #999; }
.generic_elts_list th.head_std_actions {
  text-align: center; }
.generic_elts_list tr.odd_line {
  background-color: #fff; }
.generic_elts_list tr.even_line {
  background-color: #e6e6e6; }
.generic_elts_list tr:hover, .generic_elts_list tr.even_line:hover, .generic_elts_list tr.odd_line:hover {
  background-color: #d9d9d9; }
.generic_elts_list td {
  padding: 5px 5px;
  text-align: left;
  font-size: 8pt;
  max-width: 300px; }

.generic_elts_list_actions a img {
  margin-left: 5px;
  border: 0px; }
.generic_elts_list_actions a:hover img {
  border: 0px; }
.generic_elts_list_actions form, .generic_elts_list_actions form div {
  display: inline;
  margin: 0px;
  padding: 0px; }

.content_menu ul li.selected a {
  font-weight: bold;
  font-style: normal; }

.generic_nav_pages {
  margin: 10px; }

.generic_nb_elts {
  text-align: left;
  margin: 0 0 20px 0; }

.generic_nb_elts_infos {
  float: left;
  /*margin-left:14px;*/ }

.generic_nb_elts_form {
  float: right;
  /*margin-right:14px;*/ }
.generic_nb_elts_form input[type=text] {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  width: 30px;
  text-align: center; }

.generic_elts_footer {
  padding-top: 12px;
  min-height: 17px;
  background-image: url('../img/admin/corps_bottom_shadow.png');
  background-position: top center;
  background-repeat: no-repeat;
  border-top: 1px solid #999;
  color: #999;
  margin-bottom: 0px; }

.generic_elts_empty {
  display: block;
  padding: 15px 5px;
  margin: 0px;
  border: 0px solid #999;
  border-top-width: 1px;
  text-align: center; }

#menuburger {
  display: none; }

#menuenlarge {
  display: none; }

#menusate {
  display: none; }

#bodystate {
  display: none; }

#menu_bg {
  position: relative;
  width: 216px;
  top: 0px;
  left: 0px;
  float: left; }

#menu {
  width: 198px;
  margin: 50px 0 0 0;
  margin-left: 20px;
  padding: 0px;
  list-style-type: none;
  font-size: 10pt;
  border: 1px solid #000; }
#menu #menu_head {
  background-image: url('../img/admin/menu_left_background.png');
  background-color: #919191;
  width: 100%;
  height: 10px; }

#menu_body, #menu_bodyul {
  margin: 0px;
  padding: 0px;
  list-style-type: none;
  font-size: 10pt;
  background-color: #fff;
  border: 0px solid #000; }
#menu_body li.submenu, #menu_bodyul li.submenu, #menu_body li.headmenu, #menu_bodyul li.headmenu {
  border: solid 0px #aaa;
  position: relative;
  line-height: 20px;
  padding: 5px 10px;
  font-size: 15px; }
#menu_body li.headmenu, #menu_bodyul li.headmenu, #menu_body li.headmenu a, #menu_bodyul li.headmenu a {
  font-style: italic;
  color: #999; }
#menu_body li.headmenu a, #menu_bodyul li.headmenu a {
  font-weight: bold;
  font-style: normal; }
#menu_body li.selected, #menu_bodyul li.selected, #menu_body li.selected > a, #menu_bodyul li.selected > a {
  font-weight: bold;
  font-style: normal;
  color: #000; }
#menu_body li .puce, #menu_bodyul li .puce {
  float: left;
  display: block;
  margin: 4px 0px 2px 5px;
  background-color: #c1272d;
  width: 10px;
  height: 10px;
  vertical-align: middle; }
#menu_body li.selected .puce, #menu_bodyul li.selected .puce {
  background-color: #646464; }
#menu_body li a, #menu_bodyul li a {
  display: block;
  color: #000;
  margin-left: 0px; }
#menu_body li.separator, #menu_bodyul li.separator {
  height: 1px;
  background-color: #999;
  margin: 0px;
  padding: 0px; }
#menu_body li.separator.light, #menu_bodyul li.separator.light {
  background-color: #d9d9d9; }
#menu_body li.headmenu:hover, #menu_body .child_menu li:hover {
  background-color: #e6e6e6; }
#menu_body .child_menu {
  list-style: none;
  margin-left: 0px;
  padding: 0px 8px; }
#menu_body .child_menu li {
  display: block;
  padding-top: 0px;
  margin-top: 0px;
  min-height: 14px;
  /*font-weight: bold;*/
  line-height: 14px;
  font-size: 12px;
  margin: 0px -10px;
  padding: 0px 10px; }
#menu_body .child_menu li:hover {
  display: block;
  background-color: #d9d9d9;
  margin-left: -10px; }
#menu_body .child_menu li, #menu_body .child_menu li a {
  display: block;
  padding: 3px 0;
  color: #000; }
#menu_body .child_menu li a {
  padding-left: 20px; }
#menu_body .child_menu li a:hover {
  color: inherit;
  font-style: italic;
  display: block; }
#menu_body .child_menu li.separator {
  height: 1px;
  min-height: 0px;
  max-height: 1px;
  background-color: #aaa;
  margin: 0px;
  padding: 0px;
  margin: 10px 0px; }
#menu_body .child_menu li.unclickable:hover {
  background-color: transparent; }

.menu_lvl_1, .menu_lvl_2 {
  list-style-type: none; }

.menu_lvl_li1 {
  margin-bottom: 20px; }

.menu_lvl_li2 {
  margin: 5px; }

.menu_lvl_li1 span.li1 {
  display: none; }

.menu_lvl_li1 b span {
  font-weight: normal; }

.menu_lvl_li1 b:hover span.li1 {
  display: inline; }

.menu_lvl_li2 span.li2 {
  display: none; }

.menu_lvl_li2:hover span.li2 {
  display: inline; }

.content_menu {
  height: 30px;
  margin: 0 10px;
  position: relative;
  z-index: 100; }
.content_menu ul {
  list-style-type: none;
  margin: 0;
  padding: 0px; }
.content_menu ul li {
  float: left;
  display: table;
  min-width: 100px;
  height: 29px;
  text-align: center;
  margin-right: 2px;
  border: solid #aaa 1px; }
.content_menu ul li a {
  display: table-cell;
  vertical-align: middle;
  color: #000;
  /*background-color:#F5F5F5;*/
  padding: 0 20px;
  /*padding-left:20px;
      padding-right:20px;*/ }
.content_menu ul li a:hover {
  display: table-cell;
  vertical-align: middle;
  color: #018eb9;
  background-color: #f5f5f5; }
.content_menu ul li.selected {
  border-bottom: solid 1px #fff; }
.content_menu ul li.selected a {
  background-color: #fff; }

.content_display {
  float: left;
  width: 100%;
  border: solid 1px #aaa;
  margin-top: -1px;
  min-width: 720px;
  min-height: 400px; }

.content_body {
  margin: 10px; }

.content_title {
  font-size: 17px;
  font-weight: bold;
  margin-top: 14px; }

.admin_flags {
  margin-bottom: 15px; }

.content_menu ul li {
  border: 1px solid #ccc;
  color: #808080;
  font-style: italic;
  background-image: url('../img/admin/menu_top_background_unselected.png'); }
.content_menu ul li.selected a {
  color: #000; }
.content_menu ul li a {
  color: #808080;
  font-style: italic; }

.content_display {
  border: 1px solid #ccc; }

.table-board .board_home {
  min-height: 100px; }
.table-board .board_coords table td {
  vertical-align: top;
  padding-right: 15px;
  white-space: nowrap; }
.table-board .board_registration {
  width: 25%; }
.table-board > table td {
  vertical-align: top;
  padding-top: 25px; }

@media screen and (max-width: 960px) {
  .table-board tr, .table-board tr td {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    display: block;
    width: 100%; }
  .table-board tr .board_registration, .table-board tr td .board_registration {
    width: 100%; }
  .table-board tr table tr, .table-board tr td table tr {
    display: table-row;
    width: auto; }
  .table-board tr table td, .table-board tr td table td {
    display: table-cell;
    width: auto; } }

#admin_form {
  width: 600px;
  margin: 100px auto;
  font-family: arial; }
#admin_form form table {
  width: 375px;
  margin: auto; }
#admin_form form table input {
  float: right; }
#admin_form form table input[type=text], #admin_form form table input[type=password] {
  width: 160px;
  height: 20px;
  border: 1px solid #5f5f5f; }
#admin_form form table td.label {
  font-size: 18px;
  color: #96be12;
  font-weight: normal;
  width: 215px;
  padding: 5px 0px; }
#admin_form form table td.admin_log_msg {
  font-size: 12px;
  padding-bottom: 10px;
  text-align: center; }
#admin_form .logo {
  text-align: right; }
#admin_form .logo img {
  margin: auto; }
#admin_form .title {
  font-size: 16px;
  color: #96be12;
  font-weight: bold;
  height: auto;
  line-height: 30px;
  padding-top: 0px;
  margin: 52px 0px;
  background-image: url('../img/admin/gradient-top.png');
  background-position: bottom center;
  background-repeat: no-repeat;
  text-align: center;
  padding-bottom: 35px; }
#admin_form .bottom {
  font-size: 9px;
  color: #d1d1d1;
  padding-top: 25px;
  font-family: arial;
  font-weight: normal;
  font-style: italic;
  margin: 30px 0px;
  margin-top: 0px;
  text-align: center;
  background-image: url('../img/admin/gradient-bottom.png');
  background-position: top center;
  background-repeat: no-repeat; }
#admin_form .bottom a {
  color: #d1d1d1; }
#admin_form .subform_div {
  font-size: 9px;
  height: 10px;
  line-height: 10px;
  color: #d1d1d1;
  margin-bottom: 5px;
  margin-top: 0px; }
#admin_form .subform_div a {
  color: #919191; }

.admin_alert_content {
  font-size: 12px;
  color: #919191;
  text-align: center;
  margin: 5px 0px; }

.adminbtn_connexion {
  width: 85px;
  height: 21px;
  padding: 0px;
  font-size: 10px;
  color: #fff;
  border: 0px solid #fff;
  cursor: pointer;
  margin: 10px auto;
  padding-bottom: 2px;
  background-color: #96be12;
  background-image: url('../img/admin/bouton.png');
  background-repeat: no-repeat;
  background-position: top left; }
.adminbtn_connexion:hover {
  background-color: #707072; }

@media screen and (max-width: 1000px) {
  body {
    background: #000; }
  body, body #header, body #footer, body .content_display, body .admin_tab {
    min-width: 0px;
    max-width: 100%;
    float: none;
    position: relative;
    margin: 0px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box; }
  body, body #site {
    max-width: none;
    width: auto;
    height: auto; }
  body #site {
    background: #fff; }
  body #content {
    margin: 0px;
    width: 100%;
    max-width: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box; }
  body #content .form_value, body #content .admin_form .form_value {
    padding-left: 15px; }
  body #content .form_value input, body #content .admin_form .form_value input, body #content .form_value textarea, body #content .admin_form .form_value textarea {
    width: 100%; }
  body #content input, body #content .admin_form input, body #content textarea, body #content .admin_form textarea {
    max-width: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box; }
  body #content textarea, body #content .admin_form textarea {
    padding: 3px; }
  body #content input[type="text"], body #content .admin_form input[type="text"], body #content input[type="password"], body #content .admin_form input[type="password"] {
    height: 40px;
    line-height: 40px;
    padding: 3px; }
  body #content input[type="submit"], body #content .admin_form input[type="submit"], body #content input[type="button"], body #content .admin_form input[type="button"], body #content input[type="image"], body #content .admin_form input[type="image"] {
    height: 40px;
    background: #000;
    line-height: 25px; }
  body #content input[type="submit"]:hover, body #content .admin_form input[type="submit"]:hover, body #content input[type="button"]:hover, body #content .admin_form input[type="button"]:hover, body #content input[type="image"]:hover, body #content .admin_form input[type="image"]:hover {
    background: rgba(0, 0, 0, 0.9); }
  body #content .content_menu {
    height: auto; }
  body #content .content_menu > .nav {
    min-height: 30px; }
  body #content .table-responsive {
    max-width: 100%;
    overflow-x: auto;
    padding: 30px 0px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box; }
  body #content .table-responsive td, body #content .table-responsive th {
    padding: 15px; }
  body #content .generic_nb_elts > div {
    margin: 10px auto; }
  body #admin_site {
    height: auto;
    min-height: 0px; }
  body #admin_site_body {
    padding: 15px; }
  body #bodystate:checked + #site {
    display: table; }
  body #bodystate:checked + #site #admin_site #header, body #bodystate:checked + #site #admin_site + #footer, body #bodystate:checked + #site #admin_site, body #bodystate:checked + #site #admin_site #admin_site_body, body #bodystate:checked + #site #admin_site .table-responsive, body #bodystate:checked + #site #admin_site .generic_elts_list table {
    min-width: 1000px;
    max-width: none;
    width: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    overflow-x: unset;
    display: table; }
  body #bodystate:checked + #site #admin_site .form_value input, body #bodystate:checked + #site #admin_site .form_value textarea {
    width: inherit; }
  body #bodystate:checked + #site #menuenlarge {
    background: #ccc;
    color: #fff; }
  body #menustate + #admin_site #menu {
    display: none; }
  body #menustate:checked + #admin_site #menu {
    display: block; }
  body #menustate:checked + #admin_site #menuburger {
    background: #ccc; }
  body #menustate:checked + #admin_site #menuburger hr {
    background: #fff; }
  body #header_content {
    background: none; }
  body #menu_bg #menuburger, body #menu_bg #menuenlarge {
    display: block;
    display: inline-block;
    vertical-align: middle;
    width: 40px;
    height: 40px;
    border: 1px solid #aaa;
    padding: 8px 5px;
    margin: 10px;
    cursor: pointer;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    text-align: center;
    color: #aaa; }
  body #menu_bg #menuburger hr, body #menu_bg #menuenlarge hr {
    background: #aaa;
    margin: 5px auto; }
  body #menu_bg #menuenlarge {
    line-height: 25px; }
  body #menu_bg, body #menu_bg #menu {
    float: none;
    display: block;
    position: relative;
    width: auto; }
  body #menu_bg #menu {
    padding: 10px;
    margin: 0px 10px;
    min-width: 30%;
    max-width: 80%;
    width: auto;
    background: #fff;
    position: absolute;
    left: 0px;
    z-index: 500; }
  body #menu_bg #menu #menu_head {
    display: none; }
  body #menu_bg #menu #menu_body > li {
    display: block;
    max-width: none; }
  body #menu_bg #menu #menu_body > li.unclickable {
    display: none; }
  body #menu_bg #menu #menu_body > li .child_menu {
    padding: 0px; }
  body #menu_bg #menu #menu_body > li .child_menu:before {
    content: attr(data-category);
    padding: 10px 0px;
    font-weight: bold; }
  body #menu_bg #menu #menu_body > li li {
    margin: 0px;
    font-size: 15px; }
  body #menu_bg #menu #menu_body > li li .puce {
    margin-top: 13px;
    margin-left: 0px; }
  body #menu_bg #menu #menu_body > li li a {
    padding: 10px 15px; }
  body #corps {
    margin-left: 0px;
    font-size: 17px; }
  body .generic_elts_list {
    background: none;
    padding-top: 5px; }
  body .generic_elts_list th, body .generic_elts_list td {
    font-size: 17px; }
  body .generic_elts_footer {
    background: none;
    padding-bottom: 5px; }
  body .table-board, body .table-board td {
    display: block; }
  body .table-board table, body .table-board td table {
    display: table; }
  body .table-board table td, body .table-board td table td {
    display: table-cell; } }


text:
namespace graphic
{

	class cShadow1
	{
	public:
		cShadow1();
		virtual ~cShadow1();

		bool Create(const int textureWidth, const int textureHeight);
		void UpdateShadow( cNode &node );
		IDirect3DTexture9* GetTexture();
		const IDirect3DTexture9* GetTexture() const;
		bool IsLoaded() const;

		// µð¹ö±ë¿ë ÇÔ¼ö.
		void RenderShadowMap();

	private:
		cSurface2 m_surface;
	};

	inline IDirect3DTexture9* cShadow1::GetTexture() { return m_surface.GetTexture(); }
	inline const IDirect3DTexture9* cShadow1::GetTexture() const { return m_surface.GetTexture(); }
	inline bool cShadow1::IsLoaded() const { return m_surface.IsLoaded(); }
}


text:
namespace Data
{
	// LLG_Parameters contains all LLG information about the spin system
	class Parameters_Method_LLG : public Parameters_Method
	{
	public:
		// Constructor
		Parameters_Method_LLG(std::string output_folder, std::array<bool,9> output, scalar force_convergence, long int n_iterations, long int n_iterations_log,
			int seed_i, scalar temperature_i, scalar damping_i, scalar time_step_i, bool renorm_sd_i,
			scalar stt_magnitude_i, Vector3 stt_polarisation_normal_i);

		//PRNG Seed
		const int seed;
		// --------------- Different distributions ------------
		std::mt19937 prng;
		std::uniform_real_distribution<scalar> distribution_real;
		std::uniform_real_distribution<scalar> distribution_minus_plus_one;
		std::uniform_int_distribution<int> distribution_int;

		// Temperature [K]
		scalar temperature;
		// Damping
		scalar damping;
		// Time step per iteration
		scalar dt;
		// whether to renormalize spins after every SD iteration
		bool renorm_sd = 1;
		// Energy output settings
		bool output_energy_single;
		bool output_energy_archive;
		bool output_energy_spin_resolved;
		bool output_energy_divide_by_nspins;
		// Spin configurations output settings
		bool output_configuration_single;
		bool output_configuration_archive;

		// spin-transfer-torque parameter (prop to injected current density)
		scalar stt_magnitude;
		// spin_current polarisation normal vector
		Vector3 stt_polarisation_normal;
	};
}
#endif


text:
namespace starboard {
namespace shared {
namespace starboard {

class CommandLine {
 public:
  typedef std::string StringType;

  typedef StringType::value_type CharType;
  typedef std::vector<StringType> StringVector;
  typedef std::map<std::string, StringType> SwitchMap;

  // Construct a new command line from an argument list.
  CommandLine(int argc, const CharType* const* argv);

  // Construct a new command line from a vector of strings.
  explicit CommandLine(const StringVector& argv);

  // Copy constructor
  CommandLine(const CommandLine& other)
      : argv_(other.argv_),
        switches_(other.switches_),
        begin_args_(other.begin_args_) {}

  // Move constructor
  CommandLine(CommandLine&& other) {
    swap(*this, other);
  }

  ~CommandLine();

  // Copy/move assignment. The "copy" of the copy-and-swap idiom is done by the
  // compiler to provide the by-value parameter, which comes from either the
  // copy or move constructor depending on whether or not other was an rvalue.
  CommandLine& operator=(CommandLine other) noexcept {
    swap(*this, other);
    return *this;
  }

  // Swaps two CommandLine values.
  friend void swap(CommandLine& a, CommandLine& b) {
    using std::swap;
    swap(a.argv_, b.argv_);
    swap(a.switches_, b.switches_);
    swap(a.begin_args_, b.begin_args_);
  }

  // Initialize from an argv vector.
  void InitFromArgv(int argc, const CharType* const* argv);

  // Returns the original command line string as a vector of strings.
  const StringVector& argv() const { return argv_; }

  // Returns true if this command line contains the given switch.
  // (Switch names are case-insensitive).
  bool HasSwitch(const std::string& switch_string) const;

  // Append a switch [with optional value] to the command line.
  // Note: Switches will precede arguments regardless of appending order.
  void AppendSwitch(const std::string& switch_string,
                    const StringType& value);

  // Returns the value associated with the given switch. If the switch has no
  // value or isn't present, this method returns the empty string.
  StringType GetSwitchValue(const std::string& switch_string) const;

  // Get a copy of all switches, along with their values.
  const SwitchMap& GetSwitches() const { return switches_; }

  // Get the remaining arguments to the command.
  StringVector GetArgs() const;

  // Append an argument to the command line. Note that the argument is quoted
  // properly such that it is interpreted as one argument to the target command.
  // AppendArg is primarily for ASCII; non-ASCII input is interpreted as UTF-8.
  // Note: Switches will precede arguments regardless of appending order.
  void AppendArg(const std::string& value);

  // Append the switches and arguments from another command line to this one.
  // If |include_program| is true, include |other|'s program as well.
  void AppendArguments(const CommandLine& other, bool include_program);

 private:
  void InitFromArgv(const StringVector& argv);

  // Disallow default constructor; a program name must be explicitly specified.
  CommandLine();
  // Allow the copy constructor. A common pattern is to copy of the current
  // process's command line and then add some flags to it.

  // The argv array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* }
  StringVector argv_;

  // Parsed-out switch keys and values.
  SwitchMap switches_;

  // The index after the program and switches, any arguments start here.
  size_t begin_args_;
};

}  // namespace starboard
}  // namespace shared
}  // namespace starboard

#endif  // STARBOARD_SHARED_STARBOARD_COMMAND_LINE_H_


text:
'use strict';

var journalEntries = require('../controllers/journalEntries');

// // Article authorization helpers
// var hasAuthorization = function(req, res, next) {
//   if (!req.user.isAdmin && req.photo.user.id !== req.user.id) {
//     return res.send(401, 'User is not authorized');
//   }
//   next();
// };

// The Package is past automatically as first parameter
module.exports = function(JournalEntries, app, auth, database) {

  app.route('/journalEntries')
    //note that
    .get(auth.requiresLogin, journalEntries.getJournalEntriesIncludingFriends)
    .post(auth.requiresLogin, journalEntries.create);

  app.route('/user/journalEntries')
    //note that
    .get(auth.requiresLogin, journalEntries.getJournalEntries);

  app.route('/journalEntries/:journalEntryId')
    .get(auth.requiresLogin, journalEntries.journalEntry);

  // Finish with setting up the photoId param
  app.param('journalEntryId', journalEntries.journalEntry);

  // app.route('/photos/:photoId')
  //   .get(photos.show)
  //   .put(auth.requiresLogin, hasAuthorization, photos.update)
  //   .delete(auth.requiresLogin, hasAuthorization, photos.destroy);

  // app.get('/upload/photo', auth.requiresLogin, function(req, res, next) {
  //   Photos.render('index', {
  //     package: 'photos'
  //   }, function(err, html) {
  //     //Rendering a view from the Package server/views
  //     res.send(html);
  //   });
  // });

};


text:
let texts = {
  introText:
`Click on the screen or use analog stick to move the ninja (black dot) of a fixed distance.
There is a delay before you can move again.
If you move through a zombie (color dot), it kills it.
If a zombie touches you while you don't move, you die.
Each time you kill a zombie, the rainbow light it's color.
When the rainbow is all light up, nothing happens.
For now.`,
  hitAKey: 'Hit a key\nor click somewhere.\nNOW!',
};

export { texts as default };


text:
    Title

        <input type="text" class="form-control" name="title" placeholder="Title" ng-model="book.Title" ng-maxlength="255" required/>

Title is required.

Title is too long.

    Authors

        <input type="text" class="form-control" name="authors" placeholder="Authors" ng-model="book.Authors" ng-maxlength="255">

Authors is too long.

    ISBN

        <input type="text" class="form-control" name="isbn" placeholder="ISBN" ng-model="book.ISBN" ng-maxlength="30">

ISBN is too long.

    Genre

        <select class="form-control" name="genre" ng-model="book.Genre_ID" ng-options="genre.ID as genre.Name for genre in genres" required>
        </select>

Please select a Genre.

    Summary

        <textarea class="form-control" rows="5" name="summary" placeholder="Summary" ng-model="book.Summary" ng-maxlength="2000" />

Summary is too long.

    Notes

        <textarea class="form-control" rows="5" name="notes" placeholder="Notes" ng-model="book.Notes" ng-maxlength="255" />

Notes is too long.

        <button type="submit" class="btn btn-primary" ng-disabled="bookForm.$invalid">Save</button>


text:
// --------------------------------------------------------------------------------------------------
//  Copyright (c) 2016 Microsoft Corporation
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
//  associated documentation files (the "Software"), to deal in the Software without restriction,
//  including without limitation the rights to use, copy, modify, merge, publish, distribute,
//  sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in all copies or
//  substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
//  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
//  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// --------------------------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Threading;

namespace Microsoft.Research.Malmo.HumanAction
{
    /// <summary>
    /// Interaction logic for NameDialog.xaml
    /// </summary>
    public partial class NameDialog : Window
    {
        private DispatcherTimer timer;

        private TextBlock[] letters;
        private Canvas[] boxes;
        private int index;

        public NameDialog()
        {
            InitializeComponent();
        }

        public string Result
        {
            get
            {
                return string.Join("", this.letters.Select(o => o.Text));
            }
        }

        private async void Timer_Tick(object sender, EventArgs e)
        {
            if(this.index >= this.letters.Length)
            {
                return;
            }

            TextBlock currentLetter = this.letters[this.index];
            Canvas currentBox = this.boxes[this.index];

            Brush fg = currentLetter.Foreground;
            Brush bg = currentBox.Background;

            currentBox.Background = fg;
            currentLetter.Foreground = bg;

            await Task.Delay(200);

            currentBox.Background = bg;
            currentLetter.Foreground = fg;
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            timer = new DispatcherTimer();
            timer.Interval = TimeSpan.FromMilliseconds(500);
            timer.Tick += Timer_Tick;
            timer.Start();

            this.letters = new TextBlock[] { letter0TB, letter1TB, letter2TB, letter3TB };
            this.boxes = new Canvas[] { box0C, box1C, box2C, box3C };
        }

        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            char letter;
            if(e.Key >= Key.NumPad0 && e.Key <= Key.NumPad9)
            {
                letter = (char)((e.Key - Key.NumPad0) + '0');
            }
            else if(e.Key >= Key.A && e.Key <= Key.Z)
            {
                letter = (char)((e.Key - Key.A) + 'A');
            }
            else
            {
                return;
            }

            this.letters[this.index].Text = letter.ToString();
            this.index++;

            if(this.index == 4)
            {
                DialogResult = true;
                this.timer.Stop();
            }
        }
    }
}


text:
package adb.wifi.woaiwhz.presenter;

import adb.wifi.woaiwhz.base.device.Device;
import adb.wifi.woaiwhz.command.AllDevices;
import adb.wifi.woaiwhz.command.GetDeviceIP;
import adb.wifi.woaiwhz.command.ICommand;
import org.junit.Test;

/**
 * Created by huazhou.whz on 2016/10/15.
 */

public class ParserTest {
    @Test
    public void allDevicesTest(){
        String result = "* daemon not running. starting it now on port 5037 *\n" +
                "* daemon started successfully *\n" +
                "List of devices attached\n" +
                "192.168.115.101:5555   device product:vbox86p model:Custom_Phone___5_1_0___API_22___768x1280 device:vbox86p\n" +
                "HC43FW9E0261           device product:aicp_m7 model:One device:m7\n" +
                "\n";

        ICommand<String,Device[]> parser = new AllDevices();
        Device[] devices = parser.parse(result);

        for (Device device : devices) {
            System.out.println(device);
        }
    }

    @Test
    public void getIpTest(){
        final String result = "inet 30.34.168.10/22 brd 30.34.171.255 scope global wlan0";

        ICommand<String,String> command = new GetDeviceIP("");
        final String ip = command.parse(result);

        System.out.println(ip);
    }
}


text:
======
Driver
======

Note: this document discuss Mach-O port of LLD. For ELF and COFF,
see :doc:`index`.

.. contents::
   :local:

Introduction
============

This document describes the lld driver. The purpose of this document is to
describe both the motivation and design goals for the driver, as well as details
of the internal implementation.

Overview
========

The lld driver is designed to support a number of different command line
interfaces. The main interfaces we plan to support are binutils' ld, Apple's
ld, and Microsoft's link.exe.

Flavors
-------

Each of these different interfaces is referred to as a flavor. There is also an
extra flavor "core" which is used to exercise the core functionality of the
linker it the test suite.

* gnu
* darwin
* link
* core

Selecting a Flavor
^^^^^^^^^^^^^^^^^^

There are two different ways to tell lld which flavor to be. They are checked in
order, so the second overrides the first. The first is to symlink :program:`lld`
as :program:`lld-{flavor}` or just :program:`{flavor}`. You can also specify
it as the first command line argument using ``-flavor``::

  $ lld -flavor gnu

There is a shortcut for ``-flavor core`` as ``-core``.

Adding an Option to an existing Flavor
======================================

#. Add the option to the desired :file:`lib/Driver/{flavor}Options.td`.

#. Add to :cpp:class:`lld::FlavorLinkingContext` a getter and setter method
   for the option.

#. Modify :cpp:func:`lld::FlavorDriver::parse` in :file:
   `lib/Driver/{Flavor}Driver.cpp` to call the targetInfo setter
   for the option.

#. Modify {Flavor}Reader and {Flavor}Writer to use the new targetInfo option.

Adding a Flavor
===============

#. Add an entry for the flavor in :file:`include/lld/Common/Driver.h` to
   :cpp:class:`lld::UniversalDriver::Flavor`.

#. Add an entry in :file:`lib/Driver/UniversalDriver.cpp` to
   :cpp:func:`lld::Driver::strToFlavor` and
   :cpp:func:`lld::UniversalDriver::link`.
   This allows the flavor to be selected via symlink and `-flavor`.

#. Add a tablegen file called :file:`lib/Driver/{flavor}Options.td` that
   describes the options. If the options are a superset of another driver, that
   driver's td file can simply be included. The :file:`{flavor}Options.td` file
   must also be added to :file:`lib/Driver/CMakeLists.txt`.

#. Add a ``{flavor}Driver`` as a subclass of :cpp:class:`lld::Driver`
   in :file:`lib/Driver/{flavor}Driver.cpp`.