text:
"""Module for working with EOS MLAG resources

The Mlag resource provides configuration management of global and interface
MLAG settings on an EOS node.

Parameters:

    config (dict): The global MLAG configuration values

    interfaces (dict): The configured MLAG interfaces

Config Parameters:
    domain_id (str): The domain_id parameter  is parsed from the nodes
        mlag configuration.  The domain id is an alphanumeric string that
        names the MLAG domain

    local_interface (str): The local VLAN interface used as the control
        plane endpoint between MLAG peers.  Valid values include any
        VLAN SVI

    peer_address (str): The IP address of the MLAG peer used to send MLAG
        control traffic.  The peer address must be reachable from the
        local interface.  Valid values include any IPv4 unicast address

    peer_link (str): The physical link that connects the node to its MLAG
        peer.  Valid values for the peer link include layer 2 Ethernet or
        Port-Channel interfaces

    shutdown (bool): The administrative state of the global MLAG process.

Interface Parameters:
    mlag_id (str): The interface mlag parameter parsed from the nodes
        interface configuration.  Valid values for the mlag id are in
        the range of 1 to 2000

"""

import re

from pyeapi.api import Entity

class Mlag(Entity):
    """The Mlag class provides management of the MLAG configuration

    The Mlag class is derived from Entity and provides an API for working
    with the nodes MLAG configuraiton.
    """

    def get(self):
        """Returns the Mlag configuration as a resource dict

        Returns:
            dict: A dict ojbect containing the Mlag resource attributes.
        """
        resource = dict()
        resource.update(self._parse_config())
        resource.update(self._parse_interfaces())

        return resource

    def _parse_config(self):
        """Parses the mlag global configuration

        Returns:
            dict: A dict object that is intended to be merged into the
                resource dict
        """
        config = self.get_block('mlag configuration')
        cfg = dict()
        cfg.update(self._parse_domain_id(config))
        cfg.update(self._parse_local_interface(config))
        cfg.update(self._parse_peer_address(config))
        cfg.update(self._parse_peer_link(config))
        cfg.update(self._parse_shutdown(config))
        return dict(config=cfg)

    def _parse_domain_id(self, config):
        """Scans the config block and parses the domain-id value

        Args:
            config (str): The config block to scan

        Returns:
            dict: A dict object that is intended to be merged into the
                resource dict
        """
        match = re.search(r'domain-id (.+)$', config)
        value = match.group(1) if match else None
        return dict(domain_id=value)

    def _parse_local_interface(self, config):
        """Scans the config block and parses the local-interface value

        Args:
            config (str): The config block to scan

        Returns:
            dict: A dict object that is intended to be merged into the
                resource dict
        """
        match = re.search(r'local-interface (\w+)', config)
        value = match.group(1) if match else None
        return dict(local_interface=value)

    def _parse_peer_address(self, config):
        """Scans the config block and parses the peer-address value

        Args:
            config (str): The config block to scan

        Returns:
            dict: A dict object that is intended to be merged into the
                resource dict
        """
        match = re.search(r'peer-address (\d+\.\d+\.\d+\.\d+)$', config)
        value = match.group(1) if match else None
        return dict(peer_address=value)

    def _parse_peer_link(self, config):
        """Scans the config block and parses the peer-link value

        Args:
            config (str): The config block to scan

        Returns:
            dict: A dict object that is intended to be merged into the
                resource dict
        """
        match = re.search(r'peer-link (\S+)', config)
        value = match.group(1) if match else None
        return dict(peer_link=value)

    def _parse_shutdown(self, config):
        """Scans the config block and parses the shutdown value

        Args:
            config (str): The config block to scan

        Returns:
            dict: A dict object that is intended to be merged into the
                resource dict
        """
        value = 'no shutdown' not in config
        return dict(shutdown=value)

    def _parse_interfaces(self):
        """Scans the global config and returns the configured interfaces

        Returns:
            dict: A dict object that is intended to be merged into the
                resource dict.
        """
        interfaces = dict()
        names = re.findall(r'^interface (Po.+)$', self.config, re.M)
        for name in names:
            config = self.get_block('interface %s' % name)
            match = re.search(r'mlag (\d+)', config)
            if match:
                interfaces[name] = dict(mlag_id=match.group(1))
        return dict(interfaces=interfaces)

    def _configure_mlag(self, string, value, default, disable):
        cfg = self.command_builder(string, value=value, default=default,
                                   disable=disable)
        cmds = ['mlag configuration', cfg]
        return super(Mlag, self).configure(cmds)

    def set_domain_id(self, value=None, default=False, disable=False):
        """Configures the mlag domain-id value

        Args:
            value (str): The value to configure the domain-id
            default (bool): Configures the domain-id using the default keyword
            disable (bool): Negates the domain-id using the no keyword

        Returns:
            bool: Returns True if the commands complete successfully
        """
        return self._configure_mlag('domain-id', value, default, disable)

    def set_local_interface(self, value=None, default=False, disable=False):
        """Configures the mlag local-interface value

        Args:
            value (str): The value to configure the local-interface
            default (bool): Configures the local-interface using the
                default keyword
            disable (bool): Negates the local-interface using the no keyword

        Returns:
            bool: Returns True if the commands complete successfully
        """
        return self._configure_mlag('local-interface', value, default, disable)

    def set_peer_address(self, value=None, default=False, disable=False):
        """Configures the mlag peer-address value

        Args:
            value (str): The value to configure the peer-address
            default (bool): Configures the peer-address using the
                default keyword
            disable (bool): Negates the peer-address using the no keyword

        Returns:
            bool: Returns True if the commands complete successfully
        """
        return self._configure_mlag('peer-address', value, default, disable)

    def set_peer_link(self, value=None, default=False, disable=False):
        """Configures the mlag peer-link value

        Args:
            value (str): The value to configure the peer-link
            default (bool): Configures the peer-link using the
                default keyword
            disable (bool): Negates the peer-link using the no keyword

        Returns:
            bool: Returns True if the commands complete successfully
        """
        return self._configure_mlag('peer-link', value, default, disable)

    def set_shutdown(self, default=False, disable=True):
        """Configures the mlag shutdown value

        Default setting for set_shutdown is disable=True, meaning
        'no shutdown'. Setting both default and disable to False will
        effectively enable shutdown.

        Args:
            default (bool): Configures the shutdown using the
                default keyword
            disable (bool): Negates shutdown using the no keyword

        Returns:
            bool: Returns True if the commands complete successfully
        """
        return self._configure_mlag('shutdown', True, default, disable)

    def set_mlag_id(self, name, value=None, default=False, disable=False):
        """Configures the interface mlag value for the specified interface

        Args:
            name (str): The interface to configure.  Valid values for the
                name arg include Port-Channel*
            value (str): The mlag identifier to cofigure on the interface
            default (bool): Configures the interface mlag value using the
                default keyword
            disable (bool): Negates the interface mlag value using the
                no keyword

        Returns:
            bool: Returns True if the commands complete successfully
        """
        cmd = self.command_builder('mlag', value=value, default=default,
                                   disable=disable)
        return self.configure_interface(name, cmd)

def instance(node):
    """Returns an instance of Mlag

    Args:
        node (Node): The node argument passes an instance of Node to the
            resource

    Returns:
        object: An instance of Mlag
    """
    return Mlag(node)


text:
#include <tuple>

#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
#include "test/warp_filter_test_util.h"
using libaom_test::ACMRandom;
#if CONFIG_AV1_HIGHBITDEPTH
using libaom_test::AV1HighbdWarpFilter::AV1HighbdWarpFilterTest;
#endif
using libaom_test::AV1WarpFilter::AV1WarpFilterTest;
using std::make_tuple;
using std::tuple;

namespace {

TEST_P(AV1WarpFilterTest, CheckOutput) {
  RunCheckOutput(std::get<3>(GET_PARAM(0)));
}
TEST_P(AV1WarpFilterTest, DISABLED_Speed) {
  RunSpeedTest(std::get<3>(GET_PARAM(0)));
}

INSTANTIATE_TEST_SUITE_P(
    C, AV1WarpFilterTest,
    libaom_test::AV1WarpFilter::BuildParams(av1_warp_affine_c));

#if HAVE_SSE4_1
INSTANTIATE_TEST_SUITE_P(
    SSE4_1, AV1WarpFilterTest,
    libaom_test::AV1WarpFilter::BuildParams(av1_warp_affine_sse4_1));

#if CONFIG_AV1_HIGHBITDEPTH
TEST_P(AV1HighbdWarpFilterTest, CheckOutput) {
  RunCheckOutput(std::get<4>(GET_PARAM(0)));
}
TEST_P(AV1HighbdWarpFilterTest, DISABLED_Speed) {
  RunSpeedTest(std::get<4>(GET_PARAM(0)));
}

INSTANTIATE_TEST_SUITE_P(SSE4_1, AV1HighbdWarpFilterTest,
                         libaom_test::AV1HighbdWarpFilter::BuildParams(
                             av1_highbd_warp_affine_sse4_1));
#endif  // CONFIG_AV1_HIGHBITDEPTH
#endif  // HAVE_SSE4_1

#if HAVE_AVX2
INSTANTIATE_TEST_SUITE_P(
    AVX2, AV1WarpFilterTest,
    libaom_test::AV1WarpFilter::BuildParams(av1_warp_affine_avx2));
#endif  // HAVE_AVX2

#if HAVE_NEON
INSTANTIATE_TEST_SUITE_P(
    NEON, AV1WarpFilterTest,
    libaom_test::AV1WarpFilter::BuildParams(av1_warp_affine_neon));
#endif  // HAVE_NEON

}  // namespace

redpajama_set_name: RedPajamaGithub


text:
'use strict';

function _events() {
  const data = require('events');

  _events = function () {
    return data;
  };

  return data;
}

function path() {
  const data = _interopRequireWildcard(require('path'));

  path = function () {
    return data;
  };

  return data;
}

function _anymatch() {
  const data = _interopRequireDefault(require('anymatch'));

  _anymatch = function () {
    return data;
  };

  return data;
}

function fs() {
  const data = _interopRequireWildcard(require('graceful-fs'));

  fs = function () {
    return data;
  };

  return data;
}

function _micromatch() {
  const data = _interopRequireDefault(require('micromatch'));

  _micromatch = function () {
    return data;
  };

  return data;
}

function _walker() {
  const data = _interopRequireDefault(require('walker'));

  _walker = function () {
    return data;
  };

  return data;
}

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

function _getRequireWildcardCache(nodeInterop) {
  if (typeof WeakMap !== 'function') return null;
  var cacheBabelInterop = new WeakMap();
  var cacheNodeInterop = new WeakMap();
  return (_getRequireWildcardCache = function (nodeInterop) {
    return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
  })(nodeInterop);
}

function _interopRequireWildcard(obj, nodeInterop) {
  if (!nodeInterop && obj && obj.__esModule) {
    return obj;
  }
  if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
    return {default: obj};
  }
  var cache = _getRequireWildcardCache(nodeInterop);
  if (cache && cache.has(obj)) {
    return cache.get(obj);
  }
  var newObj = {};
  var hasPropertyDescriptor =
    Object.defineProperty && Object.getOwnPropertyDescriptor;
  for (var key in obj) {
    if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) {
      var desc = hasPropertyDescriptor
        ? Object.getOwnPropertyDescriptor(obj, key)
        : null;
      if (desc && (desc.get || desc.set)) {
        Object.defineProperty(newObj, key, desc);
      } else {
        newObj[key] = obj[key];
      }
    }
  }
  newObj.default = obj;
  if (cache) {
    cache.set(obj, newObj);
  }
  return newObj;
}

function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }
  return obj;
}

// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
// @ts-ignore: this is for CI which runs linux and might not have this
let fsevents = null;

try {
  fsevents = require('fsevents');
} catch {
  // Optional dependency, only supported on Darwin.
}

const CHANGE_EVENT = 'change';
const DELETE_EVENT = 'delete';
const ADD_EVENT = 'add';
const ALL_EVENT = 'all';

/**
 * Export `FSEventsWatcher` class.
 * Watches `dir`.
 */
class FSEventsWatcher extends _events().EventEmitter {
  static isSupported() {
    return fsevents !== null;
  }

  static normalizeProxy(callback) {
    return (filepath, stats) => callback(path().normalize(filepath), stats);
  }

  static recReaddir(
    dir,
    dirCallback,
    fileCallback,
    endCallback,
    errorCallback,
    ignored
  ) {
    (0, _walker().default)(dir)
      .filterDir(
        currentDir => !ignored || !(0, _anymatch().default)(ignored, currentDir)
      )
      .on('dir', FSEventsWatcher.normalizeProxy(dirCallback))
      .on('file', FSEventsWatcher.normalizeProxy(fileCallback))
      .on('error', errorCallback)
      .on('end', () => {
        endCallback();
      });
  }

  constructor(dir, opts) {
    if (!fsevents) {
      throw new Error(
        '`fsevents` unavailable (this watcher can only be used on Darwin)'
      );
    }

    super();

    _defineProperty(this, 'root', void 0);

    _defineProperty(this, 'ignored', void 0);

    _defineProperty(this, 'glob', void 0);

    _defineProperty(this, 'dot', void 0);

    _defineProperty(this, 'hasIgnore', void 0);

    _defineProperty(this, 'doIgnore', void 0);

    _defineProperty(this, 'fsEventsWatchStopper', void 0);

    _defineProperty(this, '_tracked', void 0);

    this.dot = opts.dot || false;
    this.ignored = opts.ignored;
    this.glob = Array.isArray(opts.glob) ? opts.glob : [opts.glob];
    this.hasIgnore =
      Boolean(opts.ignored) && !(Array.isArray(opts) && opts.length > 0);
    this.doIgnore = opts.ignored
      ? (0, _anymatch().default)(opts.ignored)
      : () => false;
    this.root = path().resolve(dir);
    this.fsEventsWatchStopper = fsevents.watch(
      this.root,
      this.handleEvent.bind(this)
    );
    this._tracked = new Set();
    FSEventsWatcher.recReaddir(
      this.root,
      filepath => {
        this._tracked.add(filepath);
      },
      filepath => {
        this._tracked.add(filepath);
      },
      this.emit.bind(this, 'ready'),
      this.emit.bind(this, 'error'),
      this.ignored
    );
  }
  /**
   * End watching.
   */

  async close(callback) {
    await this.fsEventsWatchStopper();
    this.removeAllListeners();

    if (typeof callback === 'function') {
      process.nextTick(callback.bind(null, null, true));
    }
  }

  isFileIncluded(relativePath) {
    if (this.doIgnore(relativePath)) {
      return false;
    }

    return this.glob.length
      ? (0, _micromatch().default)([relativePath], this.glob, {
          dot: this.dot
        }).length > 0
      : this.dot ||
          (0, _micromatch().default)([relativePath], '**/*').length > 0;
  }

  handleEvent(filepath) {
    const relativePath = path().relative(this.root, filepath);

    if (!this.isFileIncluded(relativePath)) {
      return;
    }

    fs().lstat(filepath, (error, stat) => {
      if (error && error.code !== 'ENOENT') {
        this.emit('error', error);
        return;
      }

      if (error) {
        // Ignore files that aren't tracked and don't exist.
        if (!this._tracked.has(filepath)) {
          return;
        }

        this._emit(DELETE_EVENT, relativePath);

        this._tracked.delete(filepath);

        return;
      }

      if (this._tracked.has(filepath)) {
        this._emit(CHANGE_EVENT, relativePath, stat);
      } else {
        this._tracked.add(filepath);

        this._emit(ADD_EVENT, relativePath, stat);
      }
    });
  }
  /**
   * Emit events.
   */

  _emit(type, file, stat) {
    this.emit(type, file, this.root, stat);
    this.emit(ALL_EVENT, type, file, this.root, stat);
  }
}

module.exports = FSEventsWatcher;


text:
Dado(/^tengo mi usuario registrado$/) do
  step %{existe un Usuario: "shinjiikari", "shinji@ikari.com.ar", "neogenesis" y "1"}
end

Dado(/^completo mi email y contraseña$/) do
  visit '/users/sign_out'
  visit '/users/sign_in'
  # Esto es para evitar el Ambiguous match
  fill_in("Correo electrónico", with: "shinji@ikari.com.ar", :match => :prefer_exact)
  fill_in("Clave", with: "neogenesis", :match => :prefer_exact)
  # save_and_open_page
end


text:
from draftHost.models import NflPosition, FantasyPosition

# path relative to manage.py
NFL_DATA_FILE = "draftHost/data/nfl_positions.txt"
FANTASY_DATA_FILE = "draftHost/data/fantasy_positions.txt"

class PositionImporter(object):
    def add_positions(self):
        try:
            data = open(NFL_DATA_FILE, 'r')
            for line in data:
                parts = line.rstrip().split(',')
                position, created = NflPosition.objects.get_or_create(**{
                    'id': parts[0],
                    'description': parts[1],
                    'abbreviation': parts[2],
                })
                if created:
                    print "added {p}".format(p=position)
            data.close()
        except IOError, e:
            print "got error {e}".format(e=e)

    def add_fantasy_positions(self):
        try:
            data = open(FANTASY_DATA_FILE, 'r')
            for line in data:
                abbrev = line.rstrip()
                position = self.find_match(abbrev)

                fantasy, created = FantasyPosition.objects.get_or_create(
                    position=position
                )
                if created:
                    print "created {f}".format(f=fantasy)
            data.close()
        except IOError, e:
            print "got error {e}".format(e=e)

    def find_match(self, abbreviation):
        return NflPosition.objects.filter(abbreviation=abbreviation)[0]


text:
require File.dirname(__FILE__) + '/spec_helper'

describe "newrelic" do
  it "should do nothing" do
    true.should == true
  end
end


text:
#pragma once

#include <memory>

#include <android/asset_manager.h>
#include <cxxreact/JSModulesUnbundle.h>

namespace facebook {
namespace react {

class JniJSModulesUnbundle : public JSModulesUnbundle {
  /**
   * This implementation reads modules as single file from the assets of an apk.
   */
 public:
  JniJSModulesUnbundle() = default;
  JniJSModulesUnbundle(
      AAssetManager *assetManager,
      const std::string &moduleDirectory);
  JniJSModulesUnbundle(JniJSModulesUnbundle &&other) = delete;
  JniJSModulesUnbundle &operator=(JSModulesUnbundle &&other) = delete;

  static std::unique_ptr<JniJSModulesUnbundle> fromEntryFile(
      AAssetManager *assetManager,
      const std::string &entryFile);

  static bool isUnbundle(
      AAssetManager *assetManager,
      const std::string &assetName);
  virtual Module getModule(uint32_t moduleId) const override;

 private:
  AAssetManager *m_assetManager = nullptr;
  std::string m_moduleDirectory;
};

} // namespace react
} // namespace facebook


text:
package org.hammerlab.bam.check.eager

import java.io.{ EOFException, IOException }

import org.apache.spark.broadcast.Broadcast
import org.hammerlab.bam.check
import org.hammerlab.bam.check.Checker.{ MAX_CIGAR_OP, MakeChecker, allowedReadNameChars }
import org.hammerlab.bam.check.{ MaxReadSize, PosChecker, ReadStartFinder, ReadsToCheck, SuccessfulReads }
import org.hammerlab.bam.header.ContigLengths
import org.hammerlab.bgzf.Pos
import org.hammerlab.bgzf.block.SeekableUncompressedBytes
import org.hammerlab.channel.{ CachingChannel, SeekableByteChannel }

/**
 * [[check.Checker]] implementation that emits a [[Boolean]] at each [[org.hammerlab.bgzf.Pos]] indicating whether it is
 * a read-record boundary.
 */
case class Checker(uncompressedStream: SeekableUncompressedBytes,
                   contigLengths: ContigLengths,
                   readsToCheck: ReadsToCheck)
  extends PosChecker[Boolean]
    with ReadStartFinder {

  override protected def apply(startPos: Long)(
      implicit
      successfulReads: SuccessfulReads
  ): Boolean = {

    if (successfulReads.n == readsToCheck.n)
      return true

    buf.position(0)
    try {
      uncompressedBytes.readFully(buf)
    } catch {
      case _: EOFException
        if uncompressedBytes.position() == startPos &&
        successfulReads.n > 0 ⇒
        return true
      case _: IOException ⇒
        return false
    }

    buf.position(0)
    val remainingBytes = buf.getInt

    val nextOffset = startPos + 4 + remainingBytes

    if (getRefPosError().isDefined)
      return false

    val readNameLength = buf.getInt & 0xff
    readNameLength match {
      case 0 | 1 ⇒
        return false
      case _ ⇒
    }

    val flagsAndNumCigarOps = buf.getInt

    val flags = flagsAndNumCigarOps >>> 16

    val numCigarOps = flagsAndNumCigarOps & 0xffff
    val numCigarBytes = 4 * numCigarOps

    val seqLen = buf.getInt

    if ((flags & 4) == 0 && (seqLen == 0 || numCigarOps == 0))
      return false

    val numSeqAndQualBytes = (seqLen + 1) / 2 + seqLen

    if(remainingBytes < 32 + readNameLength + numCigarBytes + numSeqAndQualBytes)
      return false

    if (getRefPosError().isDefined)
      return false

    buf.getInt  // unused: template length

    try {
      readNameBuffer.position(0)
      readNameBuffer.limit(readNameLength)
      uncompressedBytes.readFully(readNameBuffer)
      val readNameBytes = readNameBuffer.array().view.slice(0, readNameLength)

      if (readNameBytes.last != 0)
        return false
      else if (
        readNameBytes
          .view
          .slice(0, readNameLength - 1)
          .exists(byte ⇒ !allowedReadNameChars(byte.toChar))
      )
        return false

      try {
        if (
          (0 until numCigarOps)
            .exists {
              _ ⇒
                (uncompressedBytes.getInt & 0xf) > MAX_CIGAR_OP
            }
        )
          return false
      } catch {
        case _: IOException ⇒
          return false
      }

    } catch {
      case _: IOException ⇒
        return false
    }

    val bytesToSkip = nextOffset - uncompressedBytes.position()

    if (bytesToSkip > 0)
      uncompressedBytes.skip(bytesToSkip)

    apply(
      nextOffset
    )(
      successfulReads.n + 1
    )
  }

  override def nextReadStart(start: Pos)(
      implicit
      maxReadSize: MaxReadSize
  ): Option[Pos] =
    nextReadStartWithDelta(start).map(_._1)

  def nextReadStartWithDelta(start: Pos)(
      implicit
      maxReadSize: MaxReadSize
  ): Option[(Pos, Int)] = {

    uncompressedStream.seek(start)

    var idx = 0
    while (idx < maxReadSize.n) {
      uncompressedStream.curPos match {
        case Some(pos) ⇒
          if (apply(pos)) {
            return Some(pos → idx)
          }

          uncompressedStream.seek(pos)  // go back to this failed position

          if (!uncompressedStream.hasNext)
            return None

          uncompressedStream.next()     // move over by 1 byte
        case None ⇒
          return None
      }
      idx += 1
    }

    None
  }
}

object Checker {
  implicit def makeChecker(implicit
                           contigLengths: Broadcast[ContigLengths],
                           readsToCheck: ReadsToCheck): MakeChecker[Boolean, Checker] =
    new MakeChecker[Boolean, Checker] {
      override def apply(ch: CachingChannel[SeekableByteChannel]): Checker =
        Checker(
          SeekableUncompressedBytes(ch),
          contigLengths.value,
          readsToCheck
        )
    }
}


text:
<?xml version="1.0"?>

<!DOCTYPE project [
    <!ENTITY common SYSTEM "file:../common/ant.common.xml">
]>

<project name="Numerics" default="build" basedir=".">

    <target name="init" depends="org.oobench.common.init">
        <property name="package.root" value="../../.."/>
    </target>

    &common;

</project>


text:
<?xml version="1.0"?>

<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd">

	<info organisation="jasig" module="cas-client-core" revision="3.0">
		<description homepage="http://www.ja-sig.org/products/cas/">CAS is an authentication system
			originally created by Yale University to provide a trusted way for an application to
			authenticate a user. This project is the Java client for CAS></description>
	</info>

	<configurations>
		<!-- Public Configurations-->
		<conf name="default" visibility="public"/>
	</configurations>

	<publications>
		<artifact name="cas-client-core" type="jar"/>
		<artifact name="cas-client-uportal" type="jar"/>
	</publications>

	<dependencies>
		<dependency rev="3.0.5" org="jasig" name="cas-server"/>

		<dependency rev="1.0" org="aopalliance" name="aopalliance"/>

		<dependency rev="1.2" org="apache" name="commons-codec"/>
		<dependency rev="3.0.1" org="apache" name="jarkarta-commons-httpclient"/>
		<dependency rev="3.0" org="apache" name="jarkarta-commons-httpclient-contrib"/>
		<dependency rev="1.1" org="apache" name="commons-logging"/>

		<dependency rev="2.0" org="springframework" name="spring"
			conf="default->aop,beans,context,core,web"/>
	</dependencies>
</ivy-module>


text:
using System;
using System.Xml.Serialization;

namespace EZOper.NetSiteUtilities.AopApi
{
    /// <summary>
    /// ModelColumn Data Structure.
    /// </summary>
    [Serializable]
    public class ModelColumn : AopObject
    {
        /// <summary>
        /// 列别名
        /// </summary>
        [XmlElement("alias")]
        public string Alias { get; set; }

        /// <summary>
        /// 列值
        /// </summary>
        [XmlElement("data")]
        public string Data { get; set; }
    }
}


text:
typedef enum { false, true } bool;
typedef enum { E_DOES_NOT_EXIST } StatusCode;

typedef struct {
  int hex;
} GColor;

GColor GColorFromHEX(const int hex);
int persist_write_data(const uint32_t key, const void * data, const size_t size);
bool persist_exists(const uint32_t key);
int persist_read_data(const uint32_t key, void * buffer, const size_t buffer_size);


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta name="author" content="Oleh Zasadnyy, GDG Lviv">
    <meta name="description" content="O JSday é um evento imersivo focado em Javascript e tudo o que essa linguagem tem a oferecer">
    <meta name="keywords" content="event, javascript, js, angularjs, google maps, ionic, firebase, aplicativos híbridos, nodebots">
    <meta name="google-site-verification" content="b9imDOrFawXaBXCC4r3uJDdswSYcalD-wWpMYhFq-no" />
    <link rel="canonical" href="http://jsday.com.br">

    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="@jsdayrecife">
    <meta name="twitter:title" content="Don't be a jerk policy">
    <meta name="twitter:description" content="O JSday é um evento imersivo focado em Javascript e tudo o que essa linguagem tem a oferecer">
    <meta name="twitter:image:src" content="http://jsday.com.br/img/seo/sharing-twitter.png">

    <meta property="og:title" content="Don't be a jerk policy" />
    <meta property="og:site_name" content="JSDay Recife 2015" />
    <meta property="og:type" content="website" />
    <meta property="og:url" content="http://jsday.com.br" />
    <meta property="og:image" content="http://jsday.com.br/img/seo/sharing-facebook.png" />
    <meta property="og:description" content="O JSday é um evento imersivo focado em Javascript e tudo o que essa linguagem tem a oferecer" />

    <title>Don't be a jerk policy • JSDay Recife 2015</title>
    <link rel="shortcut icon" href="/img/favicons/favicon.ico">
    <link rel="apple-touch-icon" sizes="152x152" href="/img/favicons/apple-touch-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="144x144" href="/img/favicons/apple-touch-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/img/favicons/apple-touch-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/img/favicons/apple-touch-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/img/favicons/apple-touch-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/img/favicons/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="60x60" href="/img/favicons/apple-touch-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="57x57" href="/img/favicons/apple-touch-icon-57x57.png">
    <link rel="icon" type="image/png" href="/img/favicons/favicon-196x196.png">
    <link rel="icon" type="image/png" href="/img/favicons/favicon-160x160.png">
    <link rel="icon" type="image/png" href="/img/favicons/favicon-96x96.png">
    <link rel="icon" type="image/png" href="/img/favicons/favicon-32x32.png">
    <link rel="icon" type="image/png" href="/img/favicons/favicon-16x16.png">
    <meta name="msapplication-TileColor" content="#2b5797">
    <meta name="msapplication-TileImage" content="/img/favicons/mstile-144x144.png">
    <meta name="msapplication-config" content="/img/favicons/browserconfig.xml">

    <meta name="theme-color" content="#2b5797">

    <link href="/css/main.css" rel="stylesheet">

    <svg id="menu-trigger" class="menu-trigger icon icon-menu visible-xs" viewBox="0 0 32 32">
        <use xlink:href="/img/sprites/sprites.svg#icon-menu"></use>
    </svg>

                Home

                JS Experts

                WTM JavaScript Codelab

                Inscreva-se <3

            Inscreva-se <3

Don't be a jerk policy

This "Don't be a jerk" policy is a shortened, more casual version of the longer Code of Conduct policy. Read full version.

GDG Lviv prides itself on being an open, respectful, and inclusive community. That means jerky behavior isn't allowed at GDG meetings. Because we know that it's not obvious to everyone, here's a reminder of the things we don't allow: jokes or offensive comments about sex/sexuality/race/religion/nationality/body size, showing porn in public, touching people uninvited, or continuing to interact with someone after they've asked you to stop. Continuous jerky behavior may result in getting expelled from the meeting or GDG Chapter.

If someone is bothering you, please tell GDG Organizers immediately and they will take care of it. We want to maintain GDG DevFest's awesomeness.

Contacts:

Vitaliy Zasadnyy, +38 063 863 20 62, vitaliy.zasadnyy@gdg.org.ua

Links

CESAR.EDU

CESAR

Caravana Web

Robolivre.org

Women Techmakers

Contato

jsdayrecife@gmail.com

FAQ

Código de Conduta

						<svg class="icon icon-twitter" viewBox="0 0 30 32">
							<use xlink:href="/img/sprites/sprites.svg#icon-twitter"></use>
						</svg>

				© 2014 Based on Project Zeppelin. Designed and created by Oleh Zasadnyy · GDG Lviv


text:
module Forem
  module ApplicationHelper
    def forem_markdown(text, *options)
      text = sanitize(text) unless text.html_safe? || options.delete(:safe)
      (text.blank? ? "" : RDiscount.new(text).to_html).html_safe
    end

    def forem_theme_tag
      stylesheet_link_tag("forem/#{Forem::Engine.theme}/style.css")
    end
  end
end


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Mem. Torrey bot. Club 12: 133 (1906)

#### Original name
Steccherinum adustulum Banker

### Remarks
null


text:
package test.org.datolite;

public class FailedExpectException extends RuntimeException {

  public static FailedExpectException from(Object value, Object expected) {
    StringBuilder builder = new StringBuilder();
    builder.append("expected \n'");
    builder.append(expected);
    builder.append("'\n but received \n'");
    builder.append(value);
    builder.append("'");

    String message = builder.toString();
    System.out.println(message);
    return new FailedExpectException(message);
  }

  public static void expect(Object value, Object expected) {
    if (value.equals(expected)) {
      return;
    }
    throw FailedExpectException.from(value, expected);
  }

  public static void expect(Object value) {
    if (value.equals(true)) {
      return;
    }
    String msg = value.toString() + " did no match 'true'";
    System.out.println(msg);
    throw new FailedExpectException(msg);
  }

  public static void forbid(Object value, Object bad) {
    if (!value.equals(bad)) {
      return;
    }

    StringBuilder builder = new StringBuilder();
    builder.append("'");
    builder.append(value);
    builder.append("'\n can not be \n'");
    builder.append(bad);
    builder.append("'");

    String message = builder.toString();
    System.out.println(message);
    throw new FailedExpectException(message);
  }

  public FailedExpectException(String msg) {
    super(msg);
  }

}


text:
package astilectron

import (
	"context"
	"fmt"
	stdUrl "net/url"
	"path/filepath"
	"sync"

	"github.com/asticode/go-astikit"
)

// Window event names
const (
	EventNameWebContentsEventLogin                    = "web.contents.event.login"
	EventNameWebContentsEventLoginCallback            = "web.contents.event.login.callback"
	EventNameWindowCmdBlur                            = "window.cmd.blur"
	EventNameWindowCmdCenter                          = "window.cmd.center"
	EventNameWindowCmdClose                           = "window.cmd.close"
	EventNameWindowCmdCreate                          = "window.cmd.create"
	EventNameWindowCmdDestroy                         = "window.cmd.destroy"
	EventNameWindowCmdFocus                           = "window.cmd.focus"
	EventNameWindowCmdHide                            = "window.cmd.hide"
	EventNameWindowCmdLog                             = "window.cmd.log"
	EventNameWindowCmdMaximize                        = "window.cmd.maximize"
	eventNameWindowCmdMessage                         = "window.cmd.message"
	eventNameWindowCmdMessageCallback                 = "window.cmd.message.callback"
	EventNameWindowCmdMinimize                        = "window.cmd.minimize"
	EventNameWindowCmdMove                            = "window.cmd.move"
	EventNameWindowCmdMoveTop                         = "window.cmd.move.top"
	EventNameWindowCmdResize                          = "window.cmd.resize"
	EventNameWindowCmdResizeContent                   = "window.cmd.resize.content"
	EventNameWindowCmdSetBounds                       = "window.cmd.set.bounds"
	EventNameWindowCmdRestore                         = "window.cmd.restore"
	EventNameWindowCmdSetContentProtection            = "window.cmd.set.content.protection"
	EventNameWindowCmdShow                            = "window.cmd.show"
	EventNameWindowCmdUnmaximize                      = "window.cmd.unmaximize"
	EventNameWindowCmdUpdateCustomOptions             = "window.cmd.update.custom.options"
	EventNameWindowCmdWebContentsCloseDevTools        = "window.cmd.web.contents.close.dev.tools"
	EventNameWindowCmdWebContentsOpenDevTools         = "window.cmd.web.contents.open.dev.tools"
	EventNameWindowCmdWebContentsExecuteJavaScript    = "window.cmd.web.contents.execute.javascript"
	EventNameWindowCmdSetAlwaysOnTop                  = "window.cmd.set.always.on.top"
	EventNameWindowCmdSetFullScreen                   = "window.cmd.set.full.screen"
	EventNameWindowEventBlur                          = "window.event.blur"
	EventNameWindowEventClosed                        = "window.event.closed"
	EventNameWindowEventContentProtectionSet          = "window.event.content.protection.set"
	EventNameWindowEventDidFinishLoad                 = "window.event.did.finish.load"
	EventNameWindowEventEnterFullScreen               = "window.event.enter.full.screen"
	EventNameWindowEventFocus                         = "window.event.focus"
	EventNameWindowEventHide                          = "window.event.hide"
	EventNameWindowEventLeaveFullScreen               = "window.event.leave.full.screen"
	EventNameWindowEventMaximize                      = "window.event.maximize"
	eventNameWindowEventMessage                       = "window.event.message"
	eventNameWindowEventMessageCallback               = "window.event.message.callback"
	EventNameWindowEventMinimize                      = "window.event.minimize"
	EventNameWindowEventMove                          = "window.event.move"
	EventNameWindowEventMoved                         = "window.event.moved"
	EventNameWindowEventMovedTop                      = "window.event.moved.top"
	EventNameWindowEventReadyToShow                   = "window.event.ready.to.show"
	EventNameWindowEventResize                        = "window.event.resize"
	EventNameWindowEventResizeContent                 = "window.event.resize.content"
	EventNameWindowEventRestore                       = "window.event.restore"
	EventNameWindowEventShow                          = "window.event.show"
	EventNameWindowEventUnmaximize                    = "window.event.unmaximize"
	EventNameWindowEventUnresponsive                  = "window.event.unresponsive"
	EventNameWindowEventDidGetRedirectRequest         = "window.event.did.get.redirect.request"
	EventNameWindowEventWebContentsExecutedJavaScript = "window.event.web.contents.executed.javascript"
	EventNameWindowEventWillMove                      = "window.event.will.move"
	EventNameWindowEventWillNavigate                  = "window.event.will.navigate"
	EventNameWindowEventUpdatedCustomOptions          = "window.event.updated.custom.options"
	EventNameWindowEventAlwaysOnTopChanged            = "window.event.always.on.top.changed"
)

// Title bar styles
var (
	TitleBarStyleDefault     = astikit.StrPtr("default")
	TitleBarStyleHidden      = astikit.StrPtr("hidden")
	TitleBarStyleHiddenInset = astikit.StrPtr("hidden-inset")
)

// Window represents a window
// TODO Add missing window options
// TODO Add missing window methods
// TODO Add missing window events
type Window struct {
	*object
	callbackIdentifier *identifier
	l                  astikit.SeverityLogger
	m                  sync.Mutex // Locks o
	o                  *WindowOptions
	onMessageOnce      sync.Once
	Session            *Session
	url                *stdUrl.URL
}

// WindowOptions represents window options
// We must use pointers since GO doesn't handle optional fields whereas NodeJS does. Use astikit.BoolPtr, astikit.IntPtr or astikit.StrPtr
// to fill the struct
// https://github.com/electron/electron/blob/v1.8.1/docs/api/browser-window.md
type WindowOptions struct {
	AcceptFirstMouse       *bool                 `json:"acceptFirstMouse,omitempty"`
	AlwaysOnTop            *bool                 `json:"alwaysOnTop,omitempty"`
	AutoHideMenuBar        *bool                 `json:"autoHideMenuBar,omitempty"`
	BackgroundColor        *string               `json:"backgroundColor,omitempty"`
	Center                 *bool                 `json:"center,omitempty"`
	Closable               *bool                 `json:"closable,omitempty"`
	DisableAutoHideCursor  *bool                 `json:"disableAutoHideCursor,omitempty"`
	EnableLargerThanScreen *bool                 `json:"enableLargerThanScreen,omitempty"`
	Focusable              *bool                 `json:"focusable,omitempty"`
	Frame                  *bool                 `json:"frame,omitempty"`
	Fullscreen             *bool                 `json:"fullscreen,omitempty"`
	Fullscreenable         *bool                 `json:"fullscreenable,omitempty"`
	HasShadow              *bool                 `json:"hasShadow,omitempty"`
	Height                 *int                  `json:"height,omitempty"`
	Icon                   *string               `json:"icon,omitempty"`
	Kiosk                  *bool                 `json:"kiosk,omitempty"`
	MaxHeight              *int                  `json:"maxHeight,omitempty"`
	Maximizable            *bool                 `json:"maximizable,omitempty"`
	MaxWidth               *int                  `json:"maxWidth,omitempty"`
	MinHeight              *int                  `json:"minHeight,omitempty"`
	Minimizable            *bool                 `json:"minimizable,omitempty"`
	MinWidth               *int                  `json:"minWidth,omitempty"`
	Modal                  *bool                 `json:"modal,omitempty"`
	Movable                *bool                 `json:"movable,omitempty"`
	Resizable              *bool                 `json:"resizable,omitempty"`
	Show                   *bool                 `json:"show,omitempty"`
	SkipTaskbar            *bool                 `json:"skipTaskbar,omitempty"`
	Title                  *string               `json:"title,omitempty"`
	TitleBarStyle          *string               `json:"titleBarStyle,omitempty"`
	TrafficLightPosition   *TrafficLightPosition `json:"trafficLightPosition,omitempty"`
	Transparent            *bool                 `json:"transparent,omitempty"`
	UseContentSize         *bool                 `json:"useContentSize,omitempty"`
	WebPreferences         *WebPreferences       `json:"webPreferences,omitempty"`
	Width                  *int                  `json:"width,omitempty"`
	X                      *int                  `json:"x,omitempty"`
	Y                      *int                  `json:"y,omitempty"`

	// Additional options
	AppDetails *WindowAppDetails    `json:"appDetails,omitempty"`
	Custom     *WindowCustomOptions `json:"custom,omitempty"`
	Load       *WindowLoadOptions   `json:"load,omitempty"`
	Proxy      *WindowProxyOptions  `json:"proxy,omitempty"`
}

// WindowAppDetails represents window app details
// https://github.com/electron/electron/blob/v4.0.1/docs/api/browser-window.md#winsetappdetailsoptions-windows
type WindowAppDetails struct {
	AppID               *string `json:"appId,omitempty"`
	AppIconPath         *string `json:"appIconPath,omitempty"`
	RelaunchCommand     *string `json:"relaunchCommand,omitempty"`
	AppIconIndex        *int    `json:"appIconIndex,omitempty"`
	RelaunchDisplayName *string `json:"relaunchDisplayName,omitempty"`
}

// WindowCustomOptions represents window custom options
type WindowCustomOptions struct {
	HideOnClose       *bool              `json:"hideOnClose,omitempty"`
	MessageBoxOnClose *MessageBoxOptions `json:"messageBoxOnClose,omitempty"`
	MinimizeOnClose   *bool              `json:"minimizeOnClose,omitempty"`
	Script            string             `json:"script,omitempty"`
}

// WindowLoadOptions represents window load options
// https://github.com/electron/electron/blob/v1.8.1/docs/api/browser-window.md#winloadurlurl-options
type WindowLoadOptions struct {
	ExtraHeaders string `json:"extraHeaders,omitempty"`
	HTTPReferer  string `json:"httpReferrer,omitempty"`
	UserAgent    string `json:"userAgent,omitempty"`
}

// WindowProxyOptions represents window proxy options
// https://github.com/electron/electron/blob/v1.8.1/docs/api/session.md#sessetproxyconfig-callback
type WindowProxyOptions struct {
	BypassRules string `json:"proxyBypassRules,omitempty"`
	PACScript   string `json:"pacScript,omitempty"`
	Rules       string `json:"proxyRules,omitempty"`
}

// WebPreferences represents web preferences in window options.
// We must use pointers since GO doesn't handle optional fields whereas NodeJS does.
// Use astikit.BoolPtr, astikit.IntPtr or astikit.StrPtr to fill the struct
type WebPreferences struct {
	AllowRunningInsecureContent *bool   `json:"allowRunningInsecureContent,omitempty"`
	BackgroundThrottling        *bool   `json:"backgroundThrottling,omitempty"`
	BlinkFeatures               *string `json:"blinkFeatures,omitempty"`
	// This attribute needs to be false at all time
	// ContextIsolation            *bool                  `json:"contextIsolation,omitempty"`
	DefaultEncoding            *string                `json:"defaultEncoding,omitempty"`
	DefaultFontFamily          map[string]interface{} `json:"defaultFontFamily,omitempty"`
	DefaultFontSize            *int                   `json:"defaultFontSize,omitempty"`
	DefaultMonospaceFontSize   *int                   `json:"defaultMonospaceFontSize,omitempty"`
	DevTools                   *bool                  `json:"devTools,omitempty"`
	DisableBlinkFeatures       *string                `json:"disableBlinkFeatures,omitempty"`
	EnableRemoteModule         *bool                  `json:"enableRemoteModule,omitempty"`
	ExperimentalCanvasFeatures *bool                  `json:"experimentalCanvasFeatures,omitempty"`
	ExperimentalFeatures       *bool                  `json:"experimentalFeatures,omitempty"`
	Images                     *bool                  `json:"images,omitempty"`
	Javascript                 *bool                  `json:"javascript,omitempty"`
	MinimumFontSize            *int                   `json:"minimumFontSize,omitempty"`
	// This attribute needs to be true at all time
	// NodeIntegration             *bool                  `json:"nodeIntegration,omitempty"`
	NodeIntegrationInWorker *bool                  `json:"nodeIntegrationInWorker,omitempty"`
	Offscreen               *bool                  `json:"offscreen,omitempty"`
	Partition               *string                `json:"partition,omitempty"`
	Plugins                 *bool                  `json:"plugins,omitempty"`
	Preload                 *string                `json:"preload,omitempty"`
	Sandbox                 *bool                  `json:"sandbox,omitempty"`
	ScrollBounce            *bool                  `json:"scrollBounce,omitempty"`
	Session                 map[string]interface{} `json:"session,omitempty"`
	TextAreasAreResizable   *bool                  `json:"textAreasAreResizable,omitempty"`
	Webaudio                *bool                  `json:"webaudio,omitempty"`
	Webgl                   *bool                  `json:"webgl,omitempty"`
	WebSecurity             *bool                  `json:"webSecurity,omitempty"`
	WebviewTag              *bool                  `json:"webviewTag,omitempty"`
	ZoomFactor              *float64               `json:"zoomFactor,omitempty"`
}

// TrafficLightPosition represents traffic light positions (macOS only)
// https://www.electronjs.org/docs/latest/tutorial/window-customization#create-frameless-windows
type TrafficLightPosition struct {
	X *int `json:"x,omitempty"`
	Y *int `json:"y,omitempty"`
}

// newWindow creates a new window
func newWindow(ctx context.Context, l astikit.SeverityLogger, o Options, p Paths, url string, wo *WindowOptions, d *dispatcher, i *identifier, wrt *writer) (w *Window, err error) {
	// Init
	w = &Window{
		callbackIdentifier: newIdentifier(),
		l:                  l,
		o:                  wo,
		object:             newObject(ctx, d, i, wrt, i.new()),
	}
	w.Session = newSession(w.ctx, d, i, wrt)

	// Check app details
	if wo.Icon == nil && p.AppIconDefaultSrc() != "" {
		wo.Icon = astikit.StrPtr(p.AppIconDefaultSrc())
	}
	if wo.Title == nil && o.AppName != "" {
		wo.Title = astikit.StrPtr(o.AppName)
	}

	// Make sure the window's context is cancelled once the closed event is received
	w.On(EventNameWindowEventClosed, func(e Event) (deleteListener bool) {
		w.cancel()
		return true
	})

	// Fullscreen state
	w.On(EventNameWindowEventEnterFullScreen, func(e Event) (deleteListener bool) {
		w.m.Lock()
		defer w.m.Unlock()
		w.o.Fullscreen = astikit.BoolPtr(true)
		return
	})
	w.On(EventNameWindowEventLeaveFullScreen, func(e Event) (deleteListener bool) {
		w.m.Lock()
		defer w.m.Unlock()
		w.o.Fullscreen = astikit.BoolPtr(false)
		return
	})

	// Show
	w.On(EventNameWindowEventHide, func(e Event) (deleteListener bool) {
		w.m.Lock()
		defer w.m.Unlock()
		w.o.Show = astikit.BoolPtr(false)
		return
	})
	w.On(EventNameWindowEventShow, func(e Event) (deleteListener bool) {
		w.m.Lock()
		defer w.m.Unlock()
		w.o.Show = astikit.BoolPtr(true)
		return
	})

	// Bounds change handling, updates the internal WindowOption's bounds
	updateBoundsFunc := func(w *Window) func(e Event) (deleteListener bool) {
		return func(e Event) (deleteListener bool) {
			w.m.Lock()
			defer w.m.Unlock()
			if w.o != nil && e.Bounds != nil {
				w.o.X = e.Bounds.X
				w.o.Y = e.Bounds.Y
				w.o.Width = e.Bounds.Width
				w.o.Height = e.Bounds.Height
			}
			return
		}
	}

	w.On(EventNameWindowEventDidFinishLoad, updateBoundsFunc(w))
	w.On(EventNameWindowEventMaximize, updateBoundsFunc(w))
	w.On(EventNameWindowEventMove, updateBoundsFunc(w))
	w.On(EventNameWindowEventMoved, updateBoundsFunc(w))
	w.On(EventNameWindowEventResize, updateBoundsFunc(w))
	w.On(EventNameWindowEventResizeContent, updateBoundsFunc(w))
	w.On(EventNameWindowEventUnmaximize, updateBoundsFunc(w))
	w.On(EventNameWindowEventWillMove, updateBoundsFunc(w))

	// Basic parse
	if w.url, err = stdUrl.Parse(url); err != nil {
		err = fmt.Errorf("std parsing of url %s failed: %w", url, err)
		return
	}

	// File
	if w.url.Scheme == "" {
		// Get absolute path
		if url, err = filepath.Abs(url); err != nil {
			err = fmt.Errorf("getting absolute path of %s failed: %w", url, err)
			return
		}

		// Set url
		w.url = &stdUrl.URL{Path: filepath.ToSlash(url), Scheme: "file"}
	}

	return
}

// NewMenu creates a new window menu
func (w *Window) NewMenu(i []*MenuItemOptions) *Menu {
	return newMenu(w.ctx, w.id, i, w.d, w.i, w.w)
}

// Blur blurs the window
func (w *Window) Blur() (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdBlur, TargetID: w.id}, EventNameWindowEventBlur)
	return
}

// Bounds return the window bounds
func (w *Window) Bounds() (rect Rectangle, err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	w.m.Lock()
	defer w.m.Unlock()

	if w.o.Width != nil && w.o.Height != nil {
		rect.Size.Width = *w.o.Width
		rect.Size.Height = *w.o.Height
	}

	if w.o.X != nil && w.o.Y != nil {
		rect.Position.X = *w.o.X
		rect.Position.Y = *w.o.Y
	}
	return
}

// Center centers the window
func (w *Window) Center() (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdCenter, TargetID: w.id}, EventNameWindowEventMove)
	return
}

// Close closes the window
func (w *Window) Close() (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdClose, TargetID: w.id}, EventNameWindowEventClosed)
	return
}

// CloseDevTools closes the dev tools
func (w *Window) CloseDevTools() (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	return w.w.write(Event{Name: EventNameWindowCmdWebContentsCloseDevTools, TargetID: w.id})
}

// Create creates the window
// We wait for EventNameWindowEventDidFinishLoad since we need the web content to be fully loaded before being able to
// send messages to it
func (w *Window) Create() (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdCreate, SessionID: w.Session.id, TargetID: w.id, URL: w.url.String(), WindowOptions: w.o}, EventNameWindowEventDidFinishLoad)
	return
}

// Destroy destroys the window
func (w *Window) Destroy() (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdDestroy, TargetID: w.id}, EventNameWindowEventClosed)
	return
}

// ExecuteJavaScript executes some js
func (w *Window) ExecuteJavaScript(code string) (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdWebContentsExecuteJavaScript, TargetID: w.id, Code: code}, EventNameWindowEventWebContentsExecutedJavaScript)
	return
}

// Focus focuses on the window
func (w *Window) Focus() (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdFocus, TargetID: w.id}, EventNameWindowEventFocus)
	return
}

// Hide hides the window
func (w *Window) Hide() (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdHide, TargetID: w.id}, EventNameWindowEventHide)
	return
}

// IsFullScreen returns whether the window is in full screen mode
func (w *Window) IsFullScreen() bool {
	if w.ctx.Err() != nil {
		return false
	}
	w.m.Lock()
	defer w.m.Unlock()
	return w.o.Fullscreen != nil && *w.o.Fullscreen
}

// IsShown returns whether the window is shown
func (w *Window) IsShown() bool {
	if w.ctx.Err() != nil {
		return false
	}
	w.m.Lock()
	defer w.m.Unlock()
	return w.o.Show != nil && *w.o.Show
}

// Log logs a message in the JS console of the window
func (w *Window) Log(message string) (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	return w.w.write(Event{Message: newEventMessage(message), Name: EventNameWindowCmdLog, TargetID: w.id})
}

// Maximize maximizes the window
func (w *Window) Maximize() (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdMaximize, TargetID: w.id}, EventNameWindowEventMaximize)
	return
}

// Minimize minimizes the window
func (w *Window) Minimize() (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdMinimize, TargetID: w.id}, EventNameWindowEventMinimize)
	return
}

// Move moves the window
func (w *Window) Move(x, y int) (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdMove, TargetID: w.id, WindowOptions: &WindowOptions{X: astikit.IntPtr(x), Y: astikit.IntPtr(y)}}, EventNameWindowEventMove)
	return
}

// MoveTop moves window to top (z-order) regardless of focus
func (w *Window) MoveTop() (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdMoveTop, TargetID: w.id}, EventNameWindowEventMovedTop)
	return
}

// MoveInDisplay moves the window in the proper display
func (w *Window) MoveInDisplay(d *Display, x, y int) error {
	return w.Move(d.Bounds().X+x, d.Bounds().Y+y)
}

func (w *Window) OnLogin(fn func(i Event) (username, password string, err error)) {
	w.On(EventNameWebContentsEventLogin, func(i Event) (deleteListener bool) {
		// Get username and password
		username, password, err := fn(i)
		if err != nil {
			w.l.Error(fmt.Errorf("getting username and password failed: %w", err))
			return
		}

		// No auth
		if len(username) == 0 && len(password) == 0 {
			return
		}

		// Send message back
		if err = w.w.write(Event{CallbackID: i.CallbackID, Name: EventNameWebContentsEventLoginCallback, Password: password, TargetID: w.id, Username: username}); err != nil {
			w.l.Error(fmt.Errorf("writing login callback message failed: %w", err))
			return
		}
		return
	})
}

// ListenerMessage represents a message listener executed when receiving a message from the JS
type ListenerMessage func(m *EventMessage) (v interface{})

// OnMessage adds a specific listener executed when receiving a message from the JS
// This method can be called only once
func (w *Window) OnMessage(l ListenerMessage) {
	w.onMessageOnce.Do(func() {
		w.On(eventNameWindowEventMessage, func(i Event) (deleteListener bool) {
			v := l(i.Message)
			if len(i.CallbackID) > 0 {
				o := Event{CallbackID: i.CallbackID, Name: eventNameWindowCmdMessageCallback, TargetID: w.id}
				if v != nil {
					o.Message = newEventMessage(v)
				}
				if err := w.w.write(o); err != nil {
					w.l.Error(fmt.Errorf("writing callback message failed: %w", err))
				}
			}
			return
		})
	})
}

// OpenDevTools opens the dev tools
func (w *Window) OpenDevTools() (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	return w.w.write(Event{Name: EventNameWindowCmdWebContentsOpenDevTools, TargetID: w.id})
}

// SetAlwaysOnTop sets whether the window should show always on top of other windows.
func (w *Window) SetAlwaysOnTop(flag bool) (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	w.m.Lock()
	w.o.AlwaysOnTop = astikit.BoolPtr(flag)
	w.m.Unlock()
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdSetAlwaysOnTop, TargetID: w.id, Enable: astikit.BoolPtr(flag)}, EventNameWindowEventAlwaysOnTopChanged)
	return
}

// Resize resizes the window
func (w *Window) Resize(width, height int) (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdResize, TargetID: w.id, WindowOptions: &WindowOptions{Height: astikit.IntPtr(height), Width: astikit.IntPtr(width)}}, EventNameWindowEventResize)
	return
}

// ResizeContent resizes the content viewport
func (w *Window) ResizeContent(width, height int) (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdResizeContent, TargetID: w.id, WindowOptions: &WindowOptions{Height: astikit.IntPtr(height), Width: astikit.IntPtr(width)}}, EventNameWindowEventResizeContent)
	return
}

// SetBounds set bounds of the window
func (w *Window) SetBounds(r RectangleOptions) (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdSetBounds, TargetID: w.id, Bounds: &r}, EventNameWindowEventResize)
	return
}

// Enable content protection on the window
func (w *Window) SetContentProtection(enable bool) (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdSetContentProtection, TargetID: w.id, Enable: astikit.BoolPtr(enable)}, EventNameWindowEventContentProtectionSet)
	return
}

// SetFullScreen sets the fullscreen flag of the window
func (w *Window) SetFullScreen(enable bool) (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}

	var eventNameDone string
	if enable {
		eventNameDone = EventNameWindowEventEnterFullScreen
	} else {
		eventNameDone = EventNameWindowEventLeaveFullScreen
	}

	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdSetFullScreen, TargetID: w.id, Enable: astikit.BoolPtr(enable)}, eventNameDone)
	return
}

// Restore restores the window
func (w *Window) Restore() (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdRestore, TargetID: w.id}, EventNameWindowEventRestore)
	return
}

// CallbackMessage represents a message callback
type CallbackMessage func(m *EventMessage)

// SendMessage sends a message to the JS window and execute optional callbacks upon receiving a response from the JS
// Use astilectron.onMessage method to capture those messages in JS
func (w *Window) SendMessage(message interface{}, callbacks ...CallbackMessage) (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	var e = Event{Message: newEventMessage(message), Name: eventNameWindowCmdMessage, TargetID: w.id}
	if len(callbacks) > 0 {
		e.CallbackID = w.callbackIdentifier.new()
		w.On(eventNameWindowEventMessageCallback, func(i Event) (deleteListener bool) {
			if i.CallbackID == e.CallbackID {
				for _, c := range callbacks {
					c(i.Message)
				}
				deleteListener = true
			}
			return
		})
	}
	return w.w.write(e)
}

// Show shows the window
func (w *Window) Show() (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdShow, TargetID: w.id}, EventNameWindowEventShow)
	return
}

// Unmaximize unmaximize the window
func (w *Window) Unmaximize() (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	_, err = synchronousEvent(w.ctx, w, w.w, Event{Name: EventNameWindowCmdUnmaximize, TargetID: w.id}, EventNameWindowEventUnmaximize)
	return
}

// UpdateCustomOptions updates the window custom options
func (w *Window) UpdateCustomOptions(o WindowCustomOptions) (err error) {
	if err = w.ctx.Err(); err != nil {
		return
	}
	w.m.Lock()
	w.o.Custom = &o
	w.m.Unlock()
	_, err = synchronousEvent(w.ctx, w, w.w, Event{WindowOptions: w.o, Name: EventNameWindowCmdUpdateCustomOptions, TargetID: w.id}, EventNameWindowEventUpdatedCustomOptions)
	return
}


text:
<?php

namespace DeliciousBrains\WP_Offload_Media\Gcp\Google\Cloud\Core\Exception;

/**
 * Exception thrown when a resource is not found.
 */
class NotFoundException extends \DeliciousBrains\WP_Offload_Media\Gcp\Google\Cloud\Core\Exception\ServiceException
{
    /**
     * Allows overriding message for injection of Whitelist Notice.
     *
     * @param string $message the new message
     * @return void
     * @access private
     */
    public function setMessage($message)
    {
        $this->message = $message;
    }
}


text:
import struct
import logging

import gevent
from gevent import socket
from gevent import queue

from locust.exception import LocustError
from .protocol import Message

logger = logging.getLogger(__name__)

def _recv_bytes(sock, bytes):
    data = ""
    while bytes:
        temp = sock.recv(bytes)
        if not temp:
            raise Exception("Connection reset by peer? Received so far: %r" % (data, ))
        bytes -= len(temp)
        data += temp
    return data

def _send_obj(sock, msg):
    data = msg.serialize()
    packed = struct.pack('!i', len(data)) + data
    try:
        sock.sendall(packed)
    except Exception as e:
        try:
            sock.close()
        except:
            pass
        finally:
            raise LocustError("Slave has disconnected")

def _recv_obj(sock):
    d = _recv_bytes(sock, 4)
    bytes, = struct.unpack('!i', d)
    data = _recv_bytes(sock, bytes)
    return Message.unserialize(data)

class Client(object):
    def __init__(self, host, port):
        self.host = host
        self.port = port
        self.command_queue = gevent.queue.Queue()
        self.socket = self._connect()

    def _connect(self):
        sock = socket.create_connection((self.host, self.port))
        def handle():
            try:
                while True:
                    self.command_queue.put_nowait(_recv_obj(sock))
            except Exception as e:
                try:
                    sock.close()
                except:
                    pass

        gevent.spawn(handle)
        return sock

    def send(self, event):
        _send_obj(self.socket, event)

    def recv(self):
        return self.command_queue.get()

class Server(object):
    def __init__(self, host, port):
        self.host = "0.0.0.0" if host == "*" else host
        self.port = port
        self.event_queue = gevent.queue.Queue()
        self.command_dispatcher = self._listen()

    def send(self, msg):
        self.command_dispatcher(msg)

    def recv(self):
        return self.event_queue.get()

    def _listen(self):
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
        sock.bind((self.host, self.port))
        sock.listen(256)
        self.slave_index = 0
        slaves = []

        def dispatch_command(cmd):

            _send_obj(slaves[self.slave_index], cmd)
            self.slave_index += 1
            if self.slave_index == len(slaves):
                self.slave_index = 0

        def handle_slave(sock):
            try:
                while True:
                    self.event_queue.put_nowait(_recv_obj(sock))
            except Exception as e:
                logger.info("Slave disconnected")
                slaves.remove(sock)
                if self.slave_index == len(slaves) and len(slaves) > 0:
                    self.slave_index -= 1

                try:
                    sock.close()
                except:
                    pass

        def listener():
            while True:
                _socket, _addr = sock.accept()
                logger.info("Slave connected")
                slaves.append(_socket)
                gevent.spawn(lambda: handle_slave(_socket))

        gevent.spawn(listener)
        return dispatch_command


text:
* OSX, Linux, BSD (You may need to browse their man page)*
* Bash 3.2+ (If you aren't sure, see [the Bash changelog](https://www.tldp.org/LDP/abs/html/bash2.html))
* Git 2.1+

*If you aren't able to test your new command on a platform,
make that clear in your PR and someone else may be able to test it on their system.

## To submit a new command, you should

Let's assume your new command is named `foo`.

1. Write a bash script under `./bin` called `git-foo`. The script should be started with `#!/usr/bin/env bash`.
2. Read `./man/Readme.md` and write documentation for `git-foo`.
3. Don't forget to introduce it in `Commands.md`.
4. Update `./etc/git-extras-completion.zsh`. Just follow existing code.
5. (Optional) Update `./etc/bash_completion.sh`.
6. (Optional) Update `./etc/git-extras.fish`.
7. Run `./check_integrity.sh foo` to check if all done.

You are welcome to open up an issue to discuss new commands or features before opening a pull request.


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:padding="16dp">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:drawableLeft="@drawable/emo_im_cool"
        android:drawablePadding="10dp"
        android:drawableRight="@drawable/emo_im_cool"
        android:gravity="center_vertical"
        android:text="@string/banner_text"

        android:textSize="20sp" />

</RelativeLayout>


text:
import functools
import flask
# from flask.ext.cors import cross_origin
from flask_cors import cross_origin

def json_response(fn):
    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        result = fn(*args, **kwargs)
        return flask.jsonify(result)
    return wrapper

def v2_route(app, route, *args, **kwargs):
    def decorator(fn):
        return app.route(route, *args, **kwargs)(
            cross_origin()(json_response(fn)))

    return decorator

class MyJSONEncoder(flask.json.JSONEncoder):
    def default(self, o):
        if hasattr(o, '__json__'):
            return o.__json__()
        return super(MyJSONEncoder, self).default(o)

app = flask.Flask(__name__)
app.json_encoder = MyJSONEncoder


text:
var fs = require('fs'),
	onlyScripts = require('./util/scriptFilter'),
	tasks = fs.readdirSync('./gulp/tasks/').filter(onlyScripts);

tasks.forEach(function(task) {
	'use strict';
	require('./tasks/' + task);
});


text:
#include "testcpp.h"

#if WITH_RAPIDJSON

#include <iostream>
#include <cstring>
#include <cstdlib>
#include <assert.h>
#include <sstream>
#include <string>
#include <map>
#include <set>
#include "rdkafka.h"

#include <rapidjson/document.h>
#include <rapidjson/schema.h>
#include <rapidjson/filereadstream.h>
#include <rapidjson/stringbuffer.h>
#include <rapidjson/error/en.h>
#include <rapidjson/prettywriter.h>

/**
 * @brief A basic test of fetch from follower funtionality
 *  - produces a bunch of messages to a replicated topic.
 *  - configure the consumer such that `client.rack` is different from the
 *    broker's `broker.rack` (and use
 *    org.apache.kafka.common.replica.RackAwareReplicaSelector).
 *  - consume the messages, and check they are as expected.
 *  - use rxbytes from the statistics event to confirm that
 *    the messages were retrieved from the replica broker (not the
 *    leader).
 */

static void test_assert(bool cond, std::string msg) {
  if (!cond)
    Test::Say(msg);
  assert(cond);
}

class TestEvent2Cb : public RdKafka::EventCb {
 public:
  static bool should_capture_stats;
  static bool has_captured_stats;
  static std::map<int32_t, int64_t> rxbytes;

  void event_cb(RdKafka::Event &event) {
    switch (event.type()) {
    case RdKafka::Event::EVENT_LOG:
      Test::Say(event.str() + "\n");
      break;
    case RdKafka::Event::EVENT_STATS:
      if (should_capture_stats) {
        rapidjson::Document d;
        if (d.Parse(event.str().c_str()).HasParseError())
          Test::Fail(tostr() << "Failed to parse stats JSON: "
                             << rapidjson::GetParseError_En(d.GetParseError())
                             << " at " << d.GetErrorOffset());

        /* iterate over brokers. */
        rapidjson::Pointer jpath((const char *)"/brokers");
        rapidjson::Value *pp = rapidjson::GetValueByPointer(d, jpath);
        if (pp == NULL)
          return;

        for (rapidjson::Value::ConstMemberIterator itr = pp->MemberBegin();
             itr != pp->MemberEnd(); ++itr) {
          std::string broker_name = itr->name.GetString();
          size_t broker_id_idx    = broker_name.rfind('/');
          if (broker_id_idx == (size_t)-1)
            continue;
          std::string broker_id = broker_name.substr(
              broker_id_idx + 1, broker_name.size() - broker_id_idx - 1);

          int64_t broker_rxbytes =
              itr->value.FindMember("rxbytes")->value.GetInt64();
          rxbytes[atoi(broker_id.c_str())] = broker_rxbytes;
        }

        has_captured_stats = true;
        break;
      }
    default:
      break;
    }
  }
};

bool TestEvent2Cb::should_capture_stats;
bool TestEvent2Cb::has_captured_stats;
std::map<int32_t, int64_t> TestEvent2Cb::rxbytes;
static TestEvent2Cb ex_event_cb;

static void get_brokers_info(std::string &topic_str,
                             int32_t *leader,
                             std::vector<int> &brokers) {
  std::string errstr;
  RdKafka::ErrorCode err;
  class RdKafka::Metadata *metadata;

  /* Determine the ids of the brokers that the partition has replicas
   * on and which one of those is the leader.
   */
  RdKafka::Conf *pConf;
  Test::conf_init(&pConf, NULL, 10);
  RdKafka::Producer *p = RdKafka::Producer::create(pConf, errstr);
  delete pConf;
  test_assert(p, tostr() << "Failed to create producer: " << errstr);

  RdKafka::Topic *topic = RdKafka::Topic::create(p, topic_str, NULL, errstr);
  test_assert(topic, tostr() << "Failed to create topic: " << errstr);

  err = p->metadata(0, topic, &metadata, tmout_multip(5000));
  test_assert(
      err == RdKafka::ERR_NO_ERROR,
      tostr() << "%% Failed to acquire metadata: " << RdKafka::err2str(err));

  test_assert(metadata->topics()->size() == 1,
              tostr() << "expecting metadata for exactly one topic. "
                      << "have metadata for " << metadata->topics()->size()
                      << "topics");

  RdKafka::Metadata::TopicMetadataIterator topicMetadata =
      metadata->topics()->begin();
  RdKafka::TopicMetadata::PartitionMetadataIterator partitionMetadata =
      (*topicMetadata)->partitions()->begin();

  *leader = (*partitionMetadata)->leader();

  size_t idx = 0;
  RdKafka::PartitionMetadata::ReplicasIterator replicasIterator;
  for (replicasIterator = (*partitionMetadata)->replicas()->begin();
       replicasIterator != (*partitionMetadata)->replicas()->end();
       ++replicasIterator) {
    brokers.push_back(*replicasIterator);
    idx++;
  }

  delete metadata;
  delete topic;
  delete p;
}

/**
 * @brief Wait for up to \p tmout for any type of admin result.
 * @returns the event
 */
rd_kafka_event_t *test_wait_admin_result(rd_kafka_queue_t *q,
                                         rd_kafka_event_type_t evtype,
                                         int tmout) {
  rd_kafka_event_t *rkev;

  while (1) {
    rkev = rd_kafka_queue_poll(q, tmout);
    if (!rkev)
      Test::Fail(tostr() << "Timed out waiting for admin result (" << evtype
                         << ")\n");

    if (rd_kafka_event_type(rkev) == evtype)
      return rkev;

    if (rd_kafka_event_type(rkev) == RD_KAFKA_EVENT_ERROR) {
      Test::Say(tostr() << "Received error event while waiting for " << evtype
                        << ": " << rd_kafka_event_error_string(rkev)
                        << ": ignoring");
      continue;
    }

    test_assert(rd_kafka_event_type(rkev) == evtype,
                tostr() << "Expected event type " << evtype << ", got "
                        << rd_kafka_event_type(rkev) << " ("
                        << rd_kafka_event_name(rkev) << ")");
  }

  return NULL;
}

/**
 * @returns the number of broker.rack values configured across all brokers.
 */
static int get_broker_rack_count(std::vector<int> &replica_ids) {
  std::string errstr;
  RdKafka::Conf *pConf;
  Test::conf_init(&pConf, NULL, 10);
  RdKafka::Producer *p = RdKafka::Producer::create(pConf, errstr);
  delete pConf;

  rd_kafka_queue_t *mainq = rd_kafka_queue_get_main(p->c_ptr());

  std::set<std::string> racks;
  for (size_t i = 0; i < replica_ids.size(); ++i) {
    std::string name = tostr() << replica_ids[i];

    rd_kafka_ConfigResource_t *config =
        rd_kafka_ConfigResource_new(RD_KAFKA_RESOURCE_BROKER, &name[0]);

    rd_kafka_AdminOptions_t *options;
    char cerrstr[128];
    options = rd_kafka_AdminOptions_new(p->c_ptr(), RD_KAFKA_ADMIN_OP_ANY);
    rd_kafka_resp_err_t err = rd_kafka_AdminOptions_set_request_timeout(
        options, 10000, cerrstr, sizeof(cerrstr));
    test_assert(!err, cerrstr);

    rd_kafka_DescribeConfigs(p->c_ptr(), &config, 1, options, mainq);
    rd_kafka_AdminOptions_destroy(options);
    rd_kafka_event_t *rkev = test_wait_admin_result(
        mainq, RD_KAFKA_EVENT_DESCRIBECONFIGS_RESULT, 5000);

    const rd_kafka_DescribeConfigs_result_t *res =
        rd_kafka_event_DescribeConfigs_result(rkev);
    test_assert(res, "expecting describe config results to be not NULL");

    err                 = rd_kafka_event_error(rkev);
    const char *errstr2 = rd_kafka_event_error_string(rkev);
    test_assert(!err, tostr() << "Expected success, not "
                              << rd_kafka_err2name(err) << ": " << errstr2);

    size_t rconfig_cnt;
    const rd_kafka_ConfigResource_t **rconfigs =
        rd_kafka_DescribeConfigs_result_resources(res, &rconfig_cnt);
    test_assert(rconfig_cnt == 1,
                tostr() << "Expecting 1 resource, got " << rconfig_cnt);

    err     = rd_kafka_ConfigResource_error(rconfigs[0]);
    errstr2 = rd_kafka_ConfigResource_error_string(rconfigs[0]);

    size_t entry_cnt;
    const rd_kafka_ConfigEntry_t **entries =
        rd_kafka_ConfigResource_configs(rconfigs[0], &entry_cnt);

    for (size_t j = 0; j < entry_cnt; ++j) {
      const rd_kafka_ConfigEntry_t *e = entries[j];
      const char *cname               = rd_kafka_ConfigEntry_name(e);
      if (!strcmp(cname, "broker.rack")) {
        const char *val = rd_kafka_ConfigEntry_value(e)
                              ? rd_kafka_ConfigEntry_value(e)
                              : "(NULL)";
        racks.insert(std::string(val));
      }
    }

    rd_kafka_event_destroy(rkev);
  }

  delete p;

  return (int)racks.size();
}

static void do_fff_test(void) {
  /* Produce some messages to a single partition topic
   * with 3 replicas.
   */
  int msgcnt            = 1000;
  const int msgsize     = 100;
  std::string topic_str = Test::mk_topic_name("0101-fetch-from-follower", 1);
  test_create_topic(NULL, topic_str.c_str(), 1, 3);
  test_produce_msgs_easy_size(topic_str.c_str(), 0, 0, msgcnt, msgsize);

  int leader_id;
  std::vector<int> replica_ids;
  get_brokers_info(topic_str, &leader_id, replica_ids);
  test_assert(replica_ids.size() == 3,
              tostr() << "expecting three replicas, but " << replica_ids.size()
                      << " were reported.");
  Test::Say(tostr() << topic_str << " leader id: " << leader_id
                    << ", all replica ids: [" << replica_ids[0] << ", "
                    << replica_ids[1] << ", " << replica_ids[2] << "]\n");

  if (get_broker_rack_count(replica_ids) != 3) {
    Test::Skip("unexpected broker.rack configuration: skipping test.\n");
    return;
  }

  /* arrange for the consumer's client.rack to align with a broker that is not
   * the leader. */
  int client_rack_id = -1;
  size_t i;
  for (i = 0; i < replica_ids.size(); ++i) {
    if (replica_ids[i] != leader_id) {
      client_rack_id = replica_ids[i];
      break;
    }
  }

  std::string client_rack = tostr() << "RACK" << client_rack_id;
  Test::Say("client.rack: " + client_rack + "\n");

  std::string errstr;
  RdKafka::Conf *conf;
  Test::conf_init(&conf, NULL, 10);
  Test::conf_set(conf, "group.id", topic_str);
  Test::conf_set(conf, "auto.offset.reset", "earliest");
  Test::conf_set(conf, "enable.auto.commit", "false");
  Test::conf_set(conf, "statistics.interval.ms", "1000");
  conf->set("event_cb", &ex_event_cb, errstr);
  Test::conf_set(conf, "client.rack", client_rack);

  RdKafka::KafkaConsumer *c = RdKafka::KafkaConsumer::create(conf, errstr);
  test_assert(c, "Failed to create KafkaConsumer: " + errstr);
  delete conf;

  /* Subscribe */
  std::vector<std::string> topics;
  topics.push_back(topic_str);
  RdKafka::ErrorCode err;
  if ((err = c->subscribe(topics)))
    Test::Fail("subscribe failed: " + RdKafka::err2str(err));

  /* Start consuming */
  Test::Say("Consuming topic " + topic_str + "\n");
  int cnt = 0;
  while (cnt < msgcnt) {
    RdKafka::Message *msg = c->consume(tmout_multip(1000));

    switch (msg->err()) {
    case RdKafka::ERR__TIMED_OUT:
      break;

    case RdKafka::ERR_NO_ERROR: {
      test_assert(msg->len() == 100, "expecting message value size to be 100");
      char *cnt_str_start_ptr = strstr((char *)msg->payload(), "msg=") + 4;
      test_assert(cnt_str_start_ptr, "expecting 'msg=' in message payload");
      char *cnt_str_end_ptr = strstr(cnt_str_start_ptr, "\n");
      test_assert(cnt_str_start_ptr,
                  "expecting '\n' following 'msg=' in message payload");
      *cnt_str_end_ptr = '\0';
      int msg_cnt      = atoi(cnt_str_start_ptr);
      test_assert(msg_cnt == cnt, "message consumed out of order");
      cnt++;
    } break;

    default:
      Test::Fail("Consume error: " + msg->errstr());
      break;
    }

    delete msg;
  }

  /* rely on the test timeout to prevent an infinite loop in
   * the (unlikely) event that the statistics callback isn't
   * called. */
  Test::Say("Capturing rxbytes statistics\n");
  TestEvent2Cb::should_capture_stats = true;
  while (!TestEvent2Cb::has_captured_stats) {
    RdKafka::Message *msg = c->consume(tmout_multip(500));
    delete msg;
  }

  for (i = 0; i < replica_ids.size(); ++i)
    Test::Say(
        tostr() << _C_YEL << "rxbytes for replica on broker " << replica_ids[i]
                << ": " << TestEvent2Cb::rxbytes[replica_ids[i]]
                << (replica_ids[i] == leader_id ? " (leader)" : "")
                << (replica_ids[i] == client_rack_id ? " (preferred replica)"
                                                     : "")
                << "\n");

  for (i = 0; i < replica_ids.size(); ++i)
    if (replica_ids[i] != client_rack_id)
      test_assert(
          TestEvent2Cb::rxbytes[replica_ids[i]] <
              TestEvent2Cb::rxbytes[client_rack_id],
          "rxbytes was not highest on broker corresponding to client.rack.");

  test_assert(
      TestEvent2Cb::rxbytes[client_rack_id] > msgcnt * msgsize,
      tostr() << "expecting rxbytes of client.rack broker to be at least "
              << msgcnt * msgsize << " but it was "
              << TestEvent2Cb::rxbytes[client_rack_id]);

  Test::Say("Done\n");

  // Manual test 1:
  //  - change the lease period from 5 minutes to 5 seconds (modify
  //  rdkafka_partition.c)
  //  - change the max lease grant period from 1 minute to 10 seconds (modify
  //  rdkafka_broker.c)
  //  - add infinite consume loop to the end of this test.
  //  - observe:
  //     - the partition gets delegated to the preferred replica.
  //     - the messages get consumed.
  //     - the lease expires.
  //     - the partition is reverted to the leader.
  //     - the toppar is backed off, and debug message noting the faster than
  //     expected delegation to a replica.

  // Manual test 2:
  //  - same modifications as above.
  //  - add Test::conf_set(conf, "topic.metadata.refresh.interval.ms", "3000");
  //  - observe:
  //     - that metadata being periodically received and not interfering with
  //     anything.

  c->close();
  delete c;
}
#endif

extern "C" {
int main_0101_fetch_from_follower(int argc, char **argv) {
#if WITH_RAPIDJSON
  do_fff_test();
#else
  Test::Skip("RapidJSON >=1.1.0 not available\n");
#endif
  return 0;
}
}


text:
<!DOCTYPE html>

  <meta charset="UTF-8">
  <title>Code Coverage for C:\xampp\htdocs\dev\php\rocketphp\html\src/HTMLInterface.php</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link href="css/bootstrap.min.css" rel="stylesheet">
  <link href="css/style.css" rel="stylesheet">

C:\xampp\htdocs\dev\php\rocketphp\html\src

HTMLInterface.php

Code Coverage

Classes and Traits

Functions and Methods

Lines

      Total

      CRAP

1
	<?php

2
	/**

3
	 * RocketPHP (http://rocketphp.io)

4
	 *

5
	 * @package   RocketPHP

6
	 * @link      https://github.com/rocketphp/html

7
	 * @license   http://opensource.org/licenses/MIT MIT

8
	 */

9

10
	namespace RocketPHP\HTML;

11

12
	/**

13
	 * Interface for HTML

14
	 */

15
	interface HTMLInterface

16
	extends NodeInterface

17
	{

18
	}

Legend

     Executed
     Not Executed
     Dead Code

     Generated by PHP_CodeCoverage 2.2.2 using PHP 5.6.3 and PHPUnit 4.8.6 at Fri Sep 4 21:12:37 UTC 2015.


text:
package io.lattengineer.LattEngineerAPI.store;

import io.lattengineer.LattEngineerAPI.entity.LattEngineerEntity;
import io.lattengineer.LattEngineerAPI.plugin.LattEngineerPlugin;

public interface InterfaceColl<E extends LattEngineerEntity<E>>
{
	public String getId();
	public Class<E> getGenericClass();
	public LattEngineerPlugin getPlugin();
}


text:
package org.eclipse.gemini.blueprint.util;

import org.eclipse.gemini.blueprint.mock.MockBundleContext;
import org.eclipse.gemini.blueprint.mock.MockServiceReference;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceEvent;
import org.osgi.framework.ServiceListener;
import org.osgi.framework.ServiceReference;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;

/**
 * @author Costin Leau
 */
public class OsgiListenerUtilsTest {

    private MockBundleContext bundleContext;
    private Map<ServiceReference, Object> services;
    private ServiceReference ref1, ref2, ref3;
    private Object service1, service2, service3;

    @Before
    public void setUp() throws Exception {

        ref1 = new MockServiceReference();
        ref2 = new MockServiceReference();
        ref3 = new MockServiceReference();

        service1 = new Object();
        service2 = new Object();
        service3 = new Object();

        services = new LinkedHashMap<>();

        services.put(ref1, service1);
        services.put(ref2, service2);
        services.put(ref3, service3);

        bundleContext = new MockBundleContext() {

            public ServiceReference[] getServiceReferences(String clazz, String filter) throws InvalidSyntaxException {
                return new ServiceReference[]{ref1, ref2, ref3};
            }

            public ServiceReference getServiceReference(String clazz) {
                return ref3;
            }

            @SuppressWarnings("unchecked")
            public Object getService(ServiceReference reference) {
                Object service = services.get(reference);
                if (service == null)
                    return super.getService(reference);
                return service;
            }
        };

    }

    @After
    public void tearDown() {
        bundleContext = null;
    }

    /**
     * Test method for
     * {@link org.eclipse.gemini.blueprint.util.OsgiListenerUtils#addServiceListener(org.osgi.framework.BundleContext, org.osgi.framework.ServiceListener, java.lang.String)}.
     */
    @Test
    public void testAddServiceListenerBundleContextServiceListenerString() {
        final List refs = new ArrayList();

        ServiceListener list = new ServiceListener() {

            public void serviceChanged(ServiceEvent event) {
                if (ServiceEvent.REGISTERED == event.getType())
                    refs.add(event.getSource());
            }
        };

        OsgiListenerUtils.addServiceListener(bundleContext, list, (String) null);

        assertFalse(refs.isEmpty());
        assertEquals(3, refs.size());
        assertSame(ref1, refs.get(0));
        assertSame(ref2, refs.get(1));
        assertSame(ref3, refs.get(2));
    }

    /**
     * Test method for
     * {@link org.eclipse.gemini.blueprint.util.OsgiListenerUtils#addSingleServiceListener(org.osgi.framework.BundleContext, org.osgi.framework.ServiceListener, java.lang.String)}.
     */
    @Test
    public void testAddSingleServiceListenerBundleContextServiceListenerString() {
        final List refs = new ArrayList();

        ServiceListener listener = new ServiceListener() {

            public void serviceChanged(ServiceEvent event) {
                if (ServiceEvent.REGISTERED == event.getType())
                    refs.add(event.getSource());
            }
        };

        OsgiListenerUtils.addSingleServiceListener(bundleContext, listener, (String) null);

        assertFalse(refs.isEmpty());
        assertEquals(1, refs.size());
        assertSame(ref1, refs.get(0));
    }

    /**
     * Test method for
     * {@link org.eclipse.gemini.blueprint.util.OsgiListenerUtils#removeServiceListener(org.osgi.framework.BundleContext, org.osgi.framework.ServiceListener)}.
     */
    @Test
    public void testRemoveServiceListenerBundleContextServiceListener() {
        ServiceListener listener = new ServiceListener() {

            public void serviceChanged(ServiceEvent event) {
            }
        };

        OsgiListenerUtils.addSingleServiceListener(bundleContext, listener, (String) null);
        assertEquals(1, bundleContext.getServiceListeners().size());
        OsgiListenerUtils.removeServiceListener(bundleContext, listener);
    }

}


text:
{% extends 'layouts/base.html' %} {% import 'macros/form_macros.html' as f %} {% block content %}

        {{ user.full_name() }}

             {{ user.email }}

             {{ user.student_profile.grade }}th Grade

            {{ user.student_profile.high_school }}, {{ user.student_profile.graduation_year }}

            {{ user.student_profile.phone_number }}

              {{ user.student_profile.district }}, {{ user.student_profile.city }}, {{ user.student_profile.state }}

      <button class="right floated ui button" onclick="window.location.href='{{ url_for('student.edit_profile', student_profile_id=user.student_profile.id) }}';">Edit Profile</button>
      <button class="right floated ui button" onclick="window.location.href='{{ url_for('student.checklist', student_profile_id=user.student_profile.id) }}';">View Tasks</button>

Academic Information

Unweighted GPA

{{ user.student_profile.unweighted_gpa }}

Weighted GPA

{{ user.student_profile.weighted_gpa }}

SAT

{{ sat }}

ACT

{{ act }}

        Test Scores

          Test Name
          Date
          Score
          {% if user.student_profile.test_scores|length > 0 %}

          {% endif %}

          {% if user.student_profile.test_scores|length > 0 %} {% for test in user.student_profile.test_scores|sort(attribute='name') %}

            {{ test.name }}
            {{ test.month }} {{ test.year }}
            {{ test.score|string }}

          {% endfor %} {% else %}

              No test scores.

          {% endif %}

                 Add Test Score

        Majors of Interest

          Major

          {% if user.student_profile.majors|length > 0 %} {% for major in user.student_profile.majors|sort(attribute='name') %}

            {{ major.name }}

          {% endfor %} {% else %}

              No majors.

          {% endif %}

                 Add Major

        Colleges of Interest

          College

          {% if user.student_profile.colleges|length > 0 %} {% for college in user.student_profile.colleges|sort(attribute='name') %}

            {{ college.name }}

                 View Profile

          {% endfor %} {% else %}

              No colleges.

          {% endif %}

                College Comparer

                 Add College

College Application Information

Essays

          Essay
          Status

          {% if user.student_profile.common_app_essay|length > 0 %} {% if user.student_profile.common_app_essay_status=='Incomplete' %}

          {% elif user.student_profile.common_app_essay_status=='Done' %}

          {% else %}

          {% endif %}
            Common App Essay
            {{ user.student_profile.common_app_essay_status }}

                View Essay

          {% endif %}

          {% if user.student_profile.essays|length > 0 %} {% for essay in user.student_profile.essays|sort(attribute='name') %} {% if essay.status=='Incomplete' %}

          {% elif essay.status=='Done' %}

          {% else %}

          {% endif %}
            {{ essay.name }}
            {{ essay.status }}

                View Essay

          {% endfor %} {% elif user.student_profile.common_app_essay|length == 0 %}

              No essays.

          {% endif %}

                 Add Supplemental Essay
               {% if user.student_profile.common_app_essay|length == 0 %}

                 Add Common App Essay
               {% endif %}

Recommendation Letters

          Name
          Description
          Status

          {% if user.student_profile.recommendation_letters|length > 0 %} {% for letter in user.student_profile.recommendation_letters|sort(attribute='name') %} {% if letter.status=='Incomplete' %}

            {% elif letter.status=='Submitted' %}

              {% else %}

                {% endif %}
                {{ letter.name }}
                {{ letter.category }}
                {{ letter.status }}

              {% endfor %} {% else %}

                  No recommendation letters.

              {% endif %}

                 Add Recommendation Letter

Acceptances

Colleges

          Cost of Attendance
          College
          Status

          {% if user.student_profile.acceptances|length > 0 %} {% for acceptance in
            user.student_profile.acceptances|sort(attribute='college') %}

              {% if acceptance.net_cost >= 0 %}
              {{ acceptance.net_cost }}
              {% else %}
              Pending Award Parsing
              {% endif %}
              {{ acceptance.college }}
              {{ acceptance.status }}

                      Award Letter

            {% endfor %}{% else %}

                No acceptances added.

            {% endif %}

                Add Acceptance

Scholarships

            Name
            Award Amount

            {% if user.student_profile.scholarships|length > 0 %} {% for scholarship in
              user.student_profile.scholarships|sort(attribute='name') %}

                {{ scholarship.name }}
                {{ scholarship.award_amount }}

              {% endfor %}{% else %}

                  No scholarships added.

              {% endif %}

                  Add Scholarship

{% endblock %}


text:
from ._mcp import MCP, MCP_Geometric, make_offsets

def route_through_array(array, start, end, fully_connected=True, geometric=True):
    """Simple example of how to use the MCP and MCP_Geometric classes.

    See the MCP and MCP_Geometric class documentation for explanation of the
    path-finding algorithm.

    Parameters
    ----------
    array : ndarray
        Array of costs.
    start : iterable
        n-d index into `array` defining the starting point
    end : iterable
        n-d index into `array` defining the end point
    fully_connected : bool (optional)
        If True, diagonal moves are permitted, if False, only axial moves.
    geometric : bool (optional)
        If True, the MCP_Geometric class is used to calculate costs, if False,
        the MCP base class is used. See the class documentation for
        an explanation of the differences between MCP and MCP_Geometric.

    Returns
    -------
    path : list
        List of n-d index tuples defining the path from `start` to `end`.
    cost : float
        Cost of the path.
    """
    start, end = tuple(start), tuple(end)
    if geometric:
        mcp_class = MCP_Geometric
    else:
        mcp_class = MCP
    m = mcp_class(array, fully_connected=fully_connected)
    costs, traceback_array = m.find_costs([start], [end])
    return m.traceback(end), costs[end]


text:
namespace llvm {
// Forward declarations.
class LegalizerInfo;
class Legalizer;
class MachineRegisterInfo;

class LegalizerHelper {
public:
  enum LegalizeResult {
    /// Instruction was already legal and no change was made to the
    /// MachineFunction.
    AlreadyLegal,

    /// Instruction has been legalized and the MachineFunction changed.
    Legalized,

    /// Some kind of error has occurred and we could not legalize this
    /// instruction.
    UnableToLegalize,
  };

  LegalizerHelper(MachineFunction &MF);

  /// Replace \p MI by a sequence of legal instructions that can implement the
  /// same operation. Note that this means \p MI may be deleted, so any iterator
  /// steps should be performed before calling this function. \p Helper should
  /// be initialized to the MachineFunction containing \p MI.
  ///
  /// Considered as an opaque blob, the legal code will use and define the same
  /// registers as \p MI.
  LegalizeResult legalizeInstrStep(MachineInstr &MI);

  /// Legalize an instruction by emiting a runtime library call instead.
  LegalizeResult libcall(MachineInstr &MI);

  /// Legalize an instruction by reducing the width of the underlying scalar
  /// type.
  LegalizeResult narrowScalar(MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy);

  /// Legalize an instruction by performing the operation on a wider scalar type
  /// (for example a 16-bit addition can be safely performed at 32-bits
  /// precision, ignoring the unused bits).
  LegalizeResult widenScalar(MachineInstr &MI, unsigned TypeIdx, LLT WideTy);

  /// Legalize an instruction by splitting it into simpler parts, hopefully
  /// understood by the target.
  LegalizeResult lower(MachineInstr &MI, unsigned TypeIdx, LLT Ty);

  /// Legalize a vector instruction by splitting into multiple components, each
  /// acting on the same scalar type as the original but with fewer elements.
  LegalizeResult fewerElementsVector(MachineInstr &MI, unsigned TypeIdx,
                                     LLT NarrowTy);

  /// Legalize a vector instruction by increasing the number of vector elements
  /// involved and ignoring the added elements later.
  LegalizeResult moreElementsVector(MachineInstr &MI, unsigned TypeIdx,
                                    LLT WideTy);

  /// Expose MIRBuilder so clients can set their own RecordInsertInstruction
  /// functions
  MachineIRBuilder MIRBuilder;

  /// Expose LegalizerInfo so the clients can re-use.
  const LegalizerInfo &getLegalizerInfo() const { return LI; }

private:
  /// Legalize a single operand \p OpIdx of the machine instruction \p MI as a
  /// Use by extending the operand's type to \p WideTy using the specified \p
  /// ExtOpcode for the extension instruction, and replacing the vreg of the
  /// operand in place.
  void widenScalarSrc(MachineInstr &MI, LLT WideTy, unsigned OpIdx,
                      unsigned ExtOpcode);

  /// Legalize a single operand \p OpIdx of the machine instruction \p MI as a
  /// Def by extending the operand's type to \p WideTy and truncating it back
  /// with the \p TruncOpcode, and replacing the vreg of the operand in place.
  void widenScalarDst(MachineInstr &MI, LLT WideTy, unsigned OpIdx = 0,
                      unsigned TruncOpcode = TargetOpcode::G_TRUNC);

  /// Helper function to split a wide generic register into bitwise blocks with
  /// the given Type (which implies the number of blocks needed). The generic
  /// registers created are appended to Ops, starting at bit 0 of Reg.
  void extractParts(unsigned Reg, LLT Ty, int NumParts,
                    SmallVectorImpl<unsigned> &VRegs);

  MachineRegisterInfo &MRI;
  const LegalizerInfo &LI;
};

/// Helper function that creates the given libcall.
LegalizerHelper::LegalizeResult
createLibcall(MachineIRBuilder &MIRBuilder, RTLIB::Libcall Libcall,
              const CallLowering::ArgInfo &Result,
              ArrayRef<CallLowering::ArgInfo> Args);

} // End namespace llvm.

#endif


text:
using Abp.Application.Features;
using Abp.UI.Inputs;

using static Abp.ZeroCore.SampleApp.Application.AppLocalizationHelper;

namespace Abp.ZeroCore.SampleApp.Application
{
    public class AppFeatureProvider : FeatureProvider
    {
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            context.Create(
                AppFeatures.SimpleBooleanFeature,
                defaultValue: "false",
                displayName: L("SimpleBooleanFeature"),
                inputType: new CheckboxInputType()
            );
        }
    }
}