text:
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#include "UMGEditorPrivatePCH.h"
#include "Components/VerticalBox.h"
#include "Components/VerticalBoxSlot.h"
#include "Extensions/VerticalSlotExtension.h"
#include "Kismet2/BlueprintEditorUtils.h"
#include "WidgetBlueprint.h"

#define LOCTEXT_NAMESPACE "UMG"

FVerticalSlotExtension::FVerticalSlotExtension()
{
	ExtensionId = FName(TEXT("VerticalSlot"));
}

bool FVerticalSlotExtension::CanExtendSelection(const TArray< FWidgetReference >& Selection) const
{
	for ( const FWidgetReference& Widget : Selection )
	{
		if ( !Widget.GetTemplate()->Slot || !Widget.GetTemplate()->Slot->IsA(UVerticalBoxSlot::StaticClass()) )
		{
			return false;
		}
	}

	return Selection.Num() == 1;
}

void FVerticalSlotExtension::ExtendSelection(const TArray< FWidgetReference >& Selection, TArray< TSharedRef<FDesignerSurfaceElement> >& SurfaceElements)
{
	SelectionCache = Selection;

	TSharedRef<SButton> UpArrow = SNew(SButton)
		.Text(LOCTEXT("UpArrow", "↑"))
		.ContentPadding(FMargin(6, 2))
		.IsEnabled(this, &FVerticalSlotExtension::CanShift, -1)
		.OnClicked(this, &FVerticalSlotExtension::HandleShiftVertical, -1);

	TSharedRef<SButton> DownArrow = SNew(SButton)
		.Text(LOCTEXT("DownArrow", "↓"))
		.ContentPadding(FMargin(6, 2))
		.IsEnabled(this, &FVerticalSlotExtension::CanShift, 1)
		.OnClicked(this, &FVerticalSlotExtension::HandleShiftVertical, 1);

	UpArrow->SlatePrepass();
	DownArrow->SlatePrepass();

	SurfaceElements.Add(MakeShareable(new FDesignerSurfaceElement(UpArrow, EExtensionLayoutLocation::TopCenter, FVector2D(UpArrow->GetDesiredSize().X * -0.5f, -UpArrow->GetDesiredSize().Y))));
	SurfaceElements.Add(MakeShareable(new FDesignerSurfaceElement(DownArrow, EExtensionLayoutLocation::BottomCenter, FVector2D(DownArrow->GetDesiredSize().X * -0.5f, 0))));
}

bool FVerticalSlotExtension::CanShift(int32 ShiftAmount) const
{
	//TODO UMG Provide feedback if shifting is possible.  Tricky with multiple items selected, if we ever support that.
	return true;
}

FReply FVerticalSlotExtension::HandleShiftVertical(int32 ShiftAmount)
{
	BeginTransaction(LOCTEXT("MoveWidget", "Move Widget"));

	for ( FWidgetReference& Selection : SelectionCache )
	{
		ShiftVertical(Selection.GetPreview(), ShiftAmount);
		ShiftVertical(Selection.GetTemplate(), ShiftAmount);
	}

	EndTransaction();

	//TODO UMG Reorder the live slot without rebuilding the structure
	FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(Blueprint);

	return FReply::Handled();
}

void FVerticalSlotExtension::ShiftVertical(UWidget* Widget, int32 ShiftAmount)
{
	UVerticalBox* Parent = CastChecked<UVerticalBox>(Widget->GetParent());

	Parent->Modify();
	int32 CurrentIndex = Parent->GetChildIndex(Widget);
	Parent->ShiftChild(CurrentIndex + ShiftAmount, Widget);
}

#undef LOCTEXT_NAMESPACE


text:
To install:

mvn clean install

Install Apache Karaf 4.x

feature:install pax-http-whiteboard

bundle:install -s mvn:bi.meteorite/ui-shared/1.0-SNAPSHOT

Bundle will then be available on http://localhost:8181/shared

redpajama_set_name: RedPajamaGithub


text:
Updated `azure-communication-chat` version

## 1.0.0-beta.1 (2020-09-22)
This is the initial release of Azure Communication Services for chat. For more information, please see the [README][read_me] and [documentation][documentation].

This is a Public Preview version, so breaking changes are possible in subsequent releases as we improve the product. To provide feedback, please submit an issue in our [Azure SDK for Java GitHub repo](https://github.com/Azure/azure-sdk-for-java/issues).

<!-- LINKS -->
[read_me]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/communication/azure-communication-chat/README.md
[documentation]: https://docs.microsoft.com/azure/communication-services/quickstarts/chat/get-started?pivots=programming-language-java


text:
using UnityEngine;
using System.Collections;

public class GameManager : MonoSingleton<GameManager> {

	void Start () {

	}

	void Update () {

	}
}


text:
package com.facebook.buck.artifact_cache;

import com.facebook.buck.artifact_cache.config.CacheReadMode;
import com.facebook.buck.io.file.BorrowablePath;
import com.facebook.buck.io.file.LazyPath;
import com.facebook.buck.rules.RuleKey;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.util.concurrent.ListenableFuture;
import java.util.List;

public interface ArtifactCache extends AutoCloseable {
  /**
   * Fetch a cached artifact, keyed by ruleKey, save the artifact to path specified by output, and
   * return true on success.
   *
   * @param ruleKey cache fetch key
   * @param output Path to store artifact to. Path should not be accessed unless store operation is
   *     guaranteed by the cache, to avoid potential extra disk I/O.
   * @return whether it was a {@link CacheResultType#MISS} (indicating a failure) or some type of
   *     hit.
   */
  ListenableFuture<CacheResult> fetchAsync(RuleKey ruleKey, LazyPath output);

  /** All pending (and future) async fetches will be immediately marked as skipped. */
  void skipPendingAndFutureAsyncFetches();

  /**
   * Store the artifact at path specified by output to cache, such that it can later be fetched
   * using ruleKey as the lookup key. If any internal errors occur, fail silently and continue
   * execution. Store may be performed synchronously or asynchronously.
   *
   * <p>This is a noop if {@link #getCacheReadMode()}} returns {@code READONLY}.
   *
   * @param info information to store with the artifact
   * @param output path to read artifact from. If its borrowable, you may freely move the file into
   *     cache without obtaining a copy of the file.
   * @return {@link ListenableFuture} that completes once the store has finished.
   */
  ListenableFuture<Void> store(ArtifactInfo info, BorrowablePath output);

  /**
   * Check if the cache contains the given artifacts, keyed by ruleKeys, without fetching them, and
   * return a map of results wrapped in a {@link ListenableFuture}. This is supposed to be fast, but
   * best-effort, meaning that there will be false-positives.
   *
   * @param ruleKeys Set of cache fetch keys.
   * @return map of keys to {@link CacheResult} which can be a {@link CacheResultType#MISS} / {@link
   *     CacheResultType#ERROR} (indicating a failure) or {@link CacheResultType#CONTAINS}.
   */
  ListenableFuture<ImmutableMap<RuleKey, CacheResult>> multiContainsAsync(
      ImmutableSet<RuleKey> ruleKeys);

  ListenableFuture<CacheDeleteResult> deleteAsync(List<RuleKey> ruleKeys);

  /**
   * This method must return the same value over the lifetime of this object.
   *
   * @return whether this{@link ArtifactCache} supports storing artifacts.
   */
  CacheReadMode getCacheReadMode();

  @Override
  void close();
}


text:
int main(int argc, const char * argv[])
{

    @autoreleasepool {
        NSDictionary *inventory = @{
                                    @"Mercedes-Benz SLK250" : [NSNumber numberWithInt:13],
                                    @"Mercedes-Benz E350" : [NSNumber numberWithInt:22],
                                    @"BMW M3 Coupe" : [NSNumber numberWithInt:19],
                                    @"BMW X6" : [NSNumber numberWithInt:16],
                                    };

        [inventory enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
            NSLog(@"There are %@ %@'s in stock", obj, key);
        }];

    }
    return 0;
}


text:
namespace po = boost::program_options;

namespace
{
auto piak()
{
    return []
    {
        std::cout << "piak!" << std::endl;
    };
}

const size_t SUCCESS = 0;
const size_t ERROR_UNKNOWN_PO = 1;
const size_t ERROR_UNHANDLED_EXCEPTION = 2;
}

int main(int argc, char *argv[])
{
    const int DEFAULT_ARGS_TIMEOUT_SECONDS = 2;

    try
    {
        // Declaration of options variables
        int opt_timeout;
        bool opt_dryrun = false;

        namespace po = boost::program_options;
        po::options_description generic_opts("Generic options");

        po::options_description testing_opts("Testing options");

        generic_opts.add_options()("help,h", "display this message")(
            "timeout,t", po::value<int>(&opt_timeout)
                             ->default_value(DEFAULT_ARGS_TIMEOUT_SECONDS),
            "timeout value (in seconds)");

        testing_opts.add_options()("dryrun", "dryrun mode");

        po::options_description desc("Allowed options");
        desc.add(generic_opts).add(testing_opts);

        po::variables_map vm;
        try
        {
            po::store(po::parse_command_line(argc, argv, desc), vm); // can throw

            if (vm.count("help"))
            {
                piak()();
                std::cout << "Scalarp nfc_reader application "
                          << scalarp::VERSION_STRING << std::endl;
                std::cout << desc << std::endl;
                return SUCCESS;
            }

            if (vm.count("dryrun"))
            {
                std::cout << "Scalarp nfc_reader application "
                          << scalarp::VERSION_STRING << std::endl;
                opt_dryrun = true;
            }

            po::notify(vm);
        }
        catch (po::error &e)
        {
            std::cerr << "ERROR: " << e.what() << std::endl
                      << std::endl;
            std::cerr << desc << std::endl;
            return ERROR_UNKNOWN_PO;
        }

        // application code here //
        std::cout << scalarp::nfc_json::poll(opt_timeout, opt_dryrun) << std::endl;
    }
    catch (std::exception &e)
    {
        std::cerr << "Unhandled Exception reached the top of main: " << e.what()
                  << ", application will now exit" << std::endl;
        return ERROR_UNHANDLED_EXCEPTION;
    }

    return 0;
}


text:
#include "kernel/replace_fn.h"
#include "library/sorry.h"
#include "library/equations_compiler/util.h"
#include "library/compiler/util.h"
#include "library/compiler/procedure.h"
#include "library/compiler/compiler_step_visitor.h"

namespace lean {
class extract_values_fn : public compiler_step_visitor {
    name                  m_prefix;
    expr_struct_map<expr> m_cache;
    unsigned              m_idx{1};
    buffer<procedure>     m_new_procs;
    expr                  m_root;
    optional<pos_info>    m_pos;

    expr mk_aux_decl(expr const & e) {
        auto it = m_cache.find(e);
        if (it != m_cache.end())
            return it->second;
        name aux = mk_fresh_name(env(), m_prefix, "_val", m_idx);
        m_new_procs.push_back(procedure(aux, m_pos, e));
        expr r   = mk_constant(aux);
        m_cache.insert(mk_pair(e, r));
        return r;
    }

    bool should_extract(expr const & e) {
        if (is_sorry(get_app_fn(e))) {
            // Never extract sorry.
            return false;
        }
        /* TODO(Leo): should we allow users to mark extra types for extract_values?
           Extracting everything is bad since caching may prevent destructive updates (e.g., arrays). */
        return is_nat_int_char_string_name_value(ctx(), e);
    }

    virtual expr visit_app(expr const & e) override {
        if (!has_local(e) && !is_eqp(e, m_root) && should_extract(e))
            return mk_aux_decl(e);
        else
            return compiler_step_visitor::visit_app(e);
    }

    virtual expr visit_macro(expr const & e) override {
        if (!has_local(e) && !is_eqp(e, m_root) && macro_num_args(e) > 0 && !is_sorry(e))
            return mk_aux_decl(e);
        else
            return compiler_step_visitor::visit_macro(e);
    }
public:
    extract_values_fn(environment const & env, name const & prefix):
        compiler_step_visitor(env), m_prefix(prefix) {}

    void operator()(procedure p) {
        m_root   = p.m_code;
        m_pos    = p.m_pos;
        p.m_code = visit(p.m_code);
        m_new_procs.push_back(p);
    }

    buffer<procedure> const & get_procedures() const {
        return m_new_procs;
    }
};

void extract_values(environment const & env, name const & prefix, buffer<procedure> & procs) {
    extract_values_fn fn(env, prefix);
    for (procedure const & p : procs)
        fn(p);
    procs.clear();
    procs.append(fn.get_procedures());
}
}


text:
package io.buoyant.namerd
package iface

import com.twitter.finagle.netty4.ssl.server.Netty4ServerEngineFactory
import com.twitter.finagle.ssl.server.SslServerEngineFactory
import io.buoyant.config.Parser
import org.scalatest.FunSuite

class MeshInterpreterInitializerTest extends FunSuite {

  test("address") {
    val yaml = """
      |kind: io.l5d.mesh
      |ip: 1.2.3.4
      |port: 1234
    """.stripMargin

    val config = Parser
      .objectMapper(
        yaml,
        Iterable(Seq(new MeshIfaceInitializer))
      ).readValue[MeshIfaceConfig](yaml)

    assert(config.addr.getHostString == "1.2.3.4")
    assert(config.addr.getPort == 1234)
  }

  test("tls") {
    val yaml = """
      |kind: io.l5d.mesh
      |tls:
      |  certPath: cert.pem
      |  keyPath: key.pem
      |  caCertPath: cacert.pem
      |  ciphers:
      |  - "foo"
      |  - "bar"
      |  requireClientAuth: true
    """.stripMargin

    val config = Parser
      .objectMapper(
        yaml,
        Iterable(Seq(new MeshIfaceInitializer))
      ).readValue[MeshIfaceConfig](yaml)

    val tls = config.tls.get
    assert(tls.certPath == "cert.pem")
    assert(tls.keyPath == "key.pem")
    assert(tls.caCertPath == Some("cacert.pem"))
    assert(tls.ciphers == Some(List("foo", "bar")))
    assert(tls.requireClientAuth == Some(true))

    assert(config.tlsParams[SslServerEngineFactory.Param].factory.isInstanceOf[Netty4ServerEngineFactory])
  }
}


text:
import os

from . import load_config, load_key

def test_load_key():
    path = 'tmp.json'
    data = '{"key": "key", "secret": "secret"}'
    with open(path, 'w') as tmp:
        tmp.write(data)
    load_key(path)
    assert os.environ['CrizzleKey_tmp'] is not None
    assert os.environ['CrizzleKey_tmp'] == data
    os.remove(path)

def test_load_config():
    path = 'tmp.json'
    data = '{"data": "/datapath", "keys": "/keyspath", "log": "/logpath"}'
    with open(path, 'w') as tmp:
        tmp.write(data)
    try:
        load_config(path)
    except FileNotFoundError:
        pass
    assert os.environ['CrizzleData'] == '/datapath'
    assert os.environ['CrizzleKeys'] == '/keyspath'
    assert os.environ['CrizzleLog'] == '/logpath'
    os.remove(path)


text:
'''/name_change.py'''
'''
Copyright (c) 2012, Max Garvey
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.
'''

from map_dirs import _map
from new_name import linux_name
from file_extension import standardize
from av_conv import convert
from pdf_conv import ps_convert
from img_conv import img_convert
import os
import shutil

def change_names(args, conf):
    '''this method will take a starting point and change all
    the names to more linux friendly ones'''
    dir_map, ordering = _map(args, conf)
    if args.verbose or conf['verbose']:
        print 'dir_map: {}'.format(dir_map)
        print 'ordering: {}'.format(ordering)
    while len(ordering) > 0:
        my_pop = ordering.pop()
        if args.verbose or conf['verbose']:
            print '\npopped: ' + my_pop #debug
            print 'dir_map["' + my_pop + '"]["files"]: ' + str(dir_map[my_pop]["files"]) #debug
        for _file in dir_map[my_pop]["files"]:
            if args.verbose or conf['verbose']:
                print 'file:{}'.format(_file)
            change_this_file = True
            for extension in conf['formats_don\'t_touch']:
                if _file.endswith(extension):
                    change_this_file = False
            if change_this_file:
                if args.verbose or conf['verbose']:
                    print 'os.rename("' + os.path.join(my_pop, _file) + '", "' + standardize(linux_name(os.path.join(my_pop, _file), conf), conf, False) + '")' #debug
                new_filename = standardize(linux_name(os.path.join(my_pop, _file), conf), conf, args.verbose)
                os.rename(os.path.join(my_pop, _file), new_filename)
            convert(new_filename, conf)
            img_convert(new_filename, conf)
            ps_convert(new_filename, conf)
            if conf['convert_pdf_to_ps'] and conf['convert_ps_to_pdf']:
                print 'both pdf to ps and ps to pdf conversions are selected in conf file.'
        new_name = standardize(linux_name(my_pop, conf), conf, False)
        if args.verbose or conf['verbose']:
            print 'shutil.move("' + my_pop + '", "' + new_name + '")' #debug
        if os.path.isdir(new_name):
            shutil.rmtree(new_name)
        shutil.move(my_pop, standardize(linux_name(my_pop, conf), conf, args.verbose))
        print 'debug'


text:
	 Segmentfault
    GitHub
    微博
     StackOverflow
          Oschina
     RSS

Theme is Jekyll liberxue by liberxue

Powered by Jekyll

© 2017 vefuwell blog RSS

总计文章:{{paginator.total_posts}}篇

本blog已开源点击Fork

置顶文章

    {% for post in site.posts limit:15 %}
      {% if post.istop %}

{{ post.title }}

      {% endif %}
    {% endfor %}

最新文章

  {% for post in site.posts limit:14 %}
      {% if post.book %}

{{ post.title }}

      {% endif %}
    {% endfor %}


text:
CREATE TABLE IF NOT EXISTS clusterstatus
(
    username        VARCHAR(30) NOT NULL,
    cluster         VARCHAR(30) NOT NULL,
    minnodes        INT(12),
    maxnodes        INT(12),
    status          VARCHAR(30),
    pid             INT(12),
    started         DATETIME NOT NULL,
    stopped         DATETIME NOT NULL,
    termination     DATETIME NOT NULL,
    polled          DATETIME NOT NULL,
    hours           INT(12),

    PRIMARY KEY (username, cluster)
);


text:
package com.jd.framework.orm.sequenceid;

import java.io.Serializable;
import java.sql.*;
import javax.sql.DataSource;

@SuppressWarnings("serial")
public class JdbcSequenceIdProvider implements SequenceIdProvider,Serializable {

    private static final String TABLE_NAME = "_SEQUANCE_";
    private final DataSource dataSource;

    public JdbcSequenceIdProvider(DataSource dataSource) {
        this.dataSource = dataSource;

        confirmTableExists();
    }

    @Override
    public SequenceId create(String name) {
        return new SequenceId(this, name, 1);
    }

    @Override
    public SequenceId create(String name, int begin) {
        return new SequenceId(this, name, begin);
    }

    private void confirmTableExists() {
        Connection conn = null;
        try {
            conn = dataSource.getConnection();

            ResultSet rs = conn.getMetaData().getTables(null, null, TABLE_NAME, null);
            boolean found = rs.next();
            rs.close();

            if (!found) {
                Statement stmt = conn.createStatement();
                String sql = "create table " + TABLE_NAME + " (name varchar(50) not null, next_val long not null, primary key(name))";
                stmt.execute(sql);
                stmt.close();
            }
        } catch (SQLException e) {
            throw new RuntimeException(e);
        } finally {
            close(conn);
        }
    }

    private void close(Connection conn) {
        if (conn != null) {
            try {
                conn.close();
            } catch (SQLException e) {
                throw new RuntimeException(e);
            }
        }
    }

    @Override
    public int load(String name) {
        int value = SequenceId.NOT_FOUND;
        Connection conn = null;
        try {
        	this.confirmTableExists();//检查序列表是否存在
            conn = dataSource.getConnection();
            String sql = "select next_val from " + TABLE_NAME + " where name=?";
            PreparedStatement ps = conn.prepareStatement(sql);
            ps.setString(1, name);
            ResultSet rs = ps.executeQuery();
            if (rs.next()) {
                value = rs.getInt(1);
            }
            rs.close();
            ps.close();
        } catch (SQLException e) {
            throw new RuntimeException(e);
        } finally {
            close(conn);
        }
        return value;
    }

    @Override
    public void store(String name, int value) {
        Connection conn = null;
        try {
            conn = dataSource.getConnection();
            String sql = "update " + TABLE_NAME + " set next_val=? where name=?";
            PreparedStatement ps = conn.prepareStatement(sql);
            ps.setInt(1, value);
            ps.setString(2, name);
            int updated = ps.executeUpdate();
            ps.close();

            if (updated == 0) {
                sql = "insert into " + TABLE_NAME + " (name, next_val) values (?,?)";
                ps = conn.prepareStatement(sql);
                ps.setString(1, name);
                ps.setInt(2, value);
                ps.executeUpdate();
                ps.close();
            }
        } catch (SQLException e) {
            throw new RuntimeException(e);
        } finally {
            close(conn);
        }
    }
}


text:
#define pr_fmt(fmt) "arcnet:" KBUILD_MODNAME ": " fmt

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/bootmem.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>

#include "arcdevice.h"
#include "com9026.h"

/* Internal function declarations */

static int arcrimi_probe(struct net_device *dev);
static int arcrimi_found(struct net_device *dev);
static void arcrimi_command(struct net_device *dev, int command);
static int arcrimi_status(struct net_device *dev);
static void arcrimi_setmask(struct net_device *dev, int mask);
static int arcrimi_reset(struct net_device *dev, int really_reset);
static void arcrimi_copy_to_card(struct net_device *dev, int bufnum, int offset,
				 void *buf, int count);
static void arcrimi_copy_from_card(struct net_device *dev, int bufnum,
				   int offset, void *buf, int count);

/* Handy defines for ARCnet specific stuff */

/* Amount of I/O memory used by the card */
#define BUFFER_SIZE	(512)
#define MIRROR_SIZE	(BUFFER_SIZE * 4)

/* We cannot probe for a RIM I card; one reason is I don't know how to reset
 * them.  In fact, we can't even get their node ID automatically.  So, we
 * need to be passed a specific shmem address, IRQ, and node ID.
 */
static int __init arcrimi_probe(struct net_device *dev)
{
	if (BUGLVL(D_NORMAL)) {
		pr_info("%s\n", "RIM I (entirely mem-mapped) support");
		pr_info("E-mail me if you actually test the RIM I driver, please!\n");
		pr_info("Given: node %02Xh, shmem %lXh, irq %d\n",
			dev->dev_addr[0], dev->mem_start, dev->irq);
	}

	if (dev->mem_start <= 0 || dev->irq <= 0) {
		if (BUGLVL(D_NORMAL))
			pr_err("No autoprobe for RIM I; you must specify the shmem and irq!\n");
		return -ENODEV;
	}
	if (dev->dev_addr[0] == 0) {
		if (BUGLVL(D_NORMAL))
			pr_err("You need to specify your card's station ID!\n");
		return -ENODEV;
	}
	/* Grab the memory region at mem_start for MIRROR_SIZE bytes.
	 * Later in arcrimi_found() the real size will be determined
	 * and this reserve will be released and the correct size
	 * will be taken.
	 */
	if (!request_mem_region(dev->mem_start, MIRROR_SIZE, "arcnet (90xx)")) {
		if (BUGLVL(D_NORMAL))
			pr_notice("Card memory already allocated\n");
		return -ENODEV;
	}
	return arcrimi_found(dev);
}

static int check_mirror(unsigned long addr, size_t size)
{
	void __iomem *p;
	int res = -1;

	if (!request_mem_region(addr, size, "arcnet (90xx)"))
		return -1;

	p = ioremap(addr, size);
	if (p) {
		if (arcnet_readb(p, COM9026_REG_R_STATUS) == TESTvalue)
			res = 1;
		else
			res = 0;
		iounmap(p);
	}

	release_mem_region(addr, size);
	return res;
}

/* Set up the struct net_device associated with this card.
 * Called after probing succeeds.
 */
static int __init arcrimi_found(struct net_device *dev)
{
	struct arcnet_local *lp;
	unsigned long first_mirror, last_mirror, shmem;
	void __iomem *p;
	int mirror_size;
	int err;

	p = ioremap(dev->mem_start, MIRROR_SIZE);
	if (!p) {
		release_mem_region(dev->mem_start, MIRROR_SIZE);
		arc_printk(D_NORMAL, dev, "Can't ioremap\n");
		return -ENODEV;
	}

	/* reserve the irq */
	if (request_irq(dev->irq, arcnet_interrupt, 0, "arcnet (RIM I)", dev)) {
		iounmap(p);
		release_mem_region(dev->mem_start, MIRROR_SIZE);
		arc_printk(D_NORMAL, dev, "Can't get IRQ %d!\n", dev->irq);
		return -ENODEV;
	}

	shmem = dev->mem_start;
	arcnet_writeb(TESTvalue, p, COM9026_REG_W_INTMASK);
	arcnet_writeb(TESTvalue, p, COM9026_REG_W_COMMAND);
					/* actually the station/node ID */

	/* find the real shared memory start/end points, including mirrors */

	/* guess the actual size of one "memory mirror" - the number of
	 * bytes between copies of the shared memory.  On most cards, it's
	 * 2k (or there are no mirrors at all) but on some, it's 4k.
	 */
	mirror_size = MIRROR_SIZE;
	if (arcnet_readb(p, COM9026_REG_R_STATUS) == TESTvalue &&
	    check_mirror(shmem - MIRROR_SIZE, MIRROR_SIZE) == 0 &&
	    check_mirror(shmem - 2 * MIRROR_SIZE, MIRROR_SIZE) == 1)
		mirror_size = 2 * MIRROR_SIZE;

	first_mirror = shmem - mirror_size;
	while (check_mirror(first_mirror, mirror_size) == 1)
		first_mirror -= mirror_size;
	first_mirror += mirror_size;

	last_mirror = shmem + mirror_size;
	while (check_mirror(last_mirror, mirror_size) == 1)
		last_mirror += mirror_size;
	last_mirror -= mirror_size;

	dev->mem_start = first_mirror;
	dev->mem_end = last_mirror + MIRROR_SIZE - 1;

	/* initialize the rest of the device structure. */

	lp = netdev_priv(dev);
	lp->card_name = "RIM I";
	lp->hw.command = arcrimi_command;
	lp->hw.status = arcrimi_status;
	lp->hw.intmask = arcrimi_setmask;
	lp->hw.reset = arcrimi_reset;
	lp->hw.owner = THIS_MODULE;
	lp->hw.copy_to_card = arcrimi_copy_to_card;
	lp->hw.copy_from_card = arcrimi_copy_from_card;

	/* re-reserve the memory region - arcrimi_probe() alloced this reqion
	 * but didn't know the real size.  Free that region and then re-get
	 * with the correct size.  There is a VERY slim chance this could
	 * fail.
	 */
	iounmap(p);
	release_mem_region(shmem, MIRROR_SIZE);
	if (!request_mem_region(dev->mem_start,
				dev->mem_end - dev->mem_start + 1,
				"arcnet (90xx)")) {
		arc_printk(D_NORMAL, dev, "Card memory already allocated\n");
		goto err_free_irq;
	}

	lp->mem_start = ioremap(dev->mem_start,
				dev->mem_end - dev->mem_start + 1);
	if (!lp->mem_start) {
		arc_printk(D_NORMAL, dev, "Can't remap device memory!\n");
		goto err_release_mem;
	}

	/* get and check the station ID from offset 1 in shmem */
	dev->dev_addr[0] = arcnet_readb(lp->mem_start, COM9026_REG_R_STATION);

	arc_printk(D_NORMAL, dev, "ARCnet RIM I: station %02Xh found at IRQ %d, ShMem %lXh (%ld*%d bytes)\n",
		   dev->dev_addr[0],
		   dev->irq, dev->mem_start,
		   (dev->mem_end - dev->mem_start + 1) / mirror_size,
		   mirror_size);

	err = register_netdev(dev);
	if (err)
		goto err_unmap;

	return 0;

err_unmap:
	iounmap(lp->mem_start);
err_release_mem:
	release_mem_region(dev->mem_start, dev->mem_end - dev->mem_start + 1);
err_free_irq:
	free_irq(dev->irq, dev);
	return -EIO;
}

/* Do a hardware reset on the card, and set up necessary registers.
 *
 * This should be called as little as possible, because it disrupts the
 * token on the network (causes a RECON) and requires a significant delay.
 *
 * However, it does make sure the card is in a defined state.
 */
static int arcrimi_reset(struct net_device *dev, int really_reset)
{
	struct arcnet_local *lp = netdev_priv(dev);
	void __iomem *ioaddr = lp->mem_start + 0x800;

	arc_printk(D_INIT, dev, "Resetting %s (status=%02Xh)\n",
		   dev->name, arcnet_readb(ioaddr, COM9026_REG_R_STATUS));

	if (really_reset) {
		arcnet_writeb(TESTvalue, ioaddr, -0x800);	/* fake reset */
		return 0;
	}
	/* clear flags & end reset */
	arcnet_writeb(CFLAGScmd | RESETclear, ioaddr, COM9026_REG_W_COMMAND);
	arcnet_writeb(CFLAGScmd | CONFIGclear, ioaddr, COM9026_REG_W_COMMAND);

	/* enable extended (512-byte) packets */
	arcnet_writeb(CONFIGcmd | EXTconf, ioaddr, COM9026_REG_W_COMMAND);

	/* done!  return success. */
	return 0;
}

static void arcrimi_setmask(struct net_device *dev, int mask)
{
	struct arcnet_local *lp = netdev_priv(dev);
	void __iomem *ioaddr = lp->mem_start + 0x800;

	arcnet_writeb(mask, ioaddr, COM9026_REG_W_INTMASK);
}

static int arcrimi_status(struct net_device *dev)
{
	struct arcnet_local *lp = netdev_priv(dev);
	void __iomem *ioaddr = lp->mem_start + 0x800;

	return arcnet_readb(ioaddr, COM9026_REG_R_STATUS);
}

static void arcrimi_command(struct net_device *dev, int cmd)
{
	struct arcnet_local *lp = netdev_priv(dev);
	void __iomem *ioaddr = lp->mem_start + 0x800;

	arcnet_writeb(cmd, ioaddr, COM9026_REG_W_COMMAND);
}

static void arcrimi_copy_to_card(struct net_device *dev, int bufnum, int offset,
				 void *buf, int count)
{
	struct arcnet_local *lp = netdev_priv(dev);
	void __iomem *memaddr = lp->mem_start + 0x800 + bufnum * 512 + offset;

	TIME(dev, "memcpy_toio", count, memcpy_toio(memaddr, buf, count));
}

static void arcrimi_copy_from_card(struct net_device *dev, int bufnum,
				   int offset, void *buf, int count)
{
	struct arcnet_local *lp = netdev_priv(dev);
	void __iomem *memaddr = lp->mem_start + 0x800 + bufnum * 512 + offset;

	TIME(dev, "memcpy_fromio", count, memcpy_fromio(buf, memaddr, count));
}

static int node;
static int io;			/* use the insmod io= irq= node= options */
static int irq;
static char device[9];		/* use eg. device=arc1 to change name */

module_param(node, int, 0);
module_param(io, int, 0);
module_param(irq, int, 0);
module_param_string(device, device, sizeof(device), 0);
MODULE_LICENSE("GPL");

static struct net_device *my_dev;

static int __init arc_rimi_init(void)
{
	struct net_device *dev;

	dev = alloc_arcdev(device);
	if (!dev)
		return -ENOMEM;

	if (node && node != 0xff)
		dev->dev_addr[0] = node;

	dev->mem_start = io;
	dev->irq = irq;
	if (dev->irq == 2)
		dev->irq = 9;

	if (arcrimi_probe(dev)) {
		free_netdev(dev);
		return -EIO;
	}

	my_dev = dev;
	return 0;
}

static void __exit arc_rimi_exit(void)
{
	struct net_device *dev = my_dev;
	struct arcnet_local *lp = netdev_priv(dev);

	unregister_netdev(dev);
	iounmap(lp->mem_start);
	release_mem_region(dev->mem_start, dev->mem_end - dev->mem_start + 1);
	free_irq(dev->irq, dev);
	free_netdev(dev);
}

#ifndef MODULE
static int __init arcrimi_setup(char *s)
{
	int ints[8];

	s = get_options(s, 8, ints);
	if (!ints[0])
		return 1;
	switch (ints[0]) {
	default:		/* ERROR */
		pr_err("Too many arguments\n");
	case 3:		/* Node ID */
		node = ints[3];
	case 2:		/* IRQ */
		irq = ints[2];
	case 1:		/* IO address */
		io = ints[1];
	}
	if (*s)
		snprintf(device, sizeof(device), "%s", s);
	return 1;
}
__setup("arcrimi=", arcrimi_setup);
#endif				/* MODULE */

module_init(arc_rimi_init)
module_exit(arc_rimi_exit)


text:
package org.sil.util;

public interface ASCII {

    public static final byte NUL = 0;
    public static final byte SOH = 1;
    public static final byte STX = 2;
    public static final byte ETX = 3;
    public static final byte EOT = 4;
    public static final byte ENQ = 5;
    public static final byte ACK = 6;
    public static final byte BEL = 7;
    public static final byte BS = 8;
    public static final byte TAB = 9;
    public static final byte LF = 10;
    public static final byte VT = 11;
    public static final byte FF = 12;
    public static final byte CR = 13;
    public static final byte SO = 14;
    public static final byte SI = 15;
    public static final byte DLE = 16;
    public static final byte DC1 = 17;
    public static final byte DC2 = 18;
    public static final byte DC3 = 19;
    public static final byte DC4 = 20;
    public static final byte NAK = 21;
    public static final byte SYN = 22;
    public static final byte ETB = 23;
    public static final byte CAN = 24;
    public static final byte EM = 25;
    public static final byte SUB = 26;
    public static final byte ESC = 27;
    public static final byte FS = 28;
    public static final byte GS = 29;
    public static final byte RS = 30;
    public static final byte US = 31;
    public static final byte SPACE = 32;
    public static final byte BANG = 33;
    public static final byte DQUOTE = 34;
    public static final byte NUM = 35;
    public static final byte $ = 36;
    public static final byte PS = 37;
    public static final byte AMB = 38;
    public static final byte QUOTE = 39;
    public static final byte LPAR = 40;
    public static final byte RPAR = 41;
    public static final byte STAR = 42;
    public static final byte PLUS = 43;
    public static final byte COMMA = 44;
    public static final byte MINUS = 45;
    public static final byte DOT = 46;
    public static final byte SLASH = 47;
    public static final byte $0 = 48;
    public static final byte $1 = 49;
    public static final byte $2 = 50;
    public static final byte $3 = 51;
    public static final byte $4 = 52;
    public static final byte $5 = 53;
    public static final byte $6 = 54;
    public static final byte $7 = 55;
    public static final byte $8 = 56;
    public static final byte $9 = 57;
    public static final byte COLON = 58;
    public static final byte SCOLON = 59;
    public static final byte LT = 60;
    public static final byte EQ = 61;
    public static final byte GT = 62;
    public static final byte QMARK = 63;
    public static final byte AT = 64;
    public static final byte A = 65;
    public static final byte B = 66;
    public static final byte C = 67;
    public static final byte D = 68;
    public static final byte E = 69;
    public static final byte F = 70;
    public static final byte G = 71;
    public static final byte H = 72;
    public static final byte I = 73;
    public static final byte J = 74;
    public static final byte K = 75;
    public static final byte L = 76;
    public static final byte M = 77;
    public static final byte N = 78;
    public static final byte O = 79;
    public static final byte P = 80;
    public static final byte Q = 81;
    public static final byte R = 82;
    public static final byte S = 83;
    public static final byte T = 84;
    public static final byte U = 85;
    public static final byte V = 86;
    public static final byte W = 87;
    public static final byte X = 88;
    public static final byte Y = 89;
    public static final byte Z = 90;
    public static final byte LSQUARE = 91;
    public static final byte BSLASH = 92;
    public static final byte RSQUARE = 93;
    public static final byte CARET = 94;
    public static final byte USCORE = 95;
    public static final byte BTICK = 96;
    public static final byte a = 97;
    public static final byte b = 98;
    public static final byte c = 99;
    public static final byte d = 100;
    public static final byte e = 101;
    public static final byte f = 102;
    public static final byte g = 103;
    public static final byte h = 104;
    public static final byte i = 105;
    public static final byte j = 106;
    public static final byte k = 107;
    public static final byte l = 108;
    public static final byte m = 109;
    public static final byte n = 110;
    public static final byte o = 111;
    public static final byte p = 112;
    public static final byte q = 113;
    public static final byte r = 114;
    public static final byte s = 115;
    public static final byte t = 116;
    public static final byte u = 117;
    public static final byte v = 118;
    public static final byte w = 119;
    public static final byte x = 120;
    public static final byte y = 121;
    public static final byte z = 122;
    public static final byte LBRACE = 123;
    public static final byte PIPE = 124;
    public static final byte RBRACE = 125;
    public static final byte TILDE = 126;
    public static final byte DEL = 127;

}


text:
package org.usfirst.frc.team340.robot.commands.overrides;

import java.util.logging.Logger;

import org.usfirst.frc.team340.robot.Robot;

import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.command.Command;

/**
 *
 */
public class MO_ManualShooting extends Command {

	@SuppressWarnings("unused")
	private final static Logger log = Robot.getLogger(MO_ManualShooting.class);

    public MO_ManualShooting() {
        // Use requires() here to declare subsystem dependencies
        // eg. requires(chassis);
    	requires(Robot.harvesterRollers);
    }

    private boolean leftTrigPressed = false;
    private boolean leftTrigReleased = false;

//    private boolean rightTrigPressed = false;
//    private boolean rightTrigReleased = false;
//
//    private boolean backPressed = false;
//    private boolean backReleased = false;
    private boolean ended = false;

    Timer t = new Timer();

    // Called just before this Command runs the first time
    protected void initialize() {
    	leftTrigPressed = false;
    	leftTrigReleased = false;

//    	rightTrigPressed = false;
//    	rightTrigReleased = false;
//
//        backPressed = false;
//        backReleased = false;

        ended = false;

        t.reset();
        t.stop();
    }

    public boolean rumble = false;

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {

//
    	System.out.println(/*arg0*/);
    	System.out.println("trig pressed : " + leftTrigPressed + " trig released: "+ leftTrigReleased);

    	// if left trig is pressed
//    	if(Robot.oi.getCoDriverSummedTriggers() < -0.5) {
//    		System.out.println("trig pressed");
//    		// if it has not already been pressed nor released
//    		if(!leftTrigPressed && !leftTrigReleased) {
//    			System.out.println("setting shooter full");
//    			// set left trig to true (it has been pressed)
//    			leftTrigPressed = true;
//    			rumble = true;
//    			// shoot spin up
//    			Robot.harvesterRollers.setShooter(Robot.harvesterRollers.SHOOTER_SHOOT_V_BUS);
//    		// if we have already released
//    		} else if (leftTrigReleased) {
//    			System.out.println("trig pressed : " + leftTrigPressed + " trig released: "+ leftTrigReleased);
//
//    			System.out.println("setting shooter off");
//    			// turn shooter off
//    			Robot.harvesterRollers.setShooter(0);
//    			// set left trig to true (it has been pressed)
//    			leftTrigPressed = true;
//    			// we have not released yet
//    			leftTrigReleased = false;
//    		}
//    	// if left and right trigs are not pressed
//    	} else if(Math.abs(Robot.oi.getCoDriverSummedTriggers()) < 0.1 ){
//    		// if we have pressed but not released yet
//    		if(leftTrigPressed && !leftTrigReleased) {
//    			// we have released
//    			leftTrigReleased = true;
//    		}
//
////    		if(rightTrigPressed && !rightTrigReleased) {
//
////    			rightTrigReleased = true;
////    		}
//    		// we aren't pressed any more
////    		rightTrigPressed = false;
//			leftTrigPressed = false;
//    	} else if(Robot.oi.getCoDriverSummedTriggers() > 0.5) {
//    		System.out.println("right trig");
//    		Robot.harvesterRollers.setBallControl(Robot.harvesterRollers.HARVESTER_DISCHARGE_BALL_V_BUS);
//    		t.start();
//    	}
//    	if(t.get() > 2) {
//    		ended = true;
//    	}
//    	if(rumble) {
//    		Robot.oi.coDriverRumbleLeft((float) 0.5);
//    		Robot.oi.coDriverRumbleRight((float) 0.5);
//
//    	}
//
//
////    	log.info("Arm Potentiometers left: " + Robot.harvester.getLeftAimPot() + " right: " + Robot.harvester.getRightAimPot() + " left switch:" + Robot.harvester.getLeftLimit()  + " right switch:" + Robot.harvester.getRightLimit());
//
//    	//SET SHOOTER SPEED
////    	if(Robot.oi.getDriverBumperState() == 2) { //if RB1 is pressed
////    		// Feed in
////    		log.info("RB1 pressed Shooter Speed is 1");
////    		Robot.harvester.setShooter(1);
////    	} else if(Robot.oi.getDriverBumperState() == 0) { // if LB1 is pressed
////    		// Feeds out
////    		log.info("LB1 pressed Shooter Speed is -1");
////    		Robot.harvester.setShooter(-1);
////    	} else {
////    		Robot.harvester.setShooter(0);
////    		log.info("RB1 and LB1 not pressed Stop Shooter");
////    	}
//
//    	//SET HARVESTER SPEED
////    	if(Robot.oi.getXYButtonState() == 2) { //if X1 is pressed
////    		log.info("X 1 pressed Ball Control is 1");
////    		Robot.harvester.setBallControl(1);
////    	} else if(Robot.oi.getXYButtonState() == 0) { //if Y1 is pressed
////    		log.info("Y 1 pressed Ball Control is -1");
////    		Robot.harvester.setBallControl(-1);
////    	} else {
////    		Robot.harvester.setBallControl(0);
////    		log.info("X 1 and Y 1 not pressed Ball Control Stop");
//    	}
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
    	return ended;
//        return Robot.oi.getXYButtonState() == 1 && Robot.oi.getDriverBumperState() == 1;
    }

    // Called once after isFinished returns true
    protected void end() {
    	System.out.println("ending");

    	Robot.oi.coDriverRumbleLeft((float) 0);
		Robot.oi.coDriverRumbleRight((float) 0);

    	Robot.harvesterRollers.setBallControl(0);
    	Robot.harvesterRollers.setShooter(0);
    }

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
    protected void interrupted() {
    	System.out.println("interrupt");
    	end();
    }
}


text:
"""
Python setup file for the magicembed app.

In order to register your app at pypi.python.org, create an account at
pypi.python.org and login, then register your new app like so:

    python setup.py register

If your name is still free, you can now make your first release but first you
should check if you are uploading the correct files:

    python setup.py sdist

Inspect the output thoroughly. There shouldn't be any temp files and if your
app includes staticfiles or templates, make sure that they appear in the list.
If something is wrong, you need to edit MANIFEST.in and run the command again.

If all looks good, you can make your first release:

    python setup.py sdist upload

For new releases, you need to bump the version number in
magicembed/__init__.py and re-run the above command.

For more information on creating source distributions, see
http://docs.python.org/2/distutils/sourcedist.html

"""
import os
from setuptools import setup, find_packages
import magicembed as app

dev_requires = [
    'flake8',
]

install_requires = open('requirements.txt').read().splitlines()

def read(fname):
    try:
        return open(os.path.join(os.path.dirname(__file__), fname)).read()
    except IOError:
        return ''

setup(
    name="magicembed",
    version=app.__version__,
    description=read('DESCRIPTION'),
    long_description=read('README.rst'),
    license='The MIT License',
    platforms=['OS Independent'],
    keywords='django, video, youtube, vimeo, embed, thumbnail',
    author='Adolfo Fitoria',
    author_email='fitoria@kronoscode.com',
    url="https://github.com/kronoscode/django-magicembed",
    packages=find_packages(),
    include_package_data=True,
    install_requires=install_requires,
    extras_require={
        'dev': dev_requires,
    },
)


text:
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">

  <title>yadis.discover</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />

         Home

         Trees

         Indices

         Help

Python-Yadis

        Package yadis ::
        Module discover

[hide private]

[frames] | no frames]

Module discover
source code

        Classes
        [hide private]

    DiscoveryFailure

      Raised when a YADIS protocol error occurs in the discovery
        process

    DiscoveryResult

      Contains the result of performing Yadis discovery on a URI

        Functions
        [hide private]

    discover(uri)

      Discover services for a given URI.

        Function Details
        [hide private]

discover(uri)

  	source code

Discover services for a given URI.

Parameters:

uri - The identity URI as a well-formed http or https URI. The
          well-formedness and the protocol are not checked, but the results
          of this function are undefined if those properties do not
          hold.

Returns:

DiscoveryResult object

Raises:

Exception - Any exception that can be raised by fetching a URL with the
        given fetcher.

         Home

         Trees

         Indices

         Help

Python-Yadis

    Generated by Epydoc
        3.0alpha3 on Fri Dec  8 13:17:17 2006

      http://epydoc.sourceforge.net


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <title>Redux/React App</title>
  <link href="./static/app.css" rel="stylesheet" type="text/css" />


text:
package com.weygo.weygophone.pages.order.detail.adapter;

import android.content.Context;
import android.graphics.Point;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

import com.weygo.common.base.JHBaseViewHolder;
import com.weygo.common.base.JHRecyclerViewAdapter;
import com.weygo.weygophone.R;
import com.weygo.weygophone.pages.order.detail.model.WGOrderDeliver;
import com.weygo.weygophone.pages.order.detail.model.WGOrderDetail;
import com.weygo.weygophone.pages.order.detail.model.WGOrderFax;
import com.weygo.weygophone.pages.order.detail.model.WGOrderPay;
import com.weygo.weygophone.pages.order.detail.model.WGOrderStatus;
import com.weygo.weygophone.pages.order.detail.widget.WGOrderDetailDeliverStatusView;
import com.weygo.weygophone.pages.order.detail.widget.WGOrderDetailFaxView;
import com.weygo.weygophone.pages.order.detail.widget.WGOrderDetailGoodItemView;
import com.weygo.weygophone.pages.order.detail.widget.WGOrderDetailGoodsMoreView;
import com.weygo.weygophone.pages.order.detail.widget.WGOrderDetailPayView;
import com.weygo.weygophone.pages.order.detail.widget.WGOrderDetailUserInfoView;
import com.weygo.weygophone.pages.order.list.model.WGOrderGoodItem;
import com.weygo.weygophone.pages.order.list.model.WGOrderListItem;
import com.weygo.weygophone.pages.order.list.widget.WGOrderListGoodsView;
import com.weygo.weygophone.pages.tabs.classify.adapter.WGClassifyAdapter;
import com.weygo.weygophone.pages.tabs.classify.adapter.WGSubClassifyAdapter;
import com.weygo.weygophone.pages.tabs.classify.model.WGClassifyItem;
import com.weygo.weygophone.pages.tabs.home.model.WGHomeFloorContentGoodItem;

import java.util.List;

/**
 * Created by muma on 2017/5/23.
 */

public class WGOrderDetailAdapter extends JHRecyclerViewAdapter {

    Context mContext;

    WGOrderDetail mOrderDetail;

    boolean mShowMoreGoods;

    public interface OnItemListener {
        void onPurchase(WGHomeFloorContentGoodItem item, View view, Point fromPoint);
    }

    OnItemListener mListener;
    public void setListener(OnItemListener listener) {
        mListener = listener;
    }

    public enum Item_Type {
        ITEM_TYPE_None,
        ITEM_TYPE_OrderStatus,
        ITEM_TYPE_OrderDeliver,
        ITEM_TYPE_OrderGoodsTitle,
        ITEM_TYPE_OrderGoods,
        ITEM_TYPE_OrderGoodsMore,
        ITEM_TYPE_OrderFax,
        ITEM_TYPE_OrderPay,
    }

    public WGOrderDetailAdapter(Context context, WGOrderDetail data) {
        mOrderDetail = data;
        this.mContext = context;
        mShowMoreGoods = false;
    }

    public void setData(WGOrderDetail data) {
        mOrderDetail = data;
        notifyDataSetChanged();
    }

    void handleShowMoreGood() {
        mShowMoreGoods = true;
        notifyDataSetChanged();
    }

    @Override
    public JHBaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = null;
        int resId = 0;
        WGOrderDetailViewHolder holder = null;
        if (viewType == Item_Type.ITEM_TYPE_OrderStatus.ordinal()) {
            resId = R.layout.wgorderdetail_order_status;
            view = LayoutInflater.from(
                    mContext).inflate(resId, parent,
                    false);
            holder = new WGOrderDetailViewHolder(view);
            holder.showWithData(mOrderDetail);
        }
        else if (viewType == Item_Type.ITEM_TYPE_OrderDeliver.ordinal()) {
            resId = R.layout.wgorderdetail_order_userinfo;
            view = LayoutInflater.from(
                    mContext).inflate(resId, parent,
                    false);
            holder = new WGOrderDetailViewHolder(view);
            holder.showWithData(mOrderDetail.deliver);
        }
        else if (viewType == Item_Type.ITEM_TYPE_OrderGoodsTitle.ordinal()) {
            resId = R.layout.wgorderdetail_order_goodtitle;
            view = LayoutInflater.from(
                    mContext).inflate(resId, parent,
                    false);
            holder = new WGOrderDetailViewHolder(view);
        }
        else if (viewType == Item_Type.ITEM_TYPE_OrderGoods.ordinal()) {
            resId = R.layout.wgorderdetail_order_gooditem;
            WGOrderDetailGoodItemView itemView = (WGOrderDetailGoodItemView) LayoutInflater.from(
                    mContext).inflate(resId, parent,
                    false);
            itemView.setListener(new WGOrderDetailGoodItemView.OnItemListener() {
                @Override
                public void onPurchase(WGHomeFloorContentGoodItem item, View view, Point fromPoint) {
                    if (mListener != null) {
                        mListener.onPurchase(item, view, fromPoint);
                    }
                }
            });
            view = itemView;
            holder = new WGOrderDetailViewHolder(view);
        }
        else if (viewType == Item_Type.ITEM_TYPE_OrderGoodsMore.ordinal()) {
            resId = R.layout.wgorderdetail_order_goodmore;
            WGOrderDetailGoodsMoreView moreView = (WGOrderDetailGoodsMoreView) LayoutInflater.from(
                    mContext).inflate(resId, parent,
                    false);
            moreView.setOnShowGoodMore(new WGOrderDetailGoodsMoreView.OnGoodsMore() {
                @Override
                public void onTouchMore() {
                    handleShowMoreGood();
                }
            });
            view = moreView;
            holder = new WGOrderDetailViewHolder(view);
        }
        else if (viewType == Item_Type.ITEM_TYPE_OrderFax.ordinal()) {
            resId = R.layout.wgorderdetail_order_fax;
            view = LayoutInflater.from(
                    mContext).inflate(resId, parent,
                    false);
            holder = new WGOrderDetailViewHolder(view);
            holder.showWithData(mOrderDetail.fax);
        }
        else if (viewType == Item_Type.ITEM_TYPE_OrderPay.ordinal()) {
            resId = R.layout.wgorderdetail_order_pay;
            view = LayoutInflater.from(
                    mContext).inflate(resId, parent,
                    false);
            holder = new WGOrderDetailViewHolder(view);
            holder.showWithData(mOrderDetail.pay);
        }
//        else if (viewType == Item_Type.ITEM_TYPE_OrderRebuy.ordinal()) {
//            resId = R.layout.wgorderdetail_order_rebuy;
//            view = LayoutInflater.from(
//                    mContext).inflate(resId, parent,
//                    false);
//            holder = new WGOrderDetailViewHolder(view);
//        }
        return holder;
    }

    @Override
    public void onBindViewHolder(JHBaseViewHolder holder, int position) {
        super.onBindViewHolder(holder, position);
        Item_Type type = getItemViewTypeWithPositon(position);
        if (type == Item_Type.ITEM_TYPE_OrderGoods) {
            if (mOrderDetail != null && mOrderDetail.goods != null) {
                int index = position - 3;
                WGOrderGoodItem item = mOrderDetail.goods.get(index);
                holder.showWithData(item);
                WGOrderDetailGoodItemView itemView = (WGOrderDetailGoodItemView) holder.itemView;
                if (mShowMoreGoods) {
                    itemView.setVisibility(true);
                }
                else {
                    itemView.setVisibility((index > 2) ? false : true);
                }
            }
        }
        if (type == Item_Type.ITEM_TYPE_OrderGoodsMore) {
            WGOrderDetailGoodsMoreView itemView = (WGOrderDetailGoodsMoreView) holder.itemView;
            itemView.setVisibility(!mShowMoreGoods);
        }
    }

    @Override
    public int getItemCount() {
        if (mOrderDetail == null) {
            return 0;
        }
        int count = 6;
        if (mOrderDetail.goods != null) {
            count += mOrderDetail.goods.size();
        }
        return count;
    }

    @Override
    public int getItemViewType(int position) {
        return getItemViewTypeWithPositon(position).ordinal();
    }

    Item_Type getItemViewTypeWithPositon(int position) {
        Item_Type type = Item_Type.ITEM_TYPE_None;
        int goodCount = 0;
        if (mOrderDetail != null && mOrderDetail.goods != null) {
            goodCount = mOrderDetail.goods.size();
        }
        if (position == 0) {
            type = Item_Type.ITEM_TYPE_OrderStatus;
        }
        else if (position == 1) {
            type = Item_Type.ITEM_TYPE_OrderDeliver;
        }
        else if (position == 2) {
            type = Item_Type.ITEM_TYPE_OrderGoodsTitle;
        }
        else if (position <= 2 + goodCount && position > 2) {
            type = Item_Type.ITEM_TYPE_OrderGoods;
        }
        else if (position == 3 + goodCount) {
            type = Item_Type.ITEM_TYPE_OrderGoodsMore;
        }
        else if (position == 4 + goodCount) {
            type = Item_Type.ITEM_TYPE_OrderFax;
        }
        else if (position == 5 + goodCount) {
            type = Item_Type.ITEM_TYPE_OrderPay;
        }
//        else if (position == 6 + mOrderDetai.goods.size()) {
//            type = Item_Type.ITEM_TYPE_OrderRebuy;
//        }
        Log.e("---getType-----", type + ":" + position);
        return type;
    }

    class WGOrderDetailViewHolder extends JHBaseViewHolder {

        View itemView;

        public WGOrderDetailViewHolder(View view) {
            super(view);
            itemView = view;
            Log.e("caonima", itemView.getClass().toString());
        }

        @Override
        public void showWithData(Object object) {
            super.showWithData(object);
            if (itemView instanceof WGOrderDetailDeliverStatusView) {
                ((WGOrderDetailDeliverStatusView)itemView).showWithData((WGOrderDetail) object);
            }
            else if (itemView instanceof WGOrderDetailUserInfoView) {
                ((WGOrderDetailUserInfoView)itemView).showWithData((WGOrderDeliver) object);
            }
            else if (itemView instanceof WGOrderDetailFaxView) {
                ((WGOrderDetailFaxView)itemView).showWithData((WGOrderFax) object);
            }
            else if (itemView instanceof WGOrderDetailPayView) {
                ((WGOrderDetailPayView)itemView).showWithArray((List) object);
                Log.e("-------pay--", object.toString());
            }
            else if (itemView instanceof WGOrderDetailGoodItemView) {
                ((WGOrderDetailGoodItemView)itemView).showWithData((WGOrderGoodItem) object);
            }
        }
    }
}


text:
module RuboCop
  module Cop
    module Style
      # This cop checks for the use of the send method.
      class Send < Cop
        MSG = 'Prefer `Object#__send__` or `Object#public_send` to ' \
              '`send`.'.freeze

        def on_send(node)
          _receiver, method_name, *args = *node
          return unless method_name == :send && !args.empty?
          add_offense(node, :selector)
        end
      end
    end
  end
end


text:
#pragma once
#ifndef CUDARRAYS_SYSTEM_HPP_
#define CUDARRAYS_SYSTEM_HPP_

#include "common.hpp"
#include "utils.hpp"

namespace cudarrays {

extern std::vector<cudaStream_t> StreamsIn;
extern std::vector<cudaStream_t> StreamsOut;
extern std::vector<cudaEvent_t> EventsBegin;
extern std::vector<cudaEvent_t> EventsEnd;

namespace system {

extern utils::option<unsigned> MAX_GPUS;
extern utils::option<array_size_t> CUDA_VM_ALIGN;

extern unsigned GPUS;
extern unsigned PEER_GPUS;

template <typename T>
static inline array_size_t
vm_cuda_align_elems()
{
    // LIBRARY ENTRY POINT
    cudarrays_entry_point();

    return CUDA_VM_ALIGN/sizeof(T);
}

/**
 * Obtain the number of GPUs in the system
 * @return The number of GPUs in the system
 */
unsigned gpu_count();

/**
 * Obtain the number of GPUs in the system with P2P access support
 * @return The number of GPUs in the system with P2P access support
 */
unsigned peer_gpu_count();

void init();

} // namespace system
} // namespace cudarrays

#endif


text:
namespace {

// Same as OptionsUITest but launches with Guest mode command line switches.
class GuestModeOptionsUITest : public OptionsUITest {
 public:
  GuestModeOptionsUITest() : OptionsUITest() {
    launch_arguments_.AppendSwitch(switches::kGuestSession);
    launch_arguments_.AppendSwitch(switches::kIncognito);
  }
};

// See bug 104393.
#if defined(USE_AURA)
#define MAYBE_LoadOptionsByURL FAILS_LoadOptionsByURL
#else
#define MAYBE_LoadOptionsByURL LoadOptionsByURL
#endif

TEST_F(GuestModeOptionsUITest, MAYBE_LoadOptionsByURL) {
  scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
  ASSERT_TRUE(browser.get());

  scoped_refptr<TabProxy> tab = browser->GetActiveTab();
  ASSERT_TRUE(tab.get());

  NavigateToSettings(tab);
  VerifyTitle(tab);
  VerifyNavbar(tab);
  VerifySections(tab);
}

}  // namespace


text:
from __future__ import unicode_literals

import core.utils.uploads
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager
import uuid

class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='date created')),
                ('date_modified', models.DateTimeField(auto_now=True, null=True, verbose_name='date modified')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('is_deleted', models.BooleanField(default=False, editable=False)),
                ('name', models.CharField(blank=True, max_length=100, null=True)),
                ('logo', models.FileField(blank=True, null=True, upload_to=core.utils.uploads.upload_location_company)),
                ('address', models.CharField(blank=True, max_length=200, null=True)),
                ('phone', models.CharField(blank=True, max_length=50, null=True)),
                ('mobile_phone', models.CharField(blank=True, max_length=50, null=True)),
            ],
            options={
                'ordering': ['name'],
            },
            managers=[
                ('current', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='Country',
            fields=[
                ('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='date created')),
                ('date_modified', models.DateTimeField(auto_now=True, null=True, verbose_name='date modified')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('is_deleted', models.BooleanField(default=False, editable=False)),
                ('name', models.CharField(blank=True, max_length=50, null=True)),
                ('code', models.CharField(blank=True, max_length=50, null=True)),
                ('state', models.CharField(blank=True, max_length=50, null=True)),
                ('iso_code', models.CharField(blank=True, max_length=50, null=True)),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('current', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='Port',
            fields=[
                ('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='date created')),
                ('date_modified', models.DateTimeField(auto_now=True, null=True, verbose_name='date modified')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('is_deleted', models.BooleanField(default=False, editable=False)),
                ('name', models.CharField(blank=True, max_length=50, null=True)),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('current', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='State',
            fields=[
                ('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='date created')),
                ('date_modified', models.DateTimeField(auto_now=True, null=True, verbose_name='date modified')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('is_deleted', models.BooleanField(default=False, editable=False)),
                ('name', models.CharField(blank=True, max_length=50, null=True)),
                ('country', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='core_state_country', to='core.Country')),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('current', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='Zone',
            fields=[
                ('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='date created')),
                ('date_modified', models.DateTimeField(auto_now=True, null=True, verbose_name='date modified')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('is_deleted', models.BooleanField(default=False, editable=False)),
                ('name', models.CharField(choices=[('OC', 'Oceania'), ('EU', 'Europe'), ('AF', 'Africa'), ('NA', 'North America'), ('AN', 'Antarctica'), ('SA', 'South America'), ('AS', 'Asia')], db_index=True, max_length=2)),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('current', django.db.models.manager.Manager()),
            ],
        ),
        migrations.AddField(
            model_name='state',
            name='zone',
            field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='core_state_zone', to='core.Zone'),
        ),
        migrations.AddField(
            model_name='country',
            name='zone',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='core_country_zone', to='core.Zone'),
        ),
        migrations.AlterUniqueTogether(
            name='company',
            unique_together=set([('name',)]),
        ),
    ]


text:
#ifndef HEADER_CURL_LDAP_H
#define HEADER_CURL_LDAP_H

#ifndef CURL_DISABLE_LDAP
extern const struct Curl_handler Curl_handler_ldap;

#if !defined(CURL_DISABLE_LDAPS) && \
    ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \
     (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)))
extern const struct Curl_handler Curl_handler_ldaps;
#endif

#endif
#endif /* HEADER_CURL_LDAP_H */


text:
package org.apache.samza.operators.impl;

import org.apache.samza.task.MessageCollector;
import org.apache.samza.task.TaskCoordinator;

/**
 * A no-op operator implementation that forwards incoming messages to all of its subscribers.
 * @param <M>  type of incoming messages
 */
final class RootOperatorImpl<M> extends OperatorImpl<M, M> {

  @Override
  public void onNext(M message, MessageCollector collector, TaskCoordinator coordinator) {
    this.propagateResult(message, collector, coordinator);
  }
}


text:
layout: default
---

{% include sections/00_nav.html %}

Agenda

      {% include timeline.html slots=site.data.agenda.day1 title="Day 1" subtitle="Monday, October 13th"  class="day1" %}

      {% include timeline.html slots=site.data.agenda.day2 title="Day 2" subtitle="Tuesday, October 14th" class="day2" %}

Fringe Events

      {% for day in site.data.agenda.fringe %}

{{ day.title }}

            {% for event in day.events %}

                  {{ event.from }}
                  {% if event.to %}
                    -
                    {{ event.to }}
                  {% endif %}

{{ event.title }}

Where: {{ event.where.name }}

                  {% capture file_name %}{{ event.title | downcase | replace:' ','_' | append:'.md'| prepend:'fringe_descriptions/' }}{% endcapture %}
                  {% capture markdown_text %}{% include {{ file_name }} %}{% endcapture %}
                  {{ markdown_text | markdownify }}

            {% endfor %}

      {% endfor %}

{% include sections/60_footer.html %}


text:
<?php

namespace App\Repository;

/**
 * CommentRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class UserRepository extends \Doctrine\ORM\EntityRepository
{
    public function find5best()
    {
        return $this->getEntityManager()
            ->createQuery(
                'SELECT u.username, u.id, SUM(r.rating) AS ratings
                FROM App:User AS u
                JOIN App:recipe AS r WHERE r.author=u.id

                GROUP BY r.author
                ORDER BY ratings DESC'
            )
            ->setMaxResults(5)
            ->getResult();
    }
}


text:
package io.seata.core.protocol;

/**
 * The type Abstract identify response.
 *
 * @author sharajava
 */
public abstract class AbstractIdentifyResponse extends AbstractResultMessage {

    private String version = Version.getCurrent();

    private String extraData;

    private boolean identified;

    /**
     * Gets version.
     *
     * @return the version
     */
    public String getVersion() {
        return version;
    }

    /**
     * Sets version.
     *
     * @param version the version
     */
    public void setVersion(String version) {
        this.version = version;
    }

    /**
     * Gets extra data.
     *
     * @return the extra data
     */
    public String getExtraData() {
        return extraData;
    }

    /**
     * Sets extra data.
     *
     * @param extraData the extra data
     */
    public void setExtraData(String extraData) {
        this.extraData = extraData;
    }

    /**
     * Is identified boolean.
     *
     * @return the boolean
     */
    public boolean isIdentified() {
        return identified;
    }

    /**
     * Sets identified.
     *
     * @param identified the identified
     */
    public void setIdentified(boolean identified) {
        this.identified = identified;
    }

    @Override
    public String toString() {
        StringBuilder result = new StringBuilder();
        result.append("version=");
        result.append(version);
        result.append(",");
        result.append("extraData=");
        result.append(extraData);
        result.append(",");
        result.append("identified=");
        result.append(identified);
        result.append(",");
        result.append("resultCode=");
        result.append(getResultCode());
        result.append(",");
        result.append("msg=");
        result.append(getMsg());

        return result.toString();
    }
}


text:
Ansible Openstack LXC Configuration
===================================
:date: 2013-09-05 09:51
:tags: rackspace, lxc, rpc, openstack, cloud, ansible
:category: \*nix

This directory contains the files needed to make the rpc_deployment process work.
The inventory is generated from a user configuration file named ``rpc_user_config.yml``.
To load inventory you MUST copy the directory ``rpc_deploy`` to either  ``$HOME/`` or ``/etc/``.
With this folder in place, you will need to enter the folder and edit the file ``rpc_user_config.yml``.
The file will contain all of the IP addresses/hostnames that your infrastructure will exist on
as well as a CIDR that your containers will have IP addresses assigned from. This allows for easy
scaling as new nodes and or affinity for containers is all set within this file.

Please see the ``rpc_user_config.yml`` file in the provided ``/etc`` directory for more details on how
that file is setup.

If you need some assistance defining the CIDR for a given ip address range check out http://www.ipaddressguide.com/cidr

Words on rpc_user_config.yml
############################

While the ``rpc_user_config.yml`` file is noted fairly heavily with examples and information regarding the options, here's some more information on what the file consists of and how to use it.

Global options
--------------

The user configuration file has three globally available options. These options allow you to set the CIDR for all of your containers IP addresses, and a list of used IP addresses that you may not want the inventory system to collide with, global overrides which are added to inventory outside of "group_vars" and "var_files" files.

----

Global Options:
  * cidr:
  * used_ips:
  * global_overrides:

Here's the syntax for ``cidr``.

.. code-block:: yaml

  cidr: <string>/<prefix>

----

To tell inventory not to attempt to consume IP addresses which may or may not exist within the defined cidr write all known IP addresses that are already consumed as a list in yaml format.

Heres the ``used_ips`` syntax

.. code-block:: yaml

  used_ips:
    - 10.0.0.250
    - 10.0.0.251
    - 10.0.0.252
    - 10.0.0.253

----

If you want to specify specific globally available options and do not want to place them in ``var_files`` or within the ``group_vars/all.yml`` file you can set them in a key = value par within the ``global_overrides`` hash.

Here's the ``global_overrides`` syntax

.. code-block:: yaml

    global_overrides:
      debug: True
      git_install_branch: master

Predefined host groups
----------------------

The user configuration file has 4 defined groups which have mapping found within the ``rpc_environment.yml`` file.

The predefined groups are:
  * infra_hosts:
  * compute_hosts:
  * storage_hosts:
  * log_hosts:

Any host specified within these groups will have containers built within them automatically. The containers that will be build are all mapped out within the rpc_environment.json file.

When specifying hosts inside of any of the known groups the syntax is as follows:

.. code-block:: yaml

    infra_hosts:
      infra_host1:
        ip: 10.0.0.1

With this the top key is the host name and ip is used to set the known IP address of the host name. Even if you have the host names set within your environment using either the ``hosts`` file or a resolver you must specify the "ip".

If you want to use a host that is not in a predefined group and is used is some custom out of band Ansible play you can add a top level key for the host type with the host name and "ip" key. The syntax is the exact same as the predefined host groups.

Adding options to containers within targeted hosts
--------------------------------------------------

Within the host variables options can be added that will append to the ``host_vars`` of a given set of containers.  This allows you to add "special" configuration to containers on a targeted host which may come in handy when scaling out or planning a deployment of services.  To add these options to all containers within the host simply add ``container_vars`` under the host name and use ``key: value`` pairs for all of the desired options. All ``key: value`` pairs will be set as ``host_vars`` on all containers found under host name.

Here is an example of turning debug mode on all containers on infra1

.. code-block:: yaml

	infra_hosts:
	  infra1:
	    ip: 10.0.0.10
	    container_vars:
	      debug: True
	  infra2:
	    ...

In this example you can see that we are setting ``container_vars`` under the host name ``infra1`` and that debug was set to True.

Limiting the container types:
    When developing the inventory it may be useful to further limit the containers that will have access to the provided options. In this case you use the option ``limit_container_types`` followed by the type of container you with to limit the options to. When using the ``limit_container_types`` option the inventory script will perform a string match on the container name and if a match is found, even if it's a partial match, the options will be appended to the container.

Here is an example of adding cinder_backends to containers on a host named cinder1 under the ``storage_hosts`` group. The options will be limited to containers matching the type "cinder_volume".

.. code-block:: yaml

	storage_hosts:
	  cinder1:
	    ip: 10.0.0.10
	    container_vars:
	      cinder_backends:
	        limit_container_types: cinder_volume
	        lvm:
	          volume_group: cinder-volumes
	          driver: cinder.volume.drivers.lvm.LVMISCSIDriver
	          backend_name: LVM_iSCSI
	  cinder2:
	    ...


text:
pushd /resume-web

case $1 in
        "other")
                ;;
        "other-2")
                ;;
        *)
                ;;
esac

git checkout .
git pull
npm install --unsafe-perm=true --allow-root --non-interactive
composer update --no-interaction
bower update --allow-root
php cli.php mpdf
phpunit
grunt
echo "Chown will take a few seconds..."
chown -R www-data:www-data /resume-web
echo "you can check at http://localhost:8080"
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
popd


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace EBooks.Web.Author {

    public partial class View {

        /// <summary>
        /// AuthorSearch control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::EBooks.Web.UserControls.AuthorSearch AuthorSearch;

        /// <summary>
        /// AuthorName control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.Label AuthorName;

        /// <summary>
        /// BooksByAuthorGridView control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.GridView BooksByAuthorGridView;
    }
}


text:
@interface ViewController ()<CLLocationManagerDelegate>

@property (nonatomic, strong) CLLocationManager *locMgr;

@end

@implementation ViewController

- (CLLocationManager *)locMgr
{
    if (!_locMgr) {
         // 1.创建位置管理器(管理用户的位置)
        self.locMgr = [[CLLocationManager alloc] init];
        // 2.设置代理
        self.locMgr.delegate = self;

        self.locMgr.desiredAccuracy=kCLLocationAccuracyBest;// 定位精准度,越高越耗电
        self.locMgr.distanceFilter=10;// 每个多少米调用一次
    }
    return _locMgr;
}

//////////  123456789011111111111111111111

- (void)viewDidLoad {
    [super viewDidLoad];

    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0){
        [self.locMgr requestWhenInUseAuthorization];  //调用了这句,就会弹出允许框了.前台定位
//         [self.locMgr  requestAlwaysAuthorization];// 前后台同时定位
    }

    if ([CLLocationManager locationServicesEnabled]) {
        // 开始定位用户的位置
        [self.locMgr startUpdatingLocation];

        // 传一个位置进来,进来时调用didEnterRegion方法,离开时调用didExitRegion方法
//        self.locMgr startMonitoringForRegion:<#(CLRegion *)#>

    } else { // 不能用
        NSLog(@"不能用");
        // 1.告诉用户检查网络状况
        // 2.提醒用户打开定位开关
    }

    [self countDistance];

}

// 计算两个经纬度之间的距离
- (void)countDistance
{
    CLLocation *loc1 = [[CLLocation alloc] initWithLatitude:40 longitude:116];
    CLLocation *loc2 = [[CLLocation alloc] initWithLatitude:41 longitude:116];

    CLLocationDistance distance = [loc1 distanceFromLocation:loc2];
    NSLog(@"(%@)和(%@)的距离:%f", loc1, loc2, distance);

}

#pragma mark - CLLocationManagerDelegate
// 数组里面存放多个位置信息
// 当定位到用户的位置时,就会调用(经纬度发生变化就会调用)
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
{

    // 数组里面存放的是CLLocation对象,一个CLLocation对象就代表一个位置
    // coordinate:经纬度
    // altitude:海拔---等等
    // speed:行走速度
    CLLocation *loc = [locations lastObject];

    // 经度:loc.coordinate.longitude
    // 纬度:loc.coordinate.latitude

    NSLog(@"经度%f, 纬度%f", loc.coordinate.longitude, loc.coordinate.latitude);

    // 停止更新位置(不用定位服务,应当马上停止定位,非常耗电)
//    [manager stopUpdatingLocation];

}

//// 进入某个区域
//- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region
//{
//
//}
//
//// 离开某个区域
//- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region
//{
//
//}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end


text:
package org.apache.hive.hcatalog.mapreduce;

public class TestHCatExternalNonPartitioned extends TestHCatNonPartitioned {
  public TestHCatExternalNonPartitioned(String formatName, String serdeName,
      String inputFormatClass, String outputFormatClass)
      throws Exception {
    super(formatName, serdeName, inputFormatClass, outputFormatClass);
  }

  @Override
  protected Boolean isTableExternal() {
    return true;
  }

}


text:
<?php

/* TwigBundle:Exception:exception.atom.twig */
class __TwigTemplate_849a167fbec987ff2ed38c05e2f47df784b7737c1aac186edd3ef2eea038a1a0 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        $this->env->loadTemplate("TwigBundle:Exception:exception.xml.twig")->display(array_merge($context, array("exception" => (isset($context["exception"]) ? $context["exception"] : $this->getContext($context, "exception")))));
    }

    public function getTemplateName()
    {
        return "TwigBundle:Exception:exception.atom.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  19 => 1,);
    }
}


text:
<?php
/**
 * Created by PhpStorm.
 * User: Raffaele
 * Date: 24/11/2016
 * Time: 18:15
 */

namespace AppBundle\Model;

class Formazione
{
private $golFatti;
private $golSubiti;
private $Partite_idPartita;
private $Giocatori_idGiocatori;
private $assist;
private $ruolo;
private $minutiGiocati;
private $votoPersonale;
private $ammonizioni;
private $espulsioni;

    /**
     * @return mixed
     */
    public function getGolFatti()
    {
        return $this->golFatti;
    }

    /**
     * @param mixed $golFatti
     */
    public function setGolFatti($golFatti)
    {
        $this->golFatti = $golFatti;
    }

    /**
     * @return mixed
     */
    public function getGolSubiti()
    {
        return $this->golSubiti;
    }

    /**
     * @param mixed $golSubiti
     */
    public function setGolSubiti($golSubiti)
    {
        $this->golSubiti = $golSubiti;
    }

    /**
     * @return mixed
     */
    public function getPartiteIdPartita()
    {
        return $this->Partite_idPartita;
    }

    /**
     * @param mixed $Partite_idPartita
     */
    public function setPartiteIdPartita($Partite_idPartita)
    {
        $this->Partite_idPartita = $Partite_idPartita;
    }

    /**
     * @return mixed
     */
    public function getGiocatoriIdGiocatori()
    {
        return $this->Giocatori_idGiocatori;
    }

    /**
     * @param mixed $Giocatori_idGiocatori
     */
    public function setGiocatoriIdGiocatori($Giocatori_idGiocatori)
    {
        $this->Giocatori_idGiocatori = $Giocatori_idGiocatori;
    }

    /**
     * @return mixed
     */
    public function getAssist()
    {
        return $this->assist;
    }

    /**
     * @param mixed $assist
     */
    public function setAssist($assist)
    {
        $this->assist = $assist;
    }

    /**
     * @return mixed
     */
    public function getRuolo()
    {
        return $this->ruolo;
    }

    /**
     * @param mixed $ruolo
     */
    public function setRuolo($ruolo)
    {
        $this->ruolo = $ruolo;
    }

    /**
     * @return mixed
     */
    public function getMinutiGiocati()
    {
        return $this->minutiGiocati;
    }

    /**
     * @param mixed $minutiGiocati
     */
    public function setMinutiGiocati($minutiGiocati)
    {
        $this->minutiGiocati = $minutiGiocati;
    }

    /**
     * @return mixed
     */
    public function getVotoPersonale()
    {
        return $this->votoPersonale;
    }

    /**
     * @param mixed $votoPersonale
     */
    public function setVotoPersonale($votoPersonale)
    {
        $this->votoPersonale = $votoPersonale;
    }

    /**
     * @return mixed
     */
    public function getAmmonizioni()
    {
        return $this->ammonizioni;
    }

    /**
     * @param mixed $ammonizioni
     */
    public function setAmmonizioni($ammonizioni)
    {
        $this->ammonizioni = $ammonizioni;
    }

    /**
     * @return mixed
     */
    public function getEspulsioni()
    {
        return $this->espulsioni;
    }

    /**
     * @param mixed $espulsioni
     */
    public function setEspulsioni($espulsioni)
    {
        $this->espulsioni = $espulsioni;
    }

    public function __toString()
    {
        $toString=   '{"golFatti":"'.$this->getGolFatti().
            '","golSubiti":"'.$this->getGolSubiti().
            '","Partite_idPartita":"'.$this->getPartiteIdPartita().
            '","Giocatori_idGiocatori":"'.$this->getGiocatoriIdGiocatori().
            '","assist":"'.$this->getAssist().
            '","ruolo":"'.$this->getRuolo().
            '","minutiGiocati":"'.$this->getMinutiGiocati().
            '","votoPersonale":"'.$this->getVotoPersonale().
            '","ammonizioni":"'.$this->getAmmonizioni().
            '","espulsioni":"'.$this->getEspulsioni().
            '"}';
        return $toString;
    }

}


text:
<?php

/**
 *	@author Laughingwithu <laughingwithu@gmail.com>
 *	@license FreeBSD License (http://opensource.org/licenses/BSD-2-Clause)
 */

namespace fg\Essence\Provider\OpenGraph;

/**
 *	Prezi provider (http://www.prezi.com).
 *
 *	@package fg.Essence.Provider.OpenGraph
 */

class Prezi extends \fg\Essence\Provider\OpenGraph {

	/**
	 *	{@inheritDoc}
	 */

	protected $_pattern = '#prezi\.com/.+/.+#i';

}