text:
.app {
    background-size: cover;
	background-color: #8F99A8;
	background-color: rgba(0,0,0,0);

}

.theme-dark .chat {
	background-color: rgba(0,0,0,0) !important;
}

.theme-light .chat {
	background-color: rgba(0,0,0,0) !important;
}

.private-channel-call {
	background-color: rgba(0,0,0,0.7) !important;
	box-shadow: inset 0 -4px 10px 0 rgba(0,0,0,0) !important;
	background-image: url() !important;
}

#previousButton {
    color: rgba(255,255,255,0.3);
	background-color: rgba(0,0,0,0) !important;
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
    filter: alpha(opacity=30);
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
	cursor: pointer;
	position: fixed;
	bottom: 2px;
    left: 230px;
}

#nextButton {
    color: rgba(255,255,255,0.3);
	background-color: rgba(0,0,0,0) !important;
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
    filter: alpha(opacity=30);
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
	cursor: pointer;
	position: fixed;
	bottom: 2px;
    left: 260px;
}

#previousButton:hover {
    text-decoration: underline;
}

#nextButton:hover {
    text-decoration: underline;
}

.theme-light .message-group {
    border-bottom: 1px solid rgba(0, 0, 0, 0) !important;
}

.theme-dark .message-group {
    border-bottom: 1px solid rgba(0, 0, 0, 0) !important;
}

.btn-group {
    border: 0px solid #1c1e22 !important;
    border-radius: 0px !important;
}

.btn-mute, .btn-account {
	border-right: 0px !important;
}

.account .btn-deafen, .account .btn-mute {
	border-right: 0px !important;
}

.account .btn-deafen, .account .btn-settings {
	box-shadow: inset 0px 0 0 #373b42;
}

#voice-connection .btn-info {
	border-right: 0px !important;
}

#voice-connection .btn-disconnect {
	box-shadow: inset 0px 0 0 #373b42;
}

.account {
	border-top: 1px solid rgba(0,0,0,0) !important;
}

.account .btn-settings:after {
	opacity: 0.3;
}

.chat .content {
    background-color: rgba(0,0,0,0.6) !important;
}

.messages-wrapper, .typing, .typing-animate {
	background-color: rgba(0,0,0,0) !important;
}

.channels-wrap, .guilds-wrapper {
	background: rgba(0,0,0,0.7) !important;
}

.chat>.title-wrap {
	background: rgba(0,0,0,0.7) !important;
	background-color: rgba(0,0,0,0.7) !important;
}

.theme-light .links {
	border-top: 1px solid #D1D1D1 !important;
}

.theme-light .account {
	border-top: 1px solid rgba(0,0,0,0) !important;
}

.theme-dark .links {
	border-top: 1px solid #1c1e22 !important;
}

.theme-dark .account {
	border-top: 1px solid rgba(0,0,0,0) !important;
}

.callout-backdrop {
    background-color: rgba(0,0,0,0.9) !important;
}

.guild-channels, #voice-connection, .account, .links, .guilds {
	background: rgba(0,0,0,0) !important;
}

.account .btn, #voice-connection .btn  {
	background: rgba(0,0,0,0) !important;
}

.theme-light .account .btn-group, .theme-light #voice-connection .btn-group  {
    border: 1px solid #D1D1D1 !important;
}

.theme-light .account .btn-deafen, .theme-light .account .btn-mute, .theme-light #voice-connection .btn-info  {
	border-right: 1px solid #D1D1D1;
}

#user-profile-modal .scroller {
	background: #fff !important;
}
.guilds-wrapper .guilds-add {
	background: rgba(0,0,0,0.2) !important;
	border: none;
}

.guilds-wrapper .guilds .guild .guild-inner {
	background: rgba(0,0,0,0.2) !important;
	background-color: rgba(0,0,0,0);
}
.guilds-wrapper .guilds .guild .guild-inner :hover {
    background-color: rgb(114, 137, 218) !important;
	transition:all 100ms ease;
}
.channel-textarea-inner, .theme-light .channel-textarea-inner textarea  {
	background-color: rgba(0,0,0,0) !important;
}

.theme-light .channel-textarea-inner {
	border: 2px solid #BDBDBD;
}

.theme-light .channel-textarea-inner textarea {
	color: #ECECEC !important;
}

.theme-light .message-group .comment .markup pre {
	background-color: #f9f9f9 !important;
	color: #657b83 !important;
}

.theme-light .highlight {
	background: rgba(0,0,0,0.2) !important;
}

.theme-dark .highlight {
	background: rgba(255,255,255,0.05) !important;
}

.theme-light .message-group .comment .markup code.inline {
	background-color: #f9f9f9 !important;
	color: #657b83 !important;
}

.guild-channels .channel {
	font-size: 15.5px;
}
.guild-channels .channel-text.selected {
    background: -webkit-linear-gradient(left,rgba(0, 0, 0, 0) 85%,rgba(0, 0, 0, 0)) !important;
    background: linear-gradient(90deg,rgba(0, 0, 0, 0) 85%,rgba(0, 0, 0, 0)) !important;
	background: rgba(0,0,0,0.2) !important;
}

.guild-channels .channel-text:hover {
    background: -webkit-linear-gradient(left,rgba(0, 0, 0, 0) 85%,rgba(0, 0, 0, 0)) !important;
    background: linear-gradient(90deg,rgba(0, 0, 0, 0) 85%,rgba(0, 0, 0, 0)) !important;
	background: rgba(0,0,0,0.2) !important;
}

.theme-light .message-group {
	border-bottom: 1px solid #828282 !important;
}

.theme-light .message-group .comment .markup code.inline {
	background: #2e3136;
}
.friends-table, .messages-wrapper  {
	background: rgba(0,0,0,0) !important;
}

#friends .friends-header, .search-bar {
	background-color: rgba(0,0,0,0) !important;
}

#friends .friends-table .friends-row:hover {
	background: -webkit-linear-gradient(left,rgba(0, 0, 0, 0) 85%,rgba(0, 0, 0, 0)) !important;
    background: linear-gradient(90deg,rgba(0, 0, 0, 0) 85%,rgba(0, 0, 0, 0)) !important;
	background: rgba(0,0,0,0.2) !important;
}

.friends-table .scroller-wrap ::-webkit-scrollbar-track-piece, .messages-wrapper .scroller-wrap ::-webkit-scrollbar-track-piece {
	background-color: rgba(0,0,0,0) !important;
	border: none !important;

}
.theme-dark .friends-table .scroller-wrap ::-webkit-scrollbar-thumb, .theme-dark .messages-wrapper .scroller-wrap ::-webkit-scrollbar-thumb {
	background-color: rgba(0,0,0,0.2) !important;
}

.theme-light .friends-table .scroller-wrap ::-webkit-scrollbar-thumb, .theme-light .messages-wrapper .scroller-wrap ::-webkit-scrollbar-thumb {
	background-color: rgba(255,255,255,0.2) !important;
}

.friends-table .scroller-wrap ::-webkit-scrollbar-thumb, .messages-wrapper .scroller-wrap ::-webkit-scrollbar-thumb {
	border-color: rgba(0,0,0,0) !important;
}

.private-channels .channel.selected {
    background: -webkit-linear-gradient(left,rgba(0, 0, 0, 0) 85%,rgba(0, 0, 0, 0)) !important;
    background: linear-gradient(90deg,rgba(0, 0, 0, 0) 85%,rgba(0, 0, 0, 0))!important;
	background: rgba(0,0,0,0.2) !important;
}

.private-channels  .channel:hover {
    background: -webkit-linear-gradient(left,rgba(0, 0, 0, 0) 85%,rgba(0, 0, 0, 0)) !important;
    background: linear-gradient(90deg,rgba(0, 0, 0, 0) 85%,rgba(0, 0, 0, 0)) !important;
	background: rgba(0,0,0,0.2) !important;
}

/*
.scroller-wrap.dark .scroller::-webkit-scrollbar-thumb {
	background-color: #f3f3f3;
}
*/

#friends {
	background-color: rgba(0,0,0,0.6) !important;
}
.theme-light #friends .friends-header {
	background-color: rgba(0,0,0,0) !important;
}

.private-channels {
	background: rgba(0,0,0,0) !important;
}

.theme-light .message-group .comment .markup {
	color: #ECECEC !important;
}

.theme-light .guild-channels .channel a, .theme-light .chat>.title-wrap>.title .channel-name {
	color: #CECECE !important;
	opacity: 1 !important;
}
/*
.channels-wrap {
    border-left: thin solid #282B30;
    background-color: rgba(0,0,0,0) !important;
    border-right: thin solid #282B30;
}

.guilds-wrapper {
    background-color: rgba(0,0,0,0) !important;
}
.guild-channels {
    background-color: rgba(0,0,0,0) !important;
}
.chat>.content, .theme-dark .friends-table, .theme-dark .messages-wrapper {
    background-color: rgba(0,0,0,0) !important;
}
.theme-dark .chat form {
    background-color: rgba(0,0,0,0) !important;
}
*/

/*--------------------------------------------*/
div[class*="layer"], div[class*="layers-"] {
    background: transparent !important;
}

div[class*="membersWrap-"] {
    transform:translate(150px);
    z-index:2;
    transition:all 300ms ease;
	background: transparent !important;
}

div[class*="members"], div[class*="typing"] {
    background: transparent !important;
}

div[class*="membersWrap-"]:hover {
    animation: member 300ms ease;
    transform:translate(0px);
	background-color: #2e3136 !important;
	background-color: rgba(0, 0, 0, 0.2) !important;
}

div[class*="members"], div[class*="typing"] {
    background: transparent !important;
}

div[class*="membersWrap-"] div[class*="members"]:hover {
	background: linear-gradient(90deg,rgba(0,0,0,0) ,rgba(0,0,0,0)) !important;
	background-color: rgba(0, 0, 0, 0.2) !important;
}

div[class*="membersWrap-"] .member.popout-open {
    background: -webkit-linear-gradient(left,rgba(0, 0, 0, 0) 85%,rgba(0, 0, 0, 0)) !important;
    background: linear-gradient(90deg,rgba(0, 0, 0, 0) 85%,rgba(0, 0, 0, 0)) !important;
	background: rgba(0,0,0,0.2) !important;
}

.app {
    overflow-x: hidden;
}
/*
.guild-header ul {
	transform: translate3d(0,-150%,0) !important;
}
*/

.guild-header.guild-header-open ul {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
	border-radius: 5px;
}

.theme-light .guild-header ul a {
    color: #737f8d !important;
    opacity: 1 !important;
}

.theme-light .guild-header ul {
    background: #FFFFFF !important;
}

.theme-light .guild-header ul a:hover {
	background-color: rgba(0,0,0,0.2) !important;
}

.guild-header ul a.red-highlight {
	color: #f04747 !important;
}

.theme-light #friends .friends-table .friends-row .friends-column-name {
	color: #CECECE !important;
}

.theme-light #friends .friends-table .friends-row .friends-column-status {
	color: #CECECE !important;
}

.theme-light #friends .friends-empty p {
	color: #CECECE !important;
}

.chat>.title-wrap {
	border-bottom: none !important;
	box-shadow: none !important;
}

.theme-light .scroller-wrap.light .scroller::-webkit-scrollbar-thumb {
	background-color: #7289da !important;
}
.guild-header header {
	background-color: rgba(0,0,0,0) !important;
	box-shadow: 0 1px 0 rgba(0,0,0,0),inset 0 -1px 0 rgba(0,0,0,0) !important;
}

div[class*="membersWrap-"] div[class*="memberInner"] {
    opacity:0;
    transition:opacity 300ms ease, margin 100ms ease;
}

div[class*="membersWrap-"] div[class*="memberInner"] {
    margin-bottom:10px;
}

div[class*="membersWrap-"]:hover div[class*="memberInner"] {
    opacity:1;
}

.header-toolbar button.active{
    display:none;
}

div[class*="membersWrap-"] h2{
    transform-origin:left;
    transform:scale(0.8);
    padding:0px 0px 0px 10px;
    transition: all 300ms ease;

}

.invite-btn {
    width: 30px;
    height: 30px;
	padding: 0px 0px !important;
	text-indent: 100%;
	white-space: nowrap;
	overflow: hidden;
	background: url(/assets/181143c7c10c902dc9183f39d1198d11.svg) 50% no-repeat;
    background-size: 16px 16px;
	transition: all 400ms ease;

}

div[class*="membersWrap-"]:hover  .invite-btn , div[class*="membersWrap-"]:hover .invite-btn, {
	width: initial !important;
    height: initial !important;
	padding: 5px 23px !important;
	text-indent: initial !important;
	white-space: initial !important;
	overflow: initial !important;
    background-size: 16px 16px;
	background: url() 50% no-repeat;
	background-color: #7289da;
	transition: all 400ms ease;

}

div[class*="membersWrap-"]:hover h2{
    transform:scale(1);
    padding:0px 0px 0px 30px;
}
div[class*="membersWrap-"] .avatar-small{
    transform:scale(1);
}
div[class*="membersWrap-"]:hover .avatar-small{
    transform:scale(1);
}

.chat.flex-vertical.flex-spacer>.content.flex-spacer.flex-horizontal>.flex-spacer.flex-vertical{
    margin-right:-145px;
    z-index:1
}

.chat .flex-vertical .flex-spacer .private >.content.flex-spacer.flex-horizontal>.flex-spacer.flex-vertical{
    margin-right:-145px;
    z-index:1
}

.chat.flex-vertical.flex-spacer.private>.content.flex-spacer.flex-horizontal>.flex-spacer.flex-vertical {
	margin-right:-145px;
	z-index:1;
}

#app-mount {
	background-color: rgba(0,0,0,0);
}

div[class*="titleBar-"] {
	background-color: rgba(0,0,0,0.8);
	margin-top: 0 !important;
	padding-top: 4px;
	/*fix your shit, discord*/
}


text:
<?php

/**
 * sfDoctrinePluginConfiguration Class
 *
 * @package    symfony
 * @subpackage doctrine
 * @author     Jonathan H. Wage <jonwage@gmail.com>
 * @version    SVN: $Id: sfDoctrinePluginConfiguration.class.php 24295 2009-11-23 21:46:39Z Kris.Wallsmith $
 */
class sfDoctrinePluginConfiguration extends sfPluginConfiguration
{
  /**
   * @see sfPluginConfiguration
   */
  public function initialize()
  {
    sfConfig::set('sf_orm', 'doctrine');

    if (!sfConfig::get('sf_admin_module_web_dir'))
    {
      sfConfig::set('sf_admin_module_web_dir', '/sfDoctrinePlugin');
    }

    if (sfConfig::get('sf_web_debug'))
    {
      require_once dirname(__FILE__).'/../lib/debug/sfWebDebugPanelDoctrine.class.php';

      $this->dispatcher->connect('debug.web.load_panels', array('sfWebDebugPanelDoctrine', 'listenToAddPanelEvent'));
    }

    require_once sfConfig::get('sf_doctrine_dir', realpath(dirname(__FILE__).'/../lib/vendor/doctrine')).'/Doctrine.php';
    spl_autoload_register(array('Doctrine', 'autoload'));

    $manager = Doctrine_Manager::getInstance();
    $manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_ALL);
    $manager->setAttribute(Doctrine::ATTR_VALIDATE, Doctrine::VALIDATE_NONE);
    $manager->setAttribute(Doctrine::ATTR_RECURSIVE_MERGE_FIXTURES, true);
    $manager->setAttribute(Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE, true);
    $manager->setAttribute(Doctrine::ATTR_AUTOLOAD_TABLE_CLASSES, true);

    // apply default attributes
    $manager->setDefaultAttributes();

    if (method_exists($this->configuration, 'configureDoctrine'))
    {
      $this->configuration->configureDoctrine($manager);
    }

    $this->dispatcher->notify(new sfEvent($manager, 'doctrine.configure'));
  }

  /**
   * Returns options for the Doctrine schema builder.
   *
   * @return array
   */
  public function getModelBuilderOptions()
  {
    $options = array(
      'generateBaseClasses'  => true,
      'generateTableClasses' => true,
      'packagesPrefix'       => 'Plugin',
      'suffix'               => '.class.php',
      'baseClassesDirectory' => 'base',
      'baseClassName'        => 'sfDoctrineRecord',
    );

    // for BC
    $options = array_merge($options, sfConfig::get('doctrine_model_builder_options', array()));

    // filter options through the dispatcher
    $options = $this->dispatcher->filter(new sfEvent($this, 'doctrine.filter_model_builder_options'), $options)->getReturnValue();

    return $options;
  }

  /**
   * Returns a configuration array for the Doctrine CLI.
   *
   * @return array
   */
  public function getCliConfig()
  {
    $config = array(
      'data_fixtures_path' => array_merge(array(sfConfig::get('sf_data_dir').'/fixtures'), $this->configuration->getPluginSubPaths('/data/fixtures')),
      'models_path'        => sfConfig::get('sf_lib_dir').'/model/doctrine',
      'migrations_path'    => sfConfig::get('sf_lib_dir').'/migration/doctrine',
      'sql_path'           => sfConfig::get('sf_data_dir').'/sql',
      'yaml_schema_path'   => sfConfig::get('sf_config_dir').'/doctrine',
    );

    // filter config through the dispatcher
    $config = $this->dispatcher->filter(new sfEvent($this, 'doctrine.filter_cli_config'), $config)->getReturnValue();

    return $config;
  }
}

redpajama_set_name: RedPajamaGithub


text:
import EdgeEndBundleStar from './EdgeEndBundleStar';
import extend from '../../../../../extend';
import RelateNode from './RelateNode';
import inherits from '../../../../../inherits';
import NodeFactory from '../../geomgraph/NodeFactory';
export default function RelateNodeFactory() {
	NodeFactory.apply(this);
}
inherits(RelateNodeFactory, NodeFactory);
extend(RelateNodeFactory.prototype, {
	createNode: function (coord) {
		return new RelateNode(coord, new EdgeEndBundleStar());
	},
	interfaces_: function () {
		return [];
	},
	getClass: function () {
		return RelateNodeFactory;
	}
});


text:
class Inetutils < Formula
  desc "GNU utilities for networking"
  homepage "https://www.gnu.org/software/inetutils/"
  url "https://ftp.gnu.org/gnu/inetutils/inetutils-1.9.4.tar.xz"
  mirror "https://ftpmirror.gnu.org/inetutils/inetutils-1.9.4.tar.xz"
  sha256 "849d96f136effdef69548a940e3e0ec0624fc0c81265296987986a0dd36ded37"
  revision 2

  bottle do
    sha256 "9f227bd3a357e822a8fbc399828a5ac3c06cc32c1d8d8e8da9a03a11f3df92e8" => :catalina
    sha256 "cd8d9c2d67518442b03bd4c6573a22408136fbfa54822db89db9236dca9d31bb" => :mojave
    sha256 "52c3e2f7e4d62cf0e0c742e81c026f591b9c331a338d110619b285d02a9d8b2f" => :high_sierra
    sha256 "40fc6bf3589516e420a3452c7effc46cb9463150680ab08ceed27206ddfe0b2a" => :sierra
  end

  depends_on "libidn"

  def noshadow
    # List of binaries that do not shadow macOS utils
    list = %w[dnsdomainname rcp rexec rlogin rsh]
    list += %w[ftp telnet] if MacOS.version >= :high_sierra
    list
  end

  def install
    args = %W[
      --disable-dependency-tracking
      --disable-silent-rules
      --prefix=#{prefix}
      --program-prefix=g
      --with-idn
    ]

    system "./configure", *args
    system "make", "install"

    # Binaries not shadowing macOS utils symlinked without 'g' prefix
    noshadow.each do |cmd|
      bin.install_symlink "g#{cmd}" => cmd
      man1.install_symlink "g#{cmd}.1" => "#{cmd}.1"
    end

    # Symlink commands without 'g' prefix into libexec/gnubin and
    # man pages into libexec/gnuman
    bin.find.each do |path|
      next unless File.executable?(path) && !File.directory?(path)

      cmd = path.basename.to_s.sub(/^g/, "")
      (libexec/"gnubin").install_symlink bin/"g#{cmd}" => cmd
      (libexec/"gnuman"/"man1").install_symlink man1/"g#{cmd}.1" => "#{cmd}.1"
    end

    libexec.install_symlink "gnuman" => "man"
  end

  def caveats; <<~EOS
    The following commands have been installed with the prefix 'g'.

        #{noshadow.sort.join("\n    ")}

    If you really need to use these commands with their normal names, you
    can add a "gnubin" directory to your PATH from your bashrc like:

        PATH="#{opt_libexec}/gnubin:$PATH"
  EOS
  end

  test do
    output = pipe_output("#{libexec}/gnubin/ftp -v",
                         "open ftp.gnu.org\nanonymous\nls\nquit\n")
    assert_match "Connected to ftp.gnu.org.\n220 GNU FTP server ready", output
  end
end


text:
package com.vaadin.ui;

import org.jsoup.nodes.Element;

import com.vaadin.shared.ui.textarea.TextAreaServerRpc;
import com.vaadin.shared.ui.textarea.TextAreaState;
import com.vaadin.ui.declarative.DesignContext;
import com.vaadin.ui.declarative.DesignFormatter;

/**
 * A text field that supports multi line editing.
 */
public class TextArea extends AbstractTextField {

    /**
     * Constructs an empty TextArea.
     */
    public TextArea() {
        registerRpc(new TextAreaServerRpc() {

            @Override
            public void setHeight(String height) {
                TextArea.this.setHeight(height);
            }

            @Override
            public void setWidth(String width) {
                TextArea.this.setWidth(width);
            }
        });
        clear();
    }

    /**
     * Constructs an empty TextArea with given caption.
     *
     * @param caption
     *            the caption for the field.
     */
    public TextArea(String caption) {
        this();
        setCaption(caption);
    }

    /**
     * Constructs a TextArea with given caption and value.
     *
     * @param caption
     *            the caption for the field
     * @param value
     *            the value for the field, not {@code null}
     */
    public TextArea(String caption, String value) {
        this(caption);
        setValue(value);
    }

    /**
     * Constructs a new {@code TextArea} with a value change listener.
     *

     * The listener is called when the value of this {@code TextArea} is changed
     * either by the user or programmatically.
     *
     * @param valueChangeListener
     *            the value change listener, not {@code null}
     * @since 8.0
     */
    public TextArea(ValueChangeListener<String> valueChangeListener) {
        addValueChangeListener(valueChangeListener);
    }

    /**
     * Constructs a new {@code TextArea} with the given caption and a value
     * change listener.
     *

     * The listener is called when the value of this {@code TextArea} is changed
     * either by the user or programmatically.
     *
     * @param caption
     *            the caption for the field
     * @param valueChangeListener
     *            the value change listener, not {@code null}
     * @since 8.0
     */
    public TextArea(String caption,
            ValueChangeListener<String> valueChangeListener) {
        this(valueChangeListener);
        setCaption(caption);
    }

    /**
     * Constructs a new {@code TextArea} with the given caption, initial text
     * contents and a value change listener.
     *

     * The listener is called when the value of this {@code TextArea} is changed
     * either by the user or programmatically.
     *
     * @param caption
     *            the caption for the field
     * @param value
     *            the value for the field, not {@code null}
     * @param valueChangeListener
     *            the value change listener, not {@code null}
     * @since 8.0
     */
    public TextArea(String caption, String value,
            ValueChangeListener<String> valueChangeListener) {
        this(caption, value);
        addValueChangeListener(valueChangeListener);
    }

    @Override
    protected TextAreaState getState() {
        return (TextAreaState) super.getState();
    }

    @Override
    protected TextAreaState getState(boolean markAsDirty) {
        return (TextAreaState) super.getState(markAsDirty);
    }

    /**
     * Sets the number of rows in the text area.
     *
     * @param rows
     *            the number of rows for this text area.
     */
    public void setRows(int rows) {
        if (rows < 0) {
            rows = 0;
        }
        getState().rows = rows;
    }

    /**
     * Gets the number of rows in the text area.
     *
     * @return number of explicitly set rows.
     */
    public int getRows() {
        return getState(false).rows;
    }

    /**
     * Sets the text area's word-wrap mode on or off.
     *
     * @param wordWrap
     *            true to use word-wrap mode false
     *            otherwise.
     */
    public void setWordWrap(boolean wordWrap) {
        getState().wordWrap = wordWrap;
    }

    /**
     * Tests if the text area is in word-wrap mode.
     *
     * @return true if the component is in word-wrap mode,
     *         false if not.
     */
    public boolean isWordWrap() {
        return getState(false).wordWrap;
    }

    @Override
    public void readDesign(Element design, DesignContext designContext) {
        super.readDesign(design, designContext);
        doSetValue(DesignFormatter.decodeFromTextNode(design.html()));
    }

    @Override
    public void writeDesign(Element design, DesignContext designContext) {
        super.writeDesign(design, designContext);
        design.html(DesignFormatter.encodeForTextNode(getValue()));
    }
}


text:
package com.thang.view.chat;

import java.awt.BorderLayout;

import javax.swing.BorderFactory;
import javax.swing.JPanel;

import org.jivesoftware.smack.Chat;

import com.thang.tools.model.ChatInfo;

/**
 * 显示聊天内容
 * @author gandilong
 *
 */
public class ChatPanel extends JPanel {

	private static final long serialVersionUID = 1L;

	private ShowPanel show=null;
	private InputPanel input=null;

	private ChatInfo chatInfo=null;

	public ChatPanel(ChatInfo info){
		this.chatInfo=info;
	    init();
	}

	private void init(){
		try {
			setLayout(new BorderLayout());
			setBorder(BorderFactory.createRaisedBevelBorder());
			setSize(400, 470);
			input=new InputPanel(this);
			show=new ShowPanel(this);
			add(input,BorderLayout.SOUTH);
			add(show,BorderLayout.CENTER);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public void show(String content){
		show.addText(content);
	}

	public void setChat(Chat chat){
		input.setChat(chat);
	}

	public ChatInfo getChatInfo(){
		return chatInfo;
	}

}


text:
package com.kent.service.kentcustomer.util;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;

/**
 * Created by Hardeep Singh on 09-Sep-15.
 */
public class LinkedHashMapHelper
{
    public static LinkedHashMap fromJSONObject(JSONObject json)  throws JSONException
    {
        LinkedHashMap data = new LinkedHashMap();

        try
        {
            Iterator<?> keys = json.keys();

            while( keys.hasNext() )
            {
                String key = (String)keys.next();

                Object obj = json.get(key);

                if ( obj instanceof JSONObject )
                {
                    data.put(key, fromJSONObject((JSONObject) obj));
                }
                else if ( obj instanceof JSONArray)
                {
                    data.put(key, fromJSONArray((JSONArray) obj));
                }
                else if (obj instanceof String)
                {
                    data.put(key, obj);
                }
                else
                {
                    data.put(key, obj);
                }
            }

        }
        catch (Exception ex)
        {
            throw new JSONException(ex.toString());
        }

        return data;
    }

    public static LinkedHashMap fromJSONArray(JSONArray json) throws JSONException
    {
        LinkedHashMap data = new LinkedHashMap();

        try
        {
            for (int i = 0; i < json.length(); i++)
            {
                Object obj = json.get(i);

                if ( obj instanceof JSONObject )
                {
                    data.put(i, fromJSONObject((JSONObject) obj));
                }
                else if ( obj instanceof JSONArray)
                {
                    data.put(i, fromJSONArray((JSONArray) obj));
                }
                else if (obj instanceof String)
                {
                    data.put(i, obj);
                }
                else
                {
                    data.put(i, obj);
                }
            }

        }
        catch (JSONException ex)
        {
            throw new JSONException(ex.toString());
        }

        return data;
    }

    public static JSONObject toJSONObject(LinkedHashMap data)  throws JSONException
    {
        JSONObject json = new JSONObject();

        try
        {
            Set set = data.entrySet();
            Iterator itr = set.iterator();

            while(itr.hasNext())
            {
                Map.Entry row = (Map.Entry)itr.next();

                Object obj = row.getValue();

                if ( obj instanceof LinkedHashMap )
                {
                    Set set2 = ((LinkedHashMap) obj).entrySet();
                    Iterator itr2 = set2.iterator();

                    boolean json_array = true;

                    try {
                        while (itr2.hasNext())
                        {
                            Map.Entry row2 = (Map.Entry) itr2.next();
                            Integer.parseInt(String.valueOf(row2.getKey()));
                        }
                    }
                    catch(Exception e)
                    {
                        json_array = false;
                    }

                    if (json_array)
                    {
                        json.put(String.valueOf(row.getKey()), (Object) toJSONArray((LinkedHashMap) obj));
                    }
                    else
                    {
                        json.put(String.valueOf(row.getKey()), (Object) toJSONObject((LinkedHashMap) obj));
                    }
                }
                else
                {
                    json.put(String.valueOf(row.getKey()), obj);
                }
            }

        }
        catch (JSONException ex)
        {
            throw new JSONException(ex.toString());
        }

        return json;
    }

    public static JSONArray toJSONArray(LinkedHashMap data)  throws JSONException
    {
        JSONArray json = new JSONArray();

        try
        {
            Set set = data.entrySet();
            Iterator itr = set.iterator();

            while(itr.hasNext())
            {
                Map.Entry row = (Map.Entry)itr.next();

                Object obj = row.getValue();

                if ( obj instanceof LinkedHashMap)
                {
                    json.put((Object) toJSONObject((LinkedHashMap) obj));
                }
                else
                {
                    json.put(String.valueOf(obj));
                }
            }

        }
        catch (JSONException ex)
        {
            throw new JSONException(ex.toString());
        }

        return json;
    }
}


text:
<div id="main">
        <p> Virtual addresses are maintained as links are navigated.  These
        virtual addresses allow the browser history and reload buttons to be
        utilized. </p>

        <p> Give it a whirl, hit your browser's back button now. </p>
</div>

<script class="noplate-skip">window.location.href='../#/example/virtual-addresses'</script>


text:
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F4xx_ADC_H
#define __STM32F4xx_ADC_H

#ifdef __cplusplus
 extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal_def.h"

/** @addtogroup STM32F4xx_HAL_Driver
  * @{
  */

/** @addtogroup ADC
  * @{
  */

/* Exported types ------------------------------------------------------------*/

/**
  * @brief  HAL State structures definition
  */
typedef enum
{
  HAL_ADC_STATE_RESET                   = 0x00,    /*!< ADC not yet initialized or disabled */
  HAL_ADC_STATE_READY                   = 0x01,    /*!< ADC peripheral ready for use */
  HAL_ADC_STATE_BUSY                    = 0x02,    /*!< An internal process is ongoing */
  HAL_ADC_STATE_BUSY_REG                = 0x12,    /*!< Regular conversion is ongoing */
  HAL_ADC_STATE_BUSY_INJ                = 0x22,    /*!< Injected conversion is ongoing */
  HAL_ADC_STATE_BUSY_INJ_REG            = 0x32,    /*!< Injected and regular conversion are ongoing */
  HAL_ADC_STATE_TIMEOUT                 = 0x03,    /*!< Timeout state */
  HAL_ADC_STATE_ERROR                   = 0x04,    /*!< ADC state error */
  HAL_ADC_STATE_EOC                     = 0x05,    /*!< Conversion is completed */
  HAL_ADC_STATE_EOC_REG                 = 0x15,    /*!< Regular conversion is completed */
  HAL_ADC_STATE_EOC_INJ                 = 0x25,    /*!< Injected conversion is completed */
  HAL_ADC_STATE_EOC_INJ_REG             = 0x35,    /*!< Injected and regular conversion are completed */
  HAL_ADC_STATE_AWD                     = 0x06    /*!< ADC state analog watchdog */

}HAL_ADC_StateTypeDef;

/**
  * @brief   ADC Init structure definition
  */
typedef struct
{
  uint32_t ClockPrescaler;        /*!< Select the frequency of the clock to the ADC. The clock is common for
                                       all the ADCs.
                                       This parameter can be a value of @ref ADC_ClockPrescaler */
  uint32_t Resolution;            /*!< Configures the ADC resolution dual mode.
                                       This parameter can be a value of @ref ADC_Resolution */
  uint32_t DataAlign;             /*!< Specifies whether the ADC data  alignment is left or right.
                                       This parameter can be a value of @ref ADC_data_align */
  uint32_t ScanConvMode;          /*!< Specifies whether the conversion is performed in Scan (multi channels) or
                                       Single (one channel) mode.
                                       This parameter can be set to ENABLE or DISABLE */
  uint32_t EOCSelection;          /*!< Specifies whether the EOC flag is set
                                       at the end of single channel conversion or at the end of all conversions.
                                       This parameter can be a value of @ref ADC_EOCSelection */
  uint32_t ContinuousConvMode;    /*!< Specifies whether the conversion is performed in Continuous or Single mode.
                                       This parameter can be set to ENABLE or DISABLE. */
  uint32_t DMAContinuousRequests; /*!< Specifies whether the DMA requests is performed in Continuous or in Single mode.
                                       This parameter can be set to ENABLE or DISABLE. */
  uint32_t NbrOfConversion;       /*!< Specifies the number of ADC conversions that will be done using the sequencer for
                                       regular channel group.
                                       This parameter must be a number between Min_Data = 1 and Max_Data = 16. */
  uint32_t DiscontinuousConvMode; /*!< Specifies whether the conversion is performed in Discontinuous or not
                                       for regular channels.
                                       This parameter can be set to ENABLE or DISABLE. */
  uint32_t NbrOfDiscConversion;   /*!< Specifies the number of ADC discontinuous conversions that will be done
                                       using the sequencer for regular channel group.
                                       This parameter must be a number between Min_Data = 1 and Max_Data = 8. */
  uint32_t ExternalTrigConvEdge;  /*!< Select the external trigger edge and enable the trigger of a regular group.
                                       This parameter can be a value of @ref ADC_External_trigger_edge_Regular */
  uint32_t ExternalTrigConv;      /*!< Select the external event used to trigger the start of conversion of a regular group.
                                       This parameter can be a value of @ref ADC_External_trigger_Source_Regular */
}ADC_InitTypeDef;

/**
  * @brief  ADC handle Structure definition
  */
typedef struct
{
  ADC_TypeDef                   *Instance;                   /*!< Register base address */

  ADC_InitTypeDef               Init;                        /*!< ADC required parameters */

  __IO uint32_t                 NbrOfCurrentConversionRank;  /*!< ADC number of current conversion rank */

  DMA_HandleTypeDef             *DMA_Handle;                 /*!< Pointer DMA Handler */

  HAL_LockTypeDef               Lock;                        /*!< ADC locking object */

  __IO HAL_ADC_StateTypeDef     State;                       /*!< ADC communication state */

  __IO uint32_t                 ErrorCode;                   /*!< ADC Error code */
}ADC_HandleTypeDef;

/**
  * @brief   ADC Configuration regular Channel structure definition
  */
typedef struct
{
  uint32_t Channel;        /*!< The ADC channel to configure.
                                This parameter can be a value of @ref ADC_channels */
  uint32_t Rank;           /*!< The rank in the regular group sequencer.
                                This parameter must be a number between Min_Data = 1 and Max_Data = 16 */
  uint32_t SamplingTime;   /*!< The sample time value to be set for the selected channel.
                                This parameter can be a value of @ref ADC_sampling_times */
  uint32_t Offset;         /*!< Reserved for future use, can be set to 0 */
}ADC_ChannelConfTypeDef;

/**
  * @brief   ADC Configuration multi-mode structure definition
  */
typedef struct
{
  uint32_t WatchdogMode;      /*!< Configures the ADC analog watchdog mode.
                                   This parameter can be a value of @ref ADC_analog_watchdog_selection */
  uint32_t HighThreshold;     /*!< Configures the ADC analog watchdog High threshold value.
                                   This parameter must be a 12-bit value. */
  uint32_t LowThreshold;      /*!< Configures the ADC analog watchdog High threshold value.
                                   This parameter must be a 12-bit value. */
  uint32_t Channel;           /*!< Configures ADC channel for the analog watchdog.
                                   This parameter has an effect only if watchdog mode is configured on single channel
                                   This parameter can be a value of @ref ADC_channels */
  uint32_t ITMode;            /*!< Specifies whether the analog watchdog is configured
                                   is interrupt mode or in polling mode.
                                   This parameter can be set to ENABLE or DISABLE */
  uint32_t WatchdogNumber;    /*!< Reserved for future use, can be set to 0 */
}ADC_AnalogWDGConfTypeDef;

/* Exported constants --------------------------------------------------------*/

/** @defgroup ADC_Exported_Constants
  * @{
  */

/** @defgroup ADC_Error_Code
  * @{
  */

#define HAL_ADC_ERROR_NONE        ((uint32_t)0x00)   /*!< No error             */
#define HAL_ADC_ERROR_OVR         ((uint32_t)0x01)   /*!< OVR error            */
#define HAL_ADC_ERROR_DMA         ((uint32_t)0x02)   /*!< DMA transfer error   */
/**
  * @}
  */

/** @defgroup ADC_ClockPrescaler
  * @{
  */
#define ADC_CLOCKPRESCALER_PCLK_DIV2    ((uint32_t)0x00000000)
#define ADC_CLOCKPRESCALER_PCLK_DIV4    ((uint32_t)ADC_CCR_ADCPRE_0)
#define ADC_CLOCKPRESCALER_PCLK_DIV6    ((uint32_t)ADC_CCR_ADCPRE_1)
#define ADC_CLOCKPRESCALER_PCLK_DIV8    ((uint32_t)ADC_CCR_ADCPRE)
#define IS_ADC_CLOCKPRESCALER(ADC_CLOCK)     (((ADC_CLOCK) == ADC_CLOCKPRESCALER_PCLK_DIV2) || \
                                              ((ADC_CLOCK) == ADC_CLOCKPRESCALER_PCLK_DIV4) || \
                                              ((ADC_CLOCK) == ADC_CLOCKPRESCALER_PCLK_DIV6) || \
                                              ((ADC_CLOCK) == ADC_CLOCKPRESCALER_PCLK_DIV8))
/**
  * @}
  */

/** @defgroup ADC_Resolution
  * @{
  */
#define ADC_RESOLUTION12b  ((uint32_t)0x00000000)
#define ADC_RESOLUTION10b  ((uint32_t)ADC_CR1_RES_0)
#define ADC_RESOLUTION8b   ((uint32_t)ADC_CR1_RES_1)
#define ADC_RESOLUTION6b   ((uint32_t)ADC_CR1_RES)

#define IS_ADC_RESOLUTION(RESOLUTION) (((RESOLUTION) == ADC_RESOLUTION12b) || \
                                       ((RESOLUTION) == ADC_RESOLUTION10b) || \
                                       ((RESOLUTION) == ADC_RESOLUTION8b)  || \
                                       ((RESOLUTION) == ADC_RESOLUTION6b))
/**
  * @}
  */

/** @defgroup ADC_External_trigger_edge_Regular
  * @{
  */
#define ADC_EXTERNALTRIGCONVEDGE_NONE           ((uint32_t)0x00000000)
#define ADC_EXTERNALTRIGCONVEDGE_RISING         ((uint32_t)ADC_CR2_EXTEN_0)
#define ADC_EXTERNALTRIGCONVEDGE_FALLING        ((uint32_t)ADC_CR2_EXTEN_1)
#define ADC_EXTERNALTRIGCONVEDGE_RISINGFALLING  ((uint32_t)ADC_CR2_EXTEN)

#define IS_ADC_EXT_TRIG_EDGE(EDGE) (((EDGE) == ADC_EXTERNALTRIGCONVEDGE_NONE)    || \
                                    ((EDGE) == ADC_EXTERNALTRIGCONVEDGE_RISING)  || \
                                    ((EDGE) == ADC_EXTERNALTRIGCONVEDGE_FALLING) || \
                                    ((EDGE) == ADC_EXTERNALTRIGCONVEDGE_RISINGFALLING))
/**
  * @}
  */

/** @defgroup ADC_External_trigger_Source_Regular
  * @{
  */
#define ADC_EXTERNALTRIGCONV_T1_CC1    ((uint32_t)0x00000000)
#define ADC_EXTERNALTRIGCONV_T1_CC2    ((uint32_t)ADC_CR2_EXTSEL_0)
#define ADC_EXTERNALTRIGCONV_T1_CC3    ((uint32_t)ADC_CR2_EXTSEL_1)
#define ADC_EXTERNALTRIGCONV_T2_CC2    ((uint32_t)(ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0))
#define ADC_EXTERNALTRIGCONV_T2_CC3    ((uint32_t)ADC_CR2_EXTSEL_2)
#define ADC_EXTERNALTRIGCONV_T2_CC4    ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_0))
#define ADC_EXTERNALTRIGCONV_T2_TRGO   ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_1))
#define ADC_EXTERNALTRIGCONV_T3_CC1    ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0))
#define ADC_EXTERNALTRIGCONV_T3_TRGO   ((uint32_t)ADC_CR2_EXTSEL_3)
#define ADC_EXTERNALTRIGCONV_T4_CC4    ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_0))
#define ADC_EXTERNALTRIGCONV_T5_CC1    ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_1))
#define ADC_EXTERNALTRIGCONV_T5_CC2    ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0))
#define ADC_EXTERNALTRIGCONV_T5_CC3    ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_2))
#define ADC_EXTERNALTRIGCONV_T8_CC1    ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_0))
#define ADC_EXTERNALTRIGCONV_T8_TRGO   ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_1))
#define ADC_EXTERNALTRIGCONV_Ext_IT11  ((uint32_t)ADC_CR2_EXTSEL)

#define IS_ADC_EXT_TRIG(REGTRIG) (((REGTRIG) == ADC_EXTERNALTRIGCONV_T1_CC1)  || \
                                  ((REGTRIG) == ADC_EXTERNALTRIGCONV_T1_CC2)  || \
                                  ((REGTRIG) == ADC_EXTERNALTRIGCONV_T1_CC3)  || \
                                  ((REGTRIG) == ADC_EXTERNALTRIGCONV_T2_CC2)  || \
                                  ((REGTRIG) == ADC_EXTERNALTRIGCONV_T2_CC3)  || \
                                  ((REGTRIG) == ADC_EXTERNALTRIGCONV_T2_CC4)  || \
                                  ((REGTRIG) == ADC_EXTERNALTRIGCONV_T2_TRGO) || \
                                  ((REGTRIG) == ADC_EXTERNALTRIGCONV_T3_CC1)  || \
                                  ((REGTRIG) == ADC_EXTERNALTRIGCONV_T3_TRGO) || \
                                  ((REGTRIG) == ADC_EXTERNALTRIGCONV_T4_CC4)  || \
                                  ((REGTRIG) == ADC_EXTERNALTRIGCONV_T5_CC1)  || \
                                  ((REGTRIG) == ADC_EXTERNALTRIGCONV_T5_CC2)  || \
                                  ((REGTRIG) == ADC_EXTERNALTRIGCONV_T5_CC3)  || \
                                  ((REGTRIG) == ADC_EXTERNALTRIGCONV_T8_CC1)  || \
                                  ((REGTRIG) == ADC_EXTERNALTRIGCONV_T8_TRGO) || \
                                  ((REGTRIG) == ADC_EXTERNALTRIGCONV_Ext_IT11))
/**
  * @}
  */

/** @defgroup ADC_data_align
  * @{
  */
#define ADC_DATAALIGN_RIGHT      ((uint32_t)0x00000000)
#define ADC_DATAALIGN_LEFT       ((uint32_t)ADC_CR2_ALIGN)

#define IS_ADC_DATA_ALIGN(ALIGN) (((ALIGN) == ADC_DATAALIGN_RIGHT) || \
                                  ((ALIGN) == ADC_DATAALIGN_LEFT))
/**
  * @}
  */

/** @defgroup ADC_channels
  * @{
  */
#define ADC_CHANNEL_0           ((uint32_t)0x00000000)
#define ADC_CHANNEL_1           ((uint32_t)ADC_CR1_AWDCH_0)
#define ADC_CHANNEL_2           ((uint32_t)ADC_CR1_AWDCH_1)
#define ADC_CHANNEL_3           ((uint32_t)(ADC_CR1_AWDCH_1 | ADC_CR1_AWDCH_0))
#define ADC_CHANNEL_4           ((uint32_t)ADC_CR1_AWDCH_2)
#define ADC_CHANNEL_5           ((uint32_t)(ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_0))
#define ADC_CHANNEL_6           ((uint32_t)(ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_1))
#define ADC_CHANNEL_7           ((uint32_t)(ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_1 | ADC_CR1_AWDCH_0))
#define ADC_CHANNEL_8           ((uint32_t)ADC_CR1_AWDCH_3)
#define ADC_CHANNEL_9           ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_0))
#define ADC_CHANNEL_10          ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_1))
#define ADC_CHANNEL_11          ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_1 | ADC_CR1_AWDCH_0))
#define ADC_CHANNEL_12          ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_2))
#define ADC_CHANNEL_13          ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_0))
#define ADC_CHANNEL_14          ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_1))
#define ADC_CHANNEL_15          ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_1 | ADC_CR1_AWDCH_0))
#define ADC_CHANNEL_16          ((uint32_t)ADC_CR1_AWDCH_4)
#define ADC_CHANNEL_17          ((uint32_t)(ADC_CR1_AWDCH_4 | ADC_CR1_AWDCH_0))
#define ADC_CHANNEL_18          ((uint32_t)(ADC_CR1_AWDCH_4 | ADC_CR1_AWDCH_1))

#define ADC_CHANNEL_TEMPSENSOR  ((uint32_t)ADC_CHANNEL_16)
#define ADC_CHANNEL_VREFINT     ((uint32_t)ADC_CHANNEL_17)
#define ADC_CHANNEL_VBAT        ((uint32_t)ADC_CHANNEL_18)

#define IS_ADC_CHANNEL(CHANNEL) (((CHANNEL) == ADC_CHANNEL_0)  || \
                                 ((CHANNEL) == ADC_CHANNEL_1)  || \
                                 ((CHANNEL) == ADC_CHANNEL_2)  || \
                                 ((CHANNEL) == ADC_CHANNEL_3)  || \
                                 ((CHANNEL) == ADC_CHANNEL_4)  || \
                                 ((CHANNEL) == ADC_CHANNEL_5)  || \
                                 ((CHANNEL) == ADC_CHANNEL_6)  || \
                                 ((CHANNEL) == ADC_CHANNEL_7)  || \
                                 ((CHANNEL) == ADC_CHANNEL_8)  || \
                                 ((CHANNEL) == ADC_CHANNEL_9)  || \
                                 ((CHANNEL) == ADC_CHANNEL_10) || \
                                 ((CHANNEL) == ADC_CHANNEL_11) || \
                                 ((CHANNEL) == ADC_CHANNEL_12) || \
                                 ((CHANNEL) == ADC_CHANNEL_13) || \
                                 ((CHANNEL) == ADC_CHANNEL_14) || \
                                 ((CHANNEL) == ADC_CHANNEL_15) || \
                                 ((CHANNEL) == ADC_CHANNEL_16) || \
                                 ((CHANNEL) == ADC_CHANNEL_17) || \
                                 ((CHANNEL) == ADC_CHANNEL_18))
/**
  * @}
  */

/** @defgroup ADC_sampling_times
  * @{
  */
#define ADC_SAMPLETIME_3CYCLES    ((uint32_t)0x00000000)
#define ADC_SAMPLETIME_15CYCLES   ((uint32_t)ADC_SMPR1_SMP10_0)
#define ADC_SAMPLETIME_28CYCLES   ((uint32_t)ADC_SMPR1_SMP10_1)
#define ADC_SAMPLETIME_56CYCLES   ((uint32_t)(ADC_SMPR1_SMP10_1 | ADC_SMPR1_SMP10_0))
#define ADC_SAMPLETIME_84CYCLES   ((uint32_t)ADC_SMPR1_SMP10_2)
#define ADC_SAMPLETIME_112CYCLES  ((uint32_t)(ADC_SMPR1_SMP10_2 | ADC_SMPR1_SMP10_0))
#define ADC_SAMPLETIME_144CYCLES  ((uint32_t)(ADC_SMPR1_SMP10_2 | ADC_SMPR1_SMP10_1))
#define ADC_SAMPLETIME_480CYCLES  ((uint32_t)ADC_SMPR1_SMP10)

#define IS_ADC_SAMPLE_TIME(TIME) (((TIME) == ADC_SAMPLETIME_3CYCLES)   || \
                                  ((TIME) == ADC_SAMPLETIME_15CYCLES)  || \
                                  ((TIME) == ADC_SAMPLETIME_28CYCLES)  || \
                                  ((TIME) == ADC_SAMPLETIME_56CYCLES)  || \
                                  ((TIME) == ADC_SAMPLETIME_84CYCLES)  || \
                                  ((TIME) == ADC_SAMPLETIME_112CYCLES) || \
                                  ((TIME) == ADC_SAMPLETIME_144CYCLES) || \
                                  ((TIME) == ADC_SAMPLETIME_480CYCLES))
/**
  * @}
  */

  /** @defgroup ADC_EOCSelection
  * @{
  */
#define EOC_SEQ_CONV              ((uint32_t)0x00000000)
#define EOC_SINGLE_CONV           ((uint32_t)0x00000001)
#define EOC_SINGLE_SEQ_CONV       ((uint32_t)0x00000002)  /*!< reserved for future use */

#define IS_ADC_EOCSelection(EOCSelection) (((EOCSelection) == EOC_SINGLE_CONV)   || \
                                           ((EOCSelection) == EOC_SEQ_CONV)  || \
                                           ((EOCSelection) == EOC_SINGLE_SEQ_CONV))
/**
  * @}
  */

/** @defgroup ADC_Event_type
  * @{
  */
#define AWD_EVENT             ((uint32_t)ADC_FLAG_AWD)
#define OVR_EVENT             ((uint32_t)ADC_FLAG_OVR)

#define IS_ADC_EVENT_TYPE(EVENT) (((EVENT) == AWD_EVENT) || \
                                  ((EVENT) == OVR_EVENT))
/**
  * @}
  */

/** @defgroup ADC_analog_watchdog_selection
  * @{
  */
#define ADC_ANALOGWATCHDOG_SINGLE_REG         ((uint32_t)(ADC_CR1_AWDSGL | ADC_CR1_AWDEN))
#define ADC_ANALOGWATCHDOG_SINGLE_INJEC       ((uint32_t)(ADC_CR1_AWDSGL | ADC_CR1_JAWDEN))
#define ADC_ANALOGWATCHDOG_SINGLE_REGINJEC    ((uint32_t)(ADC_CR1_AWDSGL | ADC_CR1_AWDEN | ADC_CR1_JAWDEN))
#define ADC_ANALOGWATCHDOG_ALL_REG            ((uint32_t)ADC_CR1_AWDEN)
#define ADC_ANALOGWATCHDOG_ALL_INJEC          ((uint32_t)ADC_CR1_JAWDEN)
#define ADC_ANALOGWATCHDOG_ALL_REGINJEC       ((uint32_t)(ADC_CR1_AWDEN | ADC_CR1_JAWDEN))
#define ADC_ANALOGWATCHDOG_NONE               ((uint32_t)0x00000000)

#define IS_ADC_ANALOG_WATCHDOG(WATCHDOG) (((WATCHDOG) == ADC_ANALOGWATCHDOG_SINGLE_REG)        || \
                                          ((WATCHDOG) == ADC_ANALOGWATCHDOG_SINGLE_INJEC)      || \
                                          ((WATCHDOG) == ADC_ANALOGWATCHDOG_SINGLE_REGINJEC)   || \
                                          ((WATCHDOG) == ADC_ANALOGWATCHDOG_ALL_REG)           || \
                                          ((WATCHDOG) == ADC_ANALOGWATCHDOG_ALL_INJEC)         || \
                                          ((WATCHDOG) == ADC_ANALOGWATCHDOG_ALL_REGINJEC)      || \
                                          ((WATCHDOG) == ADC_ANALOGWATCHDOG_NONE))
/**
  * @}
  */

/** @defgroup ADC_interrupts_definition
  * @{
  */
#define ADC_IT_EOC      ((uint32_t)ADC_CR1_EOCIE)
#define ADC_IT_AWD      ((uint32_t)ADC_CR1_AWDIE)
#define ADC_IT_JEOC     ((uint32_t)ADC_CR1_JEOCIE)
#define ADC_IT_OVR      ((uint32_t)ADC_CR1_OVRIE)

#define IS_ADC_IT(IT) (((IT) == ADC_IT_EOC) || ((IT) == ADC_IT_AWD) || \
                       ((IT) == ADC_IT_JEOC)|| ((IT) == ADC_IT_OVR))
/**
  * @}
  */

/** @defgroup ADC_flags_definition
  * @{
  */
#define ADC_FLAG_AWD    ((uint32_t)ADC_SR_AWD)
#define ADC_FLAG_EOC    ((uint32_t)ADC_SR_EOC)
#define ADC_FLAG_JEOC   ((uint32_t)ADC_SR_JEOC)
#define ADC_FLAG_JSTRT  ((uint32_t)ADC_SR_JSTRT)
#define ADC_FLAG_STRT   ((uint32_t)ADC_SR_STRT)
#define ADC_FLAG_OVR    ((uint32_t)ADC_SR_OVR)
/**
  * @}
  */

/** @defgroup ADC_channels_type
  * @{
  */
#define ALL_CHANNELS      ((uint32_t)0x00000001)
#define REGULAR_CHANNELS  ((uint32_t)0x00000002) /*!< reserved for future use */
#define INJECTED_CHANNELS ((uint32_t)0x00000003) /*!< reserved for future use */

#define IS_ADC_CHANNELS_TYPE(CHANNEL_TYPE) (((CHANNEL_TYPE) == ALL_CHANNELS) || \
                                            ((CHANNEL_TYPE) == REGULAR_CHANNELS) || \
                                            ((CHANNEL_TYPE) == INJECTED_CHANNELS))
/**
  * @}
  */

/** @defgroup ADC_thresholds
  * @{
  */
#define IS_ADC_THRESHOLD(THRESHOLD) ((THRESHOLD) <= ((uint32_t)0xFFF))
/**
  * @}
  */

/** @defgroup ADC_regular_length
  * @{
  */
#define IS_ADC_REGULAR_LENGTH(LENGTH) (((LENGTH) >= ((uint32_t)1)) && ((LENGTH) <= ((uint32_t)16)))
/**
  * @}
  */

/** @defgroup ADC_regular_rank
  * @{
  */
#define IS_ADC_REGULAR_RANK(RANK) (((RANK) >= ((uint32_t)1)) && ((RANK) <= ((uint32_t)16)))
/**
  * @}
  */

/** @defgroup ADC_regular_discontinuous_mode_number
  * @{
  */
#define IS_ADC_REGULAR_DISC_NUMBER(NUMBER) (((NUMBER) >= ((uint32_t)1)) && ((NUMBER) <= ((uint32_t)8)))
/**
  * @}
  */

/** @defgroup ADC_range_verification
  * @{
  */
#define IS_ADC_RANGE(RESOLUTION, ADC_VALUE)                                     \
   ((((RESOLUTION) == ADC_RESOLUTION12b) && ((ADC_VALUE) <= ((uint32_t)0x0FFF))) || \
    (((RESOLUTION) == ADC_RESOLUTION10b) && ((ADC_VALUE) <= ((uint32_t)0x03FF))) || \
    (((RESOLUTION) == ADC_RESOLUTION8b)  && ((ADC_VALUE) <= ((uint32_t)0x00FF))) || \
    (((RESOLUTION) == ADC_RESOLUTION6b)  && ((ADC_VALUE) <= ((uint32_t)0x003F))))
/**
  * @}
  */

/**
  * @}
  */

/* Exported macro ------------------------------------------------------------*/

/** @brief Reset ADC handle state
  * @param  __HANDLE__: ADC handle
  * @retval None
  */
#define __HAL_ADC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_ADC_STATE_RESET)

/**
  * @brief  Enable the ADC peripheral.
  * @param  __HANDLE__: ADC handle
  * @retval None
  */
#define __HAL_ADC_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR2 |=  ADC_CR2_ADON)

/**
  * @brief  Disable the ADC peripheral.
  * @param  __HANDLE__: ADC handle
  * @retval None
  */
#define __HAL_ADC_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR2 &=  ~ADC_CR2_ADON)

/**
  * @brief  Set ADC Regular channel sequence length.
  * @param  _NbrOfConversion_: Regular channel sequence length.
  * @retval None
  */
#define __HAL_ADC_SQR1(_NbrOfConversion_) (((_NbrOfConversion_) - (uint8_t)1) << 20)

/**
  * @brief  Set the ADC's sample time for channel numbers between 10 and 18.
  * @param  _SAMPLETIME_: Sample time parameter.
  * @param  _CHANNELNB_: Channel number.
  * @retval None
  */
#define __HAL_ADC_SMPR1(_SAMPLETIME_, _CHANNELNB_) ((_SAMPLETIME_) << (3 * ((_CHANNELNB_) - 10)))

/**
  * @brief  Set the ADC's sample time for channel numbers between 0 and 9.
  * @param  _SAMPLETIME_: Sample time parameter.
  * @param  _CHANNELNB_: Channel number.
  * @retval None
  */
#define __HAL_ADC_SMPR2(_SAMPLETIME_, _CHANNELNB_) ((_SAMPLETIME_) << (3 * (_CHANNELNB_)))

/**
  * @brief  Set the selected regular channel rank for rank between 1 and 6.
  * @param  _CHANNELNB_: Channel number.
  * @param  _RANKNB_: Rank number.
  * @retval None
  */
#define __HAL_ADC_SQR3_RK(_CHANNELNB_, _RANKNB_) ((_CHANNELNB_) << (5 * ((_RANKNB_) - 1)))

/**
  * @brief  Set the selected regular channel rank for rank between 7 and 12.
  * @param  _CHANNELNB_: Channel number.
  * @param  _RANKNB_: Rank number.
  * @retval None
  */
#define __HAL_ADC_SQR2_RK(_CHANNELNB_, _RANKNB_) ((_CHANNELNB_) << (5 * ((_RANKNB_) - 7)))

/**
  * @brief  Set the selected regular channel rank for rank between 13 and 16.
  * @param  _CHANNELNB_: Channel number.
  * @param  _RANKNB_: Rank number.
  * @retval None
  */
#define __HAL_ADC_SQR1_RK(_CHANNELNB_, _RANKNB_) ((_CHANNELNB_) << (5 * ((_RANKNB_) - 13)))

/**
  * @brief  Enable ADC continuous conversion mode.
  * @param  _CONTINUOUS_MODE_: Continuous mode.
  * @retval None
  */
#define __HAL_ADC_CR2_CONTINUOUS(_CONTINUOUS_MODE_) ((_CONTINUOUS_MODE_) << 1)

/**
  * @brief  Configures the number of discontinuous conversions for the regular group channels.
  * @param  _NBR_DISCONTINUOUSCONV_: Number of discontinuous conversions.
  * @retval None
  */
#define __HAL_ADC_CR1_DISCONTINUOUS(_NBR_DISCONTINUOUSCONV_) (((_NBR_DISCONTINUOUSCONV_) - 1) << 13)

/**
  * @brief  Enable ADC scan mode.
  * @param  _SCANCONV_MODE_: Scan conversion mode.
  * @retval None
  */
#define __HAL_ADC_CR1_SCANCONV(_SCANCONV_MODE_) ((_SCANCONV_MODE_) << 8)

/**
  * @brief  Enable the ADC end of conversion selection.
  * @param  _EOCSelection_MODE_: End of conversion selection mode.
  * @retval None
  */
#define __HAL_ADC_CR2_EOCSelection(_EOCSelection_MODE_) ((_EOCSelection_MODE_) << 10)

/**
  * @brief  Enable the ADC DMA continuous request.
  * @param  _DMAContReq_MODE_: DMA continuous request mode.
  * @retval None
  */
#define __HAL_ADC_CR2_DMAContReq(_DMAContReq_MODE_) ((_DMAContReq_MODE_) << 9)

/**
  * @brief  Enable the ADC end of conversion interrupt.
  * @param  __HANDLE__: specifies the ADC Handle.
  * @param  __INTERRUPT__: ADC Interrupt.
  * @retval None
  */
#define __HAL_ADC_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR1) |= (__INTERRUPT__))

/**
  * @brief  Disable the ADC end of conversion interrupt.
  * @param  __HANDLE__: specifies the ADC Handle.
  * @param  __INTERRUPT__: ADC interrupt.
  * @retval None
  */
#define __HAL_ADC_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR1) &= ~(__INTERRUPT__))

/** @brief  Check if the specified ADC interrupt source is enabled or disabled.
  * @param  __HANDLE__: specifies the ADC Handle.
  * @param  __INTERRUPT__: specifies the ADC interrupt source to check.
  * @retval The new state of __IT__ (TRUE or FALSE).
  */
#define __HAL_ADC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CR1 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

/**
  * @brief  Clear the ADC's pending flags.
  * @param  __HANDLE__: specifies the ADC Handle.
  * @param  __FLAG__: ADC flag.
  * @retval None
  */
#define __HAL_ADC_CLEAR_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR) &= ~(__FLAG__))

/**
  * @brief  Get the selected ADC's flag status.
  * @param  __HANDLE__: specifies the ADC Handle.
  * @param  __FLAG__: ADC flag.
  * @retval None
  */
#define __HAL_ADC_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))

/**
  * @brief Return resolution bits in CR1 register.
  * @param __HANDLE__: ADC handle
  * @retval None
  */
#define __HAL_ADC_GET_RESOLUTION(__HANDLE__) (((__HANDLE__)->Instance->CR1) & ADC_CR1_RES)

/* Include ADC HAL Extension module */
#include "stm32f4xx_hal_adc_ex.h"

/* Exported functions --------------------------------------------------------*/
/* Initialization/de-initialization functions ***********************************/
HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef* hadc);
HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef *hadc);
void       HAL_ADC_MspInit(ADC_HandleTypeDef* hadc);
void       HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc);

/* I/O operation functions ******************************************************/
HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef* hadc);
HAL_StatusTypeDef HAL_ADC_Stop(ADC_HandleTypeDef* hadc);
HAL_StatusTypeDef HAL_ADC_PollForConversion(ADC_HandleTypeDef* hadc, uint32_t Timeout);

HAL_StatusTypeDef HAL_ADC_PollForEvent(ADC_HandleTypeDef* hadc, uint32_t EventType, uint32_t Timeout);

HAL_StatusTypeDef HAL_ADC_Start_IT(ADC_HandleTypeDef* hadc);
HAL_StatusTypeDef HAL_ADC_Stop_IT(ADC_HandleTypeDef* hadc);

void              HAL_ADC_IRQHandler(ADC_HandleTypeDef* hadc);

HAL_StatusTypeDef HAL_ADC_Start_DMA(ADC_HandleTypeDef* hadc, uint32_t* pData, uint32_t Length);
HAL_StatusTypeDef HAL_ADC_Stop_DMA(ADC_HandleTypeDef* hadc);

uint32_t          HAL_ADC_GetValue(ADC_HandleTypeDef* hadc);

void       HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc);
void       HAL_ADC_ConvHalfCpltCallback(ADC_HandleTypeDef* hadc);
void       HAL_ADC_LevelOutOfWindowCallback(ADC_HandleTypeDef* hadc);
void       HAL_ADC_ErrorCallback(ADC_HandleTypeDef *hadc);

/* Peripheral Control functions *************************************************/
HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef* hadc, ADC_ChannelConfTypeDef* sConfig);
HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig(ADC_HandleTypeDef* hadc, ADC_AnalogWDGConfTypeDef* AnalogWDGConfig);

/* Peripheral State functions ***************************************************/
HAL_ADC_StateTypeDef HAL_ADC_GetState(ADC_HandleTypeDef* hadc);
uint32_t             HAL_ADC_GetError(ADC_HandleTypeDef *hadc);

/**
  * @}
  */

/**
  * @}
  */

#ifdef __cplusplus
}
#endif

#endif /*__STM32F4xx_ADC_H */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Omphalia atrovelutina Romagn., 1971

### Remarks
null


text:
({
    testProviderSettingAttributes: {
        attributes : {
            a1 : "a1",
            a2 : "a2",
            value : "aura"
        },

        test: function(component){
            aura.test.assertEquals("a1Provider", component.get("v.a1"), "a1 should have been overriden by provider");
            aura.test.assertTrue(component.get("v.a2")===undefined, "a2 should have been made undefined by provider");
            aura.test.assertEquals("b1Provider", component.get("v.b1"), "b1 should have been set by provider");
            aura.test.assertEquals("aura", component.get("v.value"), "value should have been passed through");

            // using something order than a simple string
            aura.test.assertEquals("ar1Provider1", component.getValue("v.ar1").get(1), "ar1 should have been set by provider");
            aura.test.assertTrue(component.get("v.b2")===undefined, "b2 should have been undefined");

            $A.test.assertEquals("aura [value]", $A.test.getText(component.find("value").getElement()));

            $A.test.assertEquals("aura [facet]", $A.test.getText(component.find("facet").getElement()));
        }
    },

    testSetAttributeAbsentFromProvidedComponent: {
        attributes : {"a3" : "a3", value : "aura"},
        test: function(component){
            //Provider sets an attribute on the concrete component based on a3
           aura.test.assertEquals("b2Provider", component.get("v.b2"), "b2 should have been set by provider");
        }
    }
})


text:
flexdms.query={};
flexdms.query.Operator=function(op){
	this.op=op;
	this.howManyOperands=function(){
		switch(this.op)
		{
		case "lt":
		case "le":
		case "eq":
		case "gt":
		case "ge":
		case "ne":
		case "like":
		case "notlike":
		case "tracedown":
		case "size":
		case "sizeGt":
		case "sizeLt":
			return 1;
		case "checked":
		case "unchecked":
		case "notnull":
		case "isnull":
		case "empty":
		case "notempty":
			return 0;
		case "between":
		case "notbetween":
			return 2;
		default:
			//oneof, notoneof
			return 3;
		}
	};
	this.isSize=function(){
		switch(this.op)
		{
		case "size":
		case "sizeGt":
		case "sizeLt":
		case "empty":
		case "notempty":
			return true;
		}
		return false;
	};
	this.isComparison=function(){
		switch(this.op)
		{
		case "lt":
		case "le":
		case "eq":
		case "gt":
		case "ge":
		case "ne":
		case "between":
		case "notbetween":
		case "like":
		case "notlike":
		case "tracedown":
			return true;
		default:
			return false;
		}
	};
};

//----------------------typedquery class
flexdms.query.typedquery=function(inst){
	this.inst=inst;
};

flexdms.query.typedquery.prototype.getTargetedType=function(){
	return flexdms.findType(this.inst.TargetedType);
};
flexdms.query.typedquery.prototype.getDisplayableProps=function(){
	if (!this.inst.TargetedType){
		return new Array();
	}
	if (angular.isDefined(this.displayableProps)){
		return  this.displayableProps;
	}
	var displayableProps=new Array();
	angular.forEach(this.getTargetedType().getProps(), function(propobj){
		if (propobj.isIdOrVersion()){
			return;
		}
		displayableProps.push({
			'display':propobj.getDisplayText(),
			'value':propobj.getName(),
			'group':''
		});
		if (propobj.isRelation() || propobj.isEmbedded()){
			var relatedtype=flexdms.findType(propobj.getTypeObject().value);
			angular.forEach(relatedtype.getProps(), function(subprop){
				if (!subprop.isIdOrVersion()){
					displayableProps.push({
						'display':subprop.getDisplayText(),
						'value': propobj.getName()+"."+subprop.getName(),
						'group':propobj.getDisplayText()
					});
				}
			});
		}
	});
	this.displayableProps=displayableProps;
	return this.displayableProps;
};
flexdms.query.typedquery.prototype.getQueriableProps=function(){
	var queriableProps=new Array();
	if (!this.inst.TargetedType){
		return queriableProps;
	}

	var type=this.getTargetedType();
	angular.forEach(type.getProps(), function(propobj){
		if (propobj.isIdOrVersion()){
			return;
		}
		var proptype=propobj.getTypeObject();
		if (!(proptype.isCustomObject()  ||proptype.lob || proptype.idx==1 || proptype.idx==2)){
			queriableProps.push(propobj);
		}
	});
	return queriableProps;
};

flexdms.query.typedquery.prototype.getOrderProps=function(){

	if (!this.inst.TargetedType){
		return new Array();
	}
	if (angular.isDefined(this.orderProps)){
		return this.orderProps;
	}
	var orderProps=new Array();
	angular.forEach(this.getTargetedType().getProps(), function(propobj){
		if (propobj.isIdOrVersion()){
			return;
		}
		if (propobj.isCollection()){
			return;
		}
		var tp=propobj.getTypeObject();
		if (tp.isCustomObject() || tp.isTrueFalse() || tp.isBinary()){
			return;
		}
		if (tp.isEmbedded()){
			var relatedType=flexdms.findType(tp.value);
			angular.forEach(relatedType.getProps(), function(subprop){
				if (subprop.isCollection()){
					return;
				}
				orderProps.push({
					'value':propobj.getName()+"."+subprop.getName(),
					'display':subprop.getDisplayText(),
					'group':propobj.getName()
				});

			});
		}
		if (!propobj.getTypeObject().isPrimitive()){
			return;
		}

		orderProps.push({
			'value':propobj.getName(),
			'group':'',
			'display':propobj.getDisplayText()
		});
	});
	this.orderProps=orderProps;
	return this.orderProps;
};

//-----------------------defaulttypedquery class
flexdms.query.defaulttypedquery=function(inst){
	this.inst=inst;

};

//establish the inheritance from defaultypedquery to typedquery
flexdms.query.defaulttypedquery.prototype=new flexdms.query.typedquery();
flexdms.query.defaulttypedquery.prototype.constructor=flexdms.query.defaulttypedquery;

flexdms.query.defaulttypedquery.prototype.getParams=function(instCache){
	if (this.params!=null) {
		return this.params;
	}
	var params=[];
	angular.forEach(this.getConditions(), function(condition){
		condition.processParams(instCache, params);
	});

	this.params=params;
	return params;
};
flexdms.query.defaulttypedquery.prototype.getConditions=function(){
	if (this.condtions){
		return this.conditions;
	}
	var conditions=[];
	var query=this;
	angular.forEach(this.inst.Conditions, function(cond){
		conditions.push(new flexdms.query.condition(query, cond));
	});
	this.conditions=conditions;
	return this.conditions;
};

//-----------------------conditions
flexdms.query.condition=function(query, inst){
	this.query=query;
	this.inst=inst; //embedded instance

};
flexdms.query.condition.prototype.getProp=function(){
	return this.query.getTargetedType().getProp(this.inst.Property);
};

flexdms.query.condition.prototype.processParams=function(instCache, params){
	switch(this.inst.Operator)
	{
	case "checked":
	case "unchecked":
	case "notnull":
	case "isnull":
	case "empty":
	case "notempty":
		params.push( new flexdms.query.param(this, -1));
		break;
	case "lt":
	case "le":
	case "eq":
	case "gt":
	case "ge":
	case "ne":
	case "like":
	case "notlike":
		params.push( new flexdms.query.param(this, 0));
		break;
	case "size":
	case "sizeGt":
	case "sizeLt":
		params.push( new flexdms.query.param(this, 0));
		break;
	case "between":
	case "notbetween":
		params.push( new flexdms.query.param(this, 0));
		params.push( new flexdms.query.param(this, 1));
		break;
	case "tracedown":
		var subquery=instCache.getInst('DefaultTypedQuery', this.inst.TraceDown);
		var queryObj=new flexdms.query.defaulttypedquery(subquery);
		angular.forEach(queryObj.getConditions(), function(condition){
			condition.processParams(instCache, params);
		});
		break;
	case "oneof":
	case "notoneof":
		params.push( new flexdms.query.param(this, 2));
	}
};

//----------------------------represent a query param at client side. The purpose to collect
// value for query parameter at client side
flexdms.query.param=function(condition, index){

	this.condition=condition;
	this.index=0;
	this.relativeunit='MONTH';
	this.relativevalue=null;
	this.wholetime=true;

	if (angular.isDefined(index)){
		this.index=index;
	}

	this.value=null;
	this.getOp=function(){
		return new flexdms.query.Operator(this.condition.inst.Operator);
	};

	this.computeValue=function(){
		if (this.index==-1){
			//no value is needed;
			return;
		}

		if (!angular.isDefined(this.value) || this.value==null){
			return;
		}
		var op=this.getOp();
		if (op.isSize()){
			this.value=this.value-0;
			return;
		}
		var proptype=this.condition.getProp().getTypeObject();
		//only for single date and time
		if (this.index<2 && (proptype.isDateOnly() || proptype.isTimestamp() )){
			if (isNaN(Date.parse(this.value))){ //relative time
				this.relativevalue=parseFloat(this.value.split(":")[0]);
				this.relativeunit=this.value.split(":")[1];
				this.wholetime=(this.value.split(":")[2]=='true'||this.value.split(":")[2]=='TRUE')
				this.value=null;
				return;
			}
		}
		if (this.index==0 || this.index==1){
			this.value=proptype.parse(this.value)
			return;
		}
		if (this.index==2){
			var vs=[];
			angular.forEach(this.value, function(v){
				 vs.push(proptype.parse(v));
			})
			this.value=vs;
		}
	};

	this.setValueFromQuery=function(){
		if (this.index==-1){
			//no value is needed;
			return;
		}

		var op=this.getOp();
		if (op.isSize()){
			this.value=this.condition.inst.FirstValue
			if (this.value){
				this.value=this.value-0;
			}
			return;
		}
		if (this.index==0){
			this.value=this.condition.inst.FirstValue;
			this.relativeunit=this.condition.inst.RelativeStartUnit;
			this.relativevalue=this.condition.inst.RelativeStartDate;
			this.wholetime=this.condition.inst.WholeTime;
			if (!this.relativeunit){
				this.relativeunit="MONTH";
			}
			return;
		}
		if (this.index==1){
			this.value=this.condition.inst.SecondValue;
			this.relativeunit=this.condition.inst.RelativeEndUnit;
			this.relativevalue=this.condition.inst.RelativeEndDate;
			this.wholetime=this.condition.inst.WholeTime;
			if (!this.relativeunit){
				this.relativeunit="MONTH";
			}
		}
		if (this.index==2){
			if (angular.isDefined(this.condition.inst.FirstValue) && this.condition.inst.FirstValue!==null){
				this.value=this.condition.inst.FirstValue.split(",");
			} else {
				this.value=[];
			}
			return;
		}
	}
	this.setValueFromQuery();
	this.computeValue();

	this.isReady=function(){
		if (this.index==-1){
			return true;
		}
		var op=this.getOp();
		if (angular.isDefined(this.relativevalue) && this.relativevalue!==null){
			return true;
		}
		if (!angular.isDefined(this.value) || this.value===null){
			return false;
		}
		if (op.isSize() ||this.index==0 ||this.index==1){
			return true;
		}
		if (angular.isArray(this.value)){
			return this.value.length>0?true:false;
		}
		return true;
	};

	this.getLabelText=function(){
		if (this.condition.Description){
			return this.condition.Description;
		}

		var text=this.condition.getProp().getDisplayText()+" ";
		var op=this.getOp();

		switch(op.op)
		{
		case "lt":
			text+="less than";
			break;
		case "le":
			text+="less than or equal";
			break;
		case "eq":
			text+="equal";
			break;
		case "gt":
			text+="greater than";
			break;
		case "ge":
			text+="greater than or equal";
			break;
		case "ne":
			text+="not equal";
			break;
		case "like":
			text+="like (% for any character, _ for single character)";
			break;
		case "notlike":
			text+="not like(% for any character, _ for single character)";
			break;
		case "tracedown":
			text+="sub query";
			break;
		case "size":
			text+="has number of elements";
			break;
		case "sizeGt":
			text+="has more than";
			break;
		case "sizeLt":
			text+="has less than";
			break;
		case "checked":
			text+="checked";
			break;
		case "unchecked":
			text+="unchecked";
			break;
		case "notnull":
			text+="has value";
			break;
		case "isnull":
			text+="has no value";
			break;
		case "empty":
			text+="has no members";
			break;
		case "notempty":
			text+="has members";
			break;
		case "between":
			if (this.index==0){
				text+="greater than or equal";
			} else {
				text+="less than or equal";
			}
			break;
		case "notbetween":
			if (this.index==0){
				text+="less than";
			} else {
				text+="gerater than";
			}
			break;
		case "oneof":
			text+="contains";
			break;
		case "notoneof":
			text+="not contains";
			break;
		default:

		}
		return text;

	};
	this.getLabelTextViewer=function(){
		if (this.condition.Description){
			return this.condition.Description;
		}

		var text=this.condition.getProp().getDisplayText()+" ";
		var op=this.getOp();

		switch(op.op)
		{
		case "lt":
			text+="less than";
			break;
		case "le":
			text+="less than or equal";
			break;
		case "eq":
			text+="equal";
			break;
		case "gt":
			text+="greater than";
			break;
		case "ge":
			text+="greater than or equal";
			break;
		case "ne":
			text+="not equal";
			break;
		case "like":
			text+="like";
			break;
		case "notlike":
			text+="not like";
			break;
		case "tracedown":
			text+="sub query";
			break;
		case "size":
			text+="has number of elements";
			break;
		case "sizeGt":
			text+="has more than";
			break;
		case "sizeLt":
			text+="has less than";
			break;
		case "checked":
			text+="checked";
			break;
		case "unchecked":
			text+="unchecked";
			break;
		case "notnull":
			text+="has value";
			break;
		case "isnull":
			text+="has no value";
			break;
		case "empty":
			text+="has no members";
			break;
		case "notempty":
			text+="has members";
			break;
		case "between":
			if (this.index==0){
				text+="greater than or equal";
			} else {
				text+="less than or equal";
			}
			break;
		case "notbetween":
			if (this.index==0){
				text+="less than";
			} else {
				text+="gerater than";
			}
			break;
		case "oneof":
			text+="contains";
			break;
		case "notoneof":
			text+="not contains";
			break;
		default:

		}
		return text;

	};

	this.needInput=function(){
		var op=new flexdms.query.Operator(this.condition.inst.Operator);
		var numOfOperands=op.howManyOperands();
		return numOfOperands>0;
	};

	//return a name value pair
	this.getValueObject=function(i){
		function toString(v){
			if (angular.isDate(v)){
				return v.toISOString();
			}
			return v+"";
		}
		var pobj={'index': i, 'values':[]};
		if (angular.isDefined(this.relativevalue) && this.relativevalue!==null){
			pobj.values.push(this.relativevalue+":"+this.relativeunit+":"+this.wholetime);
			return pobj;
		}
		if (!angular.isDefined(this.value)|| this.value===null){
			return pobj;
		}

		if (angular.isArray(this.value)){
			angular.forEach(this.value, function(v){
				if (angular.isDefined(v)&&v!==null){
					pobj.values.push(toString(v));
				}
			});
		} else{
			//we have single value: most string or object
			var op=this.getOp();
			if (op.howManyOperands()==1|| op.howManyOperands()==2){
				pobj.values.push(toString(this.value));
			} else if (op.howManyOperands()==3){
				angular.forEach(this.value.split(","), function(v){
					if (angular.isDefined(v)&&v!==null && v.length>0){
						pobj.values.push(v);
					}
				});
			}
		}
		return pobj;
	};

};

angular.module("flexdms.report", ["flexdms.TypeResource", "flexdms.TypeResource", "instDirective"]);
flexdms.instAppModules.push("flexdms.report");


text:
/*
 * This file is generated by jOOQ.
*/
package io.cattle.platform.core.model;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

import javax.annotation.Generated;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * This class is generated by jOOQ.
 */
@Generated(
    value = {
        "http://www.jooq.org",
        "jOOQ version:3.9.3"
    },
    comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
@Entity
@Table(name = "credential", schema = "cattle")
public interface Credential extends Serializable {

    /**
     * Setter for cattle.credential.id.
     */
    public void setId(Long value);

    /**
     * Getter for cattle.credential.id.
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", unique = true, nullable = false, precision = 19)
    public Long getId();

    /**
     * Setter for cattle.credential.name.
     */
    public void setName(String value);

    /**
     * Getter for cattle.credential.name.
     */
    @Column(name = "name", length = 255)
    public String getName();

    /**
     * Setter for cattle.credential.account_id.
     */
    public void setAccountId(Long value);

    /**
     * Getter for cattle.credential.account_id.
     */
    @Column(name = "account_id", precision = 19)
    public Long getAccountId();

    /**
     * Setter for cattle.credential.kind.
     */
    public void setKind(String value);

    /**
     * Getter for cattle.credential.kind.
     */
    @Column(name = "kind", nullable = false, length = 255)
    public String getKind();

    /**
     * Setter for cattle.credential.uuid.
     */
    public void setUuid(String value);

    /**
     * Getter for cattle.credential.uuid.
     */
    @Column(name = "uuid", unique = true, nullable = false, length = 128)
    public String getUuid();

    /**
     * Setter for cattle.credential.description.
     */
    public void setDescription(String value);

    /**
     * Getter for cattle.credential.description.
     */
    @Column(name = "description", length = 1024)
    public String getDescription();

    /**
     * Setter for cattle.credential.state.
     */
    public void setState(String value);

    /**
     * Getter for cattle.credential.state.
     */
    @Column(name = "state", nullable = false, length = 128)
    public String getState();

    /**
     * Setter for cattle.credential.created.
     */
    public void setCreated(Date value);

    /**
     * Getter for cattle.credential.created.
     */
    @Column(name = "created")
    public Date getCreated();

    /**
     * Setter for cattle.credential.removed.
     */
    public void setRemoved(Date value);

    /**
     * Getter for cattle.credential.removed.
     */
    @Column(name = "removed")
    public Date getRemoved();

    /**
     * Setter for cattle.credential.remove_time.
     */
    public void setRemoveTime(Date value);

    /**
     * Getter for cattle.credential.remove_time.
     */
    @Column(name = "remove_time")
    public Date getRemoveTime();

    /**
     * Setter for cattle.credential.data.
     */
    public void setData(Map<String,Object> value);

    /**
     * Getter for cattle.credential.data.
     */
    @Column(name = "data", length = 16777215)
    public Map<String,Object> getData();

    /**
     * Setter for cattle.credential.public_value.
     */
    public void setPublicValue(String value);

    /**
     * Getter for cattle.credential.public_value.
     */
    @Column(name = "public_value", length = 4096)
    public String getPublicValue();

    /**
     * Setter for cattle.credential.secret_value.
     */
    public void setSecretValue(String value);

    /**
     * Getter for cattle.credential.secret_value.
     */
    @Column(name = "secret_value", length = 4096)
    public String getSecretValue();

    /**
     * Setter for cattle.credential.registry_id.
     */
    public void setRegistryId(Long value);

    /**
     * Getter for cattle.credential.registry_id.
     */
    @Column(name = "registry_id", precision = 19)
    public Long getRegistryId();

    // -------------------------------------------------------------------------
    // FROM and INTO
    // -------------------------------------------------------------------------

    /**
     * Load data from another generated Record/POJO implementing the common interface Credential
     */
    public void from(io.cattle.platform.core.model.Credential from);

    /**
     * Copy data into another generated Record/POJO implementing the common interface Credential
     */
    public <E extends io.cattle.platform.core.model.Credential> E into(E into);
}


text:
use strict;
use warnings;

use FindBin qw($RealBin);
BEGIN {require "$RealBin/../setup.pl"};

use Data::Dumper qw(Dumper);
use IPC::Cmd qw(can_run);
use File::Temp qw(tempfile);
use Data::Dumper qw(Dumper);
use Storable qw(lock_store lock_retrieve);
use JSON qw(encode_json decode_json);
use IO::File;

use ZCME::HereDoc qw(here);

use Getopt::Long qw(GetOptions);
my $help = 0;
my $VERBOSE = 0;
my $input_format;
my $output_format;
my $type = 'HASH';
my $edit = 0;
my $editor = $ENV{'VISUAL'} || $ENV{'EDITOR'} || 'emacs';
GetOptions(
    "help" => \$help,
    "verbose" => \$VERBOSE,
    "edit" => \$edit,
    "input-format=s" => \$input_format,
    "output-format=s" => \$output_format,
    );
my $input_file = shift;
my $output_file = shift;

my %formats = (
    json => {
	to_perl => \&json_to_perl,
	from_perl => \&json_from_perl,
    },
    storable => {
	to_perl => \&lock_retrieve,
	from_perl => \&lock_store,
    },
    dumper => {
	to_perl => \&dumper_to_perl,
	from_perl => \&dumper_from_perl,
    },
    legacy_config => {
	to_perl => \&legacy_config_to_perl,
	from_perl => \&legacy_config_from_perl,
    },
    );
my %types = (
    HASH => 1,
    ARRAY => 1,
    );

my $Usage = here(<<"USAGE");
# $0 [--help]
# $0 [--verbose] [--edit] [--editor=PATH] [--input-format=FORMAT] [--output-format=FORMAT] [--type=TYPE] INPUT_FILE [OUTPUT_FILE]
    --edit - Edit the data in Data::Dumper format before output.
USAGE
    ;
$Usage .= "    --editor - editor to use in edit mode.";
$Usage .= defined($editor) ? " ($editor)\n" : "\n";
$Usage .= "    FORMAT:\n        ".join("\n        ", sort keys %formats)."\n";
$Usage .= "    TYPES ($type):\n        ".join("\n        ", sort keys %types)."\n";

die "$Usage" if $help;
die "--input-file required\n$Usage" unless defined($input_file);

($input_format) = ($input_file =~ m/\.([^\.]+)$/) unless(defined($input_format));
die "Invalid input format: $input_format\n$Usage" unless exists($formats{$input_format});

if($edit) {
    die "Can not find editor: $editor\n$Usage" unless(can_run($editor));
    $output_file = $input_file unless(defined($output_file));
}

unless(defined($output_format)) {
    if(defined($output_file)) {
	($output_format) = ($output_file =~ m/\.([^\.]+)$/);
	exists($formats{$output_format}) or $output_format = undef;
    }
}
$output_format = $input_format unless(defined($output_format));

die "Invalid output format: $output_format\n$Usage" unless exists($formats{$output_format});

die "Invalid type: $type\n$Usage" unless exists($types{$type});

my $data;
if(-f $input_file) {
    $data = $formats{$input_format}->{to_perl}->($input_file);
} else {
    if($type eq 'HASH') {
	$data = { foo => 'bar' };
    } elsif($type eq 'ARRAY') {
	$data = [ { foo => 'bar' }, { foo => 'bar' } ];
    } else {
	die "Invalid type: $type.";
    }
}

if($edit) {
    my($fh, $filename) = tempfile("data_file_editXXXXXX", SUFFIX => '.pl', UNLINK => 1);
    $formats{'dumper'}->{from_perl}->($data, $filename);
    system("$editor $filename");
    $data = $formats{'dumper'}->{to_perl}->($filename);
}

if($output_format eq 'storable' and not defined($output_file)) {
    $output_format = 'dumper';
}
$formats{$output_format}->{from_perl}->($data, $output_file);

sub _get_write_fh {
    my $filename = shift;
    if(defined($filename)) {
	my $fh = IO::File->new(">$filename") or die "open($filename): $!";
	return $fh;
    } else {
	return \*STDOUT;
    }
}

sub json_to_perl {
    my $filename = shift;
    my $json = join('',IO::File->new($filename)->getlines());
    return decode_json($json);
}

sub json_from_perl {
    my $data = shift;
    my $fh = _get_write_fh(shift);
    print $fh encode_json($data);
    close($fh);
}

sub dumper_to_perl {
    my $filename = shift;
    my $source = join('',IO::File->new($filename)->getlines());
    use vars qw($VAR1);
    my $perl = eval($source);
    die $@ if $@;
    return $perl;
}

sub dumper_from_perl {
    my $data = shift;
    my $fh = _get_write_fh(shift);
    print $fh Dumper($data);
    close($fh);
}

sub legacy_config_to_perl {
   my $filename = shift;
   my $source = join('',IO::File->new($filename)->getlines());
   no strict 'vars';
   eval("package ftl_legacy_config; $source");
   use strict 'vars';
   die $@ if $@;
   my $perl = {};
   foreach my $key (keys %ftl_legacy_config::) {
       no strict 'refs';
       if(defined(${"ftl_legacy_config::$key"})) {
	   $perl->{$key} = ${"ftl_legacy_config::$key"};
       } elsif(%{"ftl_legacy_config::$key"}) {
	   $perl->{$key} = \%{"ftl_legacy_config::$key"};
       } elsif(@{"ftl_legacy_config::$key"}) {
	   $perl->{$key} = \@{"ftl_legacy_config::$key"};
       }
   }
   return $perl;
}

sub legacy_config_from_perl {
    die "Can not convert to legacy_config.\n";
}

__END__


text:
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]

An aggregator for your events. Funnels events through a single point, so not all
of your code needs to attach listeners to every object. This approach is
particularly good for handling `error` events by UI components.

## Installation
```bash
$ npm i --save event-aggregate
```
## Overview
```js
var aggregate = require('event-aggregate');

module.exports = aggregate({
  error: [locationsStore, pathStore],
  change: [pathStore]
});
```

## API
#### aggregate()
Initialize the event aggregator. Takes an `{Object} config` as an argument,
which defines the event names as keys, and an array of emitters as the value.

When an event is received from an emitter, `event-aggregate` will emit the same
event.
```js
module.exports = aggregate({
  error: [myAsyncThing, myOtherAsyncThing],
  success: [myOtherAsyncThing],
  warning: [myAsyncthing]
});

// When 'myAsyncThing' emits an error, we will catch it,
// and emit the same error ourselves.
```

## License
[MIT](https://tldrlegal.com/license/mit-license) ©
[Yoshua Wuyts](yoshuawuyts.com)

[npm-image]: https://img.shields.io/npm/v/event-aggregate.svg?style=flat-square
[npm-url]: https://npmjs.org/package/event-aggregate
[travis-image]: https://img.shields.io/travis/yoshuawuyts/event-aggregate.svg?style=flat-square
[travis-url]: https://travis-ci.org/yoshuawuyts/event-aggregate
[coveralls-image]: https://img.shields.io/coveralls/yoshuawuyts/event-aggregate.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/yoshuawuyts/event-aggregate?branch=master


text:
<?php

namespace Auto\CoreBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class AutoCoreBundle extends Bundle
{
}


text:
Locations = new Mongo.Collection('locations');

Locations.helpers({
  regionals: function() {
    var regionals = [];

    this.regionalContacts.forEach(function(contactId) {
      regionals.push(Meteor.users.find(contactId));
    });

    return regionals;
  },
  getLocation: function() {
    return Locations.findOne(this.location);
  },
  getContact: function() {
    return Meteor.users.findOne(this.contact);
  }
});


text: BaseLogStream sample_log("sam", BaseLogStream::debug);


text:
import * as BaseActions from "actions/BaseEditActions";
import * as SaveLoadActions from "actions/SaveLoadActions";
import * as UpgradeScripts from "core/UpgradeScripts";
import * as Redux from "redux";
import {addElements, Document, initialState, removeElement} from "stores/Document";

let setIsEditing =
    (state: Document = initialState, action: BaseActions.SetIsEditing) => {
    if (action.type === "setIsEditing") {
        let newState: Document = { ... state };
        newState[action.itemId] = {... newState[action.itemId]} || {itemId: action.itemId};
        if (action.editing) {
            for (let itemId in newState) {
                if (newState[itemId].editing) {
                    newState[itemId] = {... newState[itemId], editing: false};
                }
            }
        }
        newState[action.itemId].editing = action.editing;
        return newState;
    }
    return state;
};

let onEdited =
    (state: Document = initialState, action: BaseActions.OnEdited) => {
    if (action.type === "onEdited") {
        let newState: Document = { ... state};
        newState[action.itemId] = {... newState[action.itemId]} || {itemId: action.itemId};
        newState[action.itemId].value = action.value;
        return newState;
    }
    return state;
};

let onAddDocument =
    (state: Document = initialState, action: BaseActions.AddToDocument) => {
    if (action.type === "addToDocument") {
        let newState: Document = {
            ... state,
        };
        addElements(newState, action.items, false, action.itemToEdit, action.ordering);
        return newState;
    }
    return state;
};

let onRemoveElement =
    (state: Document= initialState, action: BaseActions.RemoveFromDocument) => {
    if (action.type === "removeFromDocument") {
        let newState: Document = {
            ...state,
        };
        removeElement(newState, action.itemId);
        return newState;
    }
    return state;
};

let onSetDocument = (state: Document = initialState, action: SaveLoadActions.SetDocumentAction) => {
    if (action.type === "set-document") {
        let document = action.document;
        if (action.version && action.version !== UpgradeScripts.saveVersion) {
            document = UpgradeScripts.upgradeDocument(document, action.version);
        }
        return document;
    }
    return state;
};

let editReducers = (document: Document, action: Redux.Action) => {
    let newDoc = setIsEditing(document, action as BaseActions.SetIsEditing);
    newDoc = onEdited(newDoc, action as BaseActions.OnEdited);
    newDoc = onAddDocument(newDoc, action as BaseActions.AddToDocument);
    newDoc = onRemoveElement(newDoc, action as BaseActions.RemoveFromDocument);
    newDoc = onSetDocument(newDoc, action as SaveLoadActions.SetDocumentAction);
    return newDoc;
};

export default editReducers;


text:
pub mod filter;
#[doc(hidden)]
pub mod joins;

use backend::Backend;
use expression::{Expression, SelectableExpression, NonAggregate};
use query_builder::*;
#[doc(hidden)]
pub use self::joins::{InnerJoinSource, LeftOuterJoinSource};
use types::{FromSqlRow, HasSqlType};

pub use self::joins::JoinTo;

/// Trait indicating that a record can be queried from the database. This trait
/// can be derived automatically. See the [codegen
/// documentation](https://github.com/diesel-rs/diesel/tree/master/diesel_codegen#derivequeryable)
/// for more.
pub trait Queryable<ST, DB> where
    DB: Backend + HasSqlType<ST>,
{
    type Row: FromSqlRow<ST, DB>;

    fn build(row: Self::Row) -> Self;
}

#[doc(hidden)]
pub trait QuerySource {
    type FromClause;
    fn from_clause(&self) -> Self::FromClause;
}

/// A column on a database table. Types which implement this trait should have
/// been generated by the [`table!` macro](../macro.table!.html).
pub trait Column: Expression {
    type Table: Table;

    fn name() -> &'static str;
}

/// A SQL database table. Types which implement this trait should have been
/// generated by the [`table!` macro](../macro.table!.html).
pub trait Table: QuerySource + AsQuery + Sized {
    type PrimaryKey: SelectableExpression<Self> + NonAggregate;
    type AllColumns: SelectableExpression<Self> + NonAggregate;

    fn name() -> &'static str;
    fn primary_key(&self) -> Self::PrimaryKey;
    fn all_columns() -> Self::AllColumns;

    fn inner_join<T>(self, other: T) -> InnerJoinSource<Self, T> where
        T: Table,
        Self: JoinTo<T, joins::Inner>,
    {
        InnerJoinSource::new(self, other)
    }

    fn left_outer_join<T>(self, other: T) -> LeftOuterJoinSource<Self, T> where
        T: Table,
        Self: JoinTo<T, joins::LeftOuter>,
    {
        LeftOuterJoinSource::new(self, other)
    }
}


text:
package uk.co.transputersystems.occam.il;

import uk.co.transputersystems.occam.ILOpFormatter;
import uk.co.transputersystems.occam.metadata.VerificationContext;

import java.util.ArrayList;
import java.util.List;

public class ILBlock<TIdentifier, TILOp extends ILOp<? extends TIdentifier>> {
    private List<TILOp> ilOps = new ArrayList<>();
    /**
     * The Id of the scope to which this ILBlock belongs or -1 to indicate that it doesn't matter.
     *
     * This value is only relevant for the top-most ILBlock which represents the container of all the ILOps for a particular procedure.
     */
    private int scopeId = -1;

    private boolean functionBlock = false;

    public ILBlock() {
    }

    public ILBlock(TILOp op) {
        ilOps.add(op);
    }

    public ILBlock(int scopeId, boolean functionBlock) {
        this.functionBlock = functionBlock;
        this.scopeId = scopeId;
    }

    public int getScopeId() {
        return scopeId;
    }
    public boolean isFunctionBlock() {
        return functionBlock;
    }

    public TILOp get(int index) {
        return ilOps.get(index);
    }
    public TILOp get(TIdentifier id) {
        for (TILOp op : ilOps) {
            if (op.getId().equals(id)) {
                return op;
            }
        }
        return null;
    }

    public void add(int position, TILOp op){
        ilOps.add(position, op);
    }

    public void add(TILOp op) {
        ilOps.add(op);
    }
    public void addAll(List<TILOp> ops) {
        ilOps.addAll(ops);
    }
    public void appendBlock(ILBlock<TIdentifier,TILOp> block) {
        addAll(block.getAll());
    }
    public void appendBlockList(Iterable<ILBlock<TIdentifier,TILOp>> blocks){
        for(ILBlock<TIdentifier,TILOp> ilBlock : blocks){
            this.appendBlock(ilBlock);
        }
    }
    public List<TILOp> getAll() {
        return new ArrayList<>(ilOps);
    }

    public List<ILBlock<TIdentifier,TILOp>> mergeBlockList(Iterable<ILBlock<TIdentifier,TILOp>> blocks) {
        List<ILBlock<TIdentifier,TILOp>> result = new ArrayList<>();
        for(ILBlock<TIdentifier,TILOp> ilBlock : blocks){
            if (ilBlock.isFunctionBlock()) {
                result.add(ilBlock);
            } else {
                this.appendBlock(ilBlock);
            }
        }
        result.add(this);
        return result;
    }

    /**
     * Gets the offset, in bytes, of the specified IL op from the start of the block.
     * @param opId The Id of the operation to get the offset of.
     * @return The offset, in bytes, from the start of the block.
     */
    public Integer getOffset(TIdentifier opId) {
        int offset = 0;
        for (TILOp op : ilOps) {
            if (op.getId().equals(opId)) {
                return offset;
            }
            offset += op.getEncodedSize();
        }
        return null;
    }

    public Integer getOffset(ILOp searchOp) {
        int offset = 0;
        for (TILOp op : ilOps) {
            if (op.equals(searchOp)) {
                return offset;
            }
            offset += op.getEncodedSize();
        }
        return null;
    }

    @Override
    public String toString() {
        String result = " [ILBlock scope: " + (scopeId == -1 ? "[PARENT]" : Integer.toString(scopeId)) + "]\n";
        for (TILOp ilOp : ilOps) {
            result += ILOpFormatter.formatOp(ilOp, this) + "\n";
        }
        return result;
    }

    public void verify(VerificationContext ctx) {
        int methodStartOps = 0;

        for (ILOp ilOp : ilOps) {
            if (ilOp instanceof MethodStart) {
                methodStartOps++;
            }
            ilOp.verify(ctx);
        }

        assert (methodStartOps == (isFunctionBlock() ? 1 : 0));
    }
}


text:
package org.apache.xmlrpc.serializer;

import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;

/** A {@link TypeSerializer} for integers.
 */
public class I4Serializer extends TypeSerializerImpl {
	/** Tag name of an int value.
	 */
	public static final String INT_TAG = "int";

	/** Tag name of an i4 value.
	 */
	public static final String I4_TAG = "i4";

	public void write(ContentHandler pHandler, Object pObject) throws SAXException {
		write(pHandler, I4_TAG, pObject.toString());
	}
}


text:
package com.redhat.ceylon.compiler.js;

import java.util.ResourceBundle;

import com.redhat.ceylon.common.Messages;

public class CeylonRunJsMessages extends Messages {

    public static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle("com.redhat.ceylon.compiler.js.resources.messages");

    public static String msg(String msgKey, Object... msgArgs) {
        return msg(RESOURCE_BUNDLE, msgKey, msgArgs);
    }
}


text:
.. _ref_guide_deployment_heroku:

======
Heroku
======

:edb-alt-title: Deploying EdgeDB to Heroku

In this guide we show how to deploy EdgeDB to Heroku using a Heroku PostgreSQL
add-on as the backend.

Because of Heroku's architecture EdgeDB must be deployed with a web app on
Heroku. For this guide we will use a `todo app written in node <todo-repo_>`_.

.. _todo-repo: https://github.com/edgedb/simpletodo/tree/main

Prerequisites
=============

* Heroku account
* ``heroku`` CLI (`install <heroku-cli-install_>`_)
* Node.js (`install <nodejs-install_>`_)

.. _heroku-cli-install: https://devcenter.heroku.com/articles/heroku-cli
.. _nodejs-install:
   https://docs.npmjs.com
   /downloading-and-installing-node-js-and-npm
   #using-a-node-version-manager-to-install-node-js-and-npm

Setup
=====

First copy the code, initialize a new git repo, and create a new heroku app.

.. code-block:: bash

   $ npx degit 'edgedb/simpletodo#main' simpletodo-heroku
   $ cd simpletodo-heroku
   $ git init --initial-branch main
   $ heroku apps:create --buildpack heroku/nodejs
   $ edgedb project init --non-interactive

If you are using the `JS query builder for EdgeDB <js-query-builder>`_ then you
will need to check the ``dbschema/edgeql-js`` directory in to your git repo
after running ``yarn edgeql-js``. The ``edgeql-js`` command can not be run
during the build step on Heroku because it needs access to a running EdgeDB
instance which is not available at build time on Heroku.

.. _js-query-builder: https://www.edgedb.com/docs/clients/01_js/index

.. code-block:: bash

   $ yarn install && npx edgeql-js

The ``dbschema/edgeql-js`` directory was added to the ``.gitignore`` in the
upstream project so we'll remove it here.

.. code-block:: bash

   $ sed -i '/^dbschema\/edgeql-js$/d' .gitignore

Create a PostgreSQL Add-on
==========================

Heroku's smallest PostgreSQL plan, Hobby Dev, limits the number of rows to
10,000, but EdgeDB's standard library uses more than 20,000 rows so we need to
use a different plan. We'll use the `Standard 0 plan <postgres-plans_>`_ for
this guide.

.. _postgres-plans: https://devcenter.heroku.com/articles/heroku-postgres-plans

.. code-block:: bash

   $ heroku addons:create heroku-postgresql:standard-0

Add the EdgeDB Buildpack
========================

To run EdgeDB on Heroku we'll add the `EdgeDB buildpack <buildpack_>`_.

.. _buildpack: https://github.com/edgedb/heroku-buildpack-edgedb

.. code-block:: bash

   $ heroku buildpacks:add \
       --index 1 \
       https://github.com/edgedb/heroku-buildpack-edgedb.git

Use ``start-edgedb`` in the Procfile
====================================

To make EdgeDB available to a process prepend the command with ``start-edgedb``
which is provided by the EdgeDB buildpack. For the sample application in this
guide, the web process is started with the command ``npm start``. If you have
other processes in your application besides/instead of web that need to access
EdgeDB those process commands should be prepended with ``start-edgedb`` too.

.. code-block:: bash

   $ echo "web: start-edgedb npm start" > Procfile

Deploy the App
==============

Commit the changes and push to Heroku to deploy the app.

.. code-block:: bash

   $ git add .
   $ git commit -m "first commit"
   $ git push heroku main


text:
<?php

namespace Sylius\Bundle\ResourceBundle\Controller;

use Symfony\Component\HttpFoundation\ParameterBag;

/**
 * @author Arnaud Langade <arn0d.dev@gmail.com>
 */
class Parameters extends ParameterBag
{
    /**
     * {@inheritdoc}
     */
    public function get($path, $default = null, $deep = false)
    {
        $result = parent::get($path, $default);

        if (null === $result && $default !== null && $this->has($path)) {
            $result = $default;
        }

        return $result;
    }
}