text:
"""Main file for Stable Transferability Experiments.

This file runs an stable transferability experiment, for example it computes
the LEEP score for a target dataset, provided a source model or architecture.
These results are saved on disk and subsequent calls to the same experiment will
simply load the results from disk.

Experiments are defined in config files (given using the --my_config flag).
See the examples (config_*.py) in this directory.
"""

from typing import Sequence

from absl import app
from absl import logging
from ml_collections.config_flags import config_flags

from stable_transfer.transferability import accuracy
from stable_transfer.transferability import gbc
from stable_transfer.transferability import hscore
from stable_transfer.transferability import leep
from stable_transfer.transferability import logme
from stable_transfer.transferability import nleep
from stable_transfer.transferability import transfer_experiment

_CONFIG_DIR = './'

_CONFIG = config_flags.DEFINE_config_file(
    'my_config',
    f'{_CONFIG_DIR}/stable_transfer/transferability/config_transfer_experiment.py',
    )

def run_experiment(experiment):
  """Run the experiment defined in the config file."""
  if experiment.config.experiment.metric == 'accuracy':
    return accuracy.get_test_accuracy(experiment)
  if experiment.config.experiment.metric == 'leep':
    return leep.get_train_leep(experiment)
  if experiment.config.experiment.metric == 'logme':
    return logme.get_train_logme(experiment)
  if experiment.config.experiment.metric == 'hscore':
    return hscore.get_train_hscore(experiment)
  if experiment.config.experiment.metric == 'nleep':
    return nleep.get_train_nleep(experiment)
  if experiment.config.experiment.metric == 'gbc':
    return gbc.get_train_gbc(experiment)
  return ValueError('Metric (%s) unknown', experiment.config.experiment.metric)

def main(_):
  r = run_experiment(transfer_experiment.TransferExperiment(_CONFIG.value))
  logging.info('EXPERIMENT DONE %s', str(r))

if __name__ == '__main__':
  app.run(main)


text:
class CreateClubs < ActiveRecord::Migration[4.2]
  def change
    create_table :clubs do |t|
      t.string :name
      t.string :url, default: ""

      t.timestamps null: false
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
This NodeBB plugin allows users to embed Be-at.TV streams, sessions and events inline in posts.

## Installation

    npm install nodebb-plugin-beat-tv

## Usage

    Paste the Session Sharing URL from the share menu into a post, the plugin will do the rest.
    ???
    Profit!


text:
// <auto-generated />
namespace SimpleInjector.CodeSamples
{
    using System;
    using System.Reflection;
    using SimpleInjector.Advanced;

    // Attribute for use by the application
    public enum CreationPolicy { Transient, Scoped, Singleton }

    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface,
        Inherited = false, AllowMultiple = false)]
    public sealed class CreationPolicyAttribute : Attribute {
        public CreationPolicyAttribute(CreationPolicy policy) {
            this.Policy = policy;
        }

        public CreationPolicy Policy { get; }
    }

    // Custom lifestyle selection behavior
    public class AttributeBasedLifestyleSelectionBehavior : ILifestyleSelectionBehavior {
        private const CreationPolicy DefaultPolicy = CreationPolicy.Transient;

        public Lifestyle SelectLifestyle(Type type) => ToLifestyle(GetPolicy(type));

        private static Lifestyle ToLifestyle(CreationPolicy policy) =>
            policy == CreationPolicy.Singleton ? Lifestyle.Singleton :
            policy == CreationPolicy.Scoped ? Lifestyle.Scoped :
            Lifestyle.Transient;

        private static CreationPolicy GetPolicy(Type type) =>
            type.GetCustomAttribute<CreationPolicyAttribute>()?.Policy ?? DefaultPolicy;
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="dactyl://content/help.xsl"?>

<!DOCTYPE document SYSTEM "dactyl://cache/options.dtd">

<document
    name="options"
    title="&dactyl.appName; Options"
    xmlns="&xmlns.dactyl;"
    xmlns:html="&xmlns.html;">

Options

<toc start="2"/>

    &dactyl.appName; has a number of internal variables and switches which can be set to
    achieve special effects. These options come in the following forms:

boolean

        Can only be <hl key="Boolean">on</hl> (<ex>:set option</ex>) or
        <hl key="Boolean">off</hl> (<ex>:set nooption</ex>)

number

A numeric value

string

A string value

charlist

A string containing a discrete set of distinct characters

stringlist

        A comma-separated list of strings. Any comma appearing within single
        or double quotes, or prefixed with a <tt>\</tt>, will not be treated
        as an item separator.

stringmap

A comma-separated list of key-value pairs, e.g., <str delim="">key:val,foo:bar</str>

regexplist

        A comma-separated list of regular expressions. Expressions may be
        prefixed with a <tt>!</tt>, in which case the match will be negated. A
        literal <tt>!</tt> at the beginning of the expression may be matched
        with <tt>[!]</tt> or by placing the regular expression in quotes.
        Generally, the first matching regular expression is used. Any comma
        appearing within single or double quotes, or prefixed with a
        <tt>\</tt>, will not be treated as an item separator.

regexpmap

        A combination of a <t>stringmap</t> and a <t>regexplist</t>. Each key
        in the key:value pair is a regexp. If the regexp begins with a
        <tt>!</tt>, the sense of the match is negated, such that a non-matching
        expression will be considered a match and vice versa.
        The first key to match yields value.

sitelist

sitemap

        Like <t>regexplist</t> and <t>regexpmap</t>, but the keys are
        <t>site-filters</t> rather than regular expressions.

    Some options may be given format strings containing macro replacements in
    the form of <tt><name></tt>. These tokens are replaced by
    the parameter name as specified in the relevant documentation.
    If the token is in the form <tt><q-name></tt>, the value of the
    parameter is automatically <link topic="quoting">quoted</link>. If it is in
    the form of <tt><e-name></tt>, its value is never shown but may be
    used to test whether the given parameter is empty.

    Array elements, such as in the <tt><args></tt> parameter
    of <ex>:command</ex> macros, may be accessed by appending
    <tt>[n]</tt>, where n is the one-based array
    index, to the macro name. The first argument of a command is
    therefore accessed with <tt><args[1]></tt>.

    Any substring enclosed by <tt><{</tt> and <tt>}></tt>
    is automatically elided if any of the contained macros aren't currently
    valid. A literal <tt><</tt> or <tt>></tt> character may
    be included with the special escape sequences <tt><lt></tt> or
    <tt><gt></tt> respectively.

    For example, given the format string
    <str><{(cmd: <column>) }><{line: <line> }><file></str>,
    where line=<hl key="Number">32</hl> and
    file=<str delim="'">Lieder eines fahrenden Gesellen.txt</str>,
    the result is formatted as
    <str>line: 32 'Lieder eines fahrenden Gesellen.txt'</str>

Setting options

<item>
    <tags>:set :se</tags>
    <spec>:se<oa>t</oa></spec>
    <description short="true">

Show all options which differ from their default values.

    </description>
</item>

<item>
    <spec>:se<oa>t</oa> all</spec>
    <description short="true">

Show all options.

    </description>
</item>

<item>
    <tags>E518 E519</tags>
    <spec>:se<oa>t</oa> option?</spec>
    <description>

Show value of option.

    </description>
</item>

<item>
    <spec>:se<oa>t</oa> option <oa>…</oa></spec>
    <description>

            For boolean options, turn them on. For all other types,
            show their values.

    </description>
</item>

<item>
    <spec>:se<oa>t</oa> nooption <oa>…</oa></spec>
    <description>

            For boolean options, turn them off. For all other types,
            display an error.

    </description>
</item>

<item>
    <spec>:se<oa>t</oa> option! <oa>…</oa></spec>
    <spec>:se<oa>t</oa> invoption <oa>…</oa></spec>
    <description>

            For boolean options, invert their value. For all other types,
            display an error.

    </description>
</item>

<item>
    <tags>:set!=</tags>
    <spec>:se<oa>t</oa> invoption=value <oa>…</oa></spec>
    <spec>:se<oa>t</oa> option!=value <oa>…</oa></spec>
    <description>

For list options, toggle the specified values.

            If the option is a list, the given values are toggled. Given,
            <se opt="opt" link="false"><str delim="">foo</str>,<str delim="">bar</str></se>
            then,
            <se opt="opt" op="!=" link="false"><str delim="">foo</str>,<str delim="">baz</str></se>
            has the same result as
            <se opt="opt" link="false"><str delim="">bar</str>,<str delim="">baz</str></se>

            This extends to string options in a natural way, e.g.,
            <se opt="stal" op="!="><str delim="">always</str>,<str delim="">never</str></se>
            toggles between the two values.

    </description>
</item>

<item>
    <tags>:set-default</tags>
    <spec>:se<oa>t</oa> option& <oa>…</oa></spec>
    <description>

Reset option to its default value.

    </description>
</item>

<item>
    <tags>:set-default-all</tags>
    <spec>:se<oa>t</oa> all&</spec>
    <description>

Set all options to their default value.

    </description>
</item>

<item>
    <tags>:set-args E487 E521</tags>
    <spec>:se<oa>t</oa> option=value <oa>…</oa></spec>
    <description>

            Set string or number option to value.
            For numeric options the value must be given in decimal.
            The old value can be inserted by typing <k name="Tab" mode="c"/>.

    </description>
</item>

<item>
    <tags>:set+=</tags>
    <spec>:se<oa>t</oa> option+=value <oa>…</oa></spec>
    <description>

            Add the value to a number option, or append the value
            to a string option.  When the option is a comma separated list, a
            comma is added, unless the value was empty. If the option is a list
            of flags, superfluous flags are removed.  When adding a flag that
            was already present the option value doesn't change.

    </description>
</item>

<item>
    <tags>:set^=</tags>
    <spec>:se<oa>t</oa> option^=value <oa>…</oa></spec>
    <description>

            Multiply the value to a number option, or prepend the
            value to a string option. When the option is a comma
            separated list, a comma is added, unless the value was empty.

    </description>
</item>

<item>
    <tags>:set-=</tags>
    <spec>:se<oa>t</oa> option-=value <oa>…</oa></spec>
    <description>

            Subtract the value from a number option, or remove the
            value from a string option if it is there. If the
            value is not found in a string option, there is no error or
            warning. When the option is a comma separated list, a comma is
            deleted, unless the option becomes empty. When the option is a list
            of flags, value must be exactly as they appear in the option.
            Remove flags one by one to avoid problems.

    </description>
</item>

<item>
    <tags>:setlocal :setl</tags>
    <spec>:setl<oa>ocal</oa> …</spec>
    <description>

            The same as <ex>:set</ex> command, but operates on current tab options
            only. See <ex>:set</ex> for details.

    </description>
</item>

<item>
    <tags>:setglobal :setg</tags>
    <spec>:setg<oa>lobal</oa> …</spec>
    <description>

            The same as <ex>:set</ex> command, but operates on global options only.
            See <ex>:set</ex> for details.

    </description>
</item>

    Environment variables are expanded for path options like <o>cdpath</o> and
    <o>runtimepath</o>. The variable notation is $VAR (terminated by a non-word
    character) or ${VAR}. %VAR% is also supported on Windows.

Setting &dactyl.host; options

&dactyl.host; options can be viewed and set with the following commands:

<item>
    <tags>:pref :prefs :preferences</tags>
    <spec>:pref<oa>erences</oa></spec>
    <description>

            Show the &dactyl.host; preferences dialog. You can change the browser
            preferences from this dialog. Be aware that not all &dactyl.host;
            preferences work, because &dactyl.appName; overrides some key bindings and
            changes &dactyl.host;'s GUI.

    </description>
</item>

<item>
    <tags>:pref! :prefs! :preferences!</tags>
    <spec>:pref<oa>erences</oa>!</spec>
    <description>

            Opens about:config in the current tab, where you can change advanced &dactyl.host;
            preferences.

    </description>
</item>

<item>
    <tags>:set! :set-!</tags>
    <spec>:se<oa>t</oa>! …</spec>
    <description>

            The same as <ex>:set</ex> but operates on &dactyl.host; preferences
            (those on the about:config page). See <ex>:set</ex> for operator
            details.

        <note>
            The no and inv prefix operators are not available
            for setting preferences.
        </note>
    </description>
</item>

    &dactyl.appName; needs to set several &dactyl.host; preferences at
    startup in order to function properly. If this is unacceptable,
    they can be changed in your RC file with the <ex>:set!</ex>
    command, but beware of unexpected behavior. The affected
    preferences are:

<pref>accessibility.typeaheadfind</pref>

List of options

<item>
    <tags>'act' 'activate'</tags>
    <strut/>
    <spec>'activate' 'act'</spec>
    <type>&option.activate.type;</type>
    <default>addons,bookmarks,diverted,downloads,extoptions,
          help,homepage,quickmark,tabopen,paste</default>
    <description>

            A list of items which, when opened in a new tab, are
            automatically focused. Available items:

all

Activate all items.

addons

<ex>:addo<oa>ns</oa></ex> command

bookmarks

Tabs loaded from bookmarks

diverted

Links with targets set to new tabs

downloads

<ex>:downl<oa>oads</oa></ex> command

extoptions

<ex>:exto<oa>ptions</oa></ex> command

help

<ex>:h<oa>elp</oa></ex> command

homepage

<k>gH</k> mapping

links

Middle- or Control-clicked links

quickmark

<k>go</k> and <k>gn</k> mappings

tabopen

<ex>:tabopen<oa>!</oa></ex> command

paste

<k>P</k> and <k>gP</k> mappings

    </description>
</item>

<item>
    <tags>'awim' 'altwildmode'</tags>
    <spec>'altwildmode' 'awim'</spec>
    <type>&option.altwildmode.type;</type>
    <default>&option.altwildmode.default;</default>
    <description>

            Like <o>wildmode</o>, but when the <k name="A-Tab" mode="c"/> key
            is pressed.

    </description>
</item>

<item>
    <tags>'au' 'autocomplete'</tags>
    <spec>'autocomplete' 'au'</spec>
    <type>&option.autocomplete.type;</type>
    <default>&option.autocomplete.default;</default>
    <description>

            Enables automatic completion for completion contexts (see
            <ex>:contexts</ex>) matching the given regular expressions. When
            automatic completion is enabled, the completion list is
            automatically opened when the &tag.command-line; is focused.
            Thereafter, any key press triggers a completion update for the
            matching contexts. Non-matching contexts will only be updated when
            the <k name="Tab" mode="c"/> key is pressed. This option is useful
            for disabling auto-completion for computationally intensive
            contexts that don't perform well when your system is under load.

        <note>
            Completion contexts have names very much like Unix path names.
            These denote the tree in which they're called. A completer will
            never be called unless every completer preceding it in the tree
            was also called. For example, if your completer excludes
            <str>/ex/</str>, it will also exclude <str>/ex/bmarks</str>, and
            so on.
        </note>

        <example>
            To enable auto-completion for everything but <ex>:history</ex> or
            <ex>:bmarks</ex>, you would choose a value such as
            <str delim="">!/ex/(bmarks|history),.?</str>
        </example>

            To go in the other direction, i.e. only enable
            auto-completion for those commands, you have to jump through
            some hoops, due to the way contexts work (see the note above):
            <str delim="">/ex/(bmarks|history),^(/|/ex/?)$</str>

    </description>
</item>

<item>
    <tags>'bh' 'banghist'</tags>
    <spec>'banghist' 'bh'</spec>
    <type>&option.banghist.type;</type>
    <default>&option.banghist.default;</default>
    <description>

            Replace occurrences of ! with the previous command when
            executing external commands.

    </description>
</item>

<item>
    <tags>$CDPATH</tags>
    <tags>'cd' 'cdpath'</tags>
    <spec>'cdpath' 'cd'</spec>
    <type>&option.cdpath.type;</type>
    <default type="plain">equivalent to <str>.</str> or <str>.,$CDPATH</str></default>
    <description>

            List of directories searched when executing the <ex>:cd</ex>
            command. This is only used for relative paths; if an absolute path is
            specified, this option is ignored.

            If the CDPATH environment variable is set this path list
            is appended to the default value of <str>.</str>.

    </description>
</item>

<item>
    <tags>'ca' 'cookieaccept'</tags>
    <spec>'cookieaccept' 'ca'</spec>
    <type>&option.cookieaccept.type;</type>
    <default>&option.cookieaccept.default;</default>
    <description>

When to accept cookies.

all

Accept all cookies

none

Accept no cookies

samesite

Accept all non-third-party cookies

    </description>
</item>

<item>
    <tags>'cl' 'cookielifetime'</tags>
    <spec>'cookielifetime' 'cl'</spec>
    <type>&option.cookielifetime.type;</type>
    <default>&option.cookielifetime.default;</default>
    <description>

            The lifetime for which to accept cookies. The available
            options are:

default

The lifetime requested by the setter

prompt

Always prompt for a lifetime

session

The current session

days

When a number is given, it is
                interpreted as the number of days for which to keep
                cookies

    </description>
</item>

<item>
    <tags>'ck' 'cookies'</tags>
    <spec>'cookies' 'ck'</spec>
    <type>&option.cookies.type;</type>
    <default>&option.cookies.default;</default>
    <description>

The default action for the <ex>:cookies</ex> command.

    </description>
</item>

<item>
    <tags>'cpt' 'complete'</tags>
    <spec>'complete' 'cpt'</spec>
    <type>&option.complete.type;</type>
    <default>&option.complete.default;</default>
    <description>

Items which are completed at the <ex>:open</ex> prompts. Available items:

search

Search engines and keyword URLs

file

Local files

location

&dactyl.host; location bar entries (bookmarks and history sorted in an intelligent way)

bookmark

Bookmarks

history

History

suggestion

Search engine suggestions

            Additionally, native search providers can be added by prefixing
            their names with the string <str delim="'">native:</str>. These
            providers are often added by other add-ons and are occasionally
            useful.

            The order is important, such that <se opt="complete">
            <str delim="">bookmark,search,file</str></se> will list bookmarks
            followed by matching quick searches and then matching files.

        <note>
            For backward compatibility, this option currently accepts a single
            entry containing single-letter names for completers. This usage
            is deprecated and will be removed in the future.
        </note>

        <warning>
            Using bookmark and history can make completion very slow if
            there are many items.
        </warning>
    </description>
</item>

<item>
    <tags>'ds' 'defsearch'</tags>
    <spec>'defsearch' 'ds'</spec>
    <type>&option.defsearch.type;</type>
    <default>&option.defsearch.default;</default>
    <description>

            Sets the default search engine. The default search engine is
            used by <ex>:open</ex> and related commands for arguments which
            include no search or bookmark keywords and can't otherwise be
            converted into URLs or existing file names.

            This means that with <o>defsearch</o> set to <str>youtube</str>,
            <ex>:open Tim Minchin</ex> behaves exactly as
            <ex>:open youtube Tim Minchin</ex>, so long as you don't have a
            search or bookmark keyword called 'Tim'.

    </description>
</item>

<item>
    <tags>'dls' 'dlsort' 'downloadsort'</tags>
    <spec>'downloadsort' 'dlsort' 'dls'</spec>
    <strut/>
    <type>&option.downloadsort.type;</type>
    <default>&option.downloadsort.default;</default>
    <description>

            <ex>:downloads</ex> sort order, in order of precedence.
            Each element must be preceded by a <tt>+</tt> or
            <tt>-</tt>, indicating ascending or descending sorting,
            respectively. Valid sort orders are:

active

Whether download is active

complete

Percent complete

date

Date and time the download began

filename

Target filename

size

File size

speed

Download speed

time

Time remaining

url

Source URL

        <note>
            This option is currently unavailable in &dactyl.host; 26 and greater.
        </note>
    </description>
</item>

<item>
    <tags>'editor'</tags>
    <spec>'editor'</spec>
    <type>&option.editor.type;</type>
    <default>&option.editor.default;</default>
    <description>

            Set the external text editor.
            This is the editor used by <k name="C-i" mode="I"/>, <k>gF</k>, and
            other commands which launch an external text editor.

            Accepts a <t>macro-string</t> with the following escapes available.
            Arguments containing escapes which are not relevant to a given call
            are automatically elided. All field splitting is done before format
            characters are processed.

<file>

The file to edit. Appended as the final argument if missing.

<line>

The line number at which to position the cursor.

<column>

The column at which to position the cursor.

        <warning>
            &dactyl.appName; will not behave correctly if the editor forks its
            own process rather than blocking until editing is complete. Gvim
            invoked without the -f option is one such example.
        </warning>
    </description>
</item>

<item>
    <tags>'enc' 'encoding'</tags>
    <spec>'encoding' 'enc'</spec>
    <type>&option.encoding.type;</type>
    <default>&option.encoding.default;</default>
    <description>

            Changes the character encoding of the current buffer. Valid only
            until a new page is loaded.

    </description>
</item>

<item>
    <tags>'noeb' 'noerrorbells'</tags>
    <tags>'eb' 'errorbells'</tags>
    <spec>'errorbells' 'eb'</spec>
    <type>&option.errorbells.type;</type>
    <default>&option.errorbells.default;</default>
    <description>

            Ring the bell when an error message is displayed. See also
            <o>visualbell</o>.

    </description>
</item>

<item>
    <tags>'ei' 'eventignore'</tags>
    <spec>'eventignore' 'ei'</spec>
    <type>&option.eventignore.type;</type>
    <default>&option.eventignore.default;</default>
    <description>

            A list of autocommand event names which should be ignored. If the
            list contains the value <str>all</str> then all events are
            ignored.

    </description>
</item>

<item>
    <tags>'noex' 'noexrc'</tags>
    <tags>'ex' 'exrc'</tags>
    <spec>'exrc' 'ex'</spec>
    <type>&option.exrc.type;</type>
    <default>&option.exrc.default;</default>
    <description>

            Allow reading of an RC file in the current directory. This file is
            sourced after the default <tt><t>&dactyl.name;rc</t></tt> file in your
            home directory.

    </description>
</item>

<item>
    <tags>'eht' 'extendedhinttags'</tags>
    <spec>'extendedhinttags' 'eht'</spec>
    <strut/>
    <type>&option.extendedhinttags.type;</type>
    <default>[asOTvVWy]:':-moz-any-link',area[href],img[src],iframe[src],
          [A]:[id],a[name],
          [f]:body,
          [F]:body,code,div,html,p,pre,span,
          [iI]:img,
          [S]:button,'input:not([type=hidden])',select,textarea</default>
    <description>

            Defines specialized CSS selectors or XPath expressions for arbitrary
            <t>extended-hints</t> modes. The syntax is the same as for
            <o>hinttags</o>. If no matches are found, the value of
            <o>hinttags</o> is used.

    </description>
</item>

<item>
    <tags>'fenc' 'fileencoding'</tags>
    <spec>'fileencoding' 'fenc'</spec>
    <type>&option.fileencoding.type;</type>
    <default>&option.fileencoding.default;</default>
    <description>

            Changes the character encoding that &dactyl.appName; uses to read
            and write files.

    </description>
</item>

<item>
    <tags>'fc' 'findcase'</tags>
    <spec>'findcase' 'fc'</spec>
    <type>&option.findcase.type;</type>
    <default>&option.findcase.default;</default>
    <description>

Find case matching mode.

ignore

Case is never significant

match

Case is always significant

smart

Case is significant when capital letters are typed

    </description>
</item>

<item>
    <tags>'ff' 'findflags'</tags>
    <spec>'findflags' 'ff'</spec>
    <type>&option.findflags.type;</type>
    <default>&option.findflags.default;</default>
    <description>

Default flags for find invocations.

C

Match case

L

Search all text

R

Perform a plain string search

c

Ignore case

l

Search only in links

r

Perform a regular expression search

    </description>
</item>

<item>
    <tags>'fh' 'followhints'</tags>
    <spec>'followhints' 'fh'</spec>
    <type>&option.followhints.type;</type>
    <default>&option.followhints.default;</default>
    <description>

            Define the conditions under which hints selected by typing the link
            substring are followed. Hints selected by typing their label (as
            specified by <o>hintkeys</o>) are always followed immediately.

Possible values:

0

Follow the first hint as soon as typed text uniquely identifies it.

1

Follow the selected hint on <k name="CR" link="false"/>.

    </description>
</item>

<item>
    <tags>'nofs' 'nofullscreen'</tags>
    <tags>'fs' 'fullscreen'</tags>
    <spec>'fullscreen' 'fs'</spec>
    <type>&option.fullscreen.type;</type>
    <default>&option.fullscreen.default;</default>
    <description>

            Show the current window full-screen. Also hide certain GUI elements, such as
            <t>status-line</t> and tab bar.

    </description>
</item>

<item>
    <tags>'go' 'guioptions'</tags>
    <spec>'guioptions' 'go'</spec>
    <type>&option.guioptions.type;</type>
    <default>&option.guioptions.default;</default>
    <description>

Show or hide certain GUI elements.

Supported characters:

B

Bookmark bar

C

Always show the command line outside of the status line

M

Always show messages outside of the status line

N

Tab number over image

T

Toolbar

b

Bottom scrollbar

c

Always show the command line, even when empty

l

Left scrollbar (l and r are mutually exclusive)

m

Menu bar

n

Tab number

r

Right scrollbar

s

Status bar

See also <o>showtabline</o>.

        <note>Scrollbar changes require a page reload to take effect.</note>
        <note>Only one of l or r may be included.</note>
    </description>
</item>

<item>
    <tags>'hf' 'helpfile'</tags>
    <spec>'helpfile' 'hf'</spec>
    <type>&option.helpfile.type;</type>
    <default>&option.helpfile.default;</default>
    <description>

            Name of the main help file. This is that page shown if the
            <ex>:help</ex> command is called without any arguments.

    </description>
</item>

<item>
    <tags>'hin' 'hintinputs'</tags>
    <spec>'hintinputs' 'hin'</spec>
    <type>&option.hintinputs.type;</type>
    <default>&option.hintinputs.default;</default>
    <description>

            When generating hints for input elements that do not have an
            explicit caption, this specifies the methods used to generate a
            textual hint. The options are attempted in the order they are
            given, and the first successful value is used.

value

The hint is the value displayed in a text input, or the selected option for a drop-down.

label

The value of an explicit label for the input; this will not match most manually added labels that are found on sites.

name

The name of the input will be used; although the name is not designed for user consumption, it is frequently very similar to the label.

    </description>
</item>

<item>
    <tags>'hk' 'hintkeys'</tags>
    <spec>'hintkeys' 'hk'</spec>
    <type>&option.hintkeys.type;</type>
    <default>&option.hintkeys.default;</default>
    <description>

            The keys used to label and select hints. With its default value,
            each hint has a unique number which can be typed to select it,
            while all other characters are used to filter hints based on their
            text. With a value such as <str>asdfg;lkjh</str>, each hint is
            'numbered' based on the characters of the home row.

    </description>
</item>

<item>
    <tags>'hm' 'hintmatching'</tags>
    <spec>'hintmatching' 'hm'</spec>
    <type>&option.hintmatching.type;</type>
    <default>&option.hintmatching.default;</default>
    <description>

Change the hint matching algorithm used in Hints mode.

Possible values are one of:

contains

                The typed characters are split on whitespace, and
                these character groups have to match anywhere inside
                the text of the link.

wordstartswith

                The typed characters are matched with the beginning
                of the first word (see <o>wordseparators</o>) in the
                link as long as possible. If no matches occur in the
                current word, then the matching is continued at the
                beginning of the next word. The words are worked
                through in the order they appear in the link. If the
                typed characters contain spaces, then the characters
                are split on whitespace. These character groups are
                then matched with the beginning of the words,
                beginning at the first one and continuing with the
                following words in the order they appear in the
                link.

firstletters

                Behaves like wordstartswith, but non-matching words
                aren't skipped.

custom

                Delegate to the function
                <tt>dactyl.plugins.customHintMatcher</tt>.

and optionally:

transliterated

                Certain alphanumeric characters are transliterated into their
                unaccented equivalents, such that 'euro' will match 'æuró',
                and 'Ångström' will match 'angstrom'.

    </description>
</item>

<item>
    <tags>'ht' 'hinttags'</tags>
    <strut/>
    <spec>'hinttags' 'ht'</spec>
    <type>&option.hinttags.type;</type>
    <default>:-moz-any-link,area,button,iframe,input:not([type=hidden]),
          label[for],select,textarea,
          [onclick],[onmouseover],[onmousedown],[onmouseup],[oncommand],
          [tabindex],[role=link],[role=button],[contenteditable=true]</default>
    <description>

            A list of CSS selectors or XPath expressions used to select elements
            for <link topic="hints">hinting</link>. Values beginning with the
            string <str>xpath:</str> are treated as XPath expressions, while any
            other values are treated as CSS selectors. Can be overridden for
            individual <t>extended-hints</t> modes with the
            <o>extendedhinttags</o> option.

    </description>
</item>

<item>
    <tags>'hto' 'hinttimeout'</tags>
    <spec>'hinttimeout' 'hto'</spec>
    <type>&option.hinttimeout.type;</type>
    <default>&option.hinttimeout.default;</default>
    <description>

            Timeout in milliseconds before automatically following a non-unique
            hint. The timeout is measured since the last time a key listed in
            <o>hintkeys</o> was pressed. It has no effect when narrowing hints
            by typing part of their text. Set to 0 (the default) to only follow
            hints after pressing <k name="CR" link="false"/> or when the hint is unique.

    </description>
</item>

<item>
    <tags>'hi' 'history'</tags>
    <spec>'history' 'hi'</spec>
    <type>&option.history.type;</type>
    <default>&option.history.default;</default>
    <description>

            Maximum number of Ex commands and find patterns to store in the
            <t>command-line</t> history.

    </description>
</item>

<item>
    <tags>'nohlf' 'nohlfind'</tags>
    <tags>'hlf' 'hlfind'</tags>
    <spec>'hlfind' 'hlf'</spec>
    <type>&option.hlfind.type;</type>
    <default>&option.hlfind.default;</default>
    <description>

Highlight previous find pattern matches.

    </description>
</item>

<item>
    <tags>'noif' 'noincfind'</tags>
    <tags>'if' 'incfind'</tags>
    <spec>'incfind' 'if'</spec>
    <type>&option.incfind.type;</type>
    <default>&option.incfind.default;</default>
    <description>

Show the first match for a find pattern as it is typed.

    </description>
</item>

<item>
    <tags>'noim' 'noinsertmode'</tags>
    <tags>'im' 'insertmode'</tags>
    <spec>'insertmode' 'im'</spec>
    <type>&option.insertmode.type;</type>
    <default>&option.insertmode.default;</default>
    <description>

            Use Insert mode as the default for text areas. This is useful if you
            want to use the known &dactyl.host; interface for editing text areas.
            Input fields default to this behavior irrespective of this option's
            setting.

            Text Edit mode can be entered with <k name="C-t" mode="I"/> from Insert mode.

    </description>
</item>

<item>
    <tags>'isk' 'iskeyword'</tags>
    <spec>'iskeyword' 'isk'</spec>
    <type>&option.iskeyword.type;</type>
    <default>&option.iskeyword.default;</default>
    <description>

Regular expression defining which characters constitute words.

    </description>
</item>

<item>
    <tags>'jt' 'jumptags'</tags>
    <spec>'jumptags' 'jt'</spec>
    <type>&option.jumptags.type;</type>
    <default>&option.jumptags.default;</default>
    <description>

XPath or CSS selector strings of jumpable elements for extended hint modes.

    </description>
</item>

<item>
    <tags>'ln' 'linenumbers'</tags>
    <spec>'linenumbers' 'ln'</spec>
    <type>&option.linenumbers.type;</type>
    <default><![CDATA['view-source:*':[id^=line],
          code.google.com:'#nums [id^="nums_table"] a[href^="#"]',
          github.com:.line_numbers>*,
          mxr.mozilla.org:a.l,
          pastebin.com:#code_frame>div>ol>li,
          addons.mozilla.org:.gutter>.line>a,
          bugzilla.mozilla.org:.bz_comment:not(.bz_first_comment):not(.ih_history),
          *:'/* Hgweb/Gitweb */ .completecodeline a.codeline, a.linenr']]></default>
    <description>

            Patterns used to determine line numbers used by <k>G</k>. May be
            either a selector expression as accepted by <o>hinttags</o>, or the
            string <str delim="'">func:</str> followed by a JavaScript
            expression which evaluates to a function. In the former case, the
            first matching element whose text content is equal to the desired
            line number is used. If no such element exists, the <oa>count</oa>th
            matching element is used. In the latter case, the provided function
            must accept two arguments, the document in question and the desired
            line number, and must return the element corresponding to the given
            line.

    </description>
</item>

<item>
    <tags>'lpl' 'loadplugins'</tags>
    <spec>'loadplugins' 'lpl'</spec>
    <type>&option.loadplugins.type;</type>
    <default>&option.loadplugins.default;</default>
    <description>

            A regular expression list that defines which plugins are loaded at
            startup or via <ex>:loadplugins</ex>. The first item to match is
            the one that takes effect. If no items match, the file is not
            loaded. Setting this to a blank value effectively disables plugin
            loading.

            For example, to prepend to the default value of this option to load
            all plugins except for foobar-plugin, you could use:

        <set opt="loadplugins" op="^=">!<str delim="'">foobar-plugin</str></set>

            Alternatively, you can specify which plugins to load and which to
            omit in your <tt><t>&dactyl.name;rc</t></tt> using something like
            the following:

        <set opt="loadplugins">!<str delim="'">foo|bar</str>,<str delim="'">\.(js|&dactyl.fileExt;)$</str></set>

            That will load all plugins but foo and bar.

            Note that in the first expression of the latter example you don't
            need parentheses, as the ! negates the whole of the
            following expression (cf. <t>regexplist</t>).

            See also <ex>:runtime</ex>.

    </description>
</item>

<item>
    <tags>'maxitems'</tags>
    <spec>'maxitems'</spec>
    <type>&option.maxitems.type;</type>
    <default>&option.maxitems.default;</default>
    <description>

Maximum number of items to display at once in a listing.

    </description>
</item>

<item>
    <tags>'msgs' 'messages'</tags>
    <spec>'messages' 'msgs'</spec>
    <type>&option.messages.type;</type>
    <default>&option.messages.default;</default>
    <description>

Maximum number of messages to store in the message history.

    </description>
</item>

<item>
    <tags>'nomore' 'more'</tags>
    <spec>'more'</spec>
    <type>&option.more.type;</type>
    <default>&option.more.default;</default>
    <description>

            Pause the message list window when more than one screen of
            listings is displayed.

    </description>
</item>

<item>
    <tags>'newtab'</tags>
    <spec>'newtab'</spec>
    <type>&option.newtab.type;</type>
    <default>&option.newtab.default;</default>
    <description>

            Defines which Ex commands open pages in new tabs rather than the
            current tab by default. This may be overridden with the
            <ex>:tab</ex> command, and is usually inverted by affixing a
            ! to the command in question.

Possible values:

all

All commands

addons

<ex>:addo<oa>ns</oa></ex> command

downloads

<ex>:downl<oa>oads</oa></ex> command

extoptions

<ex>:exto<oa>ptions</oa></ex> command

help

<ex>:h<oa>elp</oa></ex> command

javascript

<ex>:javascript!</ex> or <ex>:js!</ex> command

prefs

<ex>:pref<oa>erences</oa>!</ex> or <ex>:prefs!</ex> command

    </description>
</item>

<item>
    <tags>'nextpattern'</tags>
    <strut/>
    <spec>'nextpattern'</spec>
    <type>&option.nextpattern.type;</type>
    <default>&option.nextpattern.default;</default>
    <description>

            Patterns to use when guessing the next page in a document
            sequence after pressing the <k>]]</k> key. Each pattern is
            successively tested against each link in the page (as defined by
            <o>hinttags</o>, starting with the last), and the first link to
            match is followed.

    </description>
</item>

<item>
    <tags>'noonline' 'online'</tags>
    <spec>'online'</spec>
    <type>&option.online.type;</type>
    <default>&option.online.default;</default>
    <description>

            Enables or disables 'offline' mode, where network access is
            disabled and all web pages are loaded entirely from cache.

    </description>
</item>

<item>
    <tags>'pa' 'pageinfo'</tags>
    <spec>'pageinfo' 'pa'</spec>
    <type>&option.pageinfo.type;</type>
    <default>&option.pageinfo.default;</default>
    <description>

Info shown in the <ex>:pageinfo</ex> output.

Items available by default:

g

General info

e

Search Engines

f

Feeds

m

Meta tags

s

Security information

            The order of the options defines the order in which they appear in
            the result.

    </description>
</item>

<item>
    <tags>'pk' 'passkeys'</tags>
    <spec>'passkeys' 'pk'</spec>
    <type>&option.passkeys.type;</type>
    <default>&option.passkeys.default;</default>
    <description>

            Pass certain keys through directly for the given URLs.
            For any page with a URL matching a given <t>site-filter</t>, all key
            events for keys listed in the corresponding value are passed
            through directly to &dactyl.host;, and are not processed
            by &dactyl.appName; in any way. Key names are separated
            by commas, where the first key name is treated as a list
            of individual keys and each subsequent key is treated as
            a key chain. Individual key entries always apply to all
            modes. Key chains apply only to non-input modes unless
            they begin with a key requiring a modifier other than
            shift.

        <example><set opt="passkeys" op="+="><str delim="">mail.google.com</str>:<str delim="">jk<CR></str>,<str delim="">gi</str></set></example>

            More subtle and complex pass through can be achieved
            using <t>groups</t> and mode-specific mappings utilizing
            the <k name="Pass"/> pseudo-key.

    </description>
</item>

<item>
    <tags>'pu' 'passunknown'</tags>
    <spec>'passunknown' 'pu'</spec>
    <type>&option.passunknown.type;</type>
    <default>&option.passunknown.default;</default>
    <description>

            Pass unknown keys through to &dactyl.host; in these
            <t>modes</t>. The first element matching a currently
            active mode is the one that takes effect. Modes may be
            negated by prefixing them with a <tt>!</tt>.

    </description>
</item>

<item>
    <tags>'pps' 'popups'</tags>
    <spec>'popups' 'pps'</spec>
    <type>&option.popups.type;</type>
    <default>&option.popups.default;</default>
    <description>

            Defines where to show requested pop-up windows. Applies only to
            links which request to open in a new window. The behavior of
            middle-, shift-, or control- clicking a link is unaffected by this
            option.

Possible values are:

tab

Open pop-ups in a new tab

window

Open pop-ups in a new window

resized

Open resized pop-ups in a new window

            If neither tab nor window is provided, all
            pop-ups open in the current tab. tab and window
            are mutually exclusive, and the last one listed is effective.

        <note>
            This option does not alter the &dactyl.host; pop-up blocker behavior
            in any way.
        </note>
    </description>
</item>

<item>
    <tags>'previouspattern'</tags>
    <strut/>
    <spec>'previouspattern'</spec>
    <type>&option.previouspattern.type;</type>
    <default>&option.previouspattern.default;</default>
    <description>

            Patterns to use when guessing the previous page in a document
            sequence after pressing the <k>[[</k> key. Each pattern is
            successively tested against each link in the page (as defined by
            <o>hinttags</o>, starting with the last), and the first link to
            match is followed.

    </description>
</item>

<item>
    <tags>$&dactyl.idName;_RUNTIME</tags>
    <tags>'rtp' 'runtimepath'</tags>
    <spec>'runtimepath' 'rtp'</spec>
    <type>&option.runtimepath.type;</type>
    <default type="plain"><str>$&dactyl.idName;_RUNTIME</str> or
       Unix, Mac: <str>~/.&dactyl.name;</str>
         Windows: <str>~/&dactyl.name;</str></default>
    <description>

List of directories searched for runtime files:

colors/

plugins/

Example:

        <set opt="runtimepath"><str delim="">~/my&dactyl.name;</str>,<str delim="">~/.&dactyl.name;</str></set>

            This will search for plugins in both
            <str>~/my&dactyl.name;/plugins</str> and
            <str>~/.&dactyl.name;/plugins</str>

            On startup, if the environment variable $&dactyl.idName;_RUNTIME does not
            exist, &dactyl.appName; will set it to match this value.

    </description>
</item>

<item>
    <tags>'si' 'sanitizeitems'</tags>
    <spec>'sanitizeitems' 'si'</spec>
    <strut/>
    <type>&option.sanitizeitems.type;</type>
    <default>&option.sanitizeitems.default;</default>
    <description>

            The default list of private items to sanitize. See
            <ex>:sanitize</ex> for a list and explanation of possible values. A
            value of <str>all</str> will cause all items to be sanitized. Items
            may be excluded by prefixing them with a <tt>!</tt>. The first
            matching item takes precedence.

    </description>
</item>

<item>
    <tags>'ss' 'sanitizeshutdown'</tags>
    <spec>'sanitizeshutdown' 'ss'</spec>
    <type>&option.sanitizeshutdown.type;</type>
    <default>&option.sanitizeshutdown.default;</default>
    <description>

The items to sanitize automatically at shutdown.

    </description>
</item>

<item>
    <tags>'sts' 'sanitizetimespan'</tags>
    <spec>'sanitizetimespan' 'sts'</spec>
    <strut/>
    <type>&option.sanitizetimespan.type;</type>
    <default>&option.sanitizetimespan.default;</default>
    <description>

            The default sanitizer time span. Only items created within this timespan are
            deleted. The value must be of the one of:

all

Everything

session

The current session

nm

Past n Minutes

nh

Past n Hours

nd

Past n Days

nw

Past n Weeks

    </description>
</item>

<item>
    <tags>'scr' 'scroll'</tags>
    <spec>'scroll' 'scr'</spec>
    <type>&option.scroll.type;</type>
    <default>&option.scroll.default;</default>
    <description>

            Number of lines to scroll with <k name="C-u"/> and <k name="C-d"/>
            commands. The number of lines scrolled defaults to half the window
            size. When a <oa>count</oa> is specified to the <k name="C-u"/> or
            <k name="C-d"/> commands, set this option to <oa>count</oa> before
            executing the command. Setting this to 0 restores the
            default behaviour.

    </description>
</item>

<item>
    <tags>'scs' 'scrollsteps'</tags>
    <spec>'scrollsteps' 'scs'</spec>
    <type>&option.scrollsteps.type;</type>
    <default>&option.scrollsteps.default;</default>
    <description>

            The number of steps in which to smooth scroll to a new position. If
            set to 1, smooth scrolling is not used.

    </description>
</item>

<item>
    <tags>'sct' 'scrolltime'</tags>
    <spec>'scrolltime' 'sct'</spec>
    <type>&option.scrolltime.type;</type>
    <default>&option.scrolltime.default;</default>
    <description>

The time, in milliseconds, in which to smooth scroll to a new position.

    </description>
    </item>

<item>
    <tags>'sh' 'shell'</tags>
    <spec>'shell' 'sh'</spec>
    <type>&option.shell.type;</type>
    <default type="plain">$SHELL or <str>sh</str>, Windows: <str>cmd.exe</str></default>
    <description>

Shell to use for executing <ex>:!</ex> and <ex>:run</ex> commands.

    </description>
</item>

<item>
    <tags>'shcf' 'shellcmdflag'</tags>
    <spec>'shellcmdflag' 'shcf'</spec>
    <strut/>
    <type>&option.shellcmdflag.type;</type>
    <default type="plain"><str>-c</str>, Windows: <str>/c</str></default>
    <description>

Flag passed to shell when executing <ex>:!</ex> and <ex>:run</ex> commands.

    </description>
</item>

<item>
    <tags>'smd' 'showmode'</tags>
    <spec>'showmode' 'smd'</spec>
    <type>&option.showmode.type;</type>
    <default>&option.showmode.default;</default>
    <description>

            Show the current mode in the command line if it or any
            of its parent <t>modes</t> is included in the list.
            Modes may be negated by prefixing them with a
            <tt>!</tt>.

    </description>
</item>

<item>
    <tags>'ssli' 'showstatuslinks'</tags>
    <spec>'showstatuslinks' 'ssli'</spec>
    <strut/>
    <type>&option.showstatuslinks.type;</type>
    <default>&option.showstatuslinks.default;</default>
    <description>

            When the mouse hovers over a link, or a link is otherwise focused,
            show its destination in the status bar.

Possible values are:

Don't show link destination

status

Show the link destination in the &tag.status-line;

command

Show the link destination in the &tag.command-line;

    </description>
</item>

<item>
    <tags>'stal' 'showtabline'</tags>
    <spec>'showtabline' 'stal'</spec>
    <type>&option.showtabline.type;</type>
    <default>&option.showtabline.default;</default>
    <description>

Define when the tab bar is visible.

always

Always show the tab bar

multitab

Show the tab bar when there are multiple tabs

never

Never show the tab bar

    </description>
</item>

<item>
    <tags>'spl' 'spelllang'</tags>
    <spec>'spelllang' 'spl'</spec>
    <type>&option.spelllang.type;</type>
    <default>&option.spelllang.default;</default>
    <description short="true">

The language used by the spell checker.

    </description>
</item>

<item>
    <tags>'sf' 'strictfocus'</tags>
    <spec>'strictfocus' 'sf'</spec>
    <type>&option.strictfocus.type;</type>
    <default>&option.strictfocus.default;</default>
    <description>

            Prevent scripts from focusing input elements without user intervention.

Possible values:

despotic

Only allow focus changes when explicitly requested by the user

laissez-faire

Always allow focus changes

moderate

Allow focus changes after user-initiated focus change

    </description>
</item>

<item>
    <tags>'suggestengines'</tags>
    <spec>'suggestengines'</spec>
    <type>&option.suggestengines.type;</type>
    <default>&option.suggestengines.default;</default>
    <description>

            Set the search engines which can be used for completion
            suggestions when <o>complete</o> contains S.

    </description>
</item>

<item>
    <tags>'notmo' 'notimeout'</tags>
    <tags>'tmo' 'timeout'</tags>
    <spec>'timeout' 'tmo'</spec>
    <type>&option.timeout.type;</type>
    <default>&option.timeout.default;</default>
    <description>

            When this option is set and a key sequence interpretable both as a
            complete command and as a start of a longer command is typed,
            execute the shorter command after <o>timeoutlen</o> milliseconds.

    </description>
</item>

<item>
    <tags>'tmol' 'timeoutlen'</tags>
    <spec>'timeoutlen' 'tmol'</spec>
    <type>&option.timeoutlen.type;</type>
    <default>&option.timeoutlen.default;</default>
    <description>

            Maximum number of milliseconds to wait for a longer key command
            when a shorter one exists. Only effective when <o>timeout</o> is
            set.

    </description>
</item>

<item>
    <tags>'titlestring'</tags>
    <spec>'titlestring'</spec>
    <type>&option.titlestring.type;</type>
    <default>&option.titlestring.default;</default>
    <description>

            Set the application name shown after the current page title in
            &dactyl.host;'s title bar.

        <example><set opt="titlestring"><str>Mozilla &dactyl.host;</str></set></example>
    </description>
</item>

<item>
    <tags>'us' 'urlsep' 'urlseparator'</tags>
    <spec>'urlseparator' 'urlsep' 'us'</spec>
    <type>&option.urlseparator.type;</type>
    <default>&option.urlseparator.default;</default>
    <description>

            The regular expression used to split URL lists in commands
            like <ex>:open</ex>. When set to the empty string, URL lists
            are never split. With the default settings, the following will open
            three URLs (the first one in the current tab and the latter two in
            two new background tabs):

        <ex>:open <str delim="">google Linux</str> | <str delim="">wikipedia Arch Linux</str> | <str delim="">imdb Serenity</str></ex>
    </description>
</item>

<item>
    <tags>'noum' 'nousermode'</tags>
    <tags>'um' 'usermode'</tags>
    <spec>'usermode' 'um'</spec>
    <type>&option.usermode.type;</type>
    <default>&option.usermode.default;</default>
    <description>

Show current website with minimal styling.

    </description>
</item>

<item>
    <tags>'vbs' 'verbose'</tags>
    <spec>'verbose' 'vbs'</spec>
    <type>&option.verbose.type;</type>
    <default>&option.verbose.default;</default>
    <description>

            Define which info messages are displayed. As the value increases,
            &dactyl.appName; will show more messages about its progress.
            These can be viewed at any time with the <ex>:messages</ex>
            command. The highest useful value is 15, being the most verbose
            mode.

    </description>
</item>

<item>
    <tags>'novb' 'novisualbell'</tags>
    <tags>'vb' 'visualbell'</tags>
    <spec>'visualbell' 'vb'</spec>
    <type>&option.visualbell.type;</type>
    <default>&option.visualbell.default;</default>
    <description>

            Use visual bell instead of beeping on errors. The visual bell
            style is controlled by <ex>:highlight Bell</ex>. See also
            <o>errorbells</o>.

    </description>
</item>

<item>
    <tags>'wia' 'wildanchor'</tags>
    <strut/>
    <spec>'wildanchor' 'wia'</spec>
    <type>&option.wildanchor.type;</type>
    <default>&option.wildanchor.default;</default>
    <description>

            Regular expression list defining which completion groups show only
            matches anchored to the beginning of the result. The first
            matching expression is the one that applies. If the match is
            negated, then the current filter may match anywhere in the result.
            If it is not negated, then the match may only occur at the
            beginning of the result. If no items match, then a
            context-dependent default value is used.

    </description>
</item>

<item>
    <tags>'wic' 'wildcase'</tags>
    <spec>'wildcase' 'wic'</spec>
    <type>&option.wildcase.type;</type>
    <default>&option.wildcase.default;</default>
    <description>

            Defines how completions are matched with regard to character case.
            Keys in the <t>regexpmap</t> refer to completion context names (see
            <ex>:contexts</ex>) for which the value applies. Possible values
            are:

<str>smart</str>

Case is significant when capital letters are typed

<str>match</str>

Case is always significant

<str>ignore</str>

Case is never significant

    </description>
</item>

<item>
    <tags>'wig' 'wildignore'</tags>
    <spec>'wildignore' 'wig'</spec>
    <type>&option.wildignore.type;</type>
    <default>&option.wildignore.default;</default>
    <description>

            List of path name patterns to ignore when completing files and
            directories. For example, the following will ignore object files
            and Vim swap files:

        <set opt="wildignore"><str delim="'">\.o$</str>,<str delim="'">^\..*\.s[a-z]{2}$</str></set>

        <note>Unlike Vim, each pattern is a regular expression rather than a glob.</note>
    </description>
</item>

<item>
    <tags>'wim' 'wildmode'</tags>
    <spec>'wildmode' 'wim'</spec>
    <type>&option.wildmode.type;</type>
    <default>&option.wildmode.default;</default>
    <description>

            Defines how command-line completion works. It is a comma-separated
            list of parts, where each part specifies what to do for each
            consecutive press of the <k name="Tab" mode="c"/> key. The last
            element in the list is used for each succeeding <k name="Tab" mode="c"/>
            after it has been reached.

These are the possible values for each part:

<str></str>

Complete only the first match.

<str>full</str>

Complete the next full match. After the last, the original string is used.

<str>longest</str>

Complete the longest common substring of all completions.

<str>list</str>

When more than one match, list all matches.

<str>list:full</str>

When more than one match, list all matches and complete the first match.

<str>list:longest</str>

                When more than one match, list all matches and
                complete till the longest common string. When there
                is only a single match, it is fully completed
                regardless of the case.

            See also <o>altwildmode</o>.

    </description>
</item>

<item>
    <tags>'wis' 'wildsort'</tags>
    <spec>'wildsort' 'wis'</spec>
    <type>&option.wildsort.type;</type>
    <default>&option.wildsort.default;</default>
    <description>

            A list of regular expressions defining which completion contexts
            should be sorted. The main purpose of this option is to prevent
            sorting of certain completion lists that don't perform well under
            load.

See also <ex>:contexts</ex>.

    </description>
</item>

<item>
    <tags>'wsp' 'wordseparators'</tags>
    <spec>'wordseparators' 'wsp'</spec>
    <strut/>
    <type>&option.wordseparators.type;</type>
    <default>&option.wordseparators.default;</default>
    <description>

            A regular expression which defines how words are split for
            the <o>hintmatching</o> types <str>wordstartswith</str> and
            <str>firstletters</str>. Words are split on each occurrence of the
            given pattern.

    </description>
</item>

<item>
    <tags>'ys' 'yankshort'</tags>
    <spec>'yankshort' 'ys'</spec>
    <type>&option.yankshort.type;</type>
    <default>&option.yankshort.default;</default>
    <description>

Yank the canonical short URL of a web page where provided.

    </description>
</item>

</document>


text:
There should have been a link to "Grayarea - Was There Ever Time?", but, sadly
and absurdly, free music is shared not as widely as priced, so i couldn't get a
link to a decent online player. So, instead of telling this ironically, i have
to tell it directly: i simply don't have enough time and desire to fix
everything.

You can have this wonderful duck instead, though:

![](http://www.outdooroddities.com/wp-content/gallery/duckonaduck/duck_standing_on_another_duck.jpg)

### Will you update this repo?

Probably no.

### Should i open an issue / pull request if i want to?

Do what comes natural.

### How do i launch this thing?

[As any other Symfony 2 app](http://symfony.com/doc/current/cookbook/deployment/tools.html).


text:
layout: post
title: Hello World
---

Hello World!

My blog is all about:

* Tech Updates
* Tips & Trick
* My Labz
* My Journey

Thx for visiting my blog.
Stay tuned!


text:
import React from 'react';
import PropTypes from 'prop-types';

import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import AppBar from 'material-ui/AppBar';

import NavBar from './nav';
import './app.css';

let App = (props) => {
    // when user clicks menu
    let onMenuClick = menu => {
        console.info('NavBar.MenuItem.onClick', menu),
        document.location = menu.href;
    };

    return (
        <MuiThemeProvider>

                <AppBar
                    title={props.productTitle}
                    showMenuIconButton={false}
                    />
                <NavBar
                    onMenuClick={onMenuClick}
                    menu={props.menu}
                    />

                    {props.children}

        </MuiThemeProvider>
    );
};

App.propTypes = {
    productTitle: PropTypes.string.isRequired,
    menu: PropTypes.arrayOf(PropTypes.object)
}

export default App;


text:
namespace ash {

// How the background can be changed.
enum BackgroundAnimatorChangeType {
  BACKGROUND_CHANGE_ANIMATE,
  BACKGROUND_CHANGE_IMMEDIATE
};

class BackgroundAnimator;

// Delegate is notified any time the background changes.
class ASH_EXPORT BackgroundAnimatorDelegate {
 public:
  virtual void UpdateBackground(BackgroundAnimator* animator, int alpha) = 0;

  virtual void BackgroundAnimationEnded(BackgroundAnimator* animator) = 0;

 protected:
  virtual ~BackgroundAnimatorDelegate() {}
};

// BackgroundAnimator is used by the shelf to animate the background (alpha).
class ASH_EXPORT BackgroundAnimator : public gfx::AnimationDelegate {
 public:
  BackgroundAnimator(BackgroundAnimatorDelegate* delegate,
                     int min_alpha,
                     int max_alpha);
  ~BackgroundAnimator() override;

  // Sets the transition time in ms.
  void SetDuration(int time_in_ms);

  // Stops the animation. Does nothing if the animation is not running.
  void Stop();

  // Sets whether a background is rendered. Initial value is false. If |type|
  // is |CHANGE_IMMEDIATE| and an animation is not in progress this notifies
  // the delegate immediately (synchronously from this method).
  void SetPaintsBackground(bool value, BackgroundAnimatorChangeType type);
  bool paints_background() const { return paints_background_; }

  // Current alpha.
  int alpha() const { return alpha_; }

  // gfx::AnimationDelegate overrides:
  void AnimationProgressed(const gfx::Animation* animation) override;
  void AnimationEnded(const gfx::Animation* animation) override;

 private:
  BackgroundAnimatorDelegate* delegate_;

  const int min_alpha_;
  const int max_alpha_;

  gfx::SlideAnimation animation_;

  // Whether the background is painted.
  bool paints_background_;

  // Current alpha value of the background.
  int alpha_;

  DISALLOW_COPY_AND_ASSIGN(BackgroundAnimator);
};

}  // namespace ash

#endif  // ASH_COMMON_WM_BACKGROUND_ANIMATOR_H_


text:
package org.apache.webbeans.test.unittests.inject.named;

import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.util.Set;

import javax.enterprise.inject.spi.AnnotatedConstructor;
import javax.enterprise.inject.spi.AnnotatedType;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.inject.Named;

import org.apache.webbeans.config.WebBeansContext;
import org.apache.webbeans.exception.WebBeansConfigurationException;
import org.apache.webbeans.test.AbstractUnitTest;
import org.apache.webbeans.portable.AnnotatedElementFactory;
import org.apache.webbeans.test.component.CheckWithCheckPayment;
import org.apache.webbeans.test.component.IPayment;
import org.apache.webbeans.test.component.inject.named.NamedFieldWithNamedValue;
import org.apache.webbeans.test.component.inject.named.NamedFieldWithoutNamedValue;
import org.apache.webbeans.test.component.inject.named.NamedOtherWithNamedValue;
import org.apache.webbeans.test.component.inject.named.NamedOtherWithoutNamedValue;
import org.apache.webbeans.test.component.inject.named.NamedPayment_PaymentProcessor;
import org.apache.webbeans.test.component.inject.named.NamedPayment_Value;
import org.apache.webbeans.util.WebBeansUtil;
import org.junit.Assert;
import org.junit.Test;

public class NamedTests extends AbstractUnitTest
{
    @Test
    public void testFieldWithNamedValue() throws Exception
    {
        startContainer(NamedFieldWithNamedValue.class, CheckWithCheckPayment.class, NamedPayment_Value.class, NamedPayment_PaymentProcessor.class);
        NamedFieldWithNamedValue instance = getInstance(NamedFieldWithNamedValue.class);
        Assert.assertEquals("value-named", instance.getPayment().pay());
    }

    @Test
    public void testFieldWithoutNamedValue() throws Exception
    {
        startContainer(NamedFieldWithoutNamedValue.class, CheckWithCheckPayment.class, NamedPayment_Value.class, NamedPayment_PaymentProcessor.class);
        NamedFieldWithoutNamedValue instance = getInstance(NamedFieldWithoutNamedValue.class);
        Assert.assertEquals("paymentProcessor-named", instance.getPayment().pay());
    }

    @Test
    public void testOtherWithNamedValue() throws Exception
    {
        startContainer(NamedOtherWithNamedValue.class, CheckWithCheckPayment.class, NamedPayment_Value.class, NamedPayment_PaymentProcessor.class);
        NamedOtherWithNamedValue instance = getInstance(NamedOtherWithNamedValue.class);
        Assert.assertEquals("value-named", instance.getPayment().pay());
    }

    @Test(expected=WebBeansConfigurationException.class)
    public void testOtherWithoutNamedValue() throws Exception
    {
        startContainer(NamedOtherWithoutNamedValue.class);
        Bean<NamedOtherWithoutNamedValue> bean = getBean(NamedOtherWithoutNamedValue.class);
        Constructor<NamedOtherWithoutNamedValue> constructor = NamedOtherWithoutNamedValue.class.getDeclaredConstructor(new Class<?>[]{IPayment.class});

        AnnotatedElementFactory annotatedElementFactory = WebBeansContext.getInstance().getAnnotatedElementFactory();
        AnnotatedType<NamedOtherWithoutNamedValue> annotatedType = annotatedElementFactory.getAnnotatedType(constructor.getDeclaringClass());
        AnnotatedConstructor<NamedOtherWithoutNamedValue> annotatedConstructor = annotatedElementFactory.newAnnotatedConstructor(constructor, annotatedType);
        InjectionPoint point =
            WebBeansContext.getInstance().getInjectionPointFactory().buildInjectionPoints(bean, annotatedConstructor).get(0);

        String value = qualifier(point);

        Assert.assertEquals("", value);

        WebBeansUtil.checkInjectionPointNamedQualifier(point);

    }

    private String qualifier(InjectionPoint injectionPoint)
    {
        Set<Annotation> qualifierset = injectionPoint.getQualifiers();
        Named namedQualifier = null;
        for(Annotation qualifier : qualifierset)
        {
            if(qualifier.annotationType().equals(Named.class))
            {
                namedQualifier = (Named)qualifier;
                break;
            }
        }

        if(namedQualifier != null)
        {
            return namedQualifier.value();
        }

        return null;
    }
}


text:
<?php

namespace Anyt\Bundle\DemoBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;

class DefaultController extends Controller
{
    public function simpleResponseAction()
    {
        return new Response('Lorem ipsum dolor sit amet, consectetuer adipiscing elit');
    }

    public function simpleTemplateAction()
    {
        return $this->render('AnytDemoBundle:Default:simpleTemplate.html.twig', ['title' => 'Hello World!']);
    }

    public function extendedTemplateAction(Request $request)
    {
        $response = new Response();
        $response->setPublic();

        return $this->render(
            'AnytDemoBundle:Default:extendedTemplate.html.twig',
            [
                'upper_case' => 'Typi non habent claritatem insitam',
                'timestamp' => new \DateTime(),
                'html' => 'Eodem modo typi, qui nunc nobis videntur parum clari',
                'bool' => true,
                'array' => ['test1', 'test2', 'test3', 'test4'],
                'object' => $request,
            ],
            $response
        );
    }

    /*
     * Action arguments mapped with url parameters using reflection
     */
    public function advancedRoutingAction(Request $request, $id, $slug, $_format)
    {
        $page = $request->query->get('page', 1);
        switch ($_format) {
            case 'json':
                return new JsonResponse(['id' => $id, 'slug' => $slug, 'page' => $page]);
                break;
            case 'text':
                return new Response("id = $id\nslug = $slug\npage = $page", 200, array('Content-Type' => 'text/plain'));
                break;
            default:
                return $this->render(
                    'AnytDemoBundle:Default:advancedRouting.html.twig',
                    ['id' => $id, 'slug' => $slug, 'page' => $page]
                );
        }

    }
}


text:
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using MeetMe.Services.Contracts;

namespace MeetMe.Services
{
    public class ImageService : IImageService
    {
        public byte[] ImageToByteArray(Image imageIn)
        {
            MemoryStream memoryStream = new MemoryStream();
            imageIn.Save(memoryStream, ImageFormat.Jpeg);
            return memoryStream.ToArray();
        }

        public string ByteArrayToImageUrl(byte[] byteArrayIn)
        {
            string base64String = Convert.ToBase64String(byteArrayIn, 0, byteArrayIn.Length);
            string resultUrl = "data:image/jpg;base64," + base64String;
            return resultUrl;
        }

        public Image GetImage(string path)
        {
            return Image.FromFile(path);
        }

        public byte[] GetByteArrayFromStream(Stream inputStream)
        {
            MemoryStream target = new MemoryStream();
            inputStream.CopyTo(target);
            byte[] data = target.ToArray();
            return data;
        }
    }
}


text:
#include "OgreLodCollapseCostOutside.h"
#include "OgreLodOutsideMarker.h"

namespace Ogre
{
    LodCollapseCostOutside::LodCollapseCostOutside( LodCollapseCostPtr costCalculator, Real outsideWeight, Real outsideWalkAngle ) :
        mOutsideWeight(outsideWeight),
        mOutsideWalkAngle(outsideWalkAngle),
        mCostCalculator(costCalculator),
        mOutsideMarker(NULL)
    {
    }

    LodCollapseCostOutside::~LodCollapseCostOutside()
    {
        delete mOutsideMarker;
    }

    void LodCollapseCostOutside::initCollapseCosts( LodData* data )
    {
        OgreAssert(mOutsideWeight != 0.0, "");

        delete mOutsideMarker;
        mOutsideMarker = new LodOutsideMarker(data->mVertexList, data->mMeshBoundingSphereRadius, mOutsideWalkAngle);
        mOutsideMarker->markOutside();

        mCostCalculator->initCollapseCosts(data);
    }

    Real LodCollapseCostOutside::computeEdgeCollapseCost( LodData* data, LodData::Vertex* src, LodData::Edge* dstEdge )
    {
        Real cost = mCostCalculator->computeEdgeCollapseCost(data, src, dstEdge);
        if(mOutsideMarker->isVertexOutside(src) || mOutsideMarker->isVertexOutside(dstEdge->dst)) {
            if(mOutsideWeight != LodData::NEVER_COLLAPSE_COST && cost != LodData::NEVER_COLLAPSE_COST) {
                cost *= std::max<Real>(0.0078125f, mOutsideWeight * 8.0f);
            } else {
                return LodData::NEVER_COLLAPSE_COST;
            }
        }
        OgreAssert(cost >= 0 && cost != LodData::UNINITIALIZED_COLLAPSE_COST, "Invalid collapse cost");
        return cost;
    }
}


text:
import win32ui
import dde

server = dde.CreateServer()
server.Create("TestClient")

conversation = dde.CreateConversation(server)

conversation.ConnectTo("RunAny", "RunAnyCommand")
conversation.Exec("DoSomething")
conversation.Exec("DoSomethingElse")

conversation.ConnectTo("RunAny", "ComputeStringLength")
s = 'abcdefghi'
sl = conversation.Request(s)
print 'length of "%s" is %s'%(s,sl)


text:
/**
 * @file FlightTaskDescend.cpp
 */

#include "FlightTaskDescend.hpp"

bool FlightTaskDescend::activate(const vehicle_local_position_setpoint_s &last_setpoint)
{
	bool ret = FlightTask::activate(last_setpoint);
	// stay level to minimize horizontal drift
	_acceleration_setpoint = matrix::Vector3f(0.f, 0.f, NAN);
	// keep heading
	_yaw_setpoint = _yaw;
	return ret;
}

bool FlightTaskDescend::update()
{
	bool ret = FlightTask::update();

	if (PX4_ISFINITE(_velocity(2))) {
		// land with landspeed
		_velocity_setpoint(2) = _param_mpc_land_speed.get();
		_acceleration_setpoint(2) = NAN;

	} else {
		// descend with constant acceleration (crash landing)
		_velocity_setpoint(2) = NAN;
		_acceleration_setpoint(2) = .3f;
	}

	return ret;
}


text:
<!doctype html>
<script>
const baseLocation = window.location;
const workerUrl = new URL('create-blob-url-worker.js', baseLocation).href;
const worker = new Worker(workerUrl);

function fetch_in_worker(url) {
  const resourceUrl = new URL(url, baseLocation).href;
  return new Promise((resolve) => {
    worker.onmessage = (event) => {
      resolve(event.data);
    };
    worker.postMessage(resourceUrl);
  });
}
</script>


text:
<?php
namespace app\components;

use yii\validators\Validator;
use app\helpers\PersonaHelper;
use app\helpers\ConfiguracionHelper;
use app\models\Horas;

class HorasAlumnoValidator extends Validator
{
    public function validateAttribute($model, $attribute)
    {
        $conf = ConfiguracionHelper::getConfiguracion();
        $maximoHorasAlumno = $conf->CantidadHorasSociales;
        $HorasOld = Horas::findOne(['IdPersona'=>$model->IdPersona, 'IdProyecto'=>$model->IdProyecto]);
        $persona = PersonaHelper::getPersonaById($model->IdPersona);
        $cantidadHoras = $persona->getCantidadHorasSociales();
        if($HorasOld !== FALSE) //Si es update
        {
           $total = $cantidadHoras - $HorasOld->HorasRealizadas + $model->HorasRealizadas;
        }
        else //si es create
        {
            $total = $cantidadHoras + $model->HorasRealizadas;
        }

        if($total > $maximoHorasAlumno && $model->EstadoRegistro == '1')
        {
            $this->addError($model, $attribute, 'El estudiante no puede tener mas de '.$maximoHorasAlumno.' horas sociales, si suma las '.$model->HorasRealizadas.' horas, tendría en total: '.$total);
        }
    }
}


text:
package org.wickedsource.gitanizer.core.security;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.springframework.mock.env.MockEnvironment;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.wickedsource.gitanizer.mirror.domain.Mirror;
import org.wickedsource.gitanizer.mirror.domain.MirrorRepository;

import java.util.Collection;
import java.util.Iterator;

import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.when;

@RunWith(MockitoJUnitRunner.class)
public class GitanizerUserDetailsServiceTest {

    @Mock
    MirrorRepository mirrorRepository;

    MockEnvironment environment = new MockEnvironment();

    @Test
    public void findsLoginFormUsers() {
        environment.setProperty("gitanizer.users.admin", "password,ADMIN,USER");
        environment.setProperty("gitanizer.users.user", "password,USER");
        GitanizerUserDetailsService service = new GitanizerUserDetailsService(mirrorRepository, environment);

        UserDetails admin = service.loadUserByUsername("admin");
        assertThat(admin.getUsername()).isEqualTo("admin");
        assertThat(admin.getPassword()).isEqualTo("password");
        assertThat(admin.getAuthorities()).hasSize(2);
        assertThat(containsRole(admin.getAuthorities(), "ADMIN")).isTrue();
        assertThat(containsRole(admin.getAuthorities(), "USER")).isTrue();

        UserDetails user = service.loadUserByUsername("user");
        assertThat(user.getUsername()).isEqualTo("user");
        assertThat(user.getPassword()).isEqualTo("password");
        assertThat(user.getAuthorities()).hasSize(1);
        assertThat(containsRole(user.getAuthorities(), "USER")).isTrue();
    }

    @Test(expected = UsernameNotFoundException.class)
    public void failsFindingLoginFormUsers() {
        environment.setProperty("gitanizer.users.admin.asd", "");
        environment.setProperty("gitanizer.users.user", "password,USER");
        GitanizerUserDetailsService service = new GitanizerUserDetailsService(mirrorRepository, environment);
        service.loadUserByUsername("admin");
    }

    @Test
    public void findsBasicAuthUsers() {
        Mirror mirror = new Mirror();
        mirror.setId(42);
        mirror.setGitUsername("user123");
        mirror.setGitPassword("password");

        when(mirrorRepository.findByGitUsername("user123")).thenReturn(mirror);
        GitanizerUserDetailsService service = new GitanizerUserDetailsService(mirrorRepository, environment);

        UserDetails user123 = service.loadUserByUsername("user123");
        assertThat(user123.getUsername()).isEqualTo("user123");
        assertThat(user123.getPassword()).isEqualTo("password");
        assertThat(user123.getAuthorities()).hasSize(1);
        assertThat(containsRole(user123.getAuthorities(), "MIRROR-42")).isTrue();
    }

    @Test(expected = UsernameNotFoundException.class)
    public void failsFindingBasicAuthUsers(){
        when(mirrorRepository.findByGitUsername("user123")).thenReturn(null);
        GitanizerUserDetailsService service = new GitanizerUserDetailsService(mirrorRepository, environment);
        service.loadUserByUsername("user123");
    }

    private static boolean containsRole(Collection<? extends GrantedAuthority> authorities, String role) {
        Iterator<? extends GrantedAuthority> iterator = authorities.iterator();
        while (iterator.hasNext()) {
            GrantedAuthority authority = iterator.next();
            if (authority.getAuthority().equals(role)) {
                return true;
            }
        }
        return false;
    }

}


text:
static inline NSColor *badgeBackgroundColor() { return [NSColor colorWithCalibratedRed:(152/255.0) green:(168/255.0) blue:(202/255.0) alpha:1]; }
static inline NSColor *badgeHiddenBackgroundColor() { return [NSColor colorWithDeviceWhite:(180/255.0) alpha:1]; }
static inline NSColor *badgeSelectedTextColor() { return [NSColor keyboardFocusIndicatorColor]; }
static inline NSColor *badgeSelectedUnfocusedTextColor() { return [NSColor colorWithCalibratedRed:(153/255.0) green:(169/255.0) blue:(203/255.0) alpha:1]; }
static inline NSColor *badgeSelectedHiddenTextColor() { return [NSColor colorWithCalibratedWhite:(170/255.0) alpha:1]; }
static inline NSFont *badgeFont() { return [NSFont boldSystemFontOfSize:11]; }

// Sizing constants.
static const CGFloat badgeLeftAndRightPadding = 5.0;

@implementation PXSourceListBadgeCell

- (id)init
{
    if (!(self = [super initTextCell:@""]))
        return nil;

    return self;
}

- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
    CGFloat borderRadius = NSHeight(cellFrame)/2.0f;
	NSBezierPath *badgePath = [NSBezierPath bezierPathWithRoundedRect:cellFrame xRadius:borderRadius yRadius:borderRadius];

	// Get the window and control state to determine the badge colours used.
	BOOL isMainWindowVisible = [[NSApp mainWindow] isVisible];
	NSDictionary *attributes;
	NSColor *backgroundColor;

	if(self.isHighlighted || self.backgroundStyle == NSBackgroundStyleDark) {
		backgroundColor = [NSColor whiteColor];

        NSResponder *firstResponder = controlView.window.firstResponder;
        BOOL isFocused = NO;

        // Starting with the closest ancestor of the control view and the first responder (to make sure both views are in the
        // same subtree of the view hierarchy), keep going up the view hierarchy until we hit a PXSourceList instance to tell
        // if the source list is focused.
        // This covers both the cell-based and view-based cases as well as if a child view of the NSTableCellView (such as
        // a text field) is focused.
        if ([firstResponder isKindOfClass:[NSView class]]) {
            NSView *view = [(NSView*)firstResponder ancestorSharedWithView:controlView];
            do {
                if ([view isKindOfClass:[PXSourceList class]]) {
                    isFocused = YES;
                    break;
                }
            } while ((view = [view superview]));
        }

        NSColor *textColor;

		if (isMainWindowVisible && isFocused)
			textColor = badgeSelectedTextColor();
		else if (isMainWindowVisible && !isFocused)
			textColor = badgeSelectedUnfocusedTextColor();
		else
			textColor = badgeSelectedHiddenTextColor();

		attributes = @{NSForegroundColorAttributeName: textColor};
	} else {
		NSColor *textColor = textColor = self.textColor ? self.textColor : [NSColor whiteColor];;

		if(isMainWindowVisible)
            backgroundColor = self.backgroundColor ? self.backgroundColor : badgeBackgroundColor();
		else
			backgroundColor = badgeHiddenBackgroundColor();

		attributes = @{NSForegroundColorAttributeName: textColor};
	}

	[backgroundColor set];
	[badgePath fill];

	//Draw the badge text
    NSMutableAttributedString *badgeString = [self.badgeString mutableCopy];
    [badgeString addAttributes:attributes range:NSMakeRange(0, badgeString.length)];

	NSSize stringSize = badgeString.size;
	NSPoint badgeTextPoint = NSMakePoint(NSMidX(cellFrame) - (stringSize.width/2.0),
										 NSMidY(cellFrame) - (stringSize.height/2.0));
	[badgeString drawAtPoint:badgeTextPoint];
}

- (NSSize)cellSize
{
    NSSize size = self.badgeString.size;
    size.width += 2 * badgeLeftAndRightPadding;

    return size;
}

- (NSAttributedString *)badgeString
{
	return [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%ld", self.badgeValue]
                                           attributes:@{NSFontAttributeName: badgeFont()}];
}

- (id)accessibilityAttributeValue:(NSString *)attribute
{
    if ([attribute isEqualToString:NSAccessibilityValueAttribute])
        return @(_badgeValue).description;
    else
        return [super accessibilityAttributeValue:attribute];
}

@end


text:
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace KayakoRestApi.Core.Tickets
{
	/// <summary>
	/// Representing the watcher element of a ticket
	/// <remarks>
	/// see http://wiki.kayako.com/display/DEV/REST+-+Ticket#REST-Ticket-Response
	/// </remarks>
	/// </summary>
    [Serializable]
    public class TicketWatcher
    {
		/// <summary>
		/// The unique numeric staff id of the watcher
		/// </summary>
        [XmlAttribute("staffid")]
        public int Id { get; set; }

		/// <summary>
		/// The staff name of the watcher
		/// </summary>
        [XmlAttribute("name")]
        public string Name { get; set; }
    }
}


text:
package com.github.kislayverma.rulette.core.ruleinput.type;

public enum RuleInputType {
    VALUE,
    RANGE
}


text:
alias ll="ls -l"
alias la="ls -a"
alias lsz="unzip -l"

alias grep="grep --color=auto"

# -P   : display port numbers instead of service names
# +c 0 : display the whole name of process
alias lsof="lsof +c 0 -P"

PYTHON_VERSION=`python --version 2>&1`
PYTHON_VERSION=${PYTHON_VERSION:7}
if [[ $PYTHON_VERSION =~ ^2. ]]; then
    alias webserver="python -m SimpleHTTPServer 8000"
elif [[ $PYTHON_VERSION =~ ^3. ]]; then
    alias webserver="python -m http.server 8000"
fi


text: Please enable JavaScript to view the comments powered by Disqus.


text:
package org.jbromo.webapp.jsf.sample.view.layer.wizard.monopage;

import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Event;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
import javax.inject.Named;

import org.jbromo.webapp.jsf.mvc.view.AbstractViewController;
import org.jbromo.webapp.jsf.sample.view.layer.wizard.monopage.togglepanel.TogglePanelRenderEvent;
import org.jbromo.webapp.jsf.view.RenderView;
import org.jbromo.webapp.jsf.view.RenderViewEvent;

import lombok.AccessLevel;
import lombok.Getter;

/**
 * Define the dynamic tab panel controller of the view.
 * @author qjafcunuas
 */
@Named
@RequestScoped
public class TogglePanelControllerView extends AbstractViewController<TogglePanelModelView> {

    /**
     * serial version UID.
     */
    private static final long serialVersionUID = 3549835982536608004L;

    /**
     * The view's model.
     */
    @Inject
    @Getter(AccessLevel.PROTECTED)
    private TogglePanelModelView model;

    /**
     * Use for sending toggle load event.
     */
    @Inject
    @Getter
    private Event<TogglePanelRenderEvent> loadEvent;

    /**
     * Call when view will be rendered.
     * @param event the event.
     */
    public void observeRenderView(@Observes @RenderView(controller = TogglePanelControllerView.class) final RenderViewEvent event) {
        onLoadPage();
    }

    @Override
    protected void loadData() {
        this.loadEvent.fire(new TogglePanelRenderEvent());
    }

}


text:
	<title>Deborah Cheetham's panel show appearances</title>

	<link rel="stylesheet" media="all" href="../style.css" type="text/css"/>

Deborah Cheetham's panel show appearances

Deborah Cheetham

Deborah Cheetham (born 1964-11-24[ref]) has appeared in 2 episodes between 2011-2013.  Deborah Cheetham on Wikipedia.

2011

2012

2013

2013-04-08 / Q&A

2011-08-15 / Q&A


text:
import _pyisaac

__all__ = ('rand',)

def rand(*dimensions):
    """
    rand(d0, d1, ..., dn)

    Random values in a given shape.

    Create a numpy array of the given shape and propagate it with
    random samples from a uniform distribution over ``[0, 1)``.

    Parameters
    ----------
    d0, d1, ..., dn : int, optional
        The dimensions of the returned array, should all be positive.
        If no argument is given a single Python float is returned.

    Returns
    -------
    out : ndarray, shape ``(d0, d1, ..., dn)``
        Random values.

    Examples
    --------
    >>> pyisaac.np.rand(3, 2)
    array([[ 0.14022471,  0.96360618],
           [ 0.37601032,  0.25528411],
           [ 0.49313049,  0.94909878]])
    """
    if len(dimensions) == 0:
        return _pyisaac.random()
    else:
        if any(dim < 0 for dim in dimensions):
            raise ValueError('negative dimensions are not allowed')

        return _pyisaac.np_rand(dimensions)


text:
title: "Pakistan"
published: true
featured_image_path:
featured_image_attribution:
geocode: PAK
iso_code: PK
territory:
state_party: false
signed_but_not_ratified: false
signed_date:
ratified_or_acceded_date:
entry_into_force_date:
ratified_apic_date:
genocide:
crimes_against_humanity:
aggression:
war_crimes:
note:
slug: pakistan
---


text:
package picard.cmdline.programgroups;

import picard.cmdline.CommandLineProgramGroup;

/**
 * @author ebanks
 */
public class Alpha implements CommandLineProgramGroup {
    @Override
    public String getName() { return "Alpha Tools"; }
    @Override
    public String getDescription() { return "Tools that are currently UNSUPPORTED until further testing and maturation."; }
}


text:
namespace g{
namespace Fuse{
namespace Resources{

// protected enum LoadingImageSource.CleanupReason :420
uEnumType* LoadingImageSource__CleanupReason_typeof();

}}} // ::g::Fuse::Resources


text:
package com.playseeds.android.sdk;

import android.test.AndroidTestCase;

import org.mockito.ArgumentCaptor;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

public class EventQueueTests extends AndroidTestCase {
    EventQueue mEventQueue;
    CountlyStore mMockCountlyStore;

    @Override
    protected void setUp() throws Exception {
        super.setUp();

        mMockCountlyStore = mock(CountlyStore.class);
        mEventQueue = new EventQueue(mMockCountlyStore);
    }

    public void testConstructor() {
        assertSame(mMockCountlyStore, mEventQueue.getCountlyStore());
    }

    public void testRecordEvent() {
        final String eventKey = "eventKey";
        final int count = 42;
        final double sum = 3.0d;
        final Map<String, String> segmentation = new HashMap<>(1);
        final int timestamp = Seeds.currentTimestamp();
        final ArgumentCaptor<Integer> arg = ArgumentCaptor.forClass(Integer.class);

        mEventQueue.recordEvent(eventKey, segmentation, count, sum);
        verify(mMockCountlyStore).addEvent(eq(eventKey), eq(segmentation), arg.capture(), eq(count), eq(sum));
        assertTrue(((timestamp - 1) <= arg.getValue()) && ((timestamp + 1) >= arg.getValue()));
    }

    public void testSize_zeroLenArray() {
        when(mMockCountlyStore.events()).thenReturn(new String[0]);
        assertEquals(0, mEventQueue.size());
    }

    public void testSize() {
        when(mMockCountlyStore.events()).thenReturn(new String[2]);
        assertEquals(2, mEventQueue.size());
    }

    public void testEvents_emptyList() throws UnsupportedEncodingException {
        final List<Event> eventsList = new ArrayList<>();
        when(mMockCountlyStore.eventsList()).thenReturn(eventsList);

        final String expected = URLEncoder.encode("[]", "UTF-8");
        assertEquals(expected, mEventQueue.events());
        verify(mMockCountlyStore).eventsList();
        verify(mMockCountlyStore).removeEvents(eventsList);
    }

    public void testEvents_nonEmptyList() throws UnsupportedEncodingException {
        final List<Event> eventsList = new ArrayList<>();
        final Event event1 = new Event();
        event1.eventName = "event1Key";
        eventsList.add(event1);
        final Event event2 = new Event();
        event2.eventName = "event2Key";
        eventsList.add(event2);
        when(mMockCountlyStore.eventsList()).thenReturn(eventsList);

        final String jsonToEncode = "[" + event1.toJSON().toString() + "," + event2.toJSON().toString() + "]";
        final String expected = URLEncoder.encode(jsonToEncode, "UTF-8");
        assertEquals(expected, mEventQueue.events());
        verify(mMockCountlyStore).eventsList();
        verify(mMockCountlyStore).removeEvents(eventsList);
    }
}