text:
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Diagnostics.Contracts;
using System;

// Disable the "this variable is not used" warning as every field would imply it.
#pragma warning disable 0414
// Disable the "this variable is never assigned to".
#pragma warning disable 0067
// Disable the "this event is never assigned to".
#pragma warning disable 0649
// Disable the "this variable is never used".
#pragma warning disable 0169
// Disable the "new keyword not required" warning.
#pragma warning disable 0109
// Disable the "extern without DllImport" warning.
#pragma warning disable 0626
// Disable the "could hide other member" warning, can happen on certain properties.
#pragma warning disable 0108

namespace System.Runtime.ConstrainedExecution
{
  abstract public partial class CriticalFinalizerObject
  {
    #region Methods and constructors
    protected CriticalFinalizerObject()
    {
    }
    #endregion
  }
}


text:
import type { ModulesOption, UseBuiltInsOption } from "./options";
import type { NormalizedCorejsOption } from "./normalize-options";
import type { Targets, InputTargets } from "@babel/helper-compilation-targets";

// Options
// Use explicit modules to prevent typo errors.
export type ModuleOption = typeof ModulesOption[keyof typeof ModulesOption];
export type BuiltInsOption =
  typeof UseBuiltInsOption[keyof typeof UseBuiltInsOption];

type CorejsVersion = 2 | 3 | string;

export type CorejsOption =
  | false
  | CorejsVersion
  | {
      version: CorejsVersion;
      proposals: boolean;
    };

export type PluginListItem = string | RegExp;
export type PluginListOption = Array<PluginListItem>;

export type Options = {
  bugfixes: boolean;
  configPath: string;
  corejs: CorejsOption;
  debug: boolean;
  exclude: PluginListOption;
  forceAllTransforms: boolean;
  ignoreBrowserslistConfig: boolean;
  include: PluginListOption;
  loose: boolean;
  modules: ModuleOption;
  shippedProposals: boolean;
  spec: boolean;
  targets: {
    uglify?: boolean;
    esmodules?: boolean;
  } & InputTargets;
  useBuiltIns: BuiltInsOption;
  browserslistEnv: string;
};

// Babel
export type Plugin = [any, any];

export type InternalPluginOptions = {
  corejs: NormalizedCorejsOption;
  include: Set<string>;
  exclude: Set<string>;
  polyfillTargets: Targets;
  debug: boolean;
  proposals: boolean;
  shippedProposals: boolean;
  regenerator: boolean;
};

redpajama_set_name: RedPajamaGithub


text:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/css/materialize.min.css">
<link href="https://fonts.googleapis.com/css?family=Permanent+Marker" rel="stylesheet">

    Name:<input type="text" name="attr_name">
    Class:<input type="text" name="attr_class">
    Bioform:<input type="text" name="attr_bioform">
    Story:<input type="text" name="attr_bioform">

Attributes

          <button type='roll' value='&{template:default} {{name=Strength Check}} {{Strength=[[1d20+@{str}]]}}' name='roll_strCheck'>STR</button>
          <input type="number" name="attr_str" value="(@{str_base}+@{str_bonus})" disabled="true">

        Base<input type="number" name="attr_str_base" value="0">

        Loot Bonus<input type="number" name="attr_str_bonus" value="0">

          <button type='roll' value='&{template:default} {{name=Dexterity Check}} {{Dexterity=[[1d20+@{dex}]]}}' name='roll_dexCheck'>STR</button>
          <input type="number" name="attr_dex" value="(@{dex_base}+@{dex_bonus})" disabled="true">

        Base<input type="number" name="attr_dex_base" value="0">

        Loot Bonus<input type="number" name="attr_dex_bonus" value="0">

          <button type='roll' value='&{template:default} {{name=Consitution Check}} {{Consitution=[[1d20+@{con}]]}}' name='roll_conCheck'>CON</button>
          <input type="number" name="attr_con" value="(@{con_base}+@{con_bonus})" disabled="true">

        Base<input type="number" name="attr_con_base" value="0">

        Loot Bonus<input type="number" name="attr_con_bonus" value="0">

          <button type='roll' value='&{template:default} {{name=Intelligence Check}} {{Intelligence=[[1d20+@{int}]]}}' name='roll_intCheck'>INT</button>
          <input type="number" name="attr_int" value="(@{int_base}+@{int_bonus})" disabled="true">

        Base<input type="number" name="attr_int_base" value="0">

        Loot Bonus<input type="number" name="attr_int_bonus" value="0">

          <button type='roll' value='&{template:default} {{name=Wisdom Check}} {{Wisdom=[[1d20+@{wis}]]}}' name='roll_wisCheck'>WIS</button>
          <input type="number" name="attr_wis" value="(@{wis_base}+@{wis_bonus})" disabled="true">

        Base<input type="number" name="attr_wis_base" value="0">

        Loot Bonus<input type="number" name="attr_wis_bonus" value="0">

          <button type='roll' value='&{template:default} {{name=Charisma Check}} {{Charisma=[[1d20+@{cha}]]}}' name='roll_chaCheck'>CHA</button>
          <input type="number" name="attr_cha" value="(@{cha_base}+@{cha_bonus})" disabled="true">

        Base<input type="number" name="attr_cha_base" value="0">

        Loot Bonus<input type="number" name="attr_cha_bonus" value="0">

Armor

              Armor
              <input type="number" name="attr_armor" value="@{armor_base}+@{armor_bonus}" disabled="true">

            Base<input type="number" name="attr_armor_base" value="0">

            Loot Bonus<input type="number" name="attr_armor_bonus" value="0">

Effort

              <button type='roll' value='&{template:default} {{name=Basic Work Check}} {{Basic Work=[[1d4+@{basic}]]}}' name='roll_basicCheck'>Basic Work</button>
              <input type="number" name="attr_basic" value="@{basic_base}+@{basic_bonus}" disabled="true">

            Base<input type="number" name="attr_basic_base" value="0">

            Loot Bonus<input type="number" name="attr_basic_bonus" value="0">

              <button type='roll' value='&{template:default} {{name=Weapon Damage}} {{Weapon Damage=[[1d6+@{weapon}]]}}' name='roll_weaponCheck'>Weapon Damage</button>
              <input type="number" name="attr_weapon" value="@{weapon_base}+@{weapon_bonus}" disabled="true">
            Base<input type="number" name="attr_weapon_base" value="0">

            Loot Bonus<input type="number" name="attr_weapon_bonus" value="0">

              <button type='roll' value='&{template:default} {{name=Magic Effect}} {{Magic Effect=[[1d8+@{magic}]]}}' name='roll_magicCheck'>Magic Check</button>
              <input type="number" name="attr_magic" value="@{magic_base}+@{magic_bonus}" disabled="true">

            Base<input type="number" name="attr_magic_base" value="0">

            Loot Bonus<input type="number" name="attr_magic_bonus" value="0">

              <button type='roll' value='&{template:default} {{name=Ultimate Check}} {{Ultimate=[[1d12+@{ultimate}]]}}' name='roll_ultimateCheck'>Basic Work</button>
              <input type="number" name="attr_ultimate" value="@{ultimate_base}+@{ultimate_bonus}" disabled="true">

            Base<input type="number" name="attr_ultimate_base" value="0">

            Loot Bonus<input type="number" name="attr_ultimate_bonus" value="0">

Health

        <input style="width:100%;" type="number"  name="attr_healthCount" value="(@{health})" disabled="true">

            <input type='checkbox' name='attr_health' value='10' checked='true' />
            <input type='checkbox' name='attr_health' value='20' checked='false' />
            <input type='checkbox' name='attr_health' value='30' checked='false' />
            <input type='checkbox' name='attr_health' value='40' checked='false' />
            <input type='checkbox' name='attr_health' value='50' checked='false' />
            <input type='checkbox' name='attr_health' value='60' checked='false' />
            <input type='checkbox' name='attr_health' value='70' checked='false' />
            <input type='checkbox' name='attr_health' value='80' checked='false' />

         <button type='roll' value='&{template:default} {{name=Death Roll}} {{[[1d6]]}}' name='roll_deathCheck'>Death d6 Roll</button>
         <button type='roll' value='&{template:default} {{name=Death Save Roll}} {{[[1d20]]}}' name='roll_deathSaveCheck'>Death Save</button>

Equipped Gear

        <input type="text" name="attr_e1">
        <input type="text" name="attr_e2">
        <input type="text" name="attr_e3">
        <input type="text" name="attr_e4">
        <input type="text" name="attr_e5">
        <input type="text" name="attr_e6">
        <input type="text" name="attr_e7">
        <input type="text" name="attr_e8">
        <input type="text" name="attr_e9">
        <input type="text" name="attr_e10">

Carried Gear

        <input type="text" name="attr_c1">
        <input type="text" name="attr_c2">
        <input type="text" name="attr_c3">
        <input type="text" name="attr_c4">
        <input type="text" name="attr_c5">
        <input type="text" name="attr_c6">
        <input type="text" name="attr_c7">
        <input type="text" name="attr_c8">
        <input type="text" name="attr_c9">
        <input type="text" name="attr_c10">


text:
<include file="Public/mobile_head"/>
<link href="{:ADDON_PUBLIC_PATH}/index.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">

  <notempty name="info.cover_id">

  <else />

  </notempty>

            活动规则

{$info.content}

{$system_copy_right}{$tongji_code}


text:
author: slowe
categories: Tutorial
comments: true
date: 2017-11-24T23:00:00Z
tags:
- Libvirt
- KVM
- Docker
- Linux
- CLI
- Fedora
title: Using Docker Machine with KVM and Libvirt
url: /2017/11/24/using-docker-machine-kvm-libvirt/
---

Docker Machine is, in my opinion, a useful and underrated tool. I've written before about using Docker Machine with various services/providers; for example, see [this article on using Docker Machine with AWS][xref-1], or [this article on using Docker Machine with OpenStack][xref-2]. Docker Machine also supports local hypervisors, such as [VMware Fusion][link-3] or [VirtualBox][link-4]. In this post, I'll show you how to use Docker Machine with KVM and Libvirt on a Linux host (I'm using [Fedora][link-2] 27 as an example).<!--more-->

Docker Machine ships with a bunch of different providers, but the KVM/Libvirt provider must be obtained separately (you can find it [here on GitHub][link-1]). Download a binary release (make sure it is named `docker-machine-driver-kvm`), mark it as executable, and place it somewhere in your PATH. Fedora 27 comes with KVM and the Libvirt daemon installed by default (in order to support the Boxes GUI virtualization app), but I found it helpful to also install the client-side tools:

    sudo dnf install libvirt-client

This will make the `virsh` tool available, which is useful for viewing Libvirt-related resources. Once you have both the KVM/Libvirt driver and the Libvirt client tools installed, you can launch a VM:

    docker-machine create -d kvm --kvm-network "docker-machines" machine1

It appears that, by default, the KVM/Libvirt provider uses a network named "docker-machines", hence the need for the `--kvm-network` flag. (If you omit this flag, the provider will look for the "default" network, which may or may not exist on your system. It didn't exist on my Fedora laptop. This is where having `virsh` available is really handy.)

(Note that if your user account isn't a member of the "libvirt" group, you'll get prompted for authentication for most every `docker-machine` command, even just listing machines.)

There are a few other flags that might be useful as well when creating a Docker-equipped VM with Docker Machine and the KVM/Libvirt driver:

* Use the `--kvm-cpu-count` parameter to specify the number of virtual CPUs.
* Use the `--kvm-memory` parameter to control the amount of RAM allocated to the VM.
* Customize the name of the user used to log into the system (the default is "docker") by using the `--kvm-ssh-user` parameter.

You can view all the parameters by running `docker-machine create -d kvm --help`.

Once the VM is up and running, you can use all the standard Docker Machine commands to work with this VM, just like with any other provider:

* Use `docker-machine ssh <name>` to connect to the VM via SSH.
* Use `docker-machine env <name>` to show the information needed to connect to the Docker Engine on the VM. (Use `eval $(docker-machine env <name>)` to load that information into the shell environment.)
* Use `docker-machine stop <name>` to stop the VM, and `docker-machine rm <name>` to remove/delete the VM.

You might be wondering if there's any value in using Docker Machine to run a VM on Linux when you can just run Docker directly on the Linux host. I haven't fully tested the idea yet, but my initial thought is that it would enable users to run various different versions of the Docker Engine (using the `--engine-install-url` option, as I outlined [here][xref-3]). If you have other ideas where this sort of arrangement might have value, I'd love to hear them; [hit me up on Twitter][link-5].

[link-1]: https://github.com/dhiltgen/docker-machine-kvm
[link-2]: https://getfedora.org/
[link-3]: http://www.vmware.com/products/fusion.html
[link-4]: https://www.virtualbox.org/
[link-5]: https://twitter.com/scott_lowe
[xref-1]: {{< relref "2016-03-22-using-docker-machine-with-aws.md" >}}
[xref-2]: {{< relref "2015-09-24-using-docker-machine-with-openstack.md" >}}
[xref-3]: {{< relref "2015-08-04-using-vagrant-docker-machine-together.md" >}}


text:
<!DOCTYPE html>

    <title>caly.ps/o</title>

Deck A

        <audio id="deckA" preload="auto" controls src="http://boxor/library/Jazz/Roy Ayers/Evolution- The Polydor Anthology (disc 2)/09 - Roy Ayers - Heat of the Beat .mp3" />

Deck B

        <audio id="deckB" preload="auto" />

Buttons

        <button onclick="document.getElementById('deckA').play()">Play A</button>
        <button onclick="document.getElementById('deckB').play()">Play B</button>
        <button onclick="document.getElementById('deckB').src = 'http://boxor/library/Jazz/Jean-Luc Ponty/1975 - Upon The Wings Of Music/04-Polyfolk Dance.mp3'">Set Track in B</button>
        <button onclick="document.getElementById('deckB').volume += 0.1">Increase Volume on B</button>
        <button onclick="document.getElementById('deckB').volume -= 0.1">Decrease Volume on B</button>


text:
from __future__ import absolute_import, division, print_function
__metaclass__ = type

ANSIBLE_METADATA = {'metadata_version': '1.1',
                    'status': ['preview'],
                    'supported_by': 'network'}

DOCUMENTATION = """
---
module: eos_static_route
version_added: "2.5"
author: "Trishna Guha (@trishnaguha)"
short_description: Manage static IP routes on Arista EOS network devices
description:
  - This module provides declarative management of static
    IP routes on Arista EOS network devices.
notes:
  - Tested against EOS 4.15
options:
  address:
    description:
      - Network address with prefix of the static route.
    required: true
    aliases: ['prefix']
  next_hop:
    description:
      - Next hop IP of the static route.
    required: true
  vrf:
    description:
      - VRF for static route.
    default: default
    version_added: 2.9
  admin_distance:
    description:
      - Admin distance of the static route.
    default: 1
  aggregate:
    description: List of static route definitions
  state:
    description:
      - State of the static route configuration.
    default: present
    choices: ['present', 'absent']
extends_documentation_fragment: eos
"""

EXAMPLES = """
- name: configure static route
  eos_static_route:
    address: 10.0.2.0/24
    next_hop: 10.8.38.1
    admin_distance: 2
- name: delete static route
  eos_static_route:
    address: 10.0.2.0/24
    next_hop: 10.8.38.1
    state: absent
- name: configure static routes using aggregate
  eos_static_route:
    aggregate:
      - { address: 10.0.1.0/24, next_hop: 10.8.38.1 }
      - { address: 10.0.3.0/24, next_hop: 10.8.38.1 }
- name: Delete static route using aggregate
  eos_static_route:
    aggregate:
      - { address: 10.0.1.0/24, next_hop: 10.8.38.1 }
      - { address: 10.0.3.0/24, next_hop: 10.8.38.1 }
    state: absent
"""

RETURN = """
commands:
  description: The list of configuration mode commands to send to the device
  returned: always
  type: list
  sample:
    - ip route 10.0.2.0/24 10.8.38.1 3
    - no ip route 10.0.2.0/24 10.8.38.1
"""

import re

from copy import deepcopy

from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.common.utils import is_masklen, validate_ip_address
from ansible.module_utils.network.common.utils import remove_default_spec, validate_prefix
from ansible.module_utils.network.eos.eos import get_config, load_config
from ansible.module_utils.network.eos.eos import eos_argument_spec

def is_address(value):
    if value:
        address = value.split('/')
        if is_masklen(address[1]) and validate_ip_address(address[0]):
            return True
    return False

def is_hop(value):
    if value:
        if validate_ip_address(value):
            return True
    return False

def map_obj_to_commands(updates, module):
    commands = list()
    want, have = updates

    for w in want:
        address = w['address']
        next_hop = w['next_hop']
        admin_distance = w['admin_distance']
        vrf = w['vrf']
        state = w['state']
        del w['state']

        if state == 'absent' and w in have:
            if vrf == 'default':
                commands.append('no ip route %s %s' % (address, next_hop))
            else:
                commands.append('no ip route vrf %s %s %s' % (vrf, address, next_hop))
        elif state == 'present' and w not in have:
            if vrf == 'default':
                commands.append('ip route %s %s %d' % (address, next_hop, admin_distance))
            else:
                commands.append('ip route vrf %s %s %s %d' % (vrf, address, next_hop, admin_distance))

    return commands

def map_params_to_obj(module, required_together=None):
    obj = []

    aggregate = module.params.get('aggregate')
    if aggregate:
        for item in aggregate:
            for key in item:
                if item.get(key) is None:
                    item[key] = module.params[key]

            module._check_required_together(required_together, item)
            d = item.copy()

            obj.append(d)
    else:
        obj.append({
            'address': module.params['address'].strip(),
            'next_hop': module.params['next_hop'].strip(),
            'admin_distance': module.params['admin_distance'],
            'state': module.params['state'],
            'vrf': module.params['vrf']
        })

    return obj

def map_config_to_obj(module):
    objs = []

    try:
        out = get_config(module, flags=['| include ip.route'])
    except IndexError:
        out = ''
    if out:
        lines = out.splitlines()
        for line in lines:
            obj = {}
            add_match = re.search(r'ip route ([\d\./]+)', line, re.M)
            if add_match:
                obj['vrf'] = 'default'
                address = add_match.group(1)
                if is_address(address):
                    obj['address'] = address
                hop_match = re.search(r'ip route {0} ([\d\./]+)'.format(address), line, re.M)
                if hop_match:
                    hop = hop_match.group(1)
                    if is_hop(hop):
                        obj['next_hop'] = hop
                    dist_match = re.search(r'ip route {0} {1} (\d+)'.format(address, hop), line, re.M)
                    if dist_match:
                        distance = dist_match.group(1)
                        obj['admin_distance'] = int(distance)
                    else:
                        obj['admin_distance'] = 1

            vrf_match = re.search(r'ip route vrf ([\w]+) ([\d\./]+)', line, re.M)
            if vrf_match:
                vrf = vrf_match.group(1)
                obj['vrf'] = vrf
                address = vrf_match.group(2)
                if is_address(address):
                    obj['address'] = address
                hop_vrf_match = re.search(r'ip route vrf {0} {1} ([\d\./]+)'.format(vrf, address), line, re.M)
                if hop_vrf_match:
                    hop = hop_vrf_match.group(1)
                    if is_hop(hop):
                        obj['next_hop'] = hop
                    dist_vrf_match = re.search(r'ip route vrf {0} {1} {2} (\d+)'.format(vrf, address, hop), line, re.M)
                    if dist_vrf_match:
                        distance = dist_vrf_match.group(1)
                        obj['admin_distance'] = int(distance)
                    else:
                        obj['admin_distance'] = 1

            objs.append(obj)

    return objs

def main():
    """ main entry point for module execution
    """
    element_spec = dict(
        address=dict(type='str', aliases=['prefix']),
        next_hop=dict(type='str'),
        vrf=dict(type='str', default='default'),
        admin_distance=dict(default=1, type='int'),
        state=dict(default='present', choices=['present', 'absent'])
    )

    aggregate_spec = deepcopy(element_spec)
    aggregate_spec['address'] = dict(required=True)

    # remove default in aggregate spec, to handle common arguments
    remove_default_spec(aggregate_spec)

    argument_spec = dict(
        aggregate=dict(type='list', elements='dict', options=aggregate_spec),
    )

    argument_spec.update(element_spec)
    argument_spec.update(eos_argument_spec)

    required_one_of = [['aggregate', 'address']]
    required_together = [['address', 'next_hop']]
    mutually_exclusive = [['aggregate', 'address']]

    module = AnsibleModule(argument_spec=argument_spec,
                           required_one_of=required_one_of,
                           required_together=required_together,
                           mutually_exclusive=mutually_exclusive,
                           supports_check_mode=True)

    address = module.params['address']
    if address is not None:
        prefix = address.split('/')[-1]

    if address and prefix:
        if '/' not in address or not validate_ip_address(address.split('/')[0]):
            module.fail_json(msg='{0} is not a valid IP address'.format(address))

        if not validate_prefix(prefix):
            module.fail_json(msg='Length of prefix should be between 0 and 32 bits')

    warnings = list()
    result = {'changed': False}
    if warnings:
        result['warnings'] = warnings

    want = map_params_to_obj(module)
    have = map_config_to_obj(module)
    commands = map_obj_to_commands((want, have), module)
    result['commands'] = commands

    if commands:
        commit = not module.check_mode
        response = load_config(module, commands, commit=commit)
        if response.get('diff') and module._diff:
            result['diff'] = {'prepared': response.get('diff')}
        result['session_name'] = response.get('session')
        result['changed'] = True

    module.exit_json(**result)

if __name__ == '__main__':
    main()


text:
import os.path
from pkg_resources import get_distribution, DistributionNotFound

__author__ = 'Keiron James Pizzey'
__email__ = 'kjpizzey@gmail.com'

try:
    _dist = get_distribution('pandamonium')
    # Normalize case for Windows systems
    dist_loc = os.path.normcase(_dist.location)
    here = os.path.normcase(__file__)
    if not here.startswith(os.path.join(dist_loc, 'pandamonium')):
        # not installed, but there is another version that *is*
        raise DistributionNotFound
except DistributionNotFound:
    __version__ = 'Please install this project with setup.py'
else:
    __version__ = _dist.version

import numpy as np
import pandas as pd

from pandamonium.dataframe import DataFrame


text:
import org.antlr.v4.runtime.ANTLRInputStream;
import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.tree.*;

import java.io.FileInputStream;
import java.io.InputStream;

public class ExtractInterfaceTool {
    public static void main(String[] args) throws Exception {
        String inputFile = null;
        if ( args.length>0 ) inputFile = args[0];
        InputStream is = System.in;
        if ( inputFile!=null ) {
            is = new FileInputStream(inputFile);
        }
        ANTLRInputStream input = new ANTLRInputStream(is);

        JavaLexer lexer = new JavaLexer(input);
        CommonTokenStream tokens = new CommonTokenStream(lexer);
        JavaParser parser = new JavaParser(tokens);
        ParseTree tree = parser.compilationUnit(); // parse

        ParseTreeWalker walker = new ParseTreeWalker(); // create standard walker
        ExtractInterfaceListener extractor = new ExtractInterfaceListener(parser);
        walker.walk(extractor, tree); // initiate walk of tree with listener
    }
}


text:
import React, { Component } from 'react';
import { render } from 'react-dom';

export default class SearchBar extends Component {
	constructor(props) {
		super(props);
	}

	handleSubmit(e) {
		e.preventDefault();
	}

	render() {
		return (
			<form className="search-bar" onSubmit={this.handleSubmit}>
				<input
					className="input"
					type="text"
					value={this.props.term}
					placeholder={this.props.placeholder}
					onChange={e => this.props.onSearchTermChange(e.target.value)} />
			</form>
		);
	}

}


text:
import { dom, component } from 'mise';

import { template } from './todos.template';
import { state } from './todos.state';
import * as actions from './todos.actions';

component({
  template,
  state,
  actions,
});


text:
namespace Tagger
{
    partial class ExtractorManagerDialog
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.dExtractors = new BrightIdeasSoftware.FastObjectListView();
            this.dApply = new System.Windows.Forms.Button();
            this.dCancel = new System.Windows.Forms.Button();
            this.dOk = new System.Windows.Forms.Button();
            this.dContext = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.removeSelectedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.revertToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.applyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.olvcPattern = new BrightIdeasSoftware.OLVColumn();
            this.olvcScore = new BrightIdeasSoftware.OLVColumn();
            this.olvcRemoveUnderscore = new BrightIdeasSoftware.OLVColumn();
            ((System.ComponentModel.ISupportInitialize)(this.dExtractors)).BeginInit();
            this.dContext.SuspendLayout();
            this.SuspendLayout();
            //
            // dExtractors
            //
            this.dExtractors.AllColumns.Add(this.olvcPattern);
            this.dExtractors.AllColumns.Add(this.olvcScore);
            this.dExtractors.AllColumns.Add(this.olvcRemoveUnderscore);
            this.dExtractors.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.dExtractors.CellEditActivation = BrightIdeasSoftware.ObjectListView.CellEditActivateMode.DoubleClick;
            this.dExtractors.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
            this.olvcPattern,
            this.olvcScore,
            this.olvcRemoveUnderscore});
            this.dExtractors.ContextMenuStrip = this.dContext;
            this.dExtractors.FullRowSelect = true;
            this.dExtractors.Location = new System.Drawing.Point(12, 12);
            this.dExtractors.Name = "dExtractors";
            this.dExtractors.ShowGroups = false;
            this.dExtractors.Size = new System.Drawing.Size(608, 302);
            this.dExtractors.TabIndex = 0;
            this.dExtractors.UseAlternatingBackColors = true;
            this.dExtractors.UseCompatibleStateImageBehavior = false;
            this.dExtractors.View = System.Windows.Forms.View.Details;
            this.dExtractors.VirtualMode = true;
            this.dExtractors.KeyUp += new System.Windows.Forms.KeyEventHandler(this.dExtractors_KeyUp);
            //
            // dApply
            //
            this.dApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.dApply.Location = new System.Drawing.Point(545, 320);
            this.dApply.Name = "dApply";
            this.dApply.Size = new System.Drawing.Size(75, 23);
            this.dApply.TabIndex = 2;
            this.dApply.Text = "Apply";
            this.dApply.UseVisualStyleBackColor = true;
            this.dApply.Click += new System.EventHandler(this.dApply_Click);
            //
            // dCancel
            //
            this.dCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.dCancel.Location = new System.Drawing.Point(464, 320);
            this.dCancel.Name = "dCancel";
            this.dCancel.Size = new System.Drawing.Size(75, 23);
            this.dCancel.TabIndex = 3;
            this.dCancel.Text = "Cancel";
            this.dCancel.UseVisualStyleBackColor = true;
            this.dCancel.Click += new System.EventHandler(this.dCancel_Click);
            //
            // dOk
            //
            this.dOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.dOk.Location = new System.Drawing.Point(383, 320);
            this.dOk.Name = "dOk";
            this.dOk.Size = new System.Drawing.Size(75, 23);
            this.dOk.TabIndex = 4;
            this.dOk.Text = "OK";
            this.dOk.UseVisualStyleBackColor = true;
            this.dOk.Click += new System.EventHandler(this.dOk_Click);
            //
            // dContext
            //
            this.dContext.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.addToolStripMenuItem,
            this.removeSelectedToolStripMenuItem,
            this.revertToolStripMenuItem,
            this.applyToolStripMenuItem});
            this.dContext.Name = "dContext";
            this.dContext.Size = new System.Drawing.Size(168, 92);
            //
            // addToolStripMenuItem
            //
            this.addToolStripMenuItem.Name = "addToolStripMenuItem";
            this.addToolStripMenuItem.Size = new System.Drawing.Size(167, 22);
            this.addToolStripMenuItem.Text = "Add";
            this.addToolStripMenuItem.Click += new System.EventHandler(this.addToolStripMenuItem_Click);
            //
            // removeSelectedToolStripMenuItem
            //
            this.removeSelectedToolStripMenuItem.Name = "removeSelectedToolStripMenuItem";
            this.removeSelectedToolStripMenuItem.Size = new System.Drawing.Size(167, 22);
            this.removeSelectedToolStripMenuItem.Text = "Remove selected";
            this.removeSelectedToolStripMenuItem.Click += new System.EventHandler(this.removeSelectedToolStripMenuItem_Click);
            //
            // revertToolStripMenuItem
            //
            this.revertToolStripMenuItem.Name = "revertToolStripMenuItem";
            this.revertToolStripMenuItem.Size = new System.Drawing.Size(167, 22);
            this.revertToolStripMenuItem.Text = "Revert";
            this.revertToolStripMenuItem.Click += new System.EventHandler(this.revertToolStripMenuItem_Click);
            //
            // applyToolStripMenuItem
            //
            this.applyToolStripMenuItem.Name = "applyToolStripMenuItem";
            this.applyToolStripMenuItem.Size = new System.Drawing.Size(167, 22);
            this.applyToolStripMenuItem.Text = "Apply";
            this.applyToolStripMenuItem.Click += new System.EventHandler(this.applyToolStripMenuItem_Click);
            //
            // olvcPattern
            //
            this.olvcPattern.AspectName = "Pattern";
            this.olvcPattern.Text = "Pattern";
            //
            // olvcScore
            //
            this.olvcScore.AspectName = "baseScore";
            this.olvcScore.Text = "Base score";
            //
            // olvcRemoveUnderscore
            //
            this.olvcRemoveUnderscore.AspectName = "removeUnderscores";
            this.olvcRemoveUnderscore.Text = "Remove underscore?";
            this.olvcRemoveUnderscore.Width = 130;
            //
            // ExtractorManagerDialog
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(635, 355);
            this.Controls.Add(this.dApply);
            this.Controls.Add(this.dExtractors);
            this.Controls.Add(this.dOk);
            this.Controls.Add(this.dCancel);
            this.Name = "ExtractorManagerDialog";
            this.Text = "ExtractorGui";
            ((System.ComponentModel.ISupportInitialize)(this.dExtractors)).EndInit();
            this.dContext.ResumeLayout(false);
            this.ResumeLayout(false);

        }

        #endregion

        private BrightIdeasSoftware.FastObjectListView dExtractors;
        private System.Windows.Forms.Button dApply;
        private System.Windows.Forms.Button dCancel;
        private System.Windows.Forms.Button dOk;
        private System.Windows.Forms.ContextMenuStrip dContext;
        private System.Windows.Forms.ToolStripMenuItem addToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem removeSelectedToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem revertToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem applyToolStripMenuItem;
        private BrightIdeasSoftware.OLVColumn olvcPattern;
        private BrightIdeasSoftware.OLVColumn olvcScore;
        private BrightIdeasSoftware.OLVColumn olvcRemoveUnderscore;
    }
}


text:
   /*******************************************************/
   /*      "C" Language Integrated Production System      */
   /*                                                     */
   /*             CLIPS Version 6.30  12/07/07            */
   /*             AdventureEngine 2/21/2013               */
   /*                                                     */
   /*                  SETUP HEADER FILE                  */
   /*******************************************************/

/*************************************************************/
/* Purpose: This file is the general header file included by */
/*   all of the .c source files. It contains global          */
/*   definitions and the compiler flags which must be edited */
/*   to create a version for a specific machine, operating   */
/*   system, or feature set.                                 */
/*                                                           */
/* Principal Programmer(s):                                  */
/*      Gary D. Riley                                        */
/*      Brian L. Dantes                                      */
/*                                                           */
/* Contributing Programmer(s):                               */
/*                                                           */
/* Revision History:                                         */
/*      6.24: Default locale modification.                   */
/*                                                           */
/*            Removed CONFLICT_RESOLUTION_STRATEGIES,        */
/*            DYNAMIC_SALIENCE, INCREMENTAL_RESET,           */
/*            LOGICAL_DEPENDENCIES, IMPERATIVE_METHODS,      */
/*            INSTANCE_PATTERN_MATCHING, and                 */
/*            IMPERATIVE_MESSAGE_HANDLERS, and               */
/*            AUXILIARY_MESSAGE_HANDLERS compilation flags.  */
/*                                                           */
/*            Removed the SHORT_LINK_NAMES compilation flag. */
/*                                                           */
/*            Renamed BOOLEAN macro type to intBool.         */
/*                                                           */
/*      6.30: Used #ifndef for preprocessor definitions so   */
/*            they can be set at the project or makefile     */
/*            level.                                         */
/*                                                           */
/*            Removed ENVIRONMENT_API_ONLY compilation flag. */
/*                                                           */
/*            Combined BASIC_IO and EXT_IO compilation       */
/*            flags into the IO_FUNCTIONS compilation flag.  */
/*                                                           */
/*            Changed the EX_MATH compilation flag to        */
/*            EXTENDED_MATH_FUNCTIONS.                       */
/*                                                           */
/*            Removed VOID definition because of conflict    */
/*            with Windows.h header file.                    */
/*                                                           */
/*      AdventureEngine 2/21/2013: Added automatic system    */
/*      identification                                       */
/*************************************************************/

#ifndef _H_setup
#define _H_setup

/****************************************************************/
/* -------------------- COMPILER FLAGS ------------------------ */
/****************************************************************/

/*********************************************************************/
/* Flag denoting the environment in which the executable is to run.  */
/* Only one of these flags should be turned on (set to 1) at a time. */
/*********************************************************************/

//#ifndef UNIX_V
//#define UNIX_V  0   /* UNIX System V, 4.2bsd, or HP Unix, presumably with gcc */
//#endif
//
#ifndef UNIX_7
#define UNIX_7  0   /* UNIX System III Version 7 or Sun Unix, presumably with gcc */
#endif

#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFlyBSD__)
	#define UNIX_V 1
#else
	#define UNIX_V 0
#endif

//TODO: Add solaris support

#if defined(__linux__)
    #define LINUX 1
#else
	 #define LINUX 0
#endif

#if defined(__APPLE__)
	#define DARWIN 1
#else
   #define DARWIN 0
#endif

#if defined(_WIN32) || defined(_WIN64)
	#define WIN_MVC 1
#else
   #define WIN_MVC 0
#endif

#ifndef WIN_GCC
#define WIN_GCC 0   /* Windows XP, with DJGPP 3.21 */
#endif

/* Use GENERIC if nothing else is used. */

#ifndef GENERIC
#if (! UNIX_V) && (! LINUX) && (! UNIX_7) && \
    (! DARWIN) && (! WIN_MVC) && (! WIN_GCC)
#define GENERIC 1   /* Generic (any machine)                   */
#else
#define GENERIC 0   /* Generic (any machine)                   */
#endif
#endif

#if WIN_MVC
#define IBM 1
#else
#define IBM 0
#endif

/***********************************************/
/* Some definitions for use with declarations. */
/***********************************************/

#define VOID_ARG void
#define STD_SIZE size_t

#define intBool int
#define globle

/*******************************************/
/* RUN_TIME:  Specifies whether a run-time */
/*   module is being created.              */
/*******************************************/

#ifndef RUN_TIME
#define RUN_TIME 0
#endif

/*************************************************/
/* DEFRULE_CONSTRUCT: Determines whether defrule */
/*   construct is included.                      */
/*************************************************/

#ifndef DEFRULE_CONSTRUCT
#define DEFRULE_CONSTRUCT 1
#endif

/************************************************/
/* DEFMODULE_CONSTRUCT:  Determines whether the */
/*   defmodule construct is included.           */
/************************************************/

#ifndef DEFMODULE_CONSTRUCT
#define DEFMODULE_CONSTRUCT 1
#endif

/****************************************************/
/* DEFTEMPLATE_CONSTRUCT:  Determines whether facts */
/*   and the deftemplate construct are included.    */
/****************************************************/

#ifndef DEFTEMPLATE_CONSTRUCT
#define DEFTEMPLATE_CONSTRUCT 1
#endif

#if ! DEFRULE_CONSTRUCT
#undef DEFTEMPLATE_CONSTRUCT
#define DEFTEMPLATE_CONSTRUCT 0
#endif

/************************************************************/
/* FACT_SET_QUERIES: Determines if fact-set query functions */
/*  such as any-factp and do-for-all-facts are included.    */
/************************************************************/

#ifndef FACT_SET_QUERIES
#define FACT_SET_QUERIES 1
#endif

#if ! DEFTEMPLATE_CONSTRUCT
#undef FACT_SET_QUERIES
#define FACT_SET_QUERIES        0
#endif

/****************************************************/
/* DEFFACTS_CONSTRUCT:  Determines whether deffacts */
/*   construct is included.                         */
/****************************************************/

#ifndef DEFFACT_CONSTRUCT
#define DEFFACTS_CONSTRUCT 1
#endif

#if ! DEFTEMPLATE_CONSTRUCT
#undef DEFFACTS_CONSTRUCT
#define DEFFACTS_CONSTRUCT 0
#endif

/************************************************/
/* DEFGLOBAL_CONSTRUCT:  Determines whether the */
/*   defglobal construct is included.           */
/************************************************/

#ifndef DEFGLOBAL_CONSTRUCT
#define DEFGLOBAL_CONSTRUCT 1
#endif

/**********************************************/
/* DEFFUNCTION_CONSTRUCT:  Determines whether */
/*   deffunction construct is included.       */
/**********************************************/

#ifndef DEFFUNCTION_CONSTRUCT
#define DEFFUNCTION_CONSTRUCT 1
#endif

/*********************************************/
/* DEFGENERIC_CONSTRUCT:  Determines whether */
/*   generic functions  are included.        */
/*********************************************/

#ifndef DEFGENERIC_CONSTRUCT
#define DEFGENERIC_CONSTRUCT 1
#endif

/*****************************************************************/
/* OBJECT_SYSTEM:  Determines whether object system is included. */
/*   The MULTIFIELD_FUNCTIONS flag should also be on if you want */
/*   to be able to manipulate multi-field slots.                 */
/*****************************************************************/

#ifndef OBJECT_SYSTEM
#define OBJECT_SYSTEM 1
#endif

/*****************************************************************/
/* DEFINSTANCES_CONSTRUCT: Determines whether the definstances   */
/*   construct is enabled.                                       */
/*****************************************************************/

#ifndef DEFINSTANCES_CONSTRUCT
#define DEFINSTANCES_CONSTRUCT      1
#endif

#if ! OBJECT_SYSTEM
#undef DEFINSTANCES_CONSTRUCT
#define DEFINSTANCES_CONSTRUCT      0
#endif

/********************************************************************/
/* INSTANCE_SET_QUERIES: Determines if instance-set query functions */
/*  such as any-instancep and do-for-all-instances are included.    */
/********************************************************************/

#ifndef INSTANCE_SET_QUERIES
#define INSTANCE_SET_QUERIES 1
#endif

#if ! OBJECT_SYSTEM
#undef INSTANCE_SET_QUERIES
#define INSTANCE_SET_QUERIES        0
#endif

/******************************************************************/
/* Check for consistencies associated with the defrule construct. */
/******************************************************************/

#if (! DEFTEMPLATE_CONSTRUCT) && (! OBJECT_SYSTEM)
#undef DEFRULE_CONSTRUCT
#define DEFRULE_CONSTRUCT 0
#endif

/*******************************************************************/
/* BLOAD/BSAVE_INSTANCES: Determines if the save/restore-instances */
/*  functions can be enhanced to perform more quickly by using     */
/*  binary files                                                   */
/*******************************************************************/

#ifndef BLOAD_INSTANCES
#define BLOAD_INSTANCES 1
#endif
#ifndef BSAVE_INSTANCES
#define BSAVE_INSTANCES 1
#endif

#if ! OBJECT_SYSTEM
#undef BLOAD_INSTANCES
#undef BSAVE_INSTANCES
#define BLOAD_INSTANCES             0
#define BSAVE_INSTANCES             0
#endif

/****************************************************************/
/* EXTENDED MATH PACKAGE FLAG: If this is on, then the extended */
/* math package functions will be available for use, (normal    */
/* default). If this flag is off, then the extended math        */
/* functions will not be available, and the 30K or so of space  */
/* they require will be free. Usually a concern only on PC type */
/* machines.                                                    */
/****************************************************************/

#ifndef EXTENDED_MATH_FUNCTIONS
#define EXTENDED_MATH_FUNCTIONS 1
#endif

/****************************************************************/
/* TEXT PROCESSING : Turn on this flag for support of the       */
/* hierarchical lookup system.                                  */
/****************************************************************/

#ifndef TEXTPRO_FUNCTIONS
#define TEXTPRO_FUNCTIONS 1
#endif

/****************************************************************/
/* HELP: To implement the help facility, set the flag below and */
/* specify the path and name of the help data file your system. */
/****************************************************************/

#ifndef HELP_FUNCTIONS
#define HELP_FUNCTIONS 1
#endif

#if HELP_FUNCTIONS
#define HELP_DEFAULT "clips.hlp"
#endif

/*************************************************************************/
/* BLOAD_ONLY:      Enables bload command and disables the load command. */
/* BLOAD:           Enables bload command.                               */
/* BLOAD_AND_BSAVE: Enables bload, and bsave commands.                   */
/*************************************************************************/

#ifndef BLOAD_ONLY
#define BLOAD_ONLY 0
#endif
#ifndef BLOAD
#define BLOAD 0
#endif
#ifndef BLOAD_AND_BSAVE
#define BLOAD_AND_BSAVE 1
#endif

#if RUN_TIME
#undef BLOAD_ONLY
#define BLOAD_ONLY      0
#undef BLOAD
#define BLOAD           0
#undef BLOAD_AND_BSAVE
#define BLOAD_AND_BSAVE 0
#endif

/********************************************************************/
/* CONSTRUCT COMPILER: If this flag is turned on, you can generate  */
/*   C code representing the constructs in the current environment. */
/*   With the RUN_TIME flag set, this code can be compiled and      */
/*   linked to create a stand-alone run-time executable.            */
/********************************************************************/

#ifndef CONSTRUCT_COMPILER
#define  CONSTRUCT_COMPILER 1
#endif

#if CONSTRUCT_COMPILER
#define API_HEADER "clips.h"
#endif

/************************************************/
/* IO_FUNCTIONS: Includes printout, read, open, */
/*   close, format, and readline functions.     */
/************************************************/

#ifndef IO_FUNCTIONS
#define IO_FUNCTIONS 1
#endif

/************************************************/
/* STRING_FUNCTIONS: Includes string functions: */
/*   str-length, str-compare, upcase, lowcase,  */
/*   sub-string, str-index, and eval.           */
/************************************************/

#ifndef STRING_FUNCTIONS
#define STRING_FUNCTIONS 1
#endif

/*********************************************/
/* MULTIFIELD_FUNCTIONS: Includes multifield */
/*   functions:  mv-subseq, mv-delete,       */
/*   mv-append, str-explode, str-implode.    */
/*********************************************/

#ifndef MULTIFIELD_FUNCTIONS
#define MULTIFIELD_FUNCTIONS 1
#endif

/****************************************************/
/* DEBUGGING_FUNCTIONS: Includes functions such as  */
/*   rules, facts, matches, ppdefrule, etc.         */
/****************************************************/

#ifndef DEBUGGING_FUNCTIONS
#define DEBUGGING_FUNCTIONS 1
#endif

/***************************************************/
/* PROFILING_FUNCTIONS: Enables code for profiling */
/*   constructs and user functions.                */
/***************************************************/

#ifndef PROFILING_FUNCTIONS
#define PROFILING_FUNCTIONS 1
#endif

/************************************************************************/
/* BLOCK_MEMORY: Causes memory to be allocated in large blocks.         */
/*   INITBUFFERSIZE and BLOCKSIZE should both be set to less than the   */
/*   maximum size of a signed integer.                                  */
/************************************************************************/

#ifndef BLOCK_MEMORY
#define BLOCK_MEMORY 0
#endif

#if BLOCK_MEMORY

#define INITBLOCKSIZE 32000
#define BLOCKSIZE 32000

#endif

/*******************************************************************/
/* WINDOW_INTERFACE : Set this flag if you are recompiling any of  */
/*   the machine specific GUI interfaces. Currently, when enabled, */
/*   this flag disables the more processing used by the help       */
/*   system. This flag also prevents any input or output being     */
/*   directly sent to stdin or stdout.                             */
/*******************************************************************/

#ifndef WINDOW_INTERFACE
#define WINDOW_INTERFACE 0
#endif

/*************************************************************/
/* ALLOW_ENVIRONMENT_GLOBALS: If enabled, tracks the current */
/*   environment and allows environments to be referred to   */
/*   by index. If disabled, CLIPS makes no use of global     */
/*   variables.                                              */
/*************************************************************/

#ifndef ALLOW_ENVIRONMENT_GLOBALS
#define ALLOW_ENVIRONMENT_GLOBALS 1
#endif

/********************************************/
/* DEVELOPER: Enables code for debugging a  */
/*   development version of the executable. */
/********************************************/

#ifndef DEVELOPER
#define DEVELOPER 1
#endif

#if DEVELOPER
#include <assert.h>
#define Bogus(x) assert(! (x))
#else
#define Bogus(x)
#endif

/***************************/
/* Environment Definitions */
/***************************/

#include "envrnmnt.h"

/******************************/
/* Compatibilty Redefinitions */
/******************************/

#define PrintCLIPS(x,y) EnvPrintRouter(GetCurrentEnvironment(),x,y)
#define GetcCLIPS(x,y) EnvGetcRouter(GetCurrentEnvironment(),x)
#define UngetcCLIPS(x,y) EnvUngetcRouter(GetCurrentEnvironment(),x,y)
#define ExitCLIPS(x) EnvExitRouter(GetCurrentEnvironment(),x)
#define CLIPSSystemError(x,y) SystemError(x,y)
#define CLIPSFunctionCall(x,y,z) FunctionCall(x,y,z)
#define InitializeCLIPS() InitializeEnvironment()
#define WCLIPS WPROMPT
#define CLIPSTrueSymbol EnvTrueSymbol(GetCurrentEnvironment())
#define CLIPSFalseSymbol EnvFalseSymbol(GetCurrentEnvironment())
#define EnvCLIPSTrueSymbol(theEnv) EnvTrueSymbol(theEnv)
#define EnvCLIPSFalseSymbol(theEnv) EnvFalseSymbol(theEnv)
#define CLIPS_FALSE 0
#define CLIPS_TRUE 1

/*************************************************/
/* Any user defined global setup information can */
/* be included in the file usrsetup.h which is   */
/* an empty file in the baseline version.        */
/*************************************************/

#include "usrsetup.h"

#endif	/* _H_setup */


text:
<!DOCTYPE HTML>

		<meta charset="utf-8"/>
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
		<meta name="HandheldFriendly" content="true"/>
		<meta name="MobileOptimized" content="320"/>
		<title>Hello H5+</title>

		<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8"/>

欢迎进入停靠页面

页面内容结束


text:
package Controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Start extends HttpServlet {

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		req.getRequestDispatcher("/WEB-INF/acceuil.jsp").forward(req, resp);
	}

}


text:
using System;

namespace Server.Items
{
	public class Checkers2 : Item
	{

		[Constructable]
		public Checkers2() : base( 0xE1B )
		{
			Movable = true;
			Stackable = false;
		}

		public Checkers2( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 );
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
		}
	}
}


text:
from   sys   import   path

print(sys.path)


text: Swift utilities for personal usage


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="Kotlin2JsCompilerArguments">
    <option name="sourceMap" value="true" />
    <option name="moduleKind" value="amd" />
    <option name="outputPrefix" value="pre_" />
    <option name="outputPostfix" value="_post" />
  </component>
  <component name="KotlinCommonCompilerArguments">
    <option name="suppressWarnings" value="true" />
  </component>
  <component name="KotlinCompilerSettings">
    <option name="additionalArguments" value="-version -verbose" />
    <option name="copyJsLibraryFiles" value="false" />
    <option name="outputDirectoryForJsLibraryFiles" value="libktln" />
  </component>
</project>


text:
require 'spec_helper'

describe 'ActiveMenu::Registry' do
  subject {ActiveMenu::Registry.instance}
  it {should respond_to(:menus)}
  it {should be_a_kind_of(Singleton)}

  before :each do
    ActiveMenu::Registry.instance.reset
  end

  it 'can reset the menus to zero' do
    ActiveMenu::Registry.instance.create(:idmenu, href: 'http://example.com')
    ActiveMenu::Registry.instance.menus.length == 1
    ActiveMenu::Registry.instance.reset
    ActiveMenu::Registry.instance.menus.length == 0
  end

  it 'can get a menu and yield it to a block' do
    ActiveMenu::Registry.instance.create(:idmenu, href: 'http://example.com')
    ActiveMenu::get(:idmenu) do |m|
      m.id.should == :idmenu
    end
  end

end


text:
package com.mongodb;

/**
 * The type of the server.
 */
enum ServerType {
    /**
     * A standalone mongod server.
     */
    StandAlone {
        @Override
        public ClusterType getClusterType() {
            return ClusterType.StandAlone;
        }
    },

    /**
     * A replica set primary.
     */
    ReplicaSetPrimary {
        @Override
        public ClusterType getClusterType() {
            return ClusterType.ReplicaSet;
        }
    },

    /**
     * A replica set secondary.
     */
    ReplicaSetSecondary {
        @Override
        public ClusterType getClusterType() {
            return ClusterType.ReplicaSet;
        }
    },

    /**
     * A replica set arbiter.
     */
    ReplicaSetArbiter {
        @Override
        public ClusterType getClusterType() {
            return ClusterType.ReplicaSet;
        }
    },

    /**
     * A replica set member that is none of the other types (a passive, for example).
     */
    ReplicaSetOther {
        @Override
        public ClusterType getClusterType() {
            return ClusterType.ReplicaSet;
        }
    },

    /**
     * A router to a sharded cluster, i.e. a mongos server.
     */
    ShardRouter {
        @Override
        public ClusterType getClusterType() {
            return ClusterType.Sharded;
        }
    },

    /**
     * The server type is not yet known.
     */
    Unknown {
        @Override
        public ClusterType getClusterType() {
            return ClusterType.Unknown;
        }
    };

    /**
     * The type of the cluster to which this server belongs
     *
     * @return the cluster type
     */
    public abstract ClusterType getClusterType();
}


text:
--TEST--
Test vsprintf() function : basic functionality - string format
--FILE--
<?php
/* Prototype  : string vsprintf(string $format , array $args)
 * Description: Return a formatted string
 * Source code: ext/standard/formatted_print.c
*/

echo "*** Testing vsprintf() : basic functionality - using string format ***\n";

// Initialise all required variables
$format = "format";
$format1 = "%s";
$format2 = "%s %s";
$format3 = "%s %s %s";
$arg1 = array("one");
$arg2 = array("one","two");
$arg3 = array("one","two","three");

var_dump( vsprintf($format1,$arg1) );
var_dump( vsprintf($format2,$arg2) );
var_dump( vsprintf($format3,$arg3) );

echo "Done";
?>
--EXPECTF--
*** Testing vsprintf() : basic functionality - using string format ***
string(3) "one"
string(7) "one two"
string(13) "one two three"
Done


text:
package com.dsinpractice.samples.hadoop.mapred.avro.colorcount;

import org.apache.avro.Schema;
import org.apache.avro.mapreduce.AvroJob;
import org.apache.avro.mapreduce.AvroKeyInputFormat;
import org.apache.avro.mapreduce.AvroKeyValueOutputFormat;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;

import java.io.IOException;

public class ColorCountJob extends Configured implements Tool {
  @Override
  public int run(String[] args) throws Exception {

    Configuration conf = getConf();
    Job job = new Job(conf, "color count");
    job.setJarByClass(ColorCountJob.class);

    configureMapper(job, args);
    configureReducer(job, args);

    return job.waitForCompletion(true) ? 0 : -1;
  }

  private void configureReducer(Job job, String[] args) {
    job.setReducerClass(ColorCountReducer.class);
    FileOutputFormat.setOutputPath(job, new Path(args[1]));
    job.setOutputFormatClass(AvroKeyValueOutputFormat.class);
    AvroJob.setOutputKeySchema(job, Schema.create(Schema.Type.STRING));
    AvroJob.setOutputValueSchema(job, Schema.create(Schema.Type.INT));
  }

  private void configureMapper(Job job, String[] args) throws IOException {
    job.setMapperClass(ColorCountMapper.class);
    job.setInputFormatClass(AvroKeyInputFormat.class);
    AvroKeyInputFormat.setInputPaths(job, args[0]);
    job.setMapOutputKeyClass(Text.class);
    job.setMapOutputValueClass(IntWritable.class);
  }

  public static void main(String[] args) throws Exception {
    ToolRunner.run(new Configuration(), new ColorCountJob(), args);
  }
}


text:
import threading
import Queue
import abc
import re
import copy
from resources.lib.kodilogging import KodiLogger
from resources.lib.pubsub import TaskReturn
from resources.lib.events import Events
import xbmcgui

events = Events()

def notify(msg):
    dialog = xbmcgui.Dialog()
    dialog.notification('Kodi Callbacks', msg, xbmcgui.NOTIFICATION_INFO, 5000)

class AbstractTask(threading.Thread):
    """
    Abstract class for command specific workers to follow
    """
    __metaclass__ = abc.ABCMeta
    tasktype = 'abstract'
    lock = threading.RLock()

    def __init__(self, logger=KodiLogger.log, name='AbstractTask'):
        super(AbstractTask, self).__init__(name=name)
        self.cmd_str = ''
        self.userargs = ''
        self.log = logger
        self.runtimeargs = []
        self.taskKwargs = {}
        self.publisherKwargs = {}
        self.topic = None
        self.type = ''
        self.taskId = ''
        self.returnQ = Queue.Queue()
        self.delimitregex = re.compile(r'\s+,\s+|,\s+|\s+')

    def processUserargs(self, kwargs):
        if self.userargs == '':
            return []
        ret = copy.copy(self.userargs)
        ret = ret.replace(ur'%%', u'{@literal%@}')
        if self.tasktype == 'script' or self.tasktype == 'python':
            tmp = self.delimitregex.sub(ur'{@originaldelim@}', ret)
            ret = tmp
        try:
            varArgs = events.AllEvents[self.topic.topic]['varArgs']
        except KeyError:
            pass
        else:
            for key in varArgs.keys():
                try:
                    kw = unicode(kwargs[varArgs[key]])
                    kw = kw.replace(u" ", u'%__')
                    ret = ret.replace(key, kw)
                except KeyError:
                    pass
                except UnicodeError:
                    pass
        ret = ret.replace(u'%__', u" ")
        ret = ret.replace(u'%_', u",")
        ret = ret.replace(u'{@literal%@}', ur'%')
        if self.tasktype == 'script' or self.tasktype == 'python':
            ret = ret.split(u'{@originaldelim@}') # need to split first to avoid unicode error
            # if self.tasktype == 'script':
            #     fse = sys.getfilesystemencoding()
            #     ret = []
            #     for r in ret2:
            #         ret.append(r.encode(fse))
            # else:
            #     ret = ret2
        return ret

    @staticmethod
    @abc.abstractmethod
    def validate(taskKwargs, xlog=KodiLogger.log):
        pass

    def t_start(self, topic, taskKwargs, **kwargs):
        with AbstractTask.lock:
            self.topic = topic
            self.taskKwargs = taskKwargs
            self.userargs = taskKwargs['userargs']
            self.taskId = taskKwargs['taskid']
            self.publisherKwargs = kwargs
            self.runtimeargs = self.processUserargs(kwargs)
        self.start()

    @abc.abstractmethod
    def run(self):
        err = None  # True if error occured
        msg = ''    # string containing error message or return message
        self.threadReturn(err, msg)

    def threadReturn(self, err, msg):
        taskReturn = TaskReturn(err, msg)
        taskReturn.eventId = str(self.topic)
        taskReturn.taskId = self.taskId
        self.returnQ.put(taskReturn)


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.googlecode.javaewah</groupId>
  <artifactId>JavaEWAH</artifactId>
  <version>1.0.8-SNAPSHOT</version>
  <packaging>bundle</packaging>
  <properties>
    <maven.compiler.source>1.6</maven.compiler.source>
    <maven.compiler.target>1.6</maven.compiler.target>
    <encoding>UTF-8</encoding>
  </properties>
  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>A business-friendly OSS license</comments>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git@github.com:lemire/javaewah.git</connection>
    <url>scm:git:git@github.com:lemire/javaewah.git</url>
    <developerConnection>scm:git:git@github.com:lemire/javaewah.git</developerConnection>
  </scm>
  <developers>
    <developer>
      <id>lemire</id>
      <name>Daniel Lemire</name>
      <email>lemire@gmail.com</email>
      <url>http://lemire.me/en/</url>
      <organization>LICEF Research Center</organization>
      <organizationUrl>http://licef.ca</organizationUrl>
      <roles>
        <role>architect</role>
        <role>developer</role>
        <role>maintainer</role>
      </roles>
      <timezone>-5</timezone>
      <properties>
        <picUrl>http://lemire.me/fr/images/JPG/profile2011B_152.jpg</picUrl>
      </properties>
    </developer>
  </developers>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.10</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <issueManagement>
    <system>GitHub Issue Tracking</system>
    <url>https://github.com/lemire/javaewah/issues</url>
  </issueManagement>
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>5</version>
  </parent>
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>animal-sniffer-maven-plugin</artifactId>
        <version>1.9</version>
        <configuration>
          <signature>
            <groupId>org.codehaus.mojo.signature</groupId>
            <artifactId>java16</artifactId>
            <version>1.0</version>
          </signature>
        </configuration>
        <executions>
          <execution>
            <id>ensure-java-1.6-class-library</id>
            <phase>test</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.7.2.201409121644</version>
        <executions>
          <execution>
            <id>prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.eluder.coveralls</groupId>
        <artifactId>coveralls-maven-plugin</artifactId>
        <version>3.1.0</version>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.3.7</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Export-Package>com.googlecode.javaewah.*</Export-Package>
            <Import-Package>*</Import-Package>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.1.2</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <name>JavaEWAH</name>
  <url>https://github.com/lemire/javaewah</url>
  <description>The bit array data structure is implemented in Java as the BitSet class. Unfortunately, this fails to scale without compression.
  JavaEWAH is a word-aligned compressed variant of the Java bitset class. It uses a 64-bit run-length encoding (RLE) compression scheme.
  The goal of word-aligned compression is not to achieve the best compression, but rather to improve query processing time. Hence, we try to save CPU cycles, maybe at the expense of storage. However, the EWAH scheme we implemented is always more efficient storage-wise than an uncompressed bitmap (implemented in Java as the BitSet class). Unlike some alternatives, javaewah does not rely on a patented scheme. </description>
</project>


text:
.mdtTableContainer {
  position: relative;
  overflow: visible;
  font-size: 15px;
  /* 12sp Roboto Medium, 54% black */
  /* optional animation of sort icons: add class 'animate-sort-icon' to mdt-header-row to activate animation */
  /* 64dp card header height */
  /* 56do for last row */
  /* column padding */
  /* 48dp row height */
  /* 13sp Roboto Regular, 87% black */
  /* border separation color */
  /* INTERACTION */
  /* default icon color */
  /* filter drop down */
  /* TH Select outline color & caret */
}
.mdtTableContainer .mdtTable {
  position: relative;
}
.mdtTableContainer .md-chips {
  font-size: 13px;
}
.mdtTableContainer .p-r {
  position: relative;
}
.mdtTableContainer .no-outline {
  outline: none;
}
.mdtTableContainer *,
.mdtTableContainer *:before,
.mdtTableContainer *:after {
  -webkit-box-sizing: inherit;
  -moz-box-sizing: inherit;
  box-sizing: inherit;
}
.mdtTableContainer table {
  width: 100%;
  display: table;
}
.mdtTableContainer table:focus {
  outline: none;
}
.mdtTableContainer td, .mdtTableContainer th {
  padding: 0;
  margin: 0;
}
.mdtTableContainer th {
  font-size: 12px;
  font-weight: 500;
  color: #757575;
  white-space: nowrap;
  /* prevent ink ripple bleeding */
  position: relative;
  /* no pointer cursor when disabled, could be not-allowed but i think that indication is to strong */
  /* remove the default blue outline in Chrome for consistent button-like behaviour */
  /* when hoverSortIcons on a non-sorted column*/
}
.mdtTableContainer th[disabled] {
  cursor: auto;
}
.mdtTableContainer th:focus, .mdtTableContainer th *:focus {
  outline: none;
}
.mdtTableContainer th .column-header-content {
  cursor: default;
}
.mdtTableContainer th .column-header-content.clickable {
  cursor: pointer;
}
.mdtTableContainer th .hoverSortIcons ng-md-icon {
  visibility: hidden;
  width: 16px;
  height: 16px;
  fill: #b3b3b3;
}
.mdtTableContainer th .hoverSortIcons ng-md-icon svg {
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
}
.mdtTableContainer th:hover .hoverSortIcons ng-md-icon {
  visibility: visible;
}
.mdtTableContainer th .sortedColumn {
  /* when hoverSortIcons on a sorted column*/
  /* sort icon rotated -90 degrees for descending sort */
}
.mdtTableContainer th .sortedColumn .hoverSortIcons ng-md-icon {
  display: none;
}
.mdtTableContainer th .sortedColumn ng-md-icon {
  /* specified 16px is a fix now cause angular materia generates a 24x24 icon even the passed value is 16  */
  width: 16px;
  height: 16px;
  fill: #212121;
  /* sort icon rotated 90 degrees for ascending sort (default) */
}
.mdtTableContainer th .sortedColumn ng-md-icon svg {
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
}
.mdtTableContainer th .sortedColumn.descending ng-md-icon > svg {
  -webkit-transform: rotate(-90deg);
  transform: rotate(-90deg);
}
.mdtTableContainer tr.animate-sort-icon .sortedColumn ng-md-icon svg {
  -webkit-transition: 0.3s linear all;
  transition: 0.3s linear all;
}
.mdtTableContainer .mdt-header, .mdtTableContainer .mdt-header-alternate {
  height: 64px;
  padding-left: 24px;
  padding-right: 14px;
}
.mdtTableContainer .mdt-header md-button, .mdtTableContainer .mdt-header-alternate md-button {
  margin-left: 24px;
}
.mdtTableContainer .mdt-header ng-md-icon, .mdtTableContainer .mdt-header-alternate ng-md-icon {
  fill: #757575;
}
.mdtTableContainer .mdt-header-alternate {
  background-color: #e3edfd;
}
.mdtTableContainer .mdt-header-alternate .alternate-text {
  color: #0D47A1;
}
.mdtTableContainer .mdt-footer, .mdtTableContainer tr th {
  height: 56px;
  line-height: 56px;
}
.mdtTableContainer .mdt-footer .mdt-pagination, .mdtTableContainer tr th .mdt-pagination {
  font-size: 12px;
  color: #757575;
}
.mdtTableContainer .mdt-footer .mdt-pagination md-input-container, .mdtTableContainer tr th .mdt-pagination md-input-container {
  margin-top: 0px;
  margin-bottom: 0px;
}
.mdtTableContainer .mdt-footer {
  overflow: hidden;
}
.mdtTableContainer .checkboxCell {
  width: 18px;
  /*the next cell should not have just 24px padding */
}
.mdtTableContainer .checkboxCell md-checkbox {
  margin: 0;
  padding: 0;
}
.mdtTableContainer .checkboxCell + td, .mdtTableContainer .checkboxCell + th {
  padding-left: 24px;
}
.mdtTableContainer tr td {
  padding: 0;
  height: 48px;
  font-size: 13px;
  color: #212121;
}
.mdtTableContainer td:first-child, .mdtTableContainer th:first-child {
  padding: 0 0 0 24px;
}
.mdtTableContainer td:last-child, .mdtTableContainer th:last-child {
  padding-right: 24px;
}
.mdtTableContainer .column {
  padding-left: 56px;
}
.mdtTableContainer .leftAlignedColumn {
  text-align: left;
}
.mdtTableContainer .rightAlignedColumn {
  text-align: right;
}
.mdtTableContainer tr th {
  border-bottom: solid 1px #DDDDDD;
}
.mdtTableContainer tr td {
  border-bottom: solid 1px #DDDDDD;
}
.mdtTableContainer tr:hover td {
  background: #EEEEEE;
}
.mdtTableContainer .selectedRow td {
  background: #F5F5F5;
}
.mdtTableContainer ng-md-icon {
  fill: #757575;
}
.mdtTableContainer .md-inactive ng-md-icon {
  fill: rgba(0, 0, 0, 0.26);
}
.mdtTableContainer .md-virtual-repeat-container {
  min-height: 106px;
}
.mdtTableContainer .filter-select {
  border: 1px solid transparent;
  padding: 11px 10px;
  border-radius: 2px;
  cursor: pointer;
  margin-left: -10px;
}
.mdtTableContainer .filter-select:hover {
  border-color: #dedede;
}
.mdtTableContainer .filter-select:hover ng-md-icon {
  visibility: visible;
}
.mdtTableContainer .filter-select.is-active {
  color: #fff;
  background-color: #0096D6;
  border-color: #0096D6;
}
.mdtTableContainer .filter-select ng-md-icon {
  visibility: hidden;
}
.mdtTableContainer .filter-select.is-active ng-md-icon {
  visibility: visible;
  fill: rgba(255, 255, 255, 0.87);
  fill: #fff;
}
.mdtTableContainer md-progress-linear .md-container {
  height: 3px;
}
.mdtTableContainer md-progress-linear .md-bar {
  background: #2A87E3;
}
.mdtTableContainer .loading-indicator {
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
}
.mdtTableContainer .loading-is-active {
  visibility: visible;
}

/* filter drop down AND column selector */
.filter-dropdown, .mdt-column-selector {
  position: absolute;
  z-index: 1;
  width: 250px;
  text-align: initial;
}
.filter-dropdown a, .mdt-column-selector a {
  text-decoration: none;
}
.filter-dropdown .selectall_clearall, .mdt-column-selector .selectall_clearall {
  font-size: 12px;
}
.filter-dropdown .selectall_clearall span, .mdt-column-selector .selectall_clearall span {
  margin: 0 5px 0 5px;
}
.filter-dropdown .selectall_clearall .selected_items, .mdt-column-selector .selectall_clearall .selected_items {
  text-align: right;
  color: darkgray;
}
.filter-dropdown .selectall_clearall .disabled, .mdt-column-selector .selectall_clearall .disabled {
  color: #9E9E9E;
  cursor: default;
}
.filter-dropdown .hoverSortIcons ng-md-icon, .mdt-column-selector .hoverSortIcons ng-md-icon {
  visibility: hidden;
  width: 20px;
  height: 20px;
  fill: #b3b3b3;
}
.filter-dropdown .hoverSortIcons ng-md-icon svg, .mdt-column-selector .hoverSortIcons ng-md-icon svg {
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
}
.filter-dropdown .hoverSortIcons ng-md-icon, .mdt-column-selector .hoverSortIcons ng-md-icon {
  visibility: visible;
}
.filter-dropdown .sortedColumn, .mdt-column-selector .sortedColumn {
  /* when hoverSortIcons on a sorted column*/
  /* sort icon rotated -90 degrees for descending sort */
}
.filter-dropdown .sortedColumn .hoverSortIcons ng-md-icon, .mdt-column-selector .sortedColumn .hoverSortIcons ng-md-icon {
  display: none;
}
.filter-dropdown .sortedColumn ng-md-icon, .mdt-column-selector .sortedColumn ng-md-icon {
  /* specified 16px is a fix now cause angular materia generates a 24x24 icon even the passed value is 16  */
  width: 20px;
  height: 20px;
  fill: #212121;
  /* sort icon rotated 90 degrees for ascending sort (default) */
}
.filter-dropdown .sortedColumn ng-md-icon svg, .mdt-column-selector .sortedColumn ng-md-icon svg {
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
}
.filter-dropdown .sortedColumn.descending ng-md-icon > svg, .mdt-column-selector .sortedColumn.descending ng-md-icon > svg {
  -webkit-transform: rotate(-90deg);
  transform: rotate(-90deg);
}
.filter-dropdown .b-b, .mdt-column-selector .b-b {
  border-bottom: 1px solid #dedede;
}
.filter-dropdown .p-md, .mdt-column-selector .p-md {
  padding: 16px;
}
.filter-dropdown .p-l-md, .mdt-column-selector .p-l-md {
  padding-left: 16px;
}
.filter-dropdown .p-r-md, .mdt-column-selector .p-r-md {
  padding-right: 16px;
}
.filter-dropdown .p-t-md, .mdt-column-selector .p-t-md {
  padding-top: 16px;
}
.filter-dropdown .p-r-md, .mdt-column-selector .p-r-md {
  padding-right: 16px;
}
.filter-dropdown .p-smd, .mdt-column-selector .p-smd {
  padding: 12px;
}
.filter-dropdown .p-sm, .mdt-column-selector .p-sm {
  padding: 8px;
}
.filter-dropdown .p-l-sm, .mdt-column-selector .p-l-sm {
  padding-left: 8px;
}
.filter-dropdown .p-t-sm, .mdt-column-selector .p-t-sm {
  padding-top: 8px;
}
.filter-dropdown .p-b-sm, .mdt-column-selector .p-b-sm {
  padding-bottom: 8px;
}
.filter-dropdown .p-r-sm, .mdt-column-selector .p-r-sm {
  padding-right: 8px;
}
.filter-dropdown .p-b-n, .mdt-column-selector .p-b-n {
  padding-bottom: 0;
}
.filter-dropdown .md-chips, .mdt-column-selector .md-chips {
  font-size: 12px;
}
.filter-dropdown .filter__scroll, .mdt-column-selector .filter__scroll {
  max-height: 200px;
  overflow-y: auto;
  border-bottom: solid 1px #DDDDDD;
}

.mdt-column-selector {
  right: 0px;
  /* <-- this is a fix for positioning an element with the 'right' value using jquery. To make it work right:0px should be set in css before */
}
.mdt-column-selector .mdt-column-selector-title {
  color: #757575;
}
.mdt-column-selector .mdt-checbox-column-items span {
  width: 180px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  -ms-text-overflow: ellipsis;
  text-overflow: ellipsis;
}


text:
import Q from 'q';

export default class EventQueue {
  constructor(task, delay = 100) {
    this.queue = [];
    this.task = task;
    this.worker = null;
    this.delay = delay
  }

  process() {
    if (this.queue.length > 0) {
      let data = this.queue.splice(0,1)[0];
      console.log("Working off item", data.item);
      this.task(data.item).then(data.callback);
    } else {
      clearInterval(this.worker);
    }
  }

  append(item) {
    let deferred = Q.defer();
    this.queue.push({item, callback: deferred.resolve});
    return deferred.promise;
  }

  begin() {
    this.worker = setInterval(this.process.bind(this), this.delay);
  }
}


text:
{% extends "base.html" %}
{% block content %}

            All Products Categories

        {% include "products/products.html" with object_list=object_list%}
{% endblock %}


text:
cube_map::cube_map()
: m_texture(GL_TEXTURE_CUBE_MAP), m_cdata(), m_shader()
{
	auto cmodel = cube_model();
	auto cmesh  = cmodel.get_mesh();

	m_cdata.attach("position", cmesh.positions);
	m_cdata.attrib("position", 0);
	m_cdata.index(cmesh.indices);

	m_shader.compile("data/shader/cubemap.vs", GL_VERTEX_SHADER);
	m_shader.compile("data/shader/cubemap.fs", GL_FRAGMENT_SHADER);
	m_shader.link();

	m_shader.declare_uniform("VP");
	m_shader.declare_uniform("CubeMap");

	m_texture.set_wrap(GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE);
}

void cube_map::attach(const image& tex, GLenum face)
{
	texture::source src(tex.pixels(), tex.format());
	texture::target dst((tex.bpp() == 24) ? GL_RGB : GL_RGBA);

	dst.mode = face;
	m_texture.set_data(src, dst, tex.size());
}

void cube_map::attach(const std::vector<image>& texes)
{
	assert(texes.size() == 6);

	for (auto i = 0; i != 6; ++i)
		this->attach(texes[i], GL_TEXTURE_CUBE_MAP_POSITIVE_X + i);
}

void cube_map::draw(const camera& cam)
{
	auto view = glm::mat4(glm::mat3(cam.view()));
	auto vp   = cam.projection() * view;

	glDepthMask(GL_FALSE);

	m_shader.use();
	m_cdata.bind();
	m_texture.bind(0);

	m_shader.set_uniform("VP", vp);
	m_shader.set_uniform("CubeMap", 0);

	glDrawElements(GL_TRIANGLES, 36, GL_UNSIGNED_INT, nullptr);

	m_texture.bind(0, false);
	m_cdata.bind(false);
	m_shader.use(false);

	glDepthMask(GL_TRUE);
}


text:
package com.jaamsim.ProcessFlow;

import java.util.ArrayList;

import com.jaamsim.Commands.KeywordCommand;
import com.jaamsim.Graphics.DisplayEntity;
import com.jaamsim.Samples.SampleInput;
import com.jaamsim.input.InputAgent;
import com.jaamsim.input.InterfaceEntityListInput;
import com.jaamsim.input.Keyword;
import com.jaamsim.input.KeywordIndex;
import com.jaamsim.units.DimensionlessUnit;

public class Branch extends LinkedComponent {

	@Keyword(description = "The list of possible next objects to which the processed DisplayEntity can be passed.",
	         exampleList = {"Queue1 Queue2"})
	protected final InterfaceEntityListInput<Linkable> nextComponentList;

	@Keyword(description = "A number that determines the choice of next component: "
	                     + "1 = first branch, 2 = second branch, etc.",
	         exampleList = {"2", "DiscreteDistribution1", "'indexOfMin([Queue1].QueueLength, [Queue2].QueueLength)'"})
	private final SampleInput choice;

	{
		nextComponent.setHidden(true);

		nextComponentList = new InterfaceEntityListInput<>(Linkable.class, "NextComponentList", KEY_INPUTS, null);
		nextComponentList.setRequired(true);
		this.addInput(nextComponentList);

		choice = new SampleInput("Choice", KEY_INPUTS, null);
		choice.setUnitType(DimensionlessUnit.class );
		choice.setIntegerValue(true);
		choice.setValidRange(1, Double.POSITIVE_INFINITY);
		choice.setRequired(true);
		this.addInput(choice);
	}

	@Override
	public void addEntity( DisplayEntity ent ) {
		super.addEntity(ent);
		double simTime = getSimTime();

		// Choose the next component for this entity
		int i = (int) choice.getNextSample(simTime);
		if (i<1 || i>nextComponentList.getValue().size())
			error("Chosen index i=%s is out of range for NextComponentList: %s.",
			      i, nextComponentList.getValue());

		// Set the standard outputs for a LinkedComponent
		releaseEntity(simTime);

		// Pass the entity to the selected next component
		nextComponentList.getValue().get(i-1).addEntity(ent);
	}

	@Override
	public ArrayList<DisplayEntity> getDestinationEntities() {
		ArrayList<DisplayEntity> ret = super.getDestinationEntities();
		ArrayList<Linkable> ls = nextComponentList.getValue();
		if (ls == null)
			return ret;

		for (Linkable l : ls) {
			if (l != null && (l instanceof DisplayEntity)) {
				ret.add((DisplayEntity)l);
			}
		}
		return ret;
	}

	@Override
	public boolean canLink(boolean dir) {
		return true;
	}

	@Override
	public void linkTo(DisplayEntity nextEnt, boolean dir) {
		if (!(nextEnt instanceof Linkable) || nextEnt instanceof EntityGen)
			return;

		ArrayList<String> toks = new ArrayList<>();
		nextComponentList.getValueTokens(toks);
		toks.add(nextEnt.getName());
		KeywordIndex kw = new KeywordIndex(nextComponentList.getKeyword(), toks, null);
		InputAgent.storeAndExecute(new KeywordCommand(this, kw));
	}

}


text:
<?php

namespace Unicity\Spring\Object\Factory {

	use \Unicity\Spring;
	use \Unicity\Throwable;

	class FunctionElement extends Spring\Object\Factory {

		/**
		 * This method returns an object matching the description specified by the element.
		 *
		 * @access public
		 * @param Spring\Object\Parser $parser                      a reference to the parser
		 * @param \SimpleXMLElement $element                        the element to be parsed
		 * @return mixed                                            an object matching the description
		 *                                                          specified by the element
		 * @throws Throwable\Parse\Exception                        indicates that a problem occurred
		 *                                                          when parsing
		 */
		public function getObject(Spring\Object\Parser $parser, \SimpleXMLElement $element) {
			$attributes = $parser->getElementAttributes($element);

			if (isset($attributes['delegate-object']) && isset($attributes['delegate-method'])) {
				$delegate_object = $parser->valueOf($attributes['delegate-object']);
				if ($parser->isClassName($delegate_object) && class_exists($delegate_object)) {
					$delegate_method = $parser->valueOf($attributes['delegate-method']);
					if ($parser->isMethodName($delegate_method) && method_exists($delegate_object, $delegate_method)) {
						return array($delegate_object, $delegate_method);
					}
					else {
						throw new Throwable\Parse\Exception('Unable to process Spring XML. Expected a valid method name, but got ":name".', array(':name' => $delegate_method));
					}
				}
				else {
					throw new Throwable\Parse\Exception('Unable to process Spring XML. Expected a valid class name, but got ":name".', array(':name' => $delegate_object));
				}
			}
			else {
				throw new Throwable\Parse\Exception('Unable to process Spring XML. Tag ":tag" is missing a valid class name and/or method name.', array(':tag' => 'function'));
			}
		}

	}

}


text:
package ezbakehelpers.hdfs;

import com.google.common.base.Predicate;
import com.google.common.base.Strings;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
import ezbake.configuration.constants.EzBakePropertyConstants;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;

import java.io.IOException;
import java.util.Properties;
import java.util.Set;

/**
 * HDFS Helpers to help get a HDFS Filesystem object
 */
public class HDFSHelper {
    /**
     * dfs.nameservices - the logical name for this new nameservice
     *

See: http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithNFS.html
     */
    public static final String HDFS_PROP_NAMESERVICES = "dfs.nameservices";
    /**
     * dfs.ha.namenodes.[nameservice ID] -  unique identifiers for each NameNode in the nameservice
     *
     *

Note: Currently, only a maximum of two NameNodes may be configured per nameservice.
     *
     *

Example value:
nn1,nn2

     *
     *

See: http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithNFS.html
     */
    public static final String HDFS_PROP_NAMENODES = "dfs.ha.namenodes.";

    /**
     * dfs.namenode.rpc-address.[nameservice ID].[name node ID] - the fully-qualified RPC address for each NameNode to listen on
     *

Example key-value:
     *

     * dfs.namenode.rpc-address.mycluster.nn1=nn1.hadoop.example.com:8020
     * dfs.namenode.rpc-address.mycluster.nn2=nn2.hadoop.example.com:8020
     *

     *
     *

Note: You may similarly configure the "servicerpc-address" setting if you so desire.
     *

See: http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithNFS.html
     */
    public static final String HDFS_PROP_NN_RPC_ADDRESSES = "dfs.namenode.rpc-address.";

    /**
     * dfs.client.failover.proxy.provider.[nameservice ID] - the Java class that HDFS clients use to contact the Active NameNode
     * TL;DR - Set this to {@link org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider}

     * Configure the name of the Java class which will be used by the DFS Client to determine which NameNode is the
     * current Active, and therefore which NameNode is currently serving client requests.
     * The only implementation which currently ships with Hadoop is the ConfiguredFailoverProxyProvider,
     * so use this unless you are using a custom one.
     *

See: http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithNFS.html
     */
    public static final String HDFS_PROP_PROXY_PROVIDERS = "dfs.client.failover.proxy.provider.";
    /**
     * fs.defaultFS - the default path prefix used by the Hadoop FS client when none is given

     *
     * Optionally, you may now configure the default path for Hadoop clients to use the new HA-enabled logical URI.
     * If you used "mycluster" as the nameservice ID earlier, this will be the value of the authority portion of all of
     * your HDFS paths.

     *
     * Example:
hdfs://mycluster

     *

See: http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithNFS.html
     */
    public static final String HDFS_PROP_DEFAULT_FS = "fs.defaultFS";
    /**
     * The configuration of automatic failover requires this to be set to true.
     *

See: http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithNFS.html
     */
    public static final String HDFS_PROP_HA_FAILOVER_ENABLED = "dfs.ha.automatic-failover.enabled";
    /**
     * This specifies that the cluster should be set up for automatic failover using this zookeeper quorum
     *

See: http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithNFS.html
     */
    public static final String HDFS_PROP_HA_ZK_QUORUM = "ha.zookeeper.quorum";
    /**
     * If you are running a secure cluster, you will likely want to ensure that the information stored in ZooKeeper is
     * also secured. This prevents malicious clients from modifying the metadata in ZooKeeper or potentially triggering
     * a false failover. In order to secure the information in ZooKeeper, you need the 'auth' property set
     * and the acl property set.

     *
     * The first configured file specifies a list of ZooKeeper authentications, in the same format as used by the ZK CLI.
     * For example, you may specify something like:
     *
digest:hdfs-zkfcs:mypassword

     *

See: http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithNFS.html
     */
    public static final String HDFS_PROP_HA_ZK_AUTH = "ha.zookeeper.auth";
    /**
     * Next, generate a ZooKeeper ACL that corresponds to this authentication, using a command like the following:
     *

     * $ java -cp $ZK_HOME/lib/*:$ZK_HOME/zookeeper-3.4.2.jar org.apache.zookeeper.server.auth.DigestAuthenticationProvider hdfs-zkfcs:mypassword
     *

     *

     * output: hdfs-zkfcs:mypassword->hdfs-zkfcs:P/OQvnYyU/nF/mGYvB/xurX8dYs=
     *

     *
     * Copy and paste the section of this output after the '->' string into the property, prefixed by the string "digest:". For example:
     *

     * digest:hdfs-zkfcs:vlUvLnd8MlacsE80rDuu6ONESbM=:rwcda
     *

     * In order for these ACLs to take effect, you should then rerun the zkfc -formatZK command as described above.

     *
     * After doing so, you may verify the ACLs from the ZK CLI as follows:

     *

     * [zk: localhost:2181(CONNECTED) 1] getAcl /hadoop-ha
     * 'digest,'hdfs-zkfcs:vlUvLnd8MlacsE80rDuu6ONESbM=
     * : cdrwa
     *

     *

See: http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithNFS.html
     */
    public static final String HDFS_PROP_HA_ZK_ACL = "ha.zookeeper.acl";
    public static final Set<String> ALL_PROPS = ImmutableSet.of(HDFS_PROP_NAMESERVICES, HDFS_PROP_NAMENODES,
            HDFS_PROP_NN_RPC_ADDRESSES, HDFS_PROP_PROXY_PROVIDERS, HDFS_PROP_DEFAULT_FS, HDFS_PROP_HA_FAILOVER_ENABLED,
            HDFS_PROP_HA_ZK_QUORUM, HDFS_PROP_HA_ZK_AUTH, HDFS_PROP_HA_ZK_ACL);

    /**
     * Creates a new FileSystem based on the properties from {@link ezbake.common.properties.EzProperties}
     * @param properties - The properties to read from to construct the FileSystem
     * @return A new Filesystem
     * @throws IOException - on IOException from constructing the FileSystem
     */
    public static FileSystem getFileSystemFromProperties(Properties properties) throws IOException {
        boolean useLocal = Boolean.parseBoolean(properties.getProperty(EzBakePropertyConstants.HADOOP_FILESYSTEM_USE_LOCAL));
        boolean useHANameNodes = Boolean.parseBoolean(properties.getProperty(HDFS_PROP_HA_FAILOVER_ENABLED, "false"));
        if ( ! useHANameNodes || useLocal ) {
            return getNonHAFileSystemFromProperties(properties);
        } else {
            return getHAFileSystemFromProperties(properties);
        }
    }

    /**
     * Always returns an non HA FileSystem from the EzProperties
     * @param properties - The properties to read from to construct the FileSystem
     * @return A new Filesystem
     * @throws IOException - on IOException from constructing the FileSystem
     */
    public static FileSystem getNonHAFileSystemFromProperties(Properties properties) throws IOException {
        Configuration hadoopConf = new Configuration();
        String fileSystemName = properties.getProperty(EzBakePropertyConstants.HADOOP_FILESYSTEM_NAME);
        boolean useLocal = Boolean.parseBoolean(properties.getProperty(EzBakePropertyConstants.HADOOP_FILESYSTEM_USE_LOCAL));
        if (!Strings.isNullOrEmpty(fileSystemName) && !useLocal) {
            hadoopConf.set(EzBakePropertyConstants.HADOOP_FILESYSTEM_NAME, fileSystemName);
            hadoopConf.set(EzBakePropertyConstants.HADOOP_FILESYSTEM_IMPL, properties.getProperty(EzBakePropertyConstants.HADOOP_FILESYSTEM_IMPL));
        }
        return FileSystem.get(hadoopConf);
    }

    /**
     * Returns a High Availability File System from the EzProperties.
     *
     * See http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithNFS.html
     * for all of the properties that are required to be set.
     *
     * @param properties - EzProperties to get the HDFS Configuration from
     * @return A new FileSystem
     * @throws IOException - on IOException from constructing the FileSystem
     */
    private static FileSystem getHAFileSystemFromProperties(Properties properties) throws IOException {
        final Configuration hadoopConf = convertToHDFSConfiguration(properties);
        return FileSystem.get(hadoopConf);
    }

    /**
     * @param properties - EzProperties to get the HDFS Configuration from
     * @return {@link org.apache.hadoop.conf.Configuration} object with HDFS configuration stored in it
     */
    private static Configuration convertToHDFSConfiguration(Properties properties) {
        final Configuration hadoopConf = new Configuration();
        @SuppressWarnings("unchecked")
        FluentIterable<String> PROP_KEYS = FluentIterable.from((Set) properties.keySet());
        for (final String prop : ALL_PROPS) {
            final Set<String> properties_to_load = Sets.newHashSet();
            // if ends with a '.' we want to add all properties from EzProperties that starts with this property name
            if (prop.endsWith(".")) {
                Iterables.addAll(properties_to_load, PROP_KEYS.filter(new Predicate<String>() {
                    @Override
                    public boolean apply(String s) {
                        return s.startsWith(prop);
                    }
                }));
            } else {
                properties_to_load.add(prop);
            }
            // for each property found, if it exist in the ezProperty load it
            for (String propToLoad : properties_to_load) {
                String value = properties.getProperty(propToLoad);
                if (!Strings.isNullOrEmpty(value))
                    hadoopConf.set(propToLoad, value);
            }
        }
        return hadoopConf;
    }

}