text:
import { type } from '../../core/core.js';

import {
    ACTION_GAMEPAD, ACTION_KEYBOARD, ACTION_MOUSE,
    EVENT_MOUSEMOVE,
    PAD_1,
    PAD_L_STICK_X, PAD_L_STICK_Y, PAD_R_STICK_X, PAD_R_STICK_Y
} from './constants.js';
import { Keyboard } from './keyboard.js';
import { Mouse } from './mouse.js';

/**
 * A general input handler which handles both mouse and keyboard input assigned to named actions.
 * This allows you to define input handlers separately to defining keyboard/mouse configurations.
 */
class Controller {
    /**
     * Create a new instance of a Controller.
     *
     * @param {Element} [element] - Element to attach Controller to.
     * @param {object} [options] - Optional arguments.
     * @param {Keyboard} [options.keyboard] - A Keyboard object to use.
     * @param {Mouse} [options.mouse] - A Mouse object to use.
     * @param {import('./game-pads.js').GamePads} [options.gamepads] - A Gamepads object to use.
     * @example
     * var c = new pc.Controller(document);
     *
     * // Register the "fire" action and assign it to both the Enter key and the space bar.
     * c.registerKeys("fire", [pc.KEY_ENTER, pc.KEY_SPACE]);
     */
    constructor(element, options = {}) {
        this._keyboard = options.keyboard || null;
        this._mouse = options.mouse || null;
        this._gamepads = options.gamepads || null;

        this._element = null;

        this._actions = {};
        this._axes = {};
        this._axesValues = {};

        if (element) {
            this.attach(element);
        }
    }

    /**
     * Attach Controller to an Element. This is required before you can monitor for key/mouse
     * inputs.
     *
     * @param {Element} element - The element to attach mouse and keyboard event handler too.
     */
    attach(element) {
        this._element = element;
        if (this._keyboard) {
            this._keyboard.attach(element);
        }

        if (this._mouse) {
            this._mouse.attach(element);
        }
    }

    /**
     * Detach Controller from an Element. This should be done before the Controller is destroyed.
     */
    detach() {
        if (this._keyboard) {
            this._keyboard.detach();
        }
        if (this._mouse) {
            this._mouse.detach();
        }
        this._element = null;
    }

    /**
     * Disable the context menu usually activated with the right mouse button.
     */
    disableContextMenu() {
        if (!this._mouse) {
            this._enableMouse();
        }

        this._mouse.disableContextMenu();
    }

    /**
     * Enable the context menu usually activated with the right mouse button. This is enabled by
     * default.
     */
    enableContextMenu() {
        if (!this._mouse) {
            this._enableMouse();
        }

        this._mouse.enableContextMenu();
    }

    /**
     * Update the Keyboard and Mouse handlers.
     *
     * @param {object} dt - The time since the last frame.
     */
    update(dt) {
        if (this._keyboard) {
            this._keyboard.update();
        }

        if (this._mouse) {
            this._mouse.update();
        }

        if (this._gamepads) {
            this._gamepads.update();
        }

        // clear axes values
        this._axesValues = {};
        for (const key in this._axes) {
            this._axesValues[key] = [];
        }
    }

    /**
     * Helper function to append an action.
     *
     * @param {string} action_name - The name of the action.
     * @param {object} action - An action object to add.
     * @param {ACTION_KEYBOARD | ACTION_MOUSE | ACTION_GAMEPAD} action.type - The name of the action.
     * @param {number[]} [action.keys] - Keyboard: A list of keycodes e.g. `[pc.KEY_A, pc.KEY_ENTER]`.
     * @param {number} [action.button] - Mouse: e.g. `pc.MOUSEBUTTON_LEFT` - Gamepad: e.g. `pc.PAD_FACE_1`
     * @param {number} [action.pad] - Gamepad: An index of the pad to register (use {@link PAD_1}, etc).
     */
    appendAction(action_name, action) {
        this._actions[action_name] = this._actions[action_name] || [];
        this._actions[action_name].push(action);
    }

    /**
     * Create or update a action which is enabled when the supplied keys are pressed.
     *
     * @param {string} action - The name of the action.
     * @param {number[]} keys - A list of keycodes.
     */
    registerKeys(action, keys) {
        if (!this._keyboard) {
            this._enableKeyboard();
        }
        if (this._actions[action]) {
            throw new Error(`Action: ${action} already registered`);
        }

        if (keys === undefined) {
            throw new Error('Invalid button');
        }

        // convert to an array
        if (!keys.length) {
            keys = [keys];
        }

        // add keys to actions
        this.appendAction(action, {
            type: ACTION_KEYBOARD,
            keys
        });
    }

    /**
     * Create or update an action which is enabled when the supplied mouse button is pressed.
     *
     * @param {string} action - The name of the action.
     * @param {number} button - The mouse button.
     */
    registerMouse(action, button) {
        if (!this._mouse) {
            this._enableMouse();
        }

        if (button === undefined) {
            throw new Error('Invalid button');
        }

        // add mouse button to actions
        this.appendAction(action, {
            type: ACTION_MOUSE,
            button
        });
    }

    /**
     * Create or update an action which is enabled when the gamepad button is pressed.
     *
     * @param {string} action - The name of the action.
     * @param {number} pad - The index of the pad to register (use {@link PAD_1}, etc).
     * @param {number} button - The pad button.
     */
    registerPadButton(action, pad, button) {
        if (button === undefined) {
            throw new Error('Invalid button');
        }
        // add gamepad button and pad to actions
        this.appendAction(action, {
            type: ACTION_GAMEPAD,
            button,
            pad
        });
    }

    /**
     * Register an action against a controller axis.
     *
     * @param {object} [options] - Optional options object.
     * @param {number} [options.pad] - The index of the game pad to register for (use {@link PAD_1}, etc).
     */
    registerAxis(options) {
        const name = options.name;
        if (!this._axes[name]) {
            this._axes[name] = [];
        }
        const i = this._axes[name].push(name);

        options = options || {};
        options.pad = options.pad || PAD_1;

        const bind = function (controller, source, value, key) {
            switch (source) {
                case 'mousex':
                    controller._mouse.on(EVENT_MOUSEMOVE, function (e) {
                        controller._axesValues[name][i] = e.dx / 10;
                    });
                    break;
                case 'mousey':
                    controller._mouse.on(EVENT_MOUSEMOVE, function (e) {
                        controller._axesValues[name][i] = e.dy / 10;
                    });
                    break;
                case 'key':
                    controller._axes[name].push(function () {
                        return controller._keyboard.isPressed(key) ? value : 0;
                    });
                    break;
                case 'padrx':
                    controller._axes[name].push(function () {
                        return controller._gamepads.getAxis(options.pad, PAD_R_STICK_X);
                    });
                    break;
                case 'padry':
                    controller._axes[name].push(function () {
                        return controller._gamepads.getAxis(options.pad, PAD_R_STICK_Y);
                    });
                    break;
                case 'padlx':
                    controller._axes[name].push(function () {
                        return controller._gamepads.getAxis(options.pad, PAD_L_STICK_X);
                    });
                    break;
                case 'padly':
                    controller._axes[name].push(function () {
                        return controller._gamepads.getAxis(options.pad, PAD_L_STICK_Y);
                    });
                    break;
                default:
                    throw new Error('Unknown axis');
            }
        };

        bind(this, options.positive, 1, options.positiveKey);
        if (options.negativeKey || options.negative !== options.positive) {
            bind(this, options.negative, -1, options.negativeKey);
        }
    }

    /**
     * Returns true if the current action is enabled.
     *
     * @param {string} actionName - The name of the action.
     * @returns {boolean} True if the action is enabled.
     */
    isPressed(actionName) {
        if (!this._actions[actionName]) {
            return false;
        }

        const length = this._actions[actionName].length;

        for (let index = 0; index < length; ++index) {
            const action = this._actions[actionName][index];
            switch (action.type) {
                case ACTION_KEYBOARD:
                    if (this._keyboard) {
                        const len = action.keys.length;
                        for (let i = 0; i < len; i++) {
                            if (this._keyboard.isPressed(action.keys[i])) {
                                return true;
                            }
                        }
                    }
                    break;
                case ACTION_MOUSE:
                    if (this._mouse && this._mouse.isPressed(action.button)) {
                        return true;
                    }
                    break;
                case ACTION_GAMEPAD:
                    if (this._gamepads && this._gamepads.isPressed(action.pad, action.button)) {
                        return true;
                    }
                    break;
            }
        }
        return false;
    }

    /**
     * Returns true if the action was enabled this since the last update.
     *
     * @param {string} actionName - The name of the action.
     * @returns {boolean} True if the action was enabled this since the last update.
     */
    wasPressed(actionName) {
        if (!this._actions[actionName]) {
            return false;
        }

        const length = this._actions[actionName].length;

        for (let index = 0; index < length; ++index) {
            const action = this._actions[actionName][index];
            switch (action.type) {
                case ACTION_KEYBOARD:
                    if (this._keyboard) {
                        const len = action.keys.length;
                        for (let i = 0; i < len; i++) {
                            if (this._keyboard.wasPressed(action.keys[i])) {
                                return true;
                            }
                        }
                    }
                    break;
                case ACTION_MOUSE:
                    if (this._mouse && this._mouse.wasPressed(action.button)) {
                        return true;
                    }
                    break;
                case ACTION_GAMEPAD:
                    if (this._gamepads && this._gamepads.wasPressed(action.pad, action.button)) {
                        return true;
                    }
                    break;
            }
        }
        return false;
    }

    getAxis(name) {
        let value = 0;

        if (this._axes[name]) {
            const len = this._axes[name].length;
            for (let i = 0; i < len; i++) {
                if (type(this._axes[name][i]) === 'function') {
                    const v = this._axes[name][i]();
                    if (Math.abs(v) > Math.abs(value)) {
                        value = v;
                    }
                } else if (this._axesValues[name]) {
                    if (Math.abs(this._axesValues[name][i]) > Math.abs(value)) {
                        value = this._axesValues[name][i];
                    }
                }
            }
        }

        return value;
    }

    _enableMouse() {
        this._mouse = new Mouse();
        if (!this._element) {
            throw new Error('Controller must be attached to an Element');
        }
        this._mouse.attach(this._element);
    }

    _enableKeyboard() {
        this._keyboard = new Keyboard();
        if (!this._element) {
            throw new Error('Controller must be attached to an Element');
        }
        this._keyboard.attach(this._element);
    }
}

export { Controller };


text:
use Search::Kino03::KinoSearch;

1;

__END__

__AUTO_XS__

my $synopsis = <<'END_SYNOPSIS';
    # Query is an abstract base class.
    package MyQuery;
    use base qw( Search::Kino03::KinoSearch::Search::Query );

    sub make_compiler {
        my $self = shift;
        return MyCompiler->new( @_, parent => $self );
    }

    package MyCompiler;
    use base ( Search::Kino03::KinoSearch::Search::Compiler );
    ...
END_SYNOPSIS

my $constructor = <<'END_CONSTRUCTOR_CODE_SAMPLE';
    my $query = MyQuery->SUPER::new(
        boost => 2.5,
    );
END_CONSTRUCTOR_CODE_SAMPLE

{   "Search::Kino03::KinoSearch::Search::Query" => {
        bind_methods => [
            qw( Set_Boost
                Get_Boost
                _make_compiler|Make_Compiler )
        ],
        make_constructors => ["new"],
        make_pod          => {
            synopsis    => $synopsis,
            constructor => { sample => $constructor },
            methods     => [qw( make_compiler set_boost get_boost )],
        },
    }
}

__COPYRIGHT__

Copyright 2005-2009 Marvin Humphrey

This program is free software; you can redistribute it and/or modify
under the same terms as Perl itself.

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Reflection;

namespace Photon
{

    class WrapperGenParameter
    {
        public string Name;
        public string TypeString;
        public string NativeTypeString;

        internal static WrapperGenParameter FromParameterInfo(ParameterInfo pi)
        {
            var genParam = new WrapperGenParameter();
            genParam.Name = pi.Name;

            Type t;
            // out类型, 要转下
            if (pi.ParameterType.IsByRef)
            {
                t = pi.ParameterType.GetElementType();
            }
            else
            {
                t = pi.ParameterType;
            }

            genParam.NativeTypeString = t.Name;

            genParam.TypeString = Convertor.NativeTypeToTypeName(t);

            if (string.IsNullOrEmpty(genParam.TypeString))
            {
                throw new RuntimeException("Unknown parameter type: " + pi.ToString());
            }

            return genParam;
        }
    }

    enum WrapperFuncMode
    {
        PackageFunc,
        ClassMethod,
    }

    class WrapperGenFunc
    {
        public string Name;
        public WrapperFuncMode Mode;
        public List<WrapperGenParameter> InputParameters = new List<WrapperGenParameter>();
        public List<WrapperGenParameter> OutputParameters = new List<WrapperGenParameter>();

        public WrapperGenParameter RetParameter;

    }

    class WrapperGenProperty
    {
        public string Name;
        public string TypeString;
        public bool CanRead;
        public bool CanWrite;
    }

    class WrapperGenClass
    {
        public string Name;
        public string NativePackageName;
        public List<WrapperGenFunc> Methods = new List<WrapperGenFunc>();
        public List<WrapperGenProperty> Properties = new List<WrapperGenProperty>();

        public string FullName
        {
            get { return NativePackageName + "." + Name; }
        }
    }

    class WrapperGenPackage
    {
        public string Name;

        public List<WrapperGenClass> Classes = new List<WrapperGenClass>();

        public List<WrapperGenFunc> PackageFuncs = new List<WrapperGenFunc>();
    }
}


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _lodash = require('lodash/');

var _lodash2 = _interopRequireDefault(_lodash);

var _utilities = require('./../utilities');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var schema = [];

var create = function create(context) {
  var report = function report(node) {
    context.report({
      loc: node.loc,
      message: 'Duplicate property.',
      node
    });
  };

  var analizeElement = function analizeElement(element) {
    var type = element.type;

    var value = void 0;

    switch (type) {
      case 'GenericTypeAnnotation':
        value = element.id.name;
        break;
      case 'ObjectTypeAnnotation':
        // eslint-disable-next-line no-use-before-define
        value = builObjectStructure(element.properties);
        break;
      case 'TupleTypeAnnotation':
        // eslint-disable-next-line no-use-before-define
        value = buildArrayStructure(element.types);
        break;
      default:
        value = element.value;
        break;
    }

    return {
      type,
      value
    };
  };

  var buildArrayStructure = function buildArrayStructure(elements) {
    return _lodash2.default.map(elements, function (element) {
      return analizeElement(element);
    });
  };

  var builObjectStructure = function builObjectStructure(properties) {
    return _lodash2.default.map(properties, function (property) {
      var element = analizeElement(property.value);

      return Object.assign(element, {
        name: (0, _utilities.getParameterName)(property, context)
      });
    });
  };

  var checkForDuplicates = function checkForDuplicates(node) {
    var haystack = [];

    // filter out complex object types, like ObjectTypeSpreadProperty
    var identifierNodes = _lodash2.default.filter(node.properties, { type: 'ObjectTypeProperty' });

    _lodash2.default.forEach(identifierNodes, function (identifierNode) {
      var needle = { name: (0, _utilities.getParameterName)(identifierNode, context) };

      if (identifierNode.value.type === 'FunctionTypeAnnotation') {
        needle.args = _lodash2.default.map(identifierNode.value.params, function (param) {
          return analizeElement(param.typeAnnotation);
        });
      }

      var match = _lodash2.default.some(haystack, function (existingNeedle) {
        return _lodash2.default.isEqual(existingNeedle, needle);
      });

      if (match) {
        report(identifierNode);
      } else {
        haystack.push(needle);
      }
    });
  };

  return {
    ObjectTypeAnnotation: checkForDuplicates
  };
};

exports.default = {
  create,
  schema
};
module.exports = exports['default'];


text:
use std::fmt;
use error::{ Location, Error };

/// Stack trace record.
#[derive(Clone, Debug)]
pub enum TraceEntry {
    /// Trace source file change that caused the error.
    SourceFile { target: String },
    /// Trace operator call that caused the error.
    Operator { target: String, extension: String },
    /// Trace position in last known source that cause the error.
    Position { from: Location },
}

#[derive(Debug, Clone)]
pub enum CastTarget {
    Int,
    Float,
    Number,
}

#[derive(Clone, Debug)]
pub enum CastError {
    /// Float is infinite, target can not be infinite.
    FloatIsInfinite(f64),
    /// Float is not a number, target has to be a number.
    FloatNotANumber(f64),
    /// Float can not be represented, target does not support the range.
    FloatRange(f64),
    /// Null can not be represented.
    Null,
    /// Target can not be created from Array.
    Array,
    /// Target is not be created from Hash.
    Hash,
    /// Target is not be created from Object.
    Object,
    /// Target is not be created from Function.
    Function,
    /// Empty string can not be represented.
    StringEmpty,
    /// String could not be parsed as number.
    StringNotNumerical(String),
}

impl fmt::Display for CastError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            CastError::FloatIsInfinite(v) => write!(f, "Infinite float {:?}", v),
            CastError::FloatNotANumber(v) => write!(f, "Nonnumerical float {:?}", v),
            CastError::FloatRange(v) => write!(f, "Out-of-range float {:?}", v),
            CastError::Null => "Null".fmt(f),
            CastError::Array => "Array".fmt(f),
            CastError::Hash => "Associative array".fmt(f),
            CastError::Object => "Object".fmt(f),
            CastError::Function => "Function".fmt(f),
            CastError::StringEmpty => "Empty string".fmt(f),
            CastError::StringNotNumerical(ref v) => write!(f, "Nonnumerical string {:?}", v),
        }
    }
}

#[derive(Clone, Debug)]
/// Runtime error message.
pub enum RuntimeError {
    /// Callable invoked with argument count that does not match defined count.
    InvalidArgumentCount { defined: usize, given: usize },
    /// Tried to access object property that does not exist.
    ObjectHasNoProperty(String),
    /// Tried to access object method that does not exist.
    ObjectHasNoMethod(String),
    /// Tried to access object property but it was a method.
    ObjectPropertyIsNotMethod(String),
    /// Tried to access object method but it was a property.
    ObjectMethodIsNotProperty(String),
    /// Tried to call object method with wrong argument count.
    ObjectMethodArgumentMismatch { name: String, defined: u16, given: u16 },
    /// Value casting error.
    ImpossibleCast { target: CastTarget, reason: CastError },
}

impl RuntimeError {
    pub fn at(self, stack_trace: Vec<TraceEntry>) -> TracedRuntimeError {
        TracedRuntimeError {
            message: self,
            stack_trace: stack_trace
        }
    }
}

impl fmt::Display for RuntimeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            RuntimeError::InvalidArgumentCount { ref defined, ref given } => {
                write!(f, "Target requires {} arguments, called with {}", defined, given)
            },
            RuntimeError::ObjectHasNoProperty(ref name) => {
                write!(f, "Object has no property {:?}", name)
            },
            RuntimeError::ObjectHasNoMethod(ref name) => {
                write!(f, "Object has no method {:?}", name)
            },
            RuntimeError::ObjectPropertyIsNotMethod(ref name) => {
                write!(f, "Property is not a method {:?}", name)
            },
            RuntimeError::ObjectMethodIsNotProperty(ref name) => {
                write!(f, "Method is not a property {:?}", name)
            },
            RuntimeError::ObjectMethodArgumentMismatch { ref name, ref defined, ref given } => {
                write!(f, "Method {:?} requires {} arguments, called with {}", name, defined, given)
            },
            RuntimeError::ImpossibleCast { ref target, ref reason } => {
                write!(f, "{} is not {}", reason, match *target {
                    CastTarget::Float => "a float",
                    CastTarget::Int => "an integer",
                    CastTarget::Number => "a number",
                })
            }
        }
    }
}

/// Runtime error with stack trace.
#[derive(Clone, Debug)]
pub struct TracedRuntimeError {
    pub message: RuntimeError,
    pub stack_trace: Vec<TraceEntry>,
}

impl TracedRuntimeError {
    pub fn new(message: RuntimeError) -> TracedRuntimeError {
        TracedRuntimeError {
            message: message,
            stack_trace: Vec::new(),
        }
    }
}

impl fmt::Display for TracedRuntimeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{:?}", self.message)
    }
}

impl From<TracedRuntimeError> for Error {
    fn from(inner: TracedRuntimeError) -> Error {
        Error::Runtime(inner)
    }
}


text:
package example;
//-*- mode:java; encoding:utf-8 -*-
// vim:set fileencoding=utf-8:
//@homepage@
import java.awt.*;
import java.awt.geom.*;
import java.util.*;
import java.util.List;
import javax.swing.*;

public final class MainPanel extends JPanel {
    private MainPanel() {
        super();

        add(makeToggleButtonBar(0xff7400, true));
        add(makeToggleButtonBar(0x555555, false));
        add(makeToggleButtonBar(0x006400, true));
        add(makeToggleButtonBar(0x8b0000, false));
        add(makeToggleButtonBar(0x001e43, true));

        setPreferredSize(new Dimension(320, 240));
    }
    private static JRadioButton makeRadioButton(String title) {
        JRadioButton radio = new JRadioButton(title);
        radio.setVerticalAlignment(SwingConstants.CENTER);
        radio.setVerticalTextPosition(SwingConstants.CENTER);
        radio.setHorizontalAlignment(SwingConstants.CENTER);
        radio.setHorizontalTextPosition(SwingConstants.CENTER);
        radio.setBorder(BorderFactory.createEmptyBorder());
        radio.setContentAreaFilled(false);
        radio.setFocusPainted(false);
        //radio.setBackground(new Color(cc));
        radio.setForeground(Color.WHITE);
        return radio;
    }
    private static JPanel makeToggleButtonBar(int cc, boolean round) {
        List<JRadioButton> list = Arrays.asList(
            makeRadioButton("left"),
            makeRadioButton("center"),
            makeRadioButton("right"));
        int size = list.size();
        ButtonGroup bg = new ButtonGroup();
        JPanel p = new JPanel(new GridLayout(1, size, 0, 0));
        Color color = new Color(cc);
        for (int i = 0; i < size; i++) {
            JRadioButton r = list.get(i);
            r.setBackground(color);
            if (round) {
                r.setIcon(new ToggleButtonBarCellIcon());
            } else {
                r.setIcon(new CellIcon());
            }
            bg.add(r);
            p.add(r);
        }
        p.setBorder(BorderFactory.createTitledBorder(String.format("Color: #%06x", cc)));
        return p;
    }
    public static void main(String... args) {
        EventQueue.invokeLater(new Runnable() {
            @Override public void run() {
                createAndShowGUI();
            }
        });
    }
    public static void createAndShowGUI() {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (ClassNotFoundException | InstantiationException
               | IllegalAccessException | UnsupportedLookAndFeelException ex) {
            ex.printStackTrace();
        }
        JFrame frame = new JFrame("@title@");
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.getContentPane().add(new MainPanel());
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
    }
}

class CellIcon implements Icon {
    //http://weboook.blog22.fc2.com/blog-entry-342.html
    //Webpark 2012.11.15
    private static final Color TL = new Color(1f, 1f, 1f, .2f);
    private static final Color BR = new Color(0f, 0f, 0f, .2f);
    private static final Color ST = new Color(1f, 1f, 1f, .4f);
    private static final Color SB = new Color(1f, 1f, 1f, .1f);

    @Override public void paintIcon(Component c, Graphics g, int x, int y) {
        int w = c.getWidth();
        int h = c.getHeight();
        Graphics2D g2 = (Graphics2D) g.create();
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

        g2.setPaint(c.getBackground());
        g2.fillRect(x, y, w, h);

        Color ssc = TL;
        Color bgc = BR;
        if (c instanceof AbstractButton) {
            ButtonModel m = ((AbstractButton) c).getModel();
            if (m.isSelected() || m.isRollover()) {
                ssc = ST;
                bgc = SB;
            }
        }
        g2.setPaint(new GradientPaint(x, y, ssc, x, y + h, bgc, true));
        g2.fillRect(x, y, w, h);

        g2.setPaint(TL);
        g2.fillRect(x, y, 1, h);
        g2.setPaint(BR);
        g2.fillRect(x + w, y, 1, h);

        g2.dispose();
    }
    @Override public int getIconWidth() {
        return 80;
    }
    @Override public int getIconHeight() {
        return 20;
    }
}

class ToggleButtonBarCellIcon implements Icon {
    private static final Color TL = new Color(1f, 1f, 1f, .2f);
    private static final Color BR = new Color(0f, 0f, 0f, .2f);
    private static final Color ST = new Color(1f, 1f, 1f, .4f);
    private static final Color SB = new Color(1f, 1f, 1f, .1f);

    @Override public void paintIcon(Component c, Graphics g, int x, int y) {
        Container parent = c.getParent();
        if (Objects.isNull(parent)) {
            return;
        }
        int r = 8;
        int w = c.getWidth();
        int h = c.getHeight();

        Graphics2D g2 = (Graphics2D) g.create();
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        Path2D.Float p = new Path2D.Float();

        if (c == parent.getComponent(0)) {
            //:first-child
            p.moveTo(x, y + r);
            p.quadTo(x, y, x + r, y);
            p.lineTo(x + w, y);
            p.lineTo(x + w, y + h);
            p.lineTo(x + r, y + h);
            p.quadTo(x, y + h, x, y + h - r);
        } else if (c == parent.getComponent(parent.getComponentCount() - 1)) {
            //:last-child
            p.moveTo(x, y);
            p.lineTo(x + w - r, y);
            p.quadTo(x + w, y, x + w, y + r);
            p.lineTo(x + w, y + h - r);
            p.quadTo(x + w, y + h, x + w - r, y + h);
            p.lineTo(x, y + h);
        } else {
            p.moveTo(x, y);
            p.lineTo(x + w, y);
            p.lineTo(x + w, y + h);
            p.lineTo(x, y + h);
        }
        p.closePath();
        Area area = new Area(p);

        g2.setPaint(c.getBackground());
        g2.fill(area);

        Color ssc = TL;
        Color bgc = BR;
        if (c instanceof AbstractButton) {
            ButtonModel m = ((AbstractButton) c).getModel();
            if (m.isSelected() || m.isRollover()) {
                ssc = ST;
                bgc = SB;
            }
        }
        g2.setPaint(new GradientPaint(x, y, ssc, x, y + h, bgc, true));
        g2.fill(area);

        g2.setPaint(BR);
        g2.draw(area);

        g2.dispose();
    }
    @Override public int getIconWidth() {
        return 80;
    }
    @Override public int getIconHeight() {
        return 20;
    }
}


text:
@extends('master.user')

@section('title')

	<title>k2movie - Remind Two Step Authentication</title>

@stop

@section('content')

Remind Two Step Authentication

			@if(Session::has('flash_notice'))

		    		{{ Session::get('flash_notice') }}

			@endif

			@if($errors->first())

					{{{ $errors->first() }}}

			@endif

			{{ Form::open(['route'=>'user.tsa.remind', 'method'=>'put', 'role'=>'form']) }}

			  	{{ Form::label('email', 'Email') }}
			  	{{ Form::text('email', Input::old('email'), ['class'=>'form-control', 'placeholder'=>'Enter email']) }}

			  {{ Form::submit('Submit', ['class'=>'btn btn-primary']) }}
			  Cancel
			{{ Form::close() }}

@stop


text:
package com.oregonscientific.meep.message.common;

public class MsmReportSystem extends MeepServerMessage {

    private String fingerprint = null;
    private String manufacturer = null;
    private String model = null;
    private String product = null;
    private String incremental = null;
    private String serialno = null;
    private String language = null;
    private String hwaddr = null;

	public MsmReportSystem(String proc, String opcode) {
		super(proc, opcode);
	}

    public String getFingerprint() {
        return fingerprint;
    }

    public void setFingerprint(String fingerprint) {
        this.fingerprint = fingerprint;
    }

    public String getManufacturer() {
        return manufacturer;
    }

    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getProduct() {
        return product;
    }

    public void setProduct(String product) {
        this.product = product;
    }

    public String getIncremental() {
        return incremental;
    }

    public void setIncremental(String incremental) {
        this.incremental = incremental;
    }

    public String getSerialno() {
        return serialno;
    }

    public void setSerialno(String serialno) {
        this.serialno = serialno;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public String getHwaddr() {
        return hwaddr;
    }

    public void setHwaddr(String hwaddr) {
        this.hwaddr = hwaddr;
    }
}


text:
@interface ITCSalesPage : SNDownloadQueue {
}
+ (ITCSalesPage*)defaultQueue;
+ (ITCSalesPage*)queueWithURLString:(NSString*)urlString;
@end


text:
<?php

namespace DOLucas\CatalogBundle\Twig;

class CatalogExtension extends \Twig_Extension
{

    public function getFilters()
    {
        return [
            'bold' => new \Twig_Filter_Method($this, 'bold')
        ];
    }

    public function bold($string)
    {
        return sprintf('<b>%s</b>', $string);
    }

    public function getName()
    {
        return "catalog";
    }
}


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package stallone.mc.sampling;

import stallone.api.doubles.IDoubleArray;
import stallone.util.MathTools;

/**
 *
 * @author noe
 */
public class TransitionMatrixSamplerNonrev extends TransitionMatrixSamplerAbstract
{
        public TransitionMatrixSamplerNonrev(IDoubleArray counts)
    {
        super(counts);
    }

    public TransitionMatrixSamplerNonrev(IDoubleArray counts, IDoubleArray Tinit)
    {
        super(counts,Tinit);
    }

    @Override
    protected boolean step()
    {
	int i=0,j=0;//,k=0;
	do
	    {
		i = MathTools.randomInt(0,T.rows());
		j = MathTools.randomInt(0,T.rows());
	    }
	while (i==j);

	if (T.get(i,j) == 0 && T.get(i,i) == 0)
	    return(false);

	double d = MathTools.randomDouble(-T.get(i,j),T.get(i,i));
	double pacc =
	    Math.pow((T.get(i,j)+d)/T.get(i,j), C.get(i,j)) *
	    Math.pow((T.get(i,i)-d)/T.get(i,i), C.get(i,i));

	if (Math.random() <= pacc)
	    {
		T.set(i,j,T.get(i,j)+d);
		T.set(i,i,T.get(i,i)-d);

		// numerical corrections:
		ensureValidElement(i,j);
		ensureValidElement(i,i);
		if (Math.random() < 0.0001) // do a row rescaling every 10000 steps
		    ensureValidRow(i);
                return(true);
	    }
        return(false);
    }
}


text:
var login;

login = function() {};

$('login-btn').on('click', login);


text:
package org.openehealth.ipf.commons.core.modules.api;

import java.io.IOException;
import java.io.OutputStream;
import java.io.Writer;

import javax.xml.transform.Result;

/**
 * Interface for creating an externalized version of an internal object model.
 *
 * @author Christian Ohr
 *
 * @param <T>
 *            the external representation
 */
public interface Renderer<T> {

    /**
     * Renders the model into its external representation.
     *
     * @param model
     * @param params
     *            dynamic information used during rendering. See the respective
     *            implementation class documentation if this is required or
     *            supported.
     * @return the external representation of the model
     * @throws RenderException
     */
    Result render(final T model, Result result, final Object... params) throws IOException;

    /**
     * Renders the model into its external representation.
     *
     * @param model
     * @param params
     *            dynamic information used during rendering. See the respective
     *            implementation class documentation if this is required or
     *            supported.
     * @return the external representation of the model
     * @throws RenderException
     */
    OutputStream render(final T model, OutputStream result, final Object... params) throws IOException;

    /**
     * Renders the model into its external representation.
     *
     * @param model
     * @param params
     *            dynamic information used during rendering. See the respective
     *            implementation class documentation if this is required or
     *            supported.
     * @return the external representation of the model
     * @throws RenderException
     */
    Writer render(final T model, Writer result, final Object... params) throws IOException;

    /**
     * Renders the model into its external representation.
     *
     * @param model
     * @param params
     *            dynamic information used during rendering. See the respective
     *            implementation class documentation if this is required or
     *            supported.
     * @return the external representation of the model
     * @throws RenderException
     */
    String render(final T model, final Object... params);

}


text:
// Copyright (c) Autofac Project. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using Autofac.Core;
using Autofac.Core.Activators.Reflection;

namespace Autofac.Builder;

/// <summary>
/// Reflection activator data for concrete types.
/// </summary>
public class ConcreteReflectionActivatorData : ReflectionActivatorData, IConcreteActivatorData
{
    /// <summary>
    /// Initializes a new instance of the <see cref="ConcreteReflectionActivatorData"/> class.
    /// </summary>
    /// <param name="implementer">Type that will be activated.</param>
    public ConcreteReflectionActivatorData(Type implementer)
        : base(implementer)
    {
    }

    /// <summary>
    /// Gets the instance activator based on the provided data.
    /// </summary>
    public IInstanceActivator Activator => new ReflectionActivator(
        ImplementationType,
        ConstructorFinder,
        ConstructorSelector,
        ConfiguredParameters,
        ConfiguredProperties);
}


text:
'use strict';

var Pooling = require('generic-pool')
  , Promise = require('../../promise')
  , _ = require('lodash')
  , semver = require('semver')
  , defaultPoolingConfig = {
    max: 5,
    min: 0,
    idle: 10000,
    handleDisconnects: true
  }
  , ConnectionManager;

ConnectionManager = function(dialect, sequelize) {
  var config = _.cloneDeep(sequelize.config);

  this.sequelize = sequelize;
  this.config = config;
  this.dialect = dialect;
  this.versionPromise = null;
  this.dialectName = this.sequelize.options.dialect;

  if (config.pool) {
    config.pool = _.clone(config.pool); // Make sure we don't modify the existing config object (user might re-use it)
    config.pool =_.defaults(config.pool, defaultPoolingConfig, {
      validate: this.$validate.bind(this)
    }) ;
  } else {
    // If the user has turned off pooling we provide a 0/1 pool for backwards compat
    config.pool = _.defaults({
      max: 1,
      min: 0
    }, defaultPoolingConfig, {
      validate: this.$validate.bind(this)
    });
  }

  // Map old names
  if (config.pool.maxIdleTime) config.pool.idle = config.pool.maxIdleTime;
  if (config.pool.maxConnections) config.pool.max = config.pool.maxConnections;
  if (config.pool.minConnections) config.pool.min = config.pool.minConnections;

  this.onProcessExit = this.onProcessExit.bind(this); // Save a reference to the bound version so we can remove it with removeListener
  process.on('exit', this.onProcessExit);
};

ConnectionManager.prototype.refreshTypeParser = function(dataTypes) {
  _.each(dataTypes, function (dataType, key) {
    if (dataType.hasOwnProperty('parse')) {
      var dialectName = this.dialectName;
      if (dialectName === 'mariadb') {
        dialectName = 'mysql';
      }

      if (dataType.types[dialectName]) {
        this.$refreshTypeParser(dataType);
      } else {
        throw new Error('Parse function not supported for type ' + dataType.key + ' in dialect ' + this.dialectName);
      }
    }
  }, this);
};

ConnectionManager.prototype.onProcessExit = function() {
  var self = this;

  if (this.pool) {
    this.pool.drain(function() {
      self.pool.destroyAllNow();
    });
  }
};

ConnectionManager.prototype.close = function () {
  this.onProcessExit();
  process.removeListener('exit', this.onProcessExit); // Remove the listener, so all references to this instance can be garbage collected.

  this.getConnection = function () {
    return Promise.reject(new Error('ConnectionManager.getConnection was called after the connection manager was closed!'));
  };
};

// This cannot happen in the constructor because the user can specify a min. number of connections to have in the pool
// If he does this, generic-pool will try to call connect before the dialect-specific connection manager has been correctly set up
ConnectionManager.prototype.initPools = function () {
  var self = this
    , config = this.config;

  if (!config.replication) {
    this.pool = Pooling.Pool({
      name: 'sequelize-connection',
      create: function(callback) {
        self.$connect(config).nodeify(function (err, connection) {
          callback(err, connection); // For some reason this is needed, else generic-pool things err is a connection or some shit
        });
      },
      destroy: function(connection) {
        self.$disconnect(connection);
        return null;
      },
      max: config.pool.max,
      min: config.pool.min,
      validate: config.pool.validate,
      idleTimeoutMillis: config.pool.idle
    });
    return;
  }

  var reads = 0;

  if (!Array.isArray(config.replication.read)) {
    config.replication.read = [config.replication.read];
  }

  // Map main connection config
  config.replication.write = _.defaults(config.replication.write, {
    host: config.host,
    port: config.port,
    username: config.username,
    password: config.password,
    database: config.database,
    pool: config.pool
  });

  // Apply defaults to each read config
  config.replication.read = _.map(config.replication.read, function(config) {
    return _.defaults(config, {
      host: self.config.host,
      port: self.config.port,
      username: self.config.username,
      password: self.config.password,
      database: self.config.database,
      pool: self.config.pool
    });
  });

  // I'll make my own pool, with blackjack and hookers! (original credit goes to @janzeh)
  this.pool = {
    release: function(client) {
      if (client.queryType === 'read') {
        return self.pool.read.release(client);
      } else {
        return self.pool.write.release(client);
      }
    },
    acquire: function(callback, priority, queryType, useMaster) {
      useMaster = _.isUndefined(useMaster) ? false : useMaster;
      if (queryType === 'SELECT' && !useMaster) {
        self.pool.read.acquire(callback, priority);
      } else {
        self.pool.write.acquire(callback, priority);
      }
    },
    destroy: function(connection) {
      return self.pool[connection.queryType].destroy(connection);
    },
    destroyAllNow: function() {
      self.pool.read.destroyAllNow();
      self.pool.write.destroyAllNow();
    },
    drain: function(cb) {
      self.pool.write.drain(function() {
        self.pool.read.drain(cb);
      });
    },
    read: Pooling.Pool({
      name: 'sequelize-connection-read',
      create: function(callback) {
        // Simple round robin config
        var nextRead = reads++ % config.replication.read.length;
        self.$connect(config.replication.read[nextRead]).tap(function (connection) {
          connection.queryType = 'read';
        }).nodeify(function (err, connection) {
          callback(err, connection); // For some reason this is needed, else generic-pool things err is a connection or some shit
        });
      },
      destroy: function(connection) {
        self.$disconnect(connection);
        return null;
      },
      validate: config.pool.validate,
      max: config.pool.max,
      min: config.pool.min,
      idleTimeoutMillis: config.pool.idle
    }),
    write: Pooling.Pool({
      name: 'sequelize-connection-write',
      create: function(callback) {
        self.$connect(config.replication.write).tap(function (connection) {
          connection.queryType = 'write';
        }).nodeify(function (err, connection) {
          callback(err, connection); // For some reason this is needed, else generic-pool things err is a connection or some shit
        });
      },
      destroy: function(connection) {
        self.$disconnect(connection);
        return null;
      },
      validate: config.pool.validate,
      max: config.pool.max,
      min: config.pool.min,
      idleTimeoutMillis: config.pool.idle
    })
  };
};

ConnectionManager.prototype.getConnection = function(options) {
  var self = this;
  options = options || {};

  var promise;
  if (this.sequelize.options.databaseVersion === 0) {
    if (this.versionPromise) {
      promise = this.versionPromise;
    } else {
      promise = this.versionPromise = self.$connect(self.config.replication.write || self.config).then(function (connection) {
        var _options = {};
        _options.transaction = { connection: connection }; // Cheat .query to use our private connection
        _options.logging = function () {};
        _options.logging.__testLoggingFn = true;

        return self.sequelize.databaseVersion(_options).then(function (version) {
          self.sequelize.options.databaseVersion = semver.valid(version) ? version : self.defaultVersion;

          self.versionPromise = null;

          self.$disconnect(connection);
          return null;
        });
      }).catch(function (err) {
        self.versionPromise = null;
        throw err;
      });
    }
  } else {
    promise = Promise.resolve();
  }

  return promise.then(function () {
    return new Promise(function (resolve, reject) {
      self.pool.acquire(function(err, connection) {
        if (err) return reject(err);
        resolve(connection);
      }, options.priority, options.type, options.useMaster);
    });
  });
};

ConnectionManager.prototype.releaseConnection = function(connection) {
  var self = this;

  return new Promise(function (resolve, reject) {
    self.pool.release(connection);
    resolve();
  });
};

ConnectionManager.prototype.$connect = function(config) {
  return this.dialect.connectionManager.connect(config);
};
ConnectionManager.prototype.$disconnect = function(connection) {
  return this.dialect.connectionManager.disconnect(connection);
};

ConnectionManager.prototype.$validate = function(connection) {
  if (!this.dialect.connectionManager.validate) return Promise.resolve();
  return this.dialect.connectionManager.validate(connection);
};

module.exports = ConnectionManager;


text:
<?php

class Tribe__Events__Asset__Calendar_Script extends Tribe__Events__Asset__Abstract_Asset {

	public function handle() {
		$deps   = array_merge( $this->deps, array( 'jquery' ), Tribe__Events__Template_Factory::get_vendor_scripts() );
		$path   = Tribe__Events__Template_Factory::getMinFile( tribe_events_resource_url( 'tribe-events.js' ), true );
		$handle = $this->prefix . '-calendar-script';
		wp_enqueue_script( $handle, $path, $deps, $this->filter_js_version() );

		$js_config_array = array(
			'permalink_settings' => get_option( 'permalink_structure' ),
			'events_post_type'   => Tribe__Events__Main::POSTTYPE,
			'events_base'        => tribe_get_events_link(),
		);

		/**
		 * Allows for easier filtering of the "Export Events" iCal link URL.
		 *
		 * @since 4.6.5
		 *
		 * @see tribe_get_ical_link
		 * @param boolean $force Defaults to false; when true, the dynamic JS generation of the "Export Events" URL is disabled.
		 */
		if ( apply_filters( 'tribe_events_force_filtered_ical_link', false ) ) {
			$js_config_array['force_filtered_ical_link'] = true;
		}

		wp_localize_script( $handle, 'tribe_js_config', $js_config_array );
	}
}


text:
var Lab = require('lab');
var lab = exports.lab = Lab.script();

var describe = lab.describe;
var it = lab.it;
var expect = Lab.expect;
var isString = require('../is-string');

var not = require('../not');

describe('not', function() {
  it('should inverse a function (and work with array functions)', function (done) {
    expect([true, 1, 'hey'].map(not(isString)))
      .to.eql([true, true, false]);
    done();
  });
});


text:
#ifndef TENSORFLOW_COMPILER_XLA_SERVICE_GRAPHCYCLES_ORDERED_SET_H_
#define TENSORFLOW_COMPILER_XLA_SERVICE_GRAPHCYCLES_ORDERED_SET_H_

#include <vector>

#include "absl/container/flat_hash_map.h"
#include "absl/types/span.h"
#include "tensorflow/core/platform/logging.h"

namespace tensorflow {
// This is a set data structure that provides a deterministic iteration order.
// The iteration order of elements only depends on the sequence of
// inserts/deletes, so as long as the inserts/deletes happen in the same
// sequence, the set will have the same iteration order.
//
// Assumes that T can be cheaply copied for simplicity.
template <typename T>
class OrderedSet {
 public:
  // Inserts `value` into the ordered set.  Returns true if the value was not
  // present in the set before the insertion.
  bool Insert(T value) {
    bool new_insertion =
        value_to_index_.insert({value, value_sequence_.size()}).second;
    if (new_insertion) {
      value_sequence_.push_back(value);
    }
    return new_insertion;
  }

  // Removes `value` from the set.  Assumes `value` is already present in the
  // set.
  void Erase(T value) {
    auto it = value_to_index_.find(value);
    DCHECK(it != value_to_index_.end());

    // Since we don't want to move values around in `value_sequence_` we swap
    // the value in the last position and with value to be deleted and then
    // pop_back.
    value_to_index_[value_sequence_.back()] = it->second;
    std::swap(value_sequence_[it->second], value_sequence_.back());
    value_sequence_.pop_back();
    value_to_index_.erase(it);
  }

  void Reserve(size_t new_size) {
    value_to_index_.reserve(new_size);
    value_sequence_.reserve(new_size);
  }

  void Clear() {
    value_to_index_.clear();
    value_sequence_.clear();
  }

  bool Contains(T value) const { return value_to_index_.contains(value); }
  size_t Size() const { return value_sequence_.size(); }

  absl::Span<T const> GetSequence() const { return value_sequence_; }

 private:
  // The stable order that we maintain through insertions and deletions.
  std::vector<T> value_sequence_;

  // Maps values to their indices in `value_sequence_`.
  absl::flat_hash_map<T, int> value_to_index_;
};
}  // namespace tensorflow

#endif  // TENSORFLOW_COMPILER_XLA_SERVICE_GRAPHCYCLES_ORDERED_SET_H_


text:
r"""A suite of benchmark tasks."""

import abc
from typing import Iterator

import nitroml

class BenchmarkSuite(abc.ABC):
  r"""Defines a collection of BenchmarkTasks."""

  @abc.abstractmethod
  def __iter__(self) -> Iterator[nitroml.BenchmarkTask]:
    """Returns the tasks that compose this suite."""
    pass


text:
import {PolymerElement} from '../deps/@polymer/polymer/polymer-element.js';
import {MessengerMixin} from './arcs-shared.js';
import {html} from '../deps/@polymer/polymer/lib/utils/html-tag.js';

class ArcsConnectionStatus extends MessengerMixin(PolymerElement) {
  static get template() {
    return html`
    <style include="shared-styles">
      :host {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background: rgba(0, 0, 0, .3);
        z-index: 10;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      :host(:not([visible])) {
        display: none;
      }
      [window] {
        background: white;
        padding: 32px;
        box-shadow: var(--drop-shadow);
        position: relative;
        font-size: 14px;
      }
      [buttons] {
        margin-top: 18px;
        text-align: right;
      }
      [buttons] button {
        margin-left: 8px;
      }
      :host(:not([confirmable])) [buttons] {
        display: none;
      }
    </style>
    <div window>
      <div>[[text]]</div>
      <div buttons>
        <button type="button" on-click="onCancel">Cancel</button>
        <button type="button" on-click="onOk" id="ok">OK</button>
      </div>
    </div>
`;
  }

  static get is() { return 'arcs-connection-status'; }

  static get properties() {
    return {
      visible: {
        type: Boolean,
        value: false,
        reflectToAttribute: true
      },
      confirmable: {
        type: Boolean,
        value: false,
        reflectToAttribute: true
      },
      text: String,
      tag: String
    };
  }

  onMessage(msg) {
    switch (msg.messageType) {
      case 'connection-status-waiting':
        return this.notify({text: 'Waiting for Arcs Shell...'});
      case 'connection-status-disconnected':
        return this.notifyDisconnected();
      case 'connection-status-broken':
        return this.notify({text: msg.messageBody});
      case 'connection-status-connected':
        this.notify({text: 'Connected.'});
        setTimeout(() => {
          this.visible = false;
        }, 500);
        return;
      case 'connection-status-heartbeat':
        clearTimeout(this.heartbeatTimeout);
        this.heartbeatTimeout = setTimeout(
          () =>this.notifyDisconnected(), 5000);
        return;
    }
  }

  notifyDisconnected() {
    this.notify({
      text: 'Arcs Shell appears disconnected. Reload and attempt reconnecting?',
      onOk: () => window.location.reload()
    });
  }

  notify({text, onOk}) {
    this.text = text;
    this.visible = true;
    if (onOk) {
      this.confirmable = true;
      this.onOk = onOk;
      this.$.ok.focus();
    } else {
      this.confirmable = false;
    }
  }

  onOk() {
    this.onOk();
    this.onOk = null;
    this.visible = false;
  }

  onCancel() {
    this.visible = false;
  }
}

window.customElements.define(ArcsConnectionStatus.is, ArcsConnectionStatus);


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Schem. di Classif. Sferiacei 236 (1863)

#### Original name
Sphaeria epicalamia Riess, 1854

### Remarks
null


text:
<?php

namespace PowerEcommerce\Pattern\Creational\Singleton {

    /**
     * Class Singleton
     * @package PowerEcommerce\Pattern\Creational\Singleton
     */
    class Singleton
    {
        /**
         * @var \PowerEcommerce\Pattern\Creational\Singleton\Singleton
         */
        private static $_instance;

        private function __construct()
        {
        }

        private function __clone()
        {
        }

        /**
         * @return \PowerEcommerce\Pattern\Creational\Singleton\Singleton
         */
        static function getInstance()
        {
            if (null === static::$_instance) {
                static::$_instance = new static;
            }
            return static::$_instance;
        }
    }
}


text:
class Action :
   def __init__(self) :
      pass

   def perform(self) :
      pass


text:
This repository contains sample solutions designed to demonstrate developing against the AvePoint Citizen Services platform.

Each sample solution is published in a folder prefixed with "CitizenServices-".

Please review the [AvePoint Citizen Services Developer Guide](https://www.avepoint.com/assets/pdf/user_guides/AvePoint_Citizen_Service_Developer_Guide.pdf "AvePoint Citizen Services Developer Guide") for additional instructions.

For more information, see https://www.avepoint.com/citizenservices/ or email citizenservices@avepoint.com


text:
"use strict";
function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(require('./android_sdk'));
__export(require('./appium'));
__export(require('./binary'));
__export(require('./chrome_driver'));
__export(require('./gecko_driver'));
__export(require('./iedriver'));
__export(require('./standalone'));
//# sourceMappingURL=index.js.map


text:
#pragma once

#include <GL/glew.h>
#include <dp/rix/gl/RiXGL.h>
#include <dp/util/Observer.h>

namespace dp
{
  namespace rix
  {
    namespace gl
    {

      class Sampler : public dp::rix::core::Sampler, public dp::util::Subject
      {
      protected:
        Sampler( );

      public:
        ~Sampler();

        static dp::rix::core::SamplerHandle create( );

        void setTexture( TextureGLSharedHandle const & texture );
        TextureGLSharedHandle const & getTexture() const;

        void setSamplerState( SamplerStateGLSharedHandle const & samplerState );
        SamplerStateGLSharedHandle const & getSamplerState() const;

        GLuint64 getBindlessHandle() const;
      private:
        TextureGLSharedHandle      m_texture;
        SamplerStateGLSharedHandle m_samplerState;

        GLuint64                  m_bindlessHandle;
      };

    } // namespace gl
  } // namespace rix
} // namespace dp