text:
namespace lldb_private {

//----------------------------------------------------------------------
/// @class ObjectFile ObjectFile.h "lldb/Symbol/ObjectFile.h"
/// @brief A plug-in interface definition class for object file parsers.
///
/// Object files belong to Module objects and know how to extract
/// information from executable, shared library, and object (.o) files
/// used by operating system runtime. The symbol table and section list
/// for an object file.
///
/// Object files can be represented by the entire file, or by part of a
/// file. Examples of object files that are part of a file include
/// object files that contain information for multiple architectures in
/// the same file, or archive files that contain multiple objects
/// (ranlib archives) (possibly for multiple architectures as well).
///
/// Object archive files (e.g. ranlib archives) can contain
/// multiple .o (object) files that must be selected by index or by name.
/// The number of objects that an ObjectFile contains can be determined
/// using the ObjectFile::GetNumObjects() const
/// function, and followed by a call to
/// ObjectFile::SelectObjectAtIndex (uint32_t) to change the currently
/// selected object. Objects can also be selected by name using the
/// ObjectFile::SelectObject(const char *) function.
///
/// Once an architecture is selected (and an object is selected for
/// for archives), the object file information can be extracted from
/// this abstract class.
//----------------------------------------------------------------------
class ObjectFile:
    public std::enable_shared_from_this<ObjectFile>,
    public PluginInterface,
    public ModuleChild
{
friend class lldb_private::Module;

public:
    typedef enum
    {
        eTypeInvalid = 0,
        eTypeCoreFile,      /// A core file that has a checkpoint of a program's execution state
        eTypeExecutable,    /// A normal executable
        eTypeDebugInfo,     /// An object file that contains only debug information
        eTypeDynamicLinker, /// The platform's dynamic linker executable
        eTypeObjectFile,    /// An intermediate object file
        eTypeSharedLibrary, /// A shared library that can be used during execution
        eTypeStubLibrary,   /// A library that can be linked against but not used for execution
        eTypeUnknown
    } Type;

    typedef enum
    {
        eStrataInvalid = 0,
        eStrataUnknown,
        eStrataUser,
        eStrataKernel,
        eStrataRawImage
    } Strata;

    //------------------------------------------------------------------
    /// Construct with a parent module, offset, and header data.
    ///
    /// Object files belong to modules and a valid module must be
    /// supplied upon construction. The at an offset within a file for
    /// objects that contain more than one architecture or object.
    //------------------------------------------------------------------
    ObjectFile (const lldb::ModuleSP &module_sp,
                const FileSpec *file_spec_ptr,
                lldb::offset_t file_offset,
                lldb::offset_t length,
                lldb::DataBufferSP& data_sp,
                lldb::offset_t data_offset);

    ObjectFile (const lldb::ModuleSP &module_sp,
                const lldb::ProcessSP &process_sp,
                lldb::addr_t header_addr,
                lldb::DataBufferSP& data_sp);

    //------------------------------------------------------------------
    /// Destructor.
    ///
    /// The destructor is virtual since this class is designed to be
    /// inherited from by the plug-in instance.
    //------------------------------------------------------------------
    virtual
    ~ObjectFile();

    //------------------------------------------------------------------
    /// Dump a description of this object to a Stream.
    ///
    /// Dump a description of the current contents of this object
    /// to the supplied stream \a s. The dumping should include the
    /// section list if it has been parsed, and the symbol table
    /// if it has been parsed.
    ///
    /// @param[in] s
    ///     The stream to which to dump the object descripton.
    //------------------------------------------------------------------
    virtual void
    Dump (Stream *s) = 0;

    //------------------------------------------------------------------
    /// Find a ObjectFile plug-in that can parse \a file_spec.
    ///
    /// Scans all loaded plug-in interfaces that implement versions of
    /// the ObjectFile plug-in interface and returns the first
    /// instance that can parse the file.
    ///
    /// @param[in] module
    ///     The parent module that owns this object file.
    ///
    /// @param[in] file_spec
    ///     A file specification that indicates which file to use as the
    ///     object file.
    ///
    /// @param[in] file_offset
    ///     The offset into the file at which to start parsing the
    ///     object. This is for files that contain multiple
    ///     architectures or objects.
    ///
    /// @param[in] file_size
    ///     The size of the current object file if it can be determined
    ///     or if it is known. This can be zero.
    ///
    /// @see ObjectFile::ParseHeader()
    //------------------------------------------------------------------
    static lldb::ObjectFileSP
    FindPlugin (const lldb::ModuleSP &module_sp,
                const FileSpec* file_spec,
                lldb::offset_t file_offset,
                lldb::offset_t file_size,
                lldb::DataBufferSP &data_sp,
                lldb::offset_t &data_offset);

    //------------------------------------------------------------------
    /// Find a ObjectFile plug-in that can parse a file in memory.
    ///
    /// Scans all loaded plug-in interfaces that implement versions of
    /// the ObjectFile plug-in interface and returns the first
    /// instance that can parse the file.
    ///
    /// @param[in] module
    ///     The parent module that owns this object file.
    ///
    /// @param[in] process_sp
    ///     A shared pointer to the process whose memory space contains
    ///     an object file. This will be stored as a std::weak_ptr.
    ///
    /// @param[in] header_addr
    ///     The address of the header for the object file in memory.
    //------------------------------------------------------------------
    static lldb::ObjectFileSP
    FindPlugin (const lldb::ModuleSP &module_sp,
                const lldb::ProcessSP &process_sp,
                lldb::addr_t header_addr,
                lldb::DataBufferSP &file_data_sp);

    static size_t
    GetModuleSpecifications (const FileSpec &file,
                             lldb::offset_t file_offset,
                             lldb::offset_t file_size,
                             ModuleSpecList &specs);

    static size_t
    GetModuleSpecifications (const lldb_private::FileSpec& file,
                             lldb::DataBufferSP& data_sp,
                             lldb::offset_t data_offset,
                             lldb::offset_t file_offset,
                             lldb::offset_t file_size,
                             lldb_private::ModuleSpecList &specs);
    //------------------------------------------------------------------
    /// Split a path into a file path with object name.
    ///
    /// For paths like "/tmp/foo.a(bar.o)" we often need to split a path
    /// up into the actual path name and into the object name so we can
    /// make a valid object file from it.
    ///
    /// @param[in] path_with_object
    ///     A path that might contain an archive path with a .o file
    ///     specified in parens in the basename of the path.
    ///
    /// @param[out] archive_file
    ///     If \b true is returned, \a file_spec will be filled in with
    ///     the path to the archive.
    ///
    /// @param[out] archive_object
    ///     If \b true is returned, \a object will be filled in with
    ///     the name of the object inside the archive.
    ///
    /// @return
    ///     \b true if the path matches the pattern of archive + object
    ///     and \a archive_file and \a archive_object are modified,
    ///     \b false otherwise and \a archive_file and \a archive_object
    ///     are guaranteed to be remain unchanged.
    //------------------------------------------------------------------
    static bool
    SplitArchivePathWithObject (const char *path_with_object,
                                lldb_private::FileSpec &archive_file,
                                lldb_private::ConstString &archive_object,
                                bool must_exist);

    //------------------------------------------------------------------
    /// Gets the address size in bytes for the current object file.
    ///
    /// @return
    ///     The size of an address in bytes for the currently selected
    ///     architecture (and object for archives). Returns zero if no
    ///     architecture or object has been selected.
    //------------------------------------------------------------------
    virtual uint32_t
    GetAddressByteSize ()  const = 0;

    //------------------------------------------------------------------
    /// Get the address type given a file address in an object file.
    ///
    /// Many binary file formats know what kinds
    /// This is primarily for ARM binaries, though it can be applied to
    /// any executable file format that supports different opcode types
    /// within the same binary. ARM binaries support having both ARM and
    /// Thumb within the same executable container. We need to be able
    /// to get
    /// @return
    ///     The size of an address in bytes for the currently selected
    ///     architecture (and object for archives). Returns zero if no
    ///     architecture or object has been selected.
    //------------------------------------------------------------------
    virtual lldb::AddressClass
    GetAddressClass (lldb::addr_t file_addr);

    //------------------------------------------------------------------
    /// Extract the dependent modules from an object file.
    ///
    /// If an object file has information about which other images it
    /// depends on (such as shared libraries), this function will
    /// provide the list. Since many executables or shared libraries
    /// may depend on the same files,
    /// FileSpecList::AppendIfUnique(const FileSpec &) should be
    /// used to make sure any files that are added are not already in
    /// the list.
    ///
    /// @param[out] file_list
    ///     A list of file specification objects that gets dependent
    ///     files appended to.
    ///
    /// @return
    ///     The number of new files that were appended to \a file_list.
    ///
    /// @see FileSpecList::AppendIfUnique(const FileSpec &)
    //------------------------------------------------------------------
    virtual uint32_t
    GetDependentModules (FileSpecList& file_list) = 0;

    //------------------------------------------------------------------
    /// Tells whether this object file is capable of being the main executable
    /// for a process.
    ///
    /// @return
    ///     \b true if it is, \b false otherwise.
    //------------------------------------------------------------------
    virtual bool
    IsExecutable () const = 0;

    //------------------------------------------------------------------
    /// Returns the offset into a file at which this object resides.
    ///
    /// Some files contain many object files, and this function allows
    /// access to an object's offset within the file.
    ///
    /// @return
    ///     The offset in bytes into the file. Defaults to zero for
    ///     simple object files that a represented by an entire file.
    //------------------------------------------------------------------
    virtual lldb::addr_t
    GetFileOffset () const
    { return m_file_offset; }

    virtual lldb::addr_t
    GetByteSize () const
    { return m_length; }

    //------------------------------------------------------------------
    /// Get accessor to the object file specification.
    ///
    /// @return
    ///     The file specification object pointer if there is one, or
    ///     NULL if this object is only from memory.
    //------------------------------------------------------------------
    virtual FileSpec&
    GetFileSpec() { return m_file; }

    //------------------------------------------------------------------
    /// Get const accessor to the object file specification.
    ///
    /// @return
    ///     The const file specification object pointer if there is one,
    ///     or NULL if this object is only from memory.
    //------------------------------------------------------------------
    virtual const FileSpec&
    GetFileSpec() const { return m_file; }

    //------------------------------------------------------------------
    /// Get the name of the cpu, vendor and OS for this object file.
    ///
    /// This value is a string that represents the target triple where
    /// the cpu type, the vendor and the OS are encoded into a string.
    ///
    /// @param[out] target_triple
    ///     The string value of the target triple.
    ///
    /// @return
    ///     \b True if the target triple was able to be computed, \b
    ///     false otherwise.
    //------------------------------------------------------------------
    virtual bool
    GetArchitecture (ArchSpec &arch) = 0;

    //------------------------------------------------------------------
    /// Gets the section list for the currently selected architecture
    /// (and object for archives).
    ///
    /// Section list parsing can be deferred by ObjectFile instances
    /// until this accessor is called the first time.
    ///
    /// @return
    ///     The list of sections contained in this object file.
    //------------------------------------------------------------------
    virtual SectionList *
    GetSectionList ();

    virtual void
    CreateSections (SectionList &unified_section_list) = 0;

    //------------------------------------------------------------------
    /// Gets the symbol table for the currently selected architecture
    /// (and object for archives).
    ///
    /// Symbol table parsing can be deferred by ObjectFile instances
    /// until this accessor is called the first time.
    ///
    /// @return
    ///     The symbol table for this object file.
    //------------------------------------------------------------------
    virtual Symtab *
    GetSymtab () = 0;

    //------------------------------------------------------------------
    /// Detect if this object file has been stripped of local symbols.
    ///
    /// @return
    ///     Return \b true if the object file has been stripped of local
    ///     symbols.
    //------------------------------------------------------------------
    virtual bool
    IsStripped () = 0;

    //------------------------------------------------------------------
    /// Frees the symbol table.
    ///
    /// This function should only be used when an object file is
    ///
    /// @param[in] flags
    ///     eSymtabFromUnifiedSectionList: Whether to clear symbol table
    ///     for unified module section list, or object file.
    ///
    /// @return
    ///     The symbol table for this object file.
    //------------------------------------------------------------------
    virtual void
    ClearSymtab ();

    //------------------------------------------------------------------
    /// Gets the UUID for this object file.
    ///
    /// If the object file format contains a UUID, the value should be
    /// returned. Else ObjectFile instances should return the MD5
    /// checksum of all of the bytes for the object file (or memory for
    /// memory based object files).
    ///
    /// @return
    ///     Returns \b true if a UUID was successfully extracted into
    ///     \a uuid, \b false otherwise.
    //------------------------------------------------------------------
    virtual bool
    GetUUID (lldb_private::UUID* uuid) = 0;

    //------------------------------------------------------------------
    /// Gets the symbol file spec list for this object file.
    ///
    /// If the object file format contains a debug symbol file link,
    /// the values will be return in the FileSpecList.
    ///
    /// @return
    ///     Returns filespeclist.
    //------------------------------------------------------------------
    virtual lldb_private::FileSpecList
    GetDebugSymbolFilePaths()
    {
        return FileSpecList();
    }

    //------------------------------------------------------------------
    /// Gets whether endian swapping should occur when extracting data
    /// from this object file.
    ///
    /// @return
    ///     Returns \b true if endian swapping is needed, \b false
    ///     otherwise.
    //------------------------------------------------------------------
    virtual lldb::ByteOrder
    GetByteOrder () const = 0;

    //------------------------------------------------------------------
    /// Attempts to parse the object header.
    ///
    /// This function is used as a test to see if a given plug-in
    /// instance can parse the header data already contained in
    /// ObjectFile::m_data. If an object file parser does not
    /// recognize that magic bytes in a header, false should be returned
    /// and the next plug-in can attempt to parse an object file.
    ///
    /// @return
    ///     Returns \b true if the header was parsed succesfully, \b
    ///     false otherwise.
    //------------------------------------------------------------------
    virtual bool
    ParseHeader () = 0;

    //------------------------------------------------------------------
    /// Returns a reference to the UnwindTable for this ObjectFile
    ///
    /// The UnwindTable contains FuncUnwinders objects for any function in
    /// this ObjectFile.  If a FuncUnwinders object hasn't been created yet
    /// (i.e. the function has yet to be unwound in a stack walk), it
    /// will be created when requested.  Specifically, we do not create
    /// FuncUnwinders objects for functions until they are needed.
    ///
    /// @return
    ///     Returns the unwind table for this object file.
    //------------------------------------------------------------------
    virtual lldb_private::UnwindTable&
    GetUnwindTable () { return m_unwind_table; }

    //------------------------------------------------------------------
    /// Similar to Process::GetImageInfoAddress().
    ///
    /// Some platforms embed auxiliary structures useful to debuggers in the
    /// address space of the inferior process.  This method returns the address
    /// of such a structure if the information can be resolved via entries in
    /// the object file.  ELF, for example, provides a means to hook into the
    /// runtime linker so that a debugger may monitor the loading and unloading
    /// of shared libraries.
    ///
    /// @return
    ///     The address of any auxiliary tables, or an invalid address if this
    ///     object file format does not support or contain such information.
    virtual lldb_private::Address
    GetImageInfoAddress () { return Address(); }

    //------------------------------------------------------------------
    /// Returns the address of the Entry Point in this object file - if
    /// the object file doesn't have an entry point (because it is not an
    /// executable file) then an invalid address is returned.
    ///
    /// @return
    ///     Returns the entry address for this module.
    //------------------------------------------------------------------
    virtual lldb_private::Address
    GetEntryPointAddress () { return Address();}

    //------------------------------------------------------------------
    /// Returns the address that represents the header of this object
    /// file.
    ///
    /// The header address is defined as where the header for the object
    /// file is that describes the content of the file. If the header
    /// doesn't appear in a section that is defined in the object file,
    /// an address with no section is returned that has the file offset
    /// set in the m_file_offset member of the lldb_private::Address object.
    ///
    /// @return
    ///     Returns the entry address for this module.
    //------------------------------------------------------------------
    virtual lldb_private::Address
    GetHeaderAddress () { return Address(m_memory_addr);}

    virtual uint32_t
    GetNumThreadContexts ()
    {
        return 0;
    }

    virtual lldb::RegisterContextSP
    GetThreadContextAtIndex (uint32_t idx, lldb_private::Thread &thread)
    {
        return lldb::RegisterContextSP();
    }

    //------------------------------------------------------------------
    /// The object file should be able to calculate its type by looking
    /// at its file header and possibly the sections or other data in
    /// the object file. The file type is used in the debugger to help
    /// select the correct plug-ins for the job at hand, so this is
    /// important to get right. If any eTypeXXX definitions do not match
    /// up with the type of file you are loading, please feel free to
    /// add a new enumeration value.
    ///
    /// @return
    ///     The calculated file type for the current object file.
    //------------------------------------------------------------------
    virtual Type
    CalculateType() = 0;

    //------------------------------------------------------------------
    /// In cases where the type can't be calculated (elf files), this
    /// routine allows someone to explicitly set it. As an example,
    /// SymbolVendorELF uses this routine to set eTypeDebugInfo when
    /// loading debug link files.
    virtual void
    SetType (Type type)
    {
        m_type = type;
    }

    //------------------------------------------------------------------
    /// The object file should be able to calculate the strata of the
    /// object file.
    ///
    /// Many object files for platforms might be for either user space
    /// debugging or for kernel debugging. If your object file subclass
    /// can figure this out, it will help with debugger plug-in selection
    /// when it comes time to debug.
    ///
    /// @return
    ///     The calculated object file strata for the current object
    ///     file.
    //------------------------------------------------------------------
    virtual Strata
    CalculateStrata() = 0;

    //------------------------------------------------------------------
    /// Get the object file version numbers.
    ///
    /// Many object files have a set of version numbers that describe
    /// the version of the executable or shared library. Typically there
    /// are major, minor and build, but there may be more. This function
    /// will extract the versions from object files if they are available.
    ///
    /// If \a versions is NULL, or if \a num_versions is 0, the return
    /// value will indicate how many version numbers are available in
    /// this object file. Then a subsequent call can be made to this
    /// function with a value of \a versions and \a num_versions that
    /// has enough storage to store some or all version numbers.
    ///
    /// @param[out] versions
    ///     A pointer to an array of uint32_t types that is \a num_versions
    ///     long. If this value is NULL, the return value will indicate
    ///     how many version numbers are required for a subsequent call
    ///     to this function so that all versions can be retrieved. If
    ///     the value is non-NULL, then at most \a num_versions of the
    ///     existing versions numbers will be filled into \a versions.
    ///     If there is no version information available, \a versions
    ///     will be filled with \a num_versions UINT32_MAX values
    ///     and zero will be returned.
    ///
    /// @param[in] num_versions
    ///     The maximum number of entries to fill into \a versions. If
    ///     this value is zero, then the return value will indicate
    ///     how many version numbers there are in total so another call
    ///     to this function can be make with adequate storage in
    ///     \a versions to get all of the version numbers. If \a
    ///     num_versions is less than the actual number of version
    ///     numbers in this object file, only \a num_versions will be
    ///     filled into \a versions (if \a versions is non-NULL).
    ///
    /// @return
    ///     This function always returns the number of version numbers
    ///     that this object file has regardless of the number of
    ///     version numbers that were copied into \a versions.
    //------------------------------------------------------------------
    virtual uint32_t
    GetVersion (uint32_t *versions, uint32_t num_versions)
    {
        if (versions && num_versions)
        {
            for (uint32_t i=0; i<num_versions; ++i)
                versions[i] = UINT32_MAX;
        }
        return 0;
    }

    //------------------------------------------------------------------
    // Member Functions
    //------------------------------------------------------------------
    Type
    GetType ()
    {
        if (m_type == eTypeInvalid)
            m_type = CalculateType();
        return m_type;
    }

    Strata
    GetStrata ()
    {
        if (m_strata == eStrataInvalid)
            m_strata = CalculateStrata();
        return m_strata;
    }

    // When an object file is in memory, subclasses should try and lock
    // the process weak pointer. If the process weak pointer produces a
    // valid ProcessSP, then subclasses can call this function to read
    // memory.
    static lldb::DataBufferSP
    ReadMemory (const lldb::ProcessSP &process_sp,
                lldb::addr_t addr,
                size_t byte_size);

    size_t
    GetData (off_t offset, size_t length, DataExtractor &data) const;

    size_t
    CopyData (off_t offset, size_t length, void *dst) const;

    size_t
    ReadSectionData (const Section *section,
                     off_t section_offset,
                     void *dst,
                     size_t dst_len) const;
    size_t
    ReadSectionData (const Section *section,
                     DataExtractor& section_data) const;

    size_t
    MemoryMapSectionData (const Section *section,
                          DataExtractor& section_data) const;

    bool
    IsInMemory () const
    {
        return m_memory_addr != LLDB_INVALID_ADDRESS;
    }

protected:
    //------------------------------------------------------------------
    // Member variables.
    //------------------------------------------------------------------
    FileSpec m_file;
    Type m_type;
    Strata m_strata;
    lldb::addr_t m_file_offset; ///< The offset in bytes into the file, or the address in memory
    lldb::addr_t m_length; ///< The length of this object file if it is known (can be zero if length is unknown or can't be determined).
    DataExtractor m_data; ///< The data for this object file so things can be parsed lazily.
    lldb_private::UnwindTable m_unwind_table; /// < Table of FuncUnwinders objects created for this ObjectFile's functions
    lldb::ProcessWP m_process_wp;
    const lldb::addr_t m_memory_addr;
    std::unique_ptr<lldb_private::SectionList> m_sections_ap;
    std::unique_ptr<lldb_private::Symtab> m_symtab_ap;

    //------------------------------------------------------------------
    /// Sets the architecture for a module.  At present the architecture
    /// can only be set if it is invalid.  It is not allowed to switch from
    /// one concrete architecture to another.
    ///
    /// @param[in] new_arch
    ///     The architecture this module will be set to.
    ///
    /// @return
    ///     Returns \b true if the architecture was changed, \b
    ///     false otherwise.
    //------------------------------------------------------------------
    bool SetModulesArchitecture (const ArchSpec &new_arch);

private:
    DISALLOW_COPY_AND_ASSIGN (ObjectFile);
};

} // namespace lldb_private

#endif  // liblldb_ObjectFile_h_


text:
/**
 * Prototype columns
 */
var util = require('util');

module.exports = function columns(_columns) {
    if(arguments.length === 0) {
        this._prop.columns = '*';
    }
    else {
        if(typeof _columns === 'string') {
            _columns = [_columns];
        }

        this._prop.columns = util.format('%s', _columns.join(','));
    }

    return new this.constructor(this._prop, this._connection);
}

redpajama_set_name: RedPajamaGithub


text:
require 'capistrano'
require 'aws-sdk'

module Capistrano
  module Ec2tag
    def self.extend(configuration)
      configuration.load do
        Capistrano::Configuration.instance.load do

          def tag(role, *args)
            @ec2 ||= AWS::EC2.new({ access_key_id: ENV['AWS_ACCESS_KEY_ID'], secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'] }.merge!(fetch(:aws_params, {})))

            @ec2.instances.with_tag('Role', role).with_tag('Environment', (fetch(:stage) || fetch(:rails_env)).to_s).tagged('Live').each do |instance|
              server instance.tags["Name"], *args
            end
          end

        end
      end
    end
  end
end

if Capistrano::Configuration.instance
  Capistrano::Ec2tag.extend(Capistrano::Configuration.instance)
end


text: Rails.application.config.session_store :cookie_store, key: '_bugmonk_session'


text:
def configuration(parent_package='', top_path=None):
    import distutils.sysconfig as sysc
    from numpy.distutils.misc_util import Configuration
    import os.path as op

    auto_dir = op.dirname(__file__)
    auto_name = op.split(auto_dir)[-1]
    config = Configuration(auto_name, parent_package, top_path)

    defines = [('__SDIR__', "'\"%s\"'" % auto_dir),
               ('DEBUGFMF', None)]

    src = ['dft.c', 'dft.i']
    config.add_extension('_dft',
                         sources=src,
                         depends=[],
                         extra_compile_args=['-O2'],
                         include_dirs=[auto_dir, '../../fem/extmods'],
                         define_macros=defines)

    return config

if __name__ == '__main__':
    from numpy.distutils.core import setup
    setup(**configuration(top_path='').todict())


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2014 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<!--
    This layout file is used by the AlertDialog when displaying a list of items.
    This layout file is inflated and used as the TextView to display individual
    items.
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/text1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeightSmall"
    android:textAppearance="?android:attr/textAppearanceListItemSmall"
    android:textColor="?android:attr/textColorAlertDialogListItem"
    android:gravity="center_vertical"
    android:paddingStart="?attr/listPreferredItemPaddingStart"
    android:paddingEnd="?attr/listPreferredItemPaddingEnd"
    android:ellipsize="marquee" />


text:
CREATE TABLE country (id NVARCHAR(2) NOT NULL, name NVARCHAR(64) NOT NULL, PRIMARY KEY (id));

INSERT INTO [country] ([id], [name]) VALUES ('de', 'aleman');
INSERT INTO [country] ([id], [name]) VALUES ('en', 'anglés');
INSERT INTO [country] ([id], [name]) VALUES ('ar', 'arabi');
INSERT INTO [country] ([id], [name]) VALUES ('hy', 'armèni');
INSERT INTO [country] ([id], [name]) VALUES ('az', 'azerbaijani');
INSERT INTO [country] ([id], [name]) VALUES ('ber', 'berbèr');
INSERT INTO [country] ([id], [name]) VALUES ('br', 'breton');
INSERT INTO [country] ([id], [name]) VALUES ('eu', 'bàscol');
INSERT INTO [country] ([id], [name]) VALUES ('ca', 'catalan');
INSERT INTO [country] ([id], [name]) VALUES ('zh', 'chinés');
INSERT INTO [country] ([id], [name]) VALUES ('da', 'danés');
INSERT INTO [country] ([id], [name]) VALUES ('he', 'ebreu');
INSERT INTO [country] ([id], [name]) VALUES ('es', 'espanhòl');
INSERT INTO [country] ([id], [name]) VALUES ('phn', 'fenician');
INSERT INTO [country] ([id], [name]) VALUES ('nl_BE', 'flamenc');
INSERT INTO [country] ([id], [name]) VALUES ('fr', 'francés');
INSERT INTO [country] ([id], [name]) VALUES ('frm', 'francés mejan');
INSERT INTO [country] ([id], [name]) VALUES ('el', 'grec');
INSERT INTO [country] ([id], [name]) VALUES ('grc', 'grec ancian');
INSERT INTO [country] ([id], [name]) VALUES ('it', 'italian');
INSERT INTO [country] ([id], [name]) VALUES ('la', 'latin');
INSERT INTO [country] ([id], [name]) VALUES ('art', 'lenga artificiala');
INSERT INTO [country] ([id], [name]) VALUES ('cel', 'lenga celtica');
INSERT INTO [country] ([id], [name]) VALUES ('roa', 'lenga romança');
INSERT INTO [country] ([id], [name]) VALUES ('oc', 'occitan');
INSERT INTO [country] ([id], [name]) VALUES ('pro', 'occitan ancian');
INSERT INTO [country] ([id], [name]) VALUES ('pt', 'portugués');


text:
.class public Lcom/android/settingslib/applications/ApplicationsState$CompoundFilter;
.super Ljava/lang/Object;
.source "ApplicationsState.java"

# interfaces
.implements Lcom/android/settingslib/applications/ApplicationsState$AppFilter;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/settingslib/applications/ApplicationsState;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "CompoundFilter"
.end annotation

# instance fields
.field private final mFirstFilter:Lcom/android/settingslib/applications/ApplicationsState$AppFilter;

.field private final mSecondFilter:Lcom/android/settingslib/applications/ApplicationsState$AppFilter;

# direct methods
.method public constructor <init>(Lcom/android/settingslib/applications/ApplicationsState$AppFilter;Lcom/android/settingslib/applications/ApplicationsState$AppFilter;)V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lcom/android/settingslib/applications/ApplicationsState$CompoundFilter;->mFirstFilter:Lcom/android/settingslib/applications/ApplicationsState$AppFilter;

    iput-object p2, p0, Lcom/android/settingslib/applications/ApplicationsState$CompoundFilter;->mSecondFilter:Lcom/android/settingslib/applications/ApplicationsState$AppFilter;

    return-void
.end method

# virtual methods
.method public filterApp(Lcom/android/settingslib/applications/ApplicationsState$AppEntry;)Z
    .locals 1

    iget-object v0, p0, Lcom/android/settingslib/applications/ApplicationsState$CompoundFilter;->mFirstFilter:Lcom/android/settingslib/applications/ApplicationsState$AppFilter;

    invoke-interface {v0, p1}, Lcom/android/settingslib/applications/ApplicationsState$AppFilter;->filterApp(Lcom/android/settingslib/applications/ApplicationsState$AppEntry;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/android/settingslib/applications/ApplicationsState$CompoundFilter;->mSecondFilter:Lcom/android/settingslib/applications/ApplicationsState$AppFilter;

    invoke-interface {v0, p1}, Lcom/android/settingslib/applications/ApplicationsState$AppFilter;->filterApp(Lcom/android/settingslib/applications/ApplicationsState$AppEntry;)Z

    move-result v0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public init()V
    .locals 1

    iget-object v0, p0, Lcom/android/settingslib/applications/ApplicationsState$CompoundFilter;->mFirstFilter:Lcom/android/settingslib/applications/ApplicationsState$AppFilter;

    invoke-interface {v0}, Lcom/android/settingslib/applications/ApplicationsState$AppFilter;->init()V

    iget-object v0, p0, Lcom/android/settingslib/applications/ApplicationsState$CompoundFilter;->mSecondFilter:Lcom/android/settingslib/applications/ApplicationsState$AppFilter;

    invoke-interface {v0}, Lcom/android/settingslib/applications/ApplicationsState$AppFilter;->init()V

    return-void
.end method

.method public init(Landroid/content/Context;)V
    .locals 1

    iget-object v0, p0, Lcom/android/settingslib/applications/ApplicationsState$CompoundFilter;->mFirstFilter:Lcom/android/settingslib/applications/ApplicationsState$AppFilter;

    invoke-interface {v0, p1}, Lcom/android/settingslib/applications/ApplicationsState$AppFilter;->init(Landroid/content/Context;)V

    iget-object v0, p0, Lcom/android/settingslib/applications/ApplicationsState$CompoundFilter;->mSecondFilter:Lcom/android/settingslib/applications/ApplicationsState$AppFilter;

    invoke-interface {v0, p1}, Lcom/android/settingslib/applications/ApplicationsState$AppFilter;->init(Landroid/content/Context;)V

    return-void
.end method


text:
package com.orientechnologies.orient.core.sql;

import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import com.orientechnologies.orient.core.command.OCommandRequestText;
import com.orientechnologies.orient.core.db.record.ODatabaseRecord;
import com.orientechnologies.orient.core.exception.OCommandExecutionException;
import com.orientechnologies.orient.core.id.ORecordId;
import com.orientechnologies.orient.core.metadata.security.ODatabaseSecurityResources;
import com.orientechnologies.orient.core.metadata.security.ORole;
import com.orientechnologies.orient.core.serialization.serializer.OStringSerializerHelper;

/**
 * SQL TRUNCATE RECORD command: Truncates a record without loading it. Useful when the record is dirty in any way and cannot be
 * loaded correctly.
 *
 * @author Luca Garulli
 *
 */
public class OCommandExecutorSQLTruncateRecord extends OCommandExecutorSQLAbstract {
	public static final String	KEYWORD_TRUNCATE	= "TRUNCATE";
	public static final String	KEYWORD_RECORD		= "RECORD";
	private Set<String>					records						= new HashSet<String>();

	@SuppressWarnings("unchecked")
	public OCommandExecutorSQLTruncateRecord parse(final OCommandRequestText iRequest) {
		getDatabase().checkSecurity(ODatabaseSecurityResources.COMMAND, ORole.PERMISSION_READ);
		init(iRequest.getText());

		StringBuilder word = new StringBuilder();

		int oldPos = 0;
		int pos = OSQLHelper.nextWord(text, textUpperCase, oldPos, word, true);
		if (pos == -1 || !word.toString().equals(KEYWORD_TRUNCATE))
			throw new OCommandSQLParsingException("Keyword " + KEYWORD_TRUNCATE + " not found. Use " + getSyntax(), text, oldPos);

		oldPos = pos;
		pos = OSQLHelper.nextWord(text, textUpperCase, oldPos, word, true);
		if (pos == -1 || !word.toString().equals(KEYWORD_RECORD))
			throw new OCommandSQLParsingException("Keyword " + KEYWORD_RECORD + " not found. Use " + getSyntax(), text, oldPos);

		oldPos = pos;
		pos = OSQLHelper.nextWord(text, text, oldPos, word, true);
		if (pos == -1)
			throw new OCommandSQLParsingException("Expected one or more records. Use " + getSyntax(), text, oldPos);

		if (word.charAt(0) == '[')
			// COLLECTION
			OStringSerializerHelper.getCollection(text, oldPos, records);
		else {
			records.add(word.toString());
		}

		if (records.isEmpty())
			throw new OCommandSQLParsingException("Missed record(s). Use " + getSyntax(), text, oldPos);
		return this;
	}

	/**
	 * Execute the command.
	 */
	public Object execute(final Map<Object, Object> iArgs) {
		if (records.isEmpty())
			throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet");

		final ODatabaseRecord database = getDatabase();
		for (String rec : records) {
			try {
				final ORecordId rid = new ORecordId(rec);
				database.getStorage().deleteRecord(rid, -1, 0, null);
			} catch (Throwable e) {
				throw new OCommandExecutionException("Error on executing command", e);
			}
		}

		return records.size();
	}

	@Override
	public String getSyntax() {
		return "TRUNCATE RECORD <rid>*";
	}
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">

<title>STWUR #7: Regresja grzbietowa lub jak HIV wpływa na korę mózgową - materiały | STWUR</title>
<meta name="generator" content="Jekyll v4.0.0" />
<meta property="og:title" content="STWUR #7: Regresja grzbietowa lub jak HIV wpływa na korę mózgową - materiały" />
<meta name="author" content="STWUR" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="Zamieszczamy slajdy z prezentacji Marty Karaś o regresji grzbietowej:" />
<meta property="og:description" content="Zamieszczamy slajdy z prezentacji Marty Karaś o regresji grzbietowej:" />
<link rel="canonical" href="http://localhost:4000/STWUR/2017/07/19/stwur7_materialy.html" />
<meta property="og:url" content="http://localhost:4000/STWUR/2017/07/19/stwur7_materialy.html" />
<meta property="og:site_name" content="STWUR" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2017-07-19T00:00:00+02:00" />

  <link rel="stylesheet" href="/STWUR/assets/css/main.css">
  <link rel="stylesheet" href="/STWUR/assets/css/skins/light.css">

    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,700,700i|Lora:400,400i,700,700i">
  <link rel="alternate" type="application/atom+xml" title="STWUR" href="/STWUR/atom.xml">

Skip links

Skip to primary navigation

Skip to content

Skip to footer

    Menu

Posty

Artykuły

O STWURZE

Sponsorzy

Szukaj

STWUR

STWUR #7: Regresja grzbietowa lub jak HIV wpływa na korę mózgową - materiały

        STWUR

    <time class="page-date dt-published" datetime="2017-07-19T00:00:00+02:00">July 19, 2017
</time>

Zamieszczamy slajdy z prezentacji Marty Karaś o regresji grzbietowej:

Nasze spotkania wspierają Kruk SA i Wydział Biotechnologii Uniwersytetu Wrocławskiego.

   Share
   Tweet
   LinkedIn
   Reddit

Previous

         STWUR #7: Regresja grzbietowa lub jak HIV wpływa na korę mózgową

Next

        Przebudzenie STWURa

© 2020 STWUR. Powered by Jekyll & So Simple.


text:
using UnityEngine;
using System.Collections;
using Common;
using System.IO;
using Assets.Scripts;

public class BoardSceneScript : MonoBehaviour, IGameObserver, IGameSubject
{

    public GameObject TileObjectPrefab;
    public GameObject DicePrefab;
    public GameObject BoardCharacterPrefab;

    public float CharacterYPositionOffset;

    private Board board;
    private GameObject[,] tileObjects;
    private GameObject[] characterObjects;
    private GameObject diceObject;

    private InputSubject inputSubject;

    private DefaultGameSubject defaultGameObject;

    private Assets.Scripts.PlayMode playMode;

    // Use this for initialization
    void Start()
    {
        defaultGameObject = new DefaultGameSubject();

        inputSubject = new InputSubject();
        board = new Board(new Tile[0, 0]);

        playMode = new MultiplayerModeSubject("localhost", 1337);
        playMode.AddObserver(HandleEvent);

        inputSubject.AddObserver(playMode.HandleEvent);
    }

    // Update is called once per frame
    void Update()
    {
        inputSubject.Update();

        //Set board character positions
        if (characterObjects != null)
        {
            for (var i = 0; i < characterObjects.Length; i++)
            {
                characterObjects[i].transform.localPosition = new Vector3(board.Characters[i].X, CharacterYPositionOffset, board.TileMap.GetLength(1) - board.Characters[i].Y);
            }
        }

        switch (board.State)
        {
            case Board.BoardStates.WAITING_FOR_ROLL:
                if (diceObject == null)
                {
                    diceObject = (GameObject)Instantiate(DicePrefab, new Vector3(0, 0, 0), DicePrefab.transform.rotation);
                    diceObject.transform.parent = this.transform;
                }

                if(characterObjects != null)
                    diceObject.transform.localPosition = characterObjects[board.CurrentPlayer].transform.localPosition + new Vector3(0, 1, 0);

                break;
        }

        if (board.State != Board.BoardStates.WAITING_FOR_ROLL)
        {
            if (diceObject != null)
            {
                DestroyObject(diceObject);
                diceObject = null;
            }
        }

        board.Update();

        if (playMode != null)
        {
            playMode.Update();
        }
    }

    public void AddObserver(NotificationDelegate callback)
    {
        defaultGameObject.AddObserver(callback);
    }

    public void RemoveObserver(NotificationDelegate callback)
    {
        defaultGameObject.RemoveObserver(callback);
    }

    public void Notify(GameEvent ge)
    {
        defaultGameObject.Notify(ge);
    }

    private void LoadBoardObjects()
    {
        tileObjects = new GameObject[board.TileMap.GetLength(0), board.TileMap.GetLength(1)];
        for (var i = 0; i < tileObjects.GetLength(0); i++)
        {
            for (var j = 0; j < tileObjects.GetLength(1); j++)
            {
                tileObjects[i, j] = (GameObject)Instantiate(TileObjectPrefab, new Vector3(i, 0, tileObjects.GetLength(1) - j), TileObjectPrefab.transform.rotation);
                tileObjects[i, j].SendMessage("SetTile", board.TileMap[i, j].Type);
                tileObjects[i, j].transform.parent = this.transform;
            }
        }

        characterObjects = new GameObject[board.Characters.Count];
        for (var i = 0; i < characterObjects.Length; i++)
        {
            characterObjects[i] = (GameObject)Instantiate(BoardCharacterPrefab, new Vector3(0, 0, 0), BoardCharacterPrefab.transform.rotation);
            characterObjects[i].transform.parent = this.transform;
        }
    }

    private void RollDice()
    {
        //Destroy the dice object
        if (diceObject != null)
        {
            DestroyObject(diceObject);
            diceObject = null;
        }

        //Make effects and play sounds here

    }

    public void HandleEvent(GameEvent ev)
    {
        switch (ev.Type)
        {
            case GameEvent.EventTypes.BOARD_ENCODE_RESPONSE:
                board.Decode(new BinaryReader(new MemoryStream(ev.Data)));

                if (tileObjects == null || board.TileMap.Length > tileObjects.Length)  //Board tiles are different, reset map
                {
                    LoadBoardObjects();
                }
                break;

            case GameEvent.EventTypes.BOARD_PLAYER_ROLLED:
                RollDice();
                break;

            case GameEvent.EventTypes.PLAYER_ID_RESPONSE:
                inputSubject.SetPlayerId(ev.Data[0]);
                break;
        }
    }
}


text:
{% extends "docframe.html" %} {% block body %}

        libpathod.test
        Using libpathod in unit tests.

The libpathod.test module is a light, flexible testing layer for HTTP clients.
    It works by firing up a Pathod instance in a separate thread, letting you use
    Pathod's full abilities to generate responses, and then query Pathod's internal
    logs to establish what happened. All the mechanics of startup, shutdown, finding
    free ports and so forth are taken care of for you.

The canonical docs can be accessed using pydoc:

pydoc libpathod.test

    The remainder of this page demonstrates some common interaction patterns using
    nose. These examples are
    also applicable with only minor modification to most commonly used Python testing
    engines.

Context Manager

    {% include "examples_context.html" %}

One instance per test

    {% include "examples_setup.html" %}

One instance per suite

    {% include "examples_setupall.html" %}

{% endblock %}


text:
datasketch: Big Data Looks Small
================================

.. image:: https://travis-ci.org/ekzhu/datasketch.svg?branch=master
    :target: https://travis-ci.org/ekzhu/datasketch
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.290602.svg
   :target: https://doi.org/10.5281/zenodo.290602

datasketch gives you probabilistic data structures that can process and
search very large amount of data super fast, with little loss of
accuracy.

This package contains the following data sketches:

+-------------------------+-----------------------------------------------+
| Data Sketch             | Usage                                         |
+=========================+===============================================+
| `MinHash`_              | estimate Jaccard similarity and cardinality   |
+-------------------------+-----------------------------------------------+
| `Weighted MinHash`_     | estimate weighted Jaccard similarity          |
+-------------------------+-----------------------------------------------+
| `HyperLogLog`_          | estimate cardinality                          |
+-------------------------+-----------------------------------------------+
| `HyperLogLog++`_        | estimate cardinality                          |
+-------------------------+-----------------------------------------------+

The following indexes for data sketches are provided to support
sub-linear query time:

+---------------------------+-----------------------------+------------------------+
| Index                     | For Data Sketch             | Supported Query Type   |
+===========================+=============================+========================+
| `MinHash LSH`_            | MinHash, Weighted MinHash   | Jaccard Threshold      |
+---------------------------+-----------------------------+------------------------+
| `MinHash LSH Forest`_     | MinHash, Weighted MinHash   | Jaccard Top-K          |
+---------------------------+-----------------------------+------------------------+
| `MinHash LSH Ensemble`_   | MinHash                     | Containment Threshold  |
+---------------------------+-----------------------------+------------------------+

datasketch must be used with Python 2.7 or above and NumPy 1.11 or
above. Scipy is optional, but with it the LSH initialization can be much
faster.

Note that `MinHash LSH`_ and `MinHash LSH Ensemble`_ also support Redis storage
layer.

Install
-------

To install datasketch using ``pip``:

::

    pip install datasketch -U

This will also install NumPy as dependency.

.. _`MinHash`: https://ekzhu.github.io/datasketch/minhash.html
.. _`Weighted MinHash`: https://ekzhu.github.io/datasketch/weightedminhash.html
.. _`HyperLogLog`: https://ekzhu.github.io/datasketch/hyperloglog.html
.. _`HyperLogLog++`: https://ekzhu.github.io/datasketch/hyperloglog.html#hyperloglog-plusplus
.. _`MinHash LSH`: https://ekzhu.github.io/datasketch/lsh.html
.. _`MinHash LSH Forest`: https://ekzhu.github.io/datasketch/lshforest.html
.. _`MinHash LSH Ensemble`: https://ekzhu.github.io/datasketch/lshensemble.html


text:
Inspired by the Ruby Koans, just start running the test files in order by name and fix the tests from top to bottom.

Lot's of the examples are coming from the excelent book by Dave Thomas Programming Elixir, you should get a copy.

## Getting started

Clone the repository in your local machine.
Navigate to the root of the repo and run:

>elixir test/01_pattern_matching_tests.exs

1. Open the file in your editor of choice.
2. Make the changes to the first test to make it pass.
3. Re-run the test from the terminal window.
4. Repite.

Once you are done with file 01 move to file 02 and keep going.

Have fun!


text:
<!--
    Copyright 2008 the original author or authors.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

    <!-- ================================================================== -->
    <!--  Test beans                                                        -->
    <!-- ================================================================== -->

    <bean id="blubConverter"
        class="org.openehealth.ipf.platform.camel.core.support.transform.ext.StaticTransmogrifier">
        <property name="from" value="blub" />
        <property name="to" value="test" />
    </bean>

    <bean id="sampleTransmogrifier"
        class="org.openehealth.ipf.platform.camel.core.support.transform.ext.StaticTransmogrifier">
        <property name="from" value="f" />
        <property name="to" value="g" />
    </bean>

    <bean id="samplePredicate"
        class="org.openehealth.ipf.platform.camel.core.support.transform.min.TestPredicate">
        <constructor-arg value="blub" />
    </bean>

    <bean id="sampleProcessor"
        class="org.openehealth.ipf.platform.camel.core.support.transform.min.TestProcessor">
    </bean>

    <bean id="sampleValidator"
        class="org.openehealth.ipf.platform.camel.core.support.transform.min.TestValidator">
    </bean>

    <bean id="sampleAggregator"
        class="org.openehealth.ipf.platform.camel.core.support.transform.min.TestAggregator">
    </bean>

    <bean id="sampleConverter"
        class="org.openehealth.ipf.platform.camel.core.support.transform.min.TestConverter">
    </bean>

    <bean id="sampleSplitRule"
    	class="org.openehealth.ipf.platform.camel.core.process.splitter.SplitterTest$TestSplitRule">
    </bean>

    <bean id="testTransmogrifier"
        class="org.openehealth.ipf.platform.camel.core.transform.TestTransmogrifier">
    </bean>

</beans>


text:
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Third Party Services
    |--------------------------------------------------------------------------
    |
    | This file is for storing the credentials for third party services such
    | as Stripe, Mailgun, Mandrill, and others. This file provides a sane
    | default location for this type of information, allowing packages
    | to have a conventional place to find your various credentials.
    |
    */

    'mailgun' => array(
        'domain' => $_ENV['MAILGUN_DOMAIN'],
        'secret' => $_ENV['MAILGUN_SECRET'],
    ),

    'mandrill' => array(
        'secret' => '',
    ),

    'stripe' => array(
        'model'  => 'User',
        'secret' => '',
    ),

    'blocktrail' => array(
        'key'      => $_ENV['BLOCKTRAIL_KEY'],
        'secret'   => $_ENV['BLOCKTRAIL_SECRET'],
        'currency' => 'btc',
        'testnet'  => $_ENV['ENABLE_TESTNET'],  //use the testnet
        'disable_ssl' => false,                 //disable ssl verification, only for local testing
    ),

);


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.apache.servicecomb</groupId>
    <artifactId>java-chassis-dependencies</artifactId>
    <version>1.0.0-m2-SNAPSHOT</version>
    <relativePath>../java-chassis-dependencies</relativePath>
  </parent>

  <artifactId>java-chassis-parent</artifactId>
  <packaging>pom</packaging>

  <name>Java Chassis::Parent</name>
  <description>Java Chassis Parent</description>
  <url>https://github.com/apache/incubator-servicecomb-java-chassis</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.8</java.version>

    <argLine>-Dfile.encoding=UTF-8</argLine>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.github.tomakehurst</groupId>
        <artifactId>wiremock-standalone</artifactId>
        <version>2.6.0</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <version>3.0.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.seanyinx</groupId>
      <artifactId>unit-scaffolding</artifactId>
      <version>1.0.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jmockit</groupId>
      <artifactId>jmockit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-mockito</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>javax.inject</groupId>
      <artifactId>javax.inject</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aspects</artifactId>
    </dependency>
  </dependencies>

  <distributionManagement>
    <repository>
      <id>apache.releases.https</id>
      <name>Apache Release Distribution Repository</name>
      <url>https://repository.apache.org/service/local/staging/deploy/maven2</url>
    </repository>
    <snapshotRepository>
      <id>apache.snapshots.https</id>
      <name>Apache Development Snapshot Repository</name>
      <url>https://repository.apache.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <configLocation>../etc/checkstyle.xml</configLocation>
          <excludes>**/demo/**</excludes>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-remote-resources-plugin</artifactId>
          <version>1.5</version>
        </plugin>
        <!-- Fixed the m2e warning of remote resources plugin -->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-remote-resources-plugin</artifactId>
                    <versionRange>[1.0,)</versionRange>
                    <goals>
                      <goal>process</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore>
                    </ignore>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
        <plugin>
          <groupId>io.fabric8</groupId>
          <artifactId>docker-maven-plugin</artifactId>
          <version>0.20.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.gmaven</groupId>
          <artifactId>gmaven-plugin</artifactId>
          <version>1.5</version>
        </plugin>
        <plugin>
          <groupId>org.eluder.coveralls</groupId>
          <artifactId>coveralls-maven-plugin</artifactId>
          <configuration>
            <jacocoReports>
              <jacocoReport>${project.basedir}/coverage-reports/target/site/jacoco-aggregate/jacoco.xml</jacocoReport>
            </jacocoReports>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.7.8</version>
          <configuration>
            <excludes>
              <exclude>*$Impl_*</exclude>
            </excludes>
          </configuration>
          <executions>
            <execution>
              <id>default-prepare-agent</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
              <configuration>
                <destFile>${project.build.directory}/jacoco.exec</destFile>
              </configuration>
            </execution>
            <execution>
              <id>default-prepare-agent-integration</id>
              <phase>pre-integration-test</phase>
              <goals>
                <goal>prepare-agent-integration</goal>
              </goals>
              <configuration>
                <destFile>${project.build.directory}/jacoco-it.exec</destFile>
                <propertyName>jacoco.failsafe.argLine</propertyName>
              </configuration>
            </execution>
            <execution>
              <id>default-report</id>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
            <execution>
              <id>default-report-integration</id>
              <goals>
                <goal>report-integration</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>2.5</version>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>docker-machine</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>io.fabric8</groupId>
              <artifactId>docker-maven-plugin</artifactId>
              <configuration>
                <machine>
                  <name>default</name>
                  <autoCreate>true</autoCreate>
                </machine>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>jacoco</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>


text:
let chai = require('chai');
let expect = chai.expect;
let sinon = require('sinon');
let sinonChai = require('sinon-chai');
let StorageFake = require('./storage-fake.js');
chai.use(sinonChai);

describe('store', () => {
  describe('initializing with state peristed in SessionStorage', () => {
    it('should apply state from SessionStorage', () => {
      let store;
      let Store = require('../../app/flux/store.js');
      let storage = new StorageFake();
      let state = {id: 42, name: 'foobar'};
      let storeIdentifier = 'article-store';
      storage.setItem('other-store', 'some stupid value');
      storage.setItem(storeIdentifier, JSON.stringify(state));
      store = new Store(storeIdentifier, storage);
      expect(store.state).to.deep.equal(state);
    });
  });

  describe('emitting an event', () => {
    let store;
    let storage;
    beforeEach(function() {
      let Store = require('../../app/flux/store.js');
      storage = new StorageFake();
      store = new Store('article-store', storage);
    });

    it('should persist changed state in SessionStorage', () => {
      let expected = {id: 4711, town: 'Cologne'};
      store.state = expected;
      store.emitChange('somethingChanged');
      let actual = JSON.parse(storage.getItem('article-store'));
      expect(actual).to.deep.equal(expected);
    });

    it('should execute all change listeners registered for that event', () => {
      let callbackA = sinon.spy();
      let callbackB = sinon.spy();
      let callbackC = sinon.spy();
      let changeEvent = 'somethingChanged';

      store.addChangeListener(changeEvent, callbackA);
      store.addChangeListener(changeEvent, callbackB);
      store.addChangeListener('otherEvent', callbackC);

      store.emitChange(changeEvent);

      expect(callbackA).to.have.been.called;
      expect(callbackB).to.have.been.called;
      expect(callbackC).not.to.have.been.called;
    });

    describe('after change listener deregistered', () => {
      it('should not execute deregistered listener', () => {
        let callbackA = sinon.spy();
        let callbackB = sinon.spy();
        let callbackC = sinon.spy();
        let changeEvent = 'somethingChanged';

        let deregisterA = store.addChangeListener(changeEvent, callbackA);
        store.addChangeListener(changeEvent, callbackB);
        let deregisterC = store.addChangeListener(changeEvent, callbackC);

        deregisterA();
        deregisterC();

        store.emitChange(changeEvent);

        expect(callbackA).not.to.have.been.called;
        expect(callbackB).to.have.been.called;
        expect(callbackC).not.to.have.been.called;
      });
    });
  });
});


text:
#ifndef __MODEL_DERIVATIVE_H__
#define __MODEL_DERIVATIVE_H__

#include <armadillo>

class ModelDerivative{

public:

  /*--------------------------------------------------------------------------*/

  ModelDerivative(const ModelSpace& modelSpace) : space(modelSpace) {
  }

  /*--------------------------------------------------------------------------*/

  // columns of returned matrix correspond to derivatives with respect to
  // the speaker weights
  arma::mat speaker(const arma::vec& phonemeWeights) const {

    return this->space.phoneme(phonemeWeights);

  }

  /*--------------------------------------------------------------------------*/

  // columns of returned matrix correspond to derivatives with respect to
  // the phoneme weights
  arma::mat phoneme(const arma::vec& speakerWeights) const {

    return this->space.speaker(speakerWeights);

  }

  /*--------------------------------------------------------------------------*/

private:

  /*--------------------------------------------------------------------------*/

  const ModelSpace& space;

  /*--------------------------------------------------------------------------*/

};
#endif


text:
<?xml version="1.0" encoding="UTF-8"?>
<gmd:MD_Metadata xsi:schemaLocation="http://www.isotc211.org/2005/gmi http://ngdc.noaa.gov/metadata/published/xsd/schema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gmi="http://www.isotc211.org/2005/gmi" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmx="http://www.isotc211.org/2005/gmx" xmlns:srv="http://www.isotc211.org/2005/srv">
<gmd:fileIdentifier>
<gco:CharacterString>4f4e4a4ee4b07f02db62839b</gco:CharacterString>
</gmd:fileIdentifier>
<gmd:language>
<gco:CharacterString>eng</gco:CharacterString>
</gmd:language>
<gmd:characterSet>
<gmd:MD_CharacterSetCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_CharacterSetCode" codeListValue="utf8">UTF-8</gmd:MD_CharacterSetCode>
</gmd:characterSet>
<gmd:hierarchyLevel>
<gmd:MD_ScopeCode codeList="https://www.sciencebase.gov/vocab/category/4f4e475de4b07f02db47ded7" codeListValue="Publication">Publication</gmd:MD_ScopeCode>
</gmd:hierarchyLevel>
<gmd:hierarchyLevelName>
<gco:CharacterString>Publication</gco:CharacterString>
</gmd:hierarchyLevelName>
<gmd:contact>
<gmd:CI_ResponsibleParty>
<gmd:individualName>
<gco:CharacterString>Nebeker, A. V.</gco:CharacterString>
</gmd:individualName>
<gmd:organisationName>
<gco:CharacterString>Unknown</gco:CharacterString>
</gmd:organisationName>
<gmd:contactInfo>
<gmd:CI_Contact/>
</gmd:contactInfo>
<gmd:role>
<gmd:CI_RoleCode codeList="https://www.sciencebase.gov/vocab/category/4f4e475ce4b07f02db47de84" codeListValue="Point Of Contact">Point Of Contact</gmd:CI_RoleCode>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:contact>
<gmd:contact>
<gmd:CI_ResponsibleParty>
<gmd:individualName>
<gco:CharacterString>Bury, R. Bruce</gco:CharacterString>
</gmd:individualName>
<gmd:organisationName>
<gco:CharacterString>Unknown</gco:CharacterString>
</gmd:organisationName>
<gmd:contactInfo>
<gmd:CI_Contact/>
</gmd:contactInfo>
<gmd:role>
<gmd:CI_RoleCode codeList="https://www.sciencebase.gov/vocab/category/4f4e475ce4b07f02db47de84" codeListValue="Point Of Contact">Point Of Contact</gmd:CI_RoleCode>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:contact>
<gmd:dateStamp>
<gco:DateTime>2013-05-15T16:57:09Z</gco:DateTime>
</gmd:dateStamp>
<gmd:metadataStandardName>
<gco:CharacterString>ISO19115</gco:CharacterString>
</gmd:metadataStandardName>
<gmd:metadataStandardVersion>
<gco:CharacterString>1.0</gco:CharacterString>
</gmd:metadataStandardVersion>
<gmd:dataSetURI>
<gco:CharacterString>https://www.sciencebase.gov/catalog/item/4f4e4a4ee4b07f02db62839b</gco:CharacterString>
</gmd:dataSetURI>
<gmd:identificationInfo>
<gmd:MD_DataIdentification>
<gmd:citation>
<gmd:CI_Citation>
<gmd:title>
<gco:CharacterString>Response of juvenile softshell turtles (Apalone mutica) in a thermal gradient</gco:CharacterString>
</gmd:title>
<gmd:date>
<gmd:CI_Date>
<gmd:date>
<gco:Date>2001</gco:Date>
</gmd:date>
<gmd:dateType>
<gmd:CI_DateTypeCode codeList="https://www.sciencebase.gov/vocab/category/4f4e475de4b07f02db47ded1" codeListValue="Publication">Publication</gmd:CI_DateTypeCode>
</gmd:dateType>
</gmd:CI_Date>
</gmd:date>
</gmd:CI_Citation>
</gmd:citation>
<gmd:abstract>
<gco:CharacterString>REQUIRED FIELD</gco:CharacterString>
</gmd:abstract>
<gmd:language>
<gco:CharacterString>eng</gco:CharacterString>
</gmd:language>
<gmd:topicCategory>
<gmd:MD_TopicCategoryCode>geoscientificInformation</gmd:MD_TopicCategoryCode>
</gmd:topicCategory>
</gmd:MD_DataIdentification>
</gmd:identificationInfo>
<gmd:distributionInfo>
<gmd:MD_Distribution>
<gmd:transferOptions>
<gmd:MD_DigitalTransferOptions>
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>https://www.sciencebase.gov/catalog/item/4f4e4a4ee4b07f02db62839b</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>
</gmd:protocol>
<gmd:applicationProfile>
<gco:CharacterString>Web Browser</gco:CharacterString>
</gmd:applicationProfile>
<gmd:name>
<gco:CharacterString>ScienceBase Item Summary Page</gco:CharacterString>
</gmd:name>
<gmd:description>
<gco:CharacterString>Link to the ScienceBase Item Summary page for the item described by this metadata record</gco:CharacterString>
</gmd:description>
<gmd:function>
<gmd:CI_OnLineFunctionCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="information">information</gmd:CI_OnLineFunctionCode>
</gmd:function>
</gmd:CI_OnlineResource>
</gmd:onLine>
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://pubs.er.usgs.gov/publication/1016152</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>
</gmd:protocol>
<gmd:applicationProfile>
<gco:CharacterString>Web Browser</gco:CharacterString>
</gmd:applicationProfile>
<gmd:name>
<gco:CharacterString>Web Site</gco:CharacterString>
</gmd:name>
<gmd:description>
<gco:CharacterString>ScienceBase WebLink</gco:CharacterString>
</gmd:description>
<gmd:function>
<gmd:CI_OnLineFunctionCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="information">information</gmd:CI_OnLineFunctionCode>
</gmd:function>
</gmd:CI_OnlineResource>
</gmd:onLine>
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>https://www.sciencebase.gov/catalog/file/get/4f4e4a4ee4b07f02db62839b</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>
</gmd:protocol>
<gmd:applicationProfile>
<gco:CharacterString>Web Browser</gco:CharacterString>
</gmd:applicationProfile>
<gmd:name>
<gco:CharacterString>Download Attached Files</gco:CharacterString>
</gmd:name>
<gmd:description>
<gco:CharacterString>Download Link</gco:CharacterString>
</gmd:description>
<gmd:function>
<gmd:CI_OnLineFunctionCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="information">information</gmd:CI_OnLineFunctionCode>
</gmd:function>
</gmd:CI_OnlineResource>
</gmd:onLine>
</gmd:MD_DigitalTransferOptions>
</gmd:transferOptions>
</gmd:MD_Distribution>
</gmd:distributionInfo>
<gmd:metadataConstraints>
<gmd:MD_Constraints>
<gmd:useLimitation>
<gco:CharacterString>none</gco:CharacterString>
</gmd:useLimitation>
</gmd:MD_Constraints>
</gmd:metadataConstraints>
</gmd:MD_Metadata>


text:
![](http://f.cl.ly/items/0W2i0E151s0B3S3x3E3W/ogp_.jpg)

iOS8-Sampler
============

Code examples for the new functions of iOS 8.

##How to build

JUST BUILD basically, however please note below:

###Schemes

- Use "iOS8Sampler" Scheme for DEVICES.
- Use "iOS8SamplerSimulator" Scheme for SIMULATORS

This is because Metal can't be compiled for Simulators. When you have build error, try to delete the Derived Data:

`/Users/shuichi/Library/Developer/Xcode/DerivedData/iOS8Sampler-{xxxxxxxxxx}`

###Provisioning Profile

When try the HealthKit or HomeKit examples, you have to use a provisioning profile for which HealthKit or HomeKit are enabled.

##Contents

###Audio Effects

Distortion and Delay effect for audio using AVAudioEngine.

###New Image Filters

New filters of CIFilter such as CIGrassDistortion, CIDivideBlendMode, etc...

###Custom Filters

Custom CIFilter examples using CIKernel.

###Metal Basic

Render a set of cubes using Metal. Based on Apple's "MetalBasic3D" sample.

###Metal Uniform Streaming

Demo using a data buffer to set uniforms for the vertex and fragment shaders.

###SceneKit

Render a 2D image on 3D scene using SceneKit framework.

###HealthKit

Fetch all types of data which are available in HealthKit. Need to use a provisioning profile for which HealthKit is enabled.

###TouchID

Invoke Touch ID verification using LocalAuthentication.

###Visual Effects

Example for UIBlurEffect and UIVibrancyEffect.

###Ruby Annotation

Display the pronunciation of characters using CTRubyAnnotationRef.

###WebKit

Browsing example using WKWebView.

###UIAlertController

Show Alert or ActionSheet using UIAlertController.

###User Notification

Schedule a local notification which has custom actions using UIUserNotificationSettings.

###Altimeter

Get relative altitude using CMAltimeter. It works only on devices which have M8 motion co-processor.

###Pedometer

Counting steps demo using CMPedometer. It works only on devices which have M7 or M8 motion co-processor.

###AVKit

Media playback demo using AVKit framework.

###Histogram

Generate a histogram from an image using the filters CIAreaHistogram and CIHistogramDisplayFilter.

###Code Generator

Generate Aztec Code and 128 Barcode.

###New Fonts

Gallery of new fonts.

###Popover

Example of UIPopoverPresentationController.

###Accordion Fold Transition

Transitions from one image to another by folding like accordion. However it doesn't work correctly...**PULL REQUESTS welcome**!!

##Author

Shuichi Tsutsumi

- [Twitter](https://twitter.com/shu223)
- [Facebook](https://www.facebook.com/shuichi.tsutsumi)
- [LinkedIn](https://www.linkedin.com/profile/view?id=214896557)
- [Blog (Japanese)](http://d.hatena.ne.jp/shu223/)

##Special Thanks

Icons and LaunchImages are **designed by [Okazu](https://www.facebook.com/pashimo)**


text:
FathomTransitionController
================

A TransitionViewController for iOS 7 that uses a zoom and blur navigation schema.

## OVERVIEW

**FathomTransitionController** is a custom UITransitionController for use in iOS 7. This demo project offers several examples of how you can use to create simple navigational transitions using the perception of depth.

The transition is easy to tweak and offers a lot of variety.

Enjoy!

-AJ

## ACKNOWLEDGEMENTS

Many thanks go out to a the following for their code:
 - Ole Begemann...OBShapedButton ( https://github.com/ole/OBShapedButton )
     for UIImage+ColorAtPixel (nicely done, sir!)
 - Tope Abayomi...CustomTransition
     for your inspiring groundwork
 - Apple...UIImage+ImageEffects
     A nice extension class!


text:
'use strict';

$(document).ready(function() {
	initializePage();
});

function initializePage() {
	// For Countdown timer
	$("#doneClick").click(doneClick);
	// For Countup timer
	$("#doneClick2").click(doneClick2);
}
function doneClick(e)
{
	//e.preventDefault();
	// console.log("clicked");
	//Countdown timer
	ga('send', 'event', 'done', 'click');
}
function doneClick2(e)
{
	//e.preventDefault();
	// console.log("clicked");
	//Countup timer
	ga('send', 'event', 'done2', 'click');
}