text:
"""SCons.Tool

SCons tool selection.

This looks for modules that define a callable object that can modify
a construction environment as appropriate for a given tool (or tool
chain).

Note that because this subsystem just *selects* a callable that can
modify a construction environment, it's possible for people to define
their own "tool specification" in an arbitrary callable function.  No
one needs to use or tie in to this subsystem in order to roll their own
tool definition.
"""

#
# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

__revision__ = "src/engine/SCons/Tool/__init__.py  2014/09/27 12:51:43 garyo"

import imp
import sys
import re
import os
import shutil

import SCons.Builder
import SCons.Errors
import SCons.Node.FS
import SCons.Scanner
import SCons.Scanner.C
import SCons.Scanner.D
import SCons.Scanner.LaTeX
import SCons.Scanner.Prog

DefaultToolpath=[]

CScanner = SCons.Scanner.C.CScanner()
DScanner = SCons.Scanner.D.DScanner()
LaTeXScanner = SCons.Scanner.LaTeX.LaTeXScanner()
PDFLaTeXScanner = SCons.Scanner.LaTeX.PDFLaTeXScanner()
ProgramScanner = SCons.Scanner.Prog.ProgramScanner()
SourceFileScanner = SCons.Scanner.Base({}, name='SourceFileScanner')

CSuffixes = [".c", ".C", ".cxx", ".cpp", ".c++", ".cc",
             ".h", ".H", ".hxx", ".hpp", ".hh",
             ".F", ".fpp", ".FPP",
             ".m", ".mm",
             ".S", ".spp", ".SPP", ".sx"]

DSuffixes = ['.d']

IDLSuffixes = [".idl", ".IDL"]

LaTeXSuffixes = [".tex", ".ltx", ".latex"]

for suffix in CSuffixes:
    SourceFileScanner.add_scanner(suffix, CScanner)

for suffix in DSuffixes:
    SourceFileScanner.add_scanner(suffix, DScanner)

# FIXME: what should be done here? Two scanners scan the same extensions,
# but look for different files, e.g., "picture.eps" vs. "picture.pdf".
# The builders for DVI and PDF explicitly reference their scanners
# I think that means this is not needed???
for suffix in LaTeXSuffixes:
    SourceFileScanner.add_scanner(suffix, LaTeXScanner)
    SourceFileScanner.add_scanner(suffix, PDFLaTeXScanner)

class Tool(object):
    def __init__(self, name, toolpath=[], **kw):
        self.name = name
        self.toolpath = toolpath + DefaultToolpath
        # remember these so we can merge them into the call
        self.init_kw = kw

        module = self._tool_module()
        self.generate = module.generate
        self.exists = module.exists
        if hasattr(module, 'options'):
            self.options = module.options

    def _tool_module(self):
        # TODO: Interchange zipimport with normal initilization for better error reporting
        oldpythonpath = sys.path
        sys.path = self.toolpath + sys.path

        try:
            try:
                file, path, desc = imp.find_module(self.name, self.toolpath)
                try:
                    return imp.load_module(self.name, file, path, desc)
                finally:
                    if file:
                        file.close()
            except ImportError, e:
                if str(e)!="No module named %s"%self.name:
                    raise SCons.Errors.EnvironmentError(e)
                try:
                    import zipimport
                except ImportError:
                    pass
                else:
                    for aPath in self.toolpath:
                        try:
                            importer = zipimport.zipimporter(aPath)
                            return importer.load_module(self.name)
                        except ImportError, e:
                            pass
        finally:
            sys.path = oldpythonpath

        full_name = 'SCons.Tool.' + self.name
        try:
            return sys.modules[full_name]
        except KeyError:
            try:
                smpath = sys.modules['SCons.Tool'].__path__
                try:
                    file, path, desc = imp.find_module(self.name, smpath)
                    module = imp.load_module(full_name, file, path, desc)
                    setattr(SCons.Tool, self.name, module)
                    if file:
                        file.close()
                    return module
                except ImportError, e:
                    if str(e)!="No module named %s"%self.name:
                        raise SCons.Errors.EnvironmentError(e)
                    try:
                        import zipimport
                        importer = zipimport.zipimporter( sys.modules['SCons.Tool'].__path__[0] )
                        module = importer.load_module(full_name)
                        setattr(SCons.Tool, self.name, module)
                        return module
                    except ImportError, e:
                        m = "No tool named '%s': %s" % (self.name, e)
                        raise SCons.Errors.EnvironmentError(m)
            except ImportError, e:
                m = "No tool named '%s': %s" % (self.name, e)
                raise SCons.Errors.EnvironmentError(m)

    def __call__(self, env, *args, **kw):
        if self.init_kw is not None:
            # Merge call kws into init kws;
            # but don't bash self.init_kw.
            if kw is not None:
                call_kw = kw
                kw = self.init_kw.copy()
                kw.update(call_kw)
            else:
                kw = self.init_kw
        env.Append(TOOLS = [ self.name ])
        if hasattr(self, 'options'):
            import SCons.Variables
            if 'options' not in env:
                from SCons.Script import ARGUMENTS
                env['options']=SCons.Variables.Variables(args=ARGUMENTS)
            opts=env['options']

            self.options(opts)
            opts.Update(env)

        self.generate(env, *args, **kw)

    def __str__(self):
        return self.name

##########################################################################
#  Create common executable program / library / object builders

def createProgBuilder(env):
    """This is a utility function that creates the Program
    Builder in an Environment if it is not there already.

    If it is already there, we return the existing one.
    """

    try:
        program = env['BUILDERS']['Program']
    except KeyError:
        import SCons.Defaults
        program = SCons.Builder.Builder(action = SCons.Defaults.LinkAction,
                                        emitter = '$PROGEMITTER',
                                        prefix = '$PROGPREFIX',
                                        suffix = '$PROGSUFFIX',
                                        src_suffix = '$OBJSUFFIX',
                                        src_builder = 'Object',
                                        target_scanner = ProgramScanner)
        env['BUILDERS']['Program'] = program

    return program

def createStaticLibBuilder(env):
    """This is a utility function that creates the StaticLibrary
    Builder in an Environment if it is not there already.

    If it is already there, we return the existing one.
    """

    try:
        static_lib = env['BUILDERS']['StaticLibrary']
    except KeyError:
        action_list = [ SCons.Action.Action("$ARCOM", "$ARCOMSTR") ]
        if env.Detect('ranlib'):
            ranlib_action = SCons.Action.Action("$RANLIBCOM", "$RANLIBCOMSTR")
            action_list.append(ranlib_action)

        static_lib = SCons.Builder.Builder(action = action_list,
                                           emitter = '$LIBEMITTER',
                                           prefix = '$LIBPREFIX',
                                           suffix = '$LIBSUFFIX',
                                           src_suffix = '$OBJSUFFIX',
                                           src_builder = 'StaticObject')
        env['BUILDERS']['StaticLibrary'] = static_lib
        env['BUILDERS']['Library'] = static_lib

    return static_lib

def VersionShLibLinkNames(version, libname, env):
    """Generate names of symlinks to the versioned shared library"""
    Verbose = False
    platform = env.subst('$PLATFORM')
    shlib_suffix = env.subst('$SHLIBSUFFIX')
    shlink_flags = SCons.Util.CLVar(env.subst('$SHLINKFLAGS'))

    linknames = []
    if version.count(".") != 2:
        # We need a version string of the form x.y.z to proceed
        # Several changes need to be made to support versions like x.y
        raise ValueError

    if platform == 'darwin':
        # For libfoo.x.y.z.dylib, linknames libfoo.so
        suffix_re = re.escape('.' + version + shlib_suffix)
        linkname = re.sub(suffix_re, shlib_suffix, libname)
        if Verbose:
            print "VersionShLibLinkNames: linkname = ",linkname
        linknames.append(linkname)
    elif platform == 'posix':
        if sys.platform.startswith('openbsd'):
            # OpenBSD uses x.y shared library versioning numbering convention
            # and doesn't use symlinks to backwards-compatible libraries
            return []
        # For libfoo.so.x.y.z, linknames libfoo.so libfoo.so.x.y libfoo.so.x
        suffix_re = re.escape(shlib_suffix + '.' + version)
        # First linkname has no version number
        linkname = re.sub(suffix_re, shlib_suffix, libname)
        if Verbose:
            print "VersionShLibLinkNames: linkname = ",linkname
        linknames.append(linkname)
        versionparts = version.split('.')
        major_name = linkname + "." + versionparts[0]
        minor_name = major_name + "." + versionparts[1]
        #Only add link for major_name
        #for linkname in [major_name, minor_name]:
        for linkname in [major_name, ]:
            if Verbose:
                print "VersionShLibLinkNames: linkname ",linkname, ", target ",libname
            linknames.append(linkname)
    # note: no Windows case here (win32 or cygwin);
    # MSVC doesn't support this type of versioned shared libs.
    # (could probably do something for MinGW though)
    return linknames

def VersionedSharedLibrary(target = None, source= None, env=None):
    """Build a shared library. If the environment has SHLIBVERSION
defined make a versioned shared library and create the appropriate
symlinks for the platform we are on"""
    Verbose = False
    try:
        version = env.subst('$SHLIBVERSION')
    except KeyError:
        version = None

    # libname includes the version number if one was given
    libname = target[0].name
    platform = env.subst('$PLATFORM')
    shlib_suffix = env.subst('$SHLIBSUFFIX')
    shlink_flags = SCons.Util.CLVar(env.subst('$SHLINKFLAGS'))
    if Verbose:
        print "VersionShLib: libname      = ",libname
        print "VersionShLib: platform     = ",platform
        print "VersionShLib: shlib_suffix = ",shlib_suffix
        print "VersionShLib: target = ",str(target[0])

    if version:
        # set the shared library link flags
        if platform == 'posix':
            shlink_flags += [ '-Wl,-Bsymbolic' ]
            # OpenBSD doesn't usually use SONAME for libraries
            if not sys.platform.startswith('openbsd'):
                # continue setup of shlink flags for all other POSIX systems
                suffix_re = re.escape(shlib_suffix + '.' + version)
                (major, age, revision) = version.split(".")
                # soname will have only the major version number in it
                soname = re.sub(suffix_re, shlib_suffix, libname) + '.' + major
                shlink_flags += [ '-Wl,-soname=%s' % soname ]
                if Verbose:
                    print " soname ",soname,", shlink_flags ",shlink_flags
        elif platform == 'cygwin':
            shlink_flags += [ '-Wl,-Bsymbolic',
                              '-Wl,--out-implib,${TARGET.base}.a' ]
        elif platform == 'darwin':
            shlink_flags += [ '-current_version', '%s' % version,
                              '-compatibility_version', '%s' % version,
                              '-undefined', 'dynamic_lookup' ]
        if Verbose:
            print "VersionShLib: shlink_flags = ",shlink_flags
        envlink = env.Clone()
        envlink['SHLINKFLAGS'] = shlink_flags
    else:
        envlink = env

    result = SCons.Defaults.ShLinkAction(target, source, envlink)

    if version:
        # here we need the full pathname so the links end up in the right directory
        libname = target[0].path
        linknames = VersionShLibLinkNames(version, libname, env)
        if Verbose:
            print "VerShLib: linknames ",linknames
        # Here we just need the file name w/o path as the target of the link
        lib_ver = target[0].name
        # make symlink of adjacent names in linknames
        for count in range(len(linknames)):
            linkname = linknames[count]
            if count > 0:
                try:
                    os.remove(lastlinkname)
                except:
                    pass
                os.symlink(os.path.basename(linkname),lastlinkname)
                if Verbose:
                    print "VerShLib: made sym link of %s -> %s" % (lastlinkname,linkname)
            lastlinkname = linkname
        # finish chain of sym links with link to the actual library
        if len(linknames)>0:
            try:
                os.remove(lastlinkname)
            except:
                pass
            os.symlink(lib_ver,lastlinkname)
            if Verbose:
                print "VerShLib: made sym link of %s -> %s" % (linkname, lib_ver)
    return result

# Fix http://scons.tigris.org/issues/show_bug.cgi?id=2903 :
# Ensure we still depend on SCons.Defaults.ShLinkAction command line which is $SHLINKCOM.
# This was tricky because we don't want changing LIBPATH to cause a rebuild, but
# changing other link args should.  LIBPATH has $( ... $) around it but until this
# fix, when the varlist was added to the build sig those ignored parts weren't getting
# ignored.
ShLibAction = SCons.Action.Action(VersionedSharedLibrary, None, varlist=['SHLINKCOM'])

def createSharedLibBuilder(env):
    """This is a utility function that creates the SharedLibrary
    Builder in an Environment if it is not there already.

    If it is already there, we return the existing one.
    """

    try:
        shared_lib = env['BUILDERS']['SharedLibrary']
    except KeyError:
        import SCons.Defaults
        action_list = [ SCons.Defaults.SharedCheck,
                        ShLibAction ]
        shared_lib = SCons.Builder.Builder(action = action_list,
                                           emitter = "$SHLIBEMITTER",
                                           prefix = '$SHLIBPREFIX',
                                           suffix = '$SHLIBSUFFIX',
                                           target_scanner = ProgramScanner,
                                           src_suffix = '$SHOBJSUFFIX',
                                           src_builder = 'SharedObject')
        env['BUILDERS']['SharedLibrary'] = shared_lib

    return shared_lib

def createLoadableModuleBuilder(env):
    """This is a utility function that creates the LoadableModule
    Builder in an Environment if it is not there already.

    If it is already there, we return the existing one.
    """

    try:
        ld_module = env['BUILDERS']['LoadableModule']
    except KeyError:
        import SCons.Defaults
        action_list = [ SCons.Defaults.SharedCheck,
                        SCons.Defaults.LdModuleLinkAction ]
        ld_module = SCons.Builder.Builder(action = action_list,
                                          emitter = "$LDMODULEEMITTER",
                                          prefix = '$LDMODULEPREFIX',
                                          suffix = '$LDMODULESUFFIX',
                                          target_scanner = ProgramScanner,
                                          src_suffix = '$SHOBJSUFFIX',
                                          src_builder = 'SharedObject')
        env['BUILDERS']['LoadableModule'] = ld_module

    return ld_module

def createObjBuilders(env):
    """This is a utility function that creates the StaticObject
    and SharedObject Builders in an Environment if they
    are not there already.

    If they are there already, we return the existing ones.

    This is a separate function because soooo many Tools
    use this functionality.

    The return is a 2-tuple of (StaticObject, SharedObject)
    """

    try:
        static_obj = env['BUILDERS']['StaticObject']
    except KeyError:
        static_obj = SCons.Builder.Builder(action = {},
                                           emitter = {},
                                           prefix = '$OBJPREFIX',
                                           suffix = '$OBJSUFFIX',
                                           src_builder = ['CFile', 'CXXFile'],
                                           source_scanner = SourceFileScanner,
                                           single_source = 1)
        env['BUILDERS']['StaticObject'] = static_obj
        env['BUILDERS']['Object'] = static_obj

    try:
        shared_obj = env['BUILDERS']['SharedObject']
    except KeyError:
        shared_obj = SCons.Builder.Builder(action = {},
                                           emitter = {},
                                           prefix = '$SHOBJPREFIX',
                                           suffix = '$SHOBJSUFFIX',
                                           src_builder = ['CFile', 'CXXFile'],
                                           source_scanner = SourceFileScanner,
                                           single_source = 1)
        env['BUILDERS']['SharedObject'] = shared_obj

    return (static_obj, shared_obj)

def createCFileBuilders(env):
    """This is a utility function that creates the CFile/CXXFile
    Builders in an Environment if they
    are not there already.

    If they are there already, we return the existing ones.

    This is a separate function because soooo many Tools
    use this functionality.

    The return is a 2-tuple of (CFile, CXXFile)
    """

    try:
        c_file = env['BUILDERS']['CFile']
    except KeyError:
        c_file = SCons.Builder.Builder(action = {},
                                       emitter = {},
                                       suffix = {None:'$CFILESUFFIX'})
        env['BUILDERS']['CFile'] = c_file

        env.SetDefault(CFILESUFFIX = '.c')

    try:
        cxx_file = env['BUILDERS']['CXXFile']
    except KeyError:
        cxx_file = SCons.Builder.Builder(action = {},
                                         emitter = {},
                                         suffix = {None:'$CXXFILESUFFIX'})
        env['BUILDERS']['CXXFile'] = cxx_file
        env.SetDefault(CXXFILESUFFIX = '.cc')

    return (c_file, cxx_file)

##########################################################################
#  Create common Java builders

def CreateJarBuilder(env):
    try:
        java_jar = env['BUILDERS']['Jar']
    except KeyError:
        fs = SCons.Node.FS.get_default_fs()
        jar_com = SCons.Action.Action('$JARCOM', '$JARCOMSTR')
        java_jar = SCons.Builder.Builder(action = jar_com,
                                         suffix = '$JARSUFFIX',
                                         src_suffix = '$JAVACLASSSUFIX',
                                         src_builder = 'JavaClassFile',
                                         source_factory = fs.Entry)
        env['BUILDERS']['Jar'] = java_jar
    return java_jar

def CreateJavaHBuilder(env):
    try:
        java_javah = env['BUILDERS']['JavaH']
    except KeyError:
        fs = SCons.Node.FS.get_default_fs()
        java_javah_com = SCons.Action.Action('$JAVAHCOM', '$JAVAHCOMSTR')
        java_javah = SCons.Builder.Builder(action = java_javah_com,
                                           src_suffix = '$JAVACLASSSUFFIX',
                                           target_factory = fs.Entry,
                                           source_factory = fs.File,
                                           src_builder = 'JavaClassFile')
        env['BUILDERS']['JavaH'] = java_javah
    return java_javah

def CreateJavaClassFileBuilder(env):
    try:
        java_class_file = env['BUILDERS']['JavaClassFile']
    except KeyError:
        fs = SCons.Node.FS.get_default_fs()
        javac_com = SCons.Action.Action('$JAVACCOM', '$JAVACCOMSTR')
        java_class_file = SCons.Builder.Builder(action = javac_com,
                                                emitter = {},
                                                #suffix = '$JAVACLASSSUFFIX',
                                                src_suffix = '$JAVASUFFIX',
                                                src_builder = ['JavaFile'],
                                                target_factory = fs.Entry,
                                                source_factory = fs.File)
        env['BUILDERS']['JavaClassFile'] = java_class_file
    return java_class_file

def CreateJavaClassDirBuilder(env):
    try:
        java_class_dir = env['BUILDERS']['JavaClassDir']
    except KeyError:
        fs = SCons.Node.FS.get_default_fs()
        javac_com = SCons.Action.Action('$JAVACCOM', '$JAVACCOMSTR')
        java_class_dir = SCons.Builder.Builder(action = javac_com,
                                               emitter = {},
                                               target_factory = fs.Dir,
                                               source_factory = fs.Dir)
        env['BUILDERS']['JavaClassDir'] = java_class_dir
    return java_class_dir

def CreateJavaFileBuilder(env):
    try:
        java_file = env['BUILDERS']['JavaFile']
    except KeyError:
        java_file = SCons.Builder.Builder(action = {},
                                          emitter = {},
                                          suffix = {None:'$JAVASUFFIX'})
        env['BUILDERS']['JavaFile'] = java_file
        env['JAVASUFFIX'] = '.java'
    return java_file

class ToolInitializerMethod(object):
    """
    This is added to a construction environment in place of a
    method(s) normally called for a Builder (env.Object, env.StaticObject,
    etc.).  When called, it has its associated ToolInitializer
    object search the specified list of tools and apply the first
    one that exists to the construction environment.  It then calls
    whatever builder was (presumably) added to the construction
    environment in place of this particular instance.
    """
    def __init__(self, name, initializer):
        """
        Note:  we store the tool name as __name__ so it can be used by
        the class that attaches this to a construction environment.
        """
        self.__name__ = name
        self.initializer = initializer

    def get_builder(self, env):
        """
	Returns the appropriate real Builder for this method name
	after having the associated ToolInitializer object apply
	the appropriate Tool module.
        """
        builder = getattr(env, self.__name__)

        self.initializer.apply_tools(env)

        builder = getattr(env, self.__name__)
        if builder is self:
            # There was no Builder added, which means no valid Tool
            # for this name was found (or possibly there's a mismatch
            # between the name we were called by and the Builder name
            # added by the Tool module).
            return None

        self.initializer.remove_methods(env)

        return builder

    def __call__(self, env, *args, **kw):
        """
        """
        builder = self.get_builder(env)
        if builder is None:
            return [], []
        return builder(*args, **kw)

class ToolInitializer(object):
    """
    A class for delayed initialization of Tools modules.

    Instances of this class associate a list of Tool modules with
    a list of Builder method names that will be added by those Tool
    modules.  As part of instantiating this object for a particular
    construction environment, we also add the appropriate
    ToolInitializerMethod objects for the various Builder methods
    that we want to use to delay Tool searches until necessary.
    """
    def __init__(self, env, tools, names):
        if not SCons.Util.is_List(tools):
            tools = [tools]
        if not SCons.Util.is_List(names):
            names = [names]
        self.env = env
        self.tools = tools
        self.names = names
        self.methods = {}
        for name in names:
            method = ToolInitializerMethod(name, self)
            self.methods[name] = method
            env.AddMethod(method)

    def remove_methods(self, env):
        """
        Removes the methods that were added by the tool initialization
        so we no longer copy and re-bind them when the construction
        environment gets cloned.
        """
        for method in self.methods.values():
            env.RemoveMethod(method)

    def apply_tools(self, env):
        """
	Searches the list of associated Tool modules for one that
	exists, and applies that to the construction environment.
        """
        for t in self.tools:
            tool = SCons.Tool.Tool(t)
            if tool.exists(env):
                env.Tool(tool)
                return

	# If we fall through here, there was no tool module found.
	# This is where we can put an informative error message
	# about the inability to find the tool.   We'll start doing
	# this as we cut over more pre-defined Builder+Tools to use
	# the ToolInitializer class.

def Initializers(env):
    ToolInitializer(env, ['install'], ['_InternalInstall', '_InternalInstallAs', '_InternalInstallVersionedLib'])
    def Install(self, *args, **kw):
        return self._InternalInstall(*args, **kw)
    def InstallAs(self, *args, **kw):
        return self._InternalInstallAs(*args, **kw)
    def InstallVersionedLib(self, *args, **kw):
        return self._InternalInstallVersionedLib(*args, **kw)
    env.AddMethod(Install)
    env.AddMethod(InstallAs)
    env.AddMethod(InstallVersionedLib)

def FindTool(tools, env):
    for tool in tools:
        t = Tool(tool)
        if t.exists(env):
            return tool
    return None

def FindAllTools(tools, env):
    def ToolExists(tool, env=env):
        return Tool(tool).exists(env)
    return list(filter (ToolExists, tools))

def tool_list(platform, env):

    other_plat_tools=[]
    # XXX this logic about what tool to prefer on which platform
    #     should be moved into either the platform files or
    #     the tool files themselves.
    # The search orders here are described in the man page.  If you
    # change these search orders, update the man page as well.
    if str(platform) == 'win32':
        "prefer Microsoft tools on Windows"
        linkers = ['mslink', 'gnulink', 'ilink', 'linkloc', 'ilink32' ]
        c_compilers = ['msvc', 'mingw', 'gcc', 'intelc', 'icl', 'icc', 'cc', 'bcc32' ]
        cxx_compilers = ['msvc', 'intelc', 'icc', 'g++', 'c++', 'bcc32' ]
        assemblers = ['masm', 'nasm', 'gas', '386asm' ]
        fortran_compilers = ['gfortran', 'g77', 'ifl', 'cvf', 'f95', 'f90', 'fortran']
        ars = ['mslib', 'ar', 'tlib']
        other_plat_tools = ['msvs', 'midl']
    elif str(platform) == 'os2':
        "prefer IBM tools on OS/2"
        linkers = ['ilink', 'gnulink', ]#'mslink']
        c_compilers = ['icc', 'gcc',]# 'msvc', 'cc']
        cxx_compilers = ['icc', 'g++',]# 'msvc', 'c++']
        assemblers = ['nasm',]# 'masm', 'gas']
        fortran_compilers = ['ifl', 'g77']
        ars = ['ar',]# 'mslib']
    elif str(platform) == 'irix':
        "prefer MIPSPro on IRIX"
        linkers = ['sgilink', 'gnulink']
        c_compilers = ['sgicc', 'gcc', 'cc']
        cxx_compilers = ['sgic++', 'g++', 'c++']
        assemblers = ['as', 'gas']
        fortran_compilers = ['f95', 'f90', 'f77', 'g77', 'fortran']
        ars = ['sgiar']
    elif str(platform) == 'sunos':
        "prefer Forte tools on SunOS"
        linkers = ['sunlink', 'gnulink']
        c_compilers = ['suncc', 'gcc', 'cc']
        cxx_compilers = ['sunc++', 'g++', 'c++']
        assemblers = ['as', 'gas']
        fortran_compilers = ['sunf95', 'sunf90', 'sunf77', 'f95', 'f90', 'f77',
                             'gfortran', 'g77', 'fortran']
        ars = ['sunar']
    elif str(platform) == 'hpux':
        "prefer aCC tools on HP-UX"
        linkers = ['hplink', 'gnulink']
        c_compilers = ['hpcc', 'gcc', 'cc']
        cxx_compilers = ['hpc++', 'g++', 'c++']
        assemblers = ['as', 'gas']
        fortran_compilers = ['f95', 'f90', 'f77', 'g77', 'fortran']
        ars = ['ar']
    elif str(platform) == 'aix':
        "prefer AIX Visual Age tools on AIX"
        linkers = ['aixlink', 'gnulink']
        c_compilers = ['aixcc', 'gcc', 'cc']
        cxx_compilers = ['aixc++', 'g++', 'c++']
        assemblers = ['as', 'gas']
        fortran_compilers = ['f95', 'f90', 'aixf77', 'g77', 'fortran']
        ars = ['ar']
    elif str(platform) == 'darwin':
        "prefer GNU tools on Mac OS X, except for some linkers and IBM tools"
        linkers = ['applelink', 'gnulink']
        c_compilers = ['gcc', 'cc']
        cxx_compilers = ['g++', 'c++']
        assemblers = ['as']
        fortran_compilers = ['gfortran', 'f95', 'f90', 'g77']
        ars = ['ar']
    elif str(platform) == 'cygwin':
        "prefer GNU tools on Cygwin, except for a platform-specific linker"
        linkers = ['cyglink', 'mslink', 'ilink']
        c_compilers = ['gcc', 'msvc', 'intelc', 'icc', 'cc']
        cxx_compilers = ['g++', 'msvc', 'intelc', 'icc', 'c++']
        assemblers = ['gas', 'nasm', 'masm']
        fortran_compilers = ['gfortran', 'g77', 'ifort', 'ifl', 'f95', 'f90', 'f77']
        ars = ['ar', 'mslib']
    else:
        "prefer GNU tools on all other platforms"
        linkers = ['gnulink', 'mslink', 'ilink']
        c_compilers = ['gcc', 'msvc', 'intelc', 'icc', 'cc']
        cxx_compilers = ['g++', 'msvc', 'intelc', 'icc', 'c++']
        assemblers = ['gas', 'nasm', 'masm']
        fortran_compilers = ['gfortran', 'g77', 'ifort', 'ifl', 'f95', 'f90', 'f77']
        ars = ['ar', 'mslib']

    if not str(platform) == 'win32':
        other_plat_tools += ['m4', 'rpm']

    c_compiler = FindTool(c_compilers, env) or c_compilers[0]

    # XXX this logic about what tool provides what should somehow be
    #     moved into the tool files themselves.
    if c_compiler and c_compiler == 'mingw':
        # MinGW contains a linker, C compiler, C++ compiler,
        # Fortran compiler, archiver and assembler:
        cxx_compiler = None
        linker = None
        assembler = None
        fortran_compiler = None
        ar = None
    else:
        # Don't use g++ if the C compiler has built-in C++ support:
        if c_compiler in ('msvc', 'intelc', 'icc'):
            cxx_compiler = None
        else:
            cxx_compiler = FindTool(cxx_compilers, env) or cxx_compilers[0]
        linker = FindTool(linkers, env) or linkers[0]
        assembler = FindTool(assemblers, env) or assemblers[0]
        fortran_compiler = FindTool(fortran_compilers, env) or fortran_compilers[0]
        ar = FindTool(ars, env) or ars[0]

    preferred_d = env.get('PREFERRED_D_COMPILER', None)
    d_compilers = ['dmd', 'gdc', 'ldc']
    d_compiler = preferred_d or FindTool(d_compilers, env) or d_compilers[0]
    print "D compiler is %s" % d_compiler

    other_tools = FindAllTools(other_plat_tools + [
                               #TODO: merge 'install' into 'filesystem' and
                               # make 'filesystem' the default
                               'filesystem',
                               'wix', #'midl', 'msvs',
                               # Parser generators
                               'lex', 'yacc',
                               # Foreign function interface
                               'rpcgen', 'swig',
                               # Java
                               'jar', 'javac', 'javah', 'rmic',
                               # TeX
                               'dvipdf', 'dvips', 'gs',
                               'tex', 'latex', 'pdflatex', 'pdftex',
                               # Archivers
                               'tar', 'zip',
                               # SourceCode factories
                               'BitKeeper', 'CVS', 'Perforce',
                               'RCS', 'SCCS', # 'Subversion',
                               ], env)

    tools = ([linker, c_compiler, cxx_compiler,
              fortran_compiler, assembler, ar, d_compiler]
             + other_tools)

    return [x for x in tools if x]

# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
# End:
# vim: set expandtab tabstop=4 shiftwidth=4:


text:
@interface SessionModel : NSObject

@property (copy, nonatomic) NSString *plid;
@property (copy, nonatomic) NSString *authorid;
@property (copy, nonatomic) NSString *pmtype;
@property (copy, nonatomic) NSString *subject;
@property (copy, nonatomic) NSString *members;
//消息发出的时间
@property (copy, nonatomic) NSString *dateline;
@property (copy, nonatomic) NSString *pmid;
//消息内容
@property (copy, nonatomic) NSString *message;
@property (copy, nonatomic) NSString *touid;
@property (copy, nonatomic) NSString *author;
@property (copy, nonatomic) NSString *msgfromid;
//发消息的人的名字
@property (copy, nonatomic) NSString *msgfrom;
@property (copy, nonatomic) NSString *msgtoid;
@property (copy, nonatomic) NSString *msgtoid_avatar;
//发消息的人的头像
@property (copy, nonatomic) NSString *msgfromid_avatar;
//当前的登录用户ID
@property (copy, nonatomic) NSString *current_member_ID;

@end

redpajama_set_name: RedPajamaGithub


text:
import boto
from boto import handler
from boto.exception import InvalidAclError
from boto.gs.acl import ACL, CannedACLStrings
from boto.gs.acl import SupportedPermissions as GSPermissions
from boto.gs.key import Key as GSKey
from boto.s3.acl import Policy
from boto.s3.bucket import Bucket as S3Bucket
import xml.sax

class Bucket(S3Bucket):

    def __init__(self, connection=None, name=None, key_class=GSKey):
        super(Bucket, self).__init__(connection, name, key_class)

    def set_acl(self, acl_or_str, key_name='', headers=None, version_id=None):
        if isinstance(acl_or_str, Policy):
            raise InvalidAclError('Attempt to set S3 Policy on GS ACL')
        elif isinstance(acl_or_str, ACL):
            self.set_xml_acl(acl_or_str.to_xml(), key_name, headers=headers)
        else:
            self.set_canned_acl(acl_or_str, key_name, headers=headers)

    def get_acl(self, key_name='', headers=None, version_id=None):
        response = self.connection.make_request('GET', self.name, key_name,
                query_args='acl', headers=headers)
        body = response.read()
        if response.status == 200:
            acl = ACL(self)
            h = handler.XmlHandler(acl, self)
            xml.sax.parseString(body, h)
            return acl
        else:
            raise self.connection.provider.storage_response_error(
                response.status, response.reason, body)

    def set_canned_acl(self, acl_str, key_name='', headers=None,
                       version_id=None):
        assert acl_str in CannedACLStrings

        if headers:
            headers[self.connection.provider.acl_header] = acl_str
        else:
            headers={self.connection.provider.acl_header: acl_str}

        query_args='acl'
        if version_id:
            query_args += '&versionId=%s' % version_id
        response = self.connection.make_request('PUT', self.name, key_name,
                headers=headers, query_args=query_args)
        body = response.read()
        if response.status != 200:
            raise self.connection.provider.storage_response_error(
                response.status, response.reason, body)

    # Method with same signature as boto.s3.bucket.Bucket.add_email_grant(),
    # to allow polymorphic treatment at application layer.
    def add_email_grant(self, permission, email_address,
                        recursive=False, headers=None):
        """
        Convenience method that provides a quick way to add an email grant
        to a bucket. This method retrieves the current ACL, creates a new
        grant based on the parameters passed in, adds that grant to the ACL
        and then PUT's the new ACL back to GS.

        :type permission: string
        :param permission: The permission being granted. Should be one of:
                           (READ, WRITE, FULL_CONTROL).

        :type email_address: string
        :param email_address: The email address associated with the GS
                              account your are granting the permission to.

        :type recursive: boolean
        :param recursive: A boolean value to controls whether the call
                          will apply the grant to all keys within the bucket
                          or not.  The default value is False.  By passing a
                          True value, the call will iterate through all keys
                          in the bucket and apply the same grant to each key.
                          CAUTION: If you have a lot of keys, this could take
                          a long time!
        """
        if permission not in GSPermissions:
            raise self.connection.provider.storage_permissions_error(
                'Unknown Permission: %s' % permission)
        acl = self.get_acl(headers=headers)
        acl.add_email_grant(permission, email_address)
        self.set_acl(acl, headers=headers)
        if recursive:
            for key in self:
                key.add_email_grant(permission, email_address, headers=headers)

    # Method with same signature as boto.s3.bucket.Bucket.add_user_grant(),
    # to allow polymorphic treatment at application layer.
    def add_user_grant(self, permission, user_id, recursive=False, headers=None):
        """
        Convenience method that provides a quick way to add a canonical user grant to a bucket.
        This method retrieves the current ACL, creates a new grant based on the parameters
        passed in, adds that grant to the ACL and then PUTs the new ACL back to GS.

        :type permission: string
        :param permission:  The permission being granted.  Should be one of:
                            (READ|WRITE|FULL_CONTROL)

        :type user_id: string
        :param user_id:     The canonical user id associated with the GS account you are granting
                            the permission to.

        :type recursive: bool
        :param recursive: A boolean value to controls whether the call
                          will apply the grant to all keys within the bucket
                          or not.  The default value is False.  By passing a
                          True value, the call will iterate through all keys
                          in the bucket and apply the same grant to each key.
                          CAUTION: If you have a lot of keys, this could take
                          a long time!
        """
        if permission not in GSPermissions:
            raise self.connection.provider.storage_permissions_error(
                'Unknown Permission: %s' % permission)
        acl = self.get_acl(headers=headers)
        acl.add_user_grant(permission, user_id)
        self.set_acl(acl, headers=headers)
        if recursive:
            for key in self:
                key.add_user_grant(permission, user_id, headers=headers)

    def add_group_email_grant(self, permission, email_address, recursive=False,
                              headers=None):
        """
        Convenience method that provides a quick way to add an email group
        grant to a bucket. This method retrieves the current ACL, creates a new
        grant based on the parameters passed in, adds that grant to the ACL and
        then PUT's the new ACL back to GS.

        :type permission: string
        :param permission: The permission being granted. Should be one of:
            READ|WRITE|FULL_CONTROL
            See http://code.google.com/apis/storage/docs/developer-guide.html#authorization
            for more details on permissions.

        :type email_address: string
        :param email_address: The email address associated with the Google
            Group to which you are granting the permission.

        :type recursive: bool
        :param recursive: A boolean value to controls whether the call
                          will apply the grant to all keys within the bucket
                          or not.  The default value is False.  By passing a
                          True value, the call will iterate through all keys
                          in the bucket and apply the same grant to each key.
                          CAUTION: If you have a lot of keys, this could take
                          a long time!
        """
        if permission not in GSPermissions:
            raise self.connection.provider.storage_permissions_error(
                'Unknown Permission: %s' % permission)
        acl = self.get_acl(headers=headers)
        acl.add_group_email_grant(permission, email_address)
        self.set_acl(acl, headers=headers)
        if recursive:
            for key in self:
                key.add_group_email_grant(permission, email_address,
                                          headers=headers)

    # Method with same input signature as boto.s3.bucket.Bucket.list_grants()
    # (but returning different object type), to allow polymorphic treatment
    # at application layer.
    def list_grants(self, headers=None):
        acl = self.get_acl(headers=headers)
        return acl.entries


text:
'use strict';
var Promise = require('lie');
function binaryAjax(url) {
  return new Promise(function(resolve, reject) {
    var ajax = new XMLHttpRequest();
    ajax.open('GET', url, true);
    ajax.responseType = 'arraybuffer';
    ajax.addEventListener('load', function() {
      if (ajax.status > 399) {
        return reject(ajax.status);
      }
      resolve(ajax.response);
    }, false);
    ajax.send();
  });
}
module.exports = binaryAjax;


text:
require 'chefspec'
require 'chefspec/policyfile'

require_relative '../libraries/chef_ingredient_provider'

RSpec.configure do |config|
  config.color = true
  config.formatter = 'doc'
  config.log_level = :error

  config.before(:each) do
    artifact_info = instance_double('artifact info',
      url: 'http://packages.chef.io',
      sha256: 'f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b')
    installer = instance_double('installer', artifact_info: artifact_info)
    allow_any_instance_of(Chef::Provider::ChefIngredient).to receive(:installer).and_return(installer)
  end
end

at_exit { ChefSpec::Coverage.report! }


text:
{{ provider_id|title }}

<form action="{% url 'notifications_edit' provider_id=provider_id notification_id=notification_id %}" method='post'>

    {% for field in form %}

       {{ field.label_tag }}
       {{ field }}
       {{ field.errors }}

    {% endfor %}

        {% if provider_data %}
            <input type="submit" class='button blue' value="Test" name="test">
        {% endif %}
        {% csrf_token %}
        <input type="submit" class='button' value='Save' />

</form>


text:
layout: default
---

          {% for post in paginator.posts %}

{{ post.title }}

Posted on {{ post.date | date_to_string }} in {{ post.categories }}

            {{ post.excerpt }}

          {% endfor %}

  {% if paginator.previous_page %}

  {% else %}

  {% endif %}

Page: {{ paginator.page }} of {{ paginator.total_pages }}

  {% if paginator.next_page %}

  {% else %}

  {% endif %}

Categories

            {% include categories.html %}

Featured

Pork drumstick turkey fugiat. Tri-tip elit turducken pork chop in. Swine short ribs meatball irure bacon nulla pork belly cupidatat meatloaf cow.

            Read More →

      {% include page-background.html %}


text:
package com.reactnativenavigation.viewcontrollers;

import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;

import com.reactnativenavigation.parse.Options;
import com.reactnativenavigation.parse.params.Bool;
import com.reactnativenavigation.presentation.Presenter;
import com.reactnativenavigation.utils.CollectionUtils;
import com.reactnativenavigation.views.Component;

import java.util.Collection;

import androidx.annotation.CallSuper;
import androidx.annotation.CheckResult;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.viewpager.widget.ViewPager;

import static com.reactnativenavigation.utils.CollectionUtils.*;
import static com.reactnativenavigation.utils.ObjectUtils.perform;

public abstract class ParentController<T extends ViewGroup> extends ChildController<T> {

    public ParentController(Activity activity, ChildControllersRegistry childRegistry, String id, Presenter presenter, Options initialOptions) {
		super(activity, childRegistry, id, presenter, initialOptions);
	}

    @Override
    public void setWaitForRender(Bool waitForRender) {
        super.setWaitForRender(waitForRender);
        applyOnController(getCurrentChild(), currentChild -> currentChild.setWaitForRender(waitForRender));
    }

    @Override
    public void setDefaultOptions(Options defaultOptions) {
	    super.setDefaultOptions(defaultOptions);
	    forEach(getChildControllers(), child -> child.setDefaultOptions(defaultOptions));
    }

    @Override
    @CheckResult
    public Options resolveCurrentOptions() {
	    if (CollectionUtils.isNullOrEmpty(getChildControllers())) return initialOptions;
        return getCurrentChild()
                .resolveCurrentOptions()
                .copy()
                .withDefaultOptions(initialOptions);
    }

    public Options resolveChildOptions(ViewController child) {
	    if (child == this) return resolveCurrentOptions();
        return child
                .resolveCurrentOptions()
                .copy()
                .withDefaultOptions(initialOptions);
    }

    @Override
    @CheckResult
    public Options resolveCurrentOptions(Options defaultOptions) {
        return resolveCurrentOptions().withDefaultOptions(defaultOptions);
    }

    public boolean isCurrentChild(ViewController child) {
        return getCurrentChild() == child;
    }

    protected abstract ViewController getCurrentChild();

	@NonNull
	@Override
	protected abstract T createView();

    @NonNull
	public abstract Collection<? extends ViewController> getChildControllers();

	@Nullable
	@Override
	public ViewController findController(final String id) {
		ViewController fromSuper = super.findController(id);
		if (fromSuper != null) return fromSuper;

		for (ViewController child : getChildControllers()) {
			ViewController fromChild = child.findController(id);
			if (fromChild != null) return fromChild;
		}

		return null;
	}

    @Nullable
    @Override
    public ViewController findController(View child) {
        ViewController fromSuper = super.findController(child);
        if (fromSuper != null) return fromSuper;

        for (ViewController childController : getChildControllers()) {
            ViewController fromChild = childController.findController(child);
            if (fromChild != null) return fromChild;
        }

        return null;
    }

    @Override
    public boolean containsComponent(Component component) {
        if (super.containsComponent(component)) {
            return true;
        }
        for (ViewController child : getChildControllers()) {
            if (child.containsComponent(component)) return true;
        }
        return false;
    }

    @CallSuper
    public void applyChildOptions(Options options, ViewController child) {
        this.options = initialOptions.mergeWith(options);
    }

    @CallSuper
    public void mergeChildOptions(Options options, ViewController child) {
    }

	@Override
	public void destroy() {
		super.destroy();
		forEach(getChildControllers(), ViewController::destroy);
	}

	@SuppressWarnings("WeakerAccess")
    @CallSuper
    protected void clearOptions() {
	    performOnParentController(ParentController::clearOptions);
        options = initialOptions.copy().clearOneTimeOptions();
    }

    public void setupTopTabsWithViewPager(ViewPager viewPager) {

    }

    public void clearTopTabs() {

    }

    @Override
    public boolean isRendered() {
        return getCurrentChild() != null && getCurrentChild().isRendered();
    }

    public void onChildDestroyed(ViewController child) {

    }

    @Override
    public void applyTopInset() {
	    forEach(getChildControllers(), ViewController::applyTopInset);
    }

    public int getTopInset(ViewController child) {
        return perform(getParentController(), 0, p -> p.getTopInset(child));
    }

    @Override
    public void applyBottomInset() {
        forEach(getChildControllers(), ViewController::applyBottomInset);
    }

    public int getBottomInset(ViewController child) {
        return perform(getParentController(), 0, p -> p.getBottomInset(child));
    }

    @Override
    public String getCurrentComponentName() {
	    return getCurrentChild().getCurrentComponentName();
    }
}


text: sudo docker build -t nherbaut/storage-base .


text:
import React, { Component } from 'react';
import { Route } from 'react-router-dom';
import { connect } from 'react-redux';

import { getEvent } from '../../actions/event.action';
import Arena from './Arena';
import Participate from './Participate';

class DataLoader extends Component {
  componentDidMount() {
    this.props.getEvent(this.props.eventName);
  }
  render() {
    return null;
  }
}

class Event extends Component {
  onParticipate = ({ success }) => {
    if (success) {
      const redirectUrl = `/events/${this.props.event.eventGet.data.name}/arena`;
      this.props.history.push(redirectUrl);
    }
    console.log('success', success);
  };
  renderRules(rules) {
    if (!rules) {
      return null;
    }
    return rules.map((rule, index) =>
{rule}
);
  }
  render() {
    const { match, getEvent, event } = this.props;
    return (

        <Route
          exact
          path={`${match.path}/:name`}
          render={({ match }) => (

 {match.params.name}

              <DataLoader eventName={match.params.name} getEvent={getEvent} />
              {this.renderRules(event.eventGet.data.rules)}
              <Participate eventId={event.eventGet.data._id} onParticipate={this.onParticipate} />

          )}
        />
        <Route path={`${match.path}/:name/arena`} render={() => <Arena />} />

    );
  }
}

const mapStateToProps = ({ event }) => ({ event });

export default connect(mapStateToProps, {
  getEvent
})(Event);


text:
using NUnit.Framework;
using Rivet.Operations;

namespace Rivet.Test.Operations
{
	[TestFixture]
	public sealed class AddDataTypeOperationTestFixture
	{

		private const string SchemaName = "schemaName";
		private const string Name = "name";
		private const string From = "uniqueidentifier";
		private const string AssemblyName = "assemblyName";
		private const string ClassName = "className";
		private const string DefaultConstraintName = "default constraint name";
		static Column column1 = Column.VarChar("name", new CharacterLength(50), null, Nullable.NotNull, "''", DefaultConstraintName, "varchar column");
		static readonly Identity Identity = new Identity();
		static Column column2 = Column.Int("int column", Identity, "test int column");
		static Column[] AsTable = { column1, column2 };
		string[] TableConstraint = { "constraint1", "constraint2" };

		[Test]
		public void ShouldSetPropertiesForAddDataTypeAlias()
		{
			var op = new AddDataTypeOperation(SchemaName, Name, From);

			Assert.AreEqual(SchemaName, op.SchemaName);
			Assert.AreEqual(Name, op.Name);
			Assert.AreEqual(From, op.From);
			Assert.That(op.ObjectName, Is.EqualTo(SchemaName + "." + Name));
		}

		[Test]
		public void ShouldSetPropertiesForAddDataTypeUserDefinedType()
		{
			var op = new AddDataTypeOperation(SchemaName, Name, AssemblyName, ClassName);

			Assert.AreEqual(SchemaName, op.SchemaName);
			Assert.AreEqual(Name, op.Name);
			Assert.AreEqual(AssemblyName, op.AssemblyName);
			Assert.AreEqual(ClassName, op.ClassName);
		}

		[Test]
		public void ShouldSetPropertiesForAddDataTypeUserDefinedTableType()
		{
			var op = new AddDataTypeOperation(SchemaName, Name, AsTable, TableConstraint);

			Assert.AreEqual(SchemaName, op.SchemaName);
			Assert.AreEqual(Name, op.Name);
			Assert.AreEqual(AsTable, op.AsTable);
			Assert.AreEqual(TableConstraint, op.TableConstraint);
		}

		[Test]
		public void ShouldWriteQueryForAddDataTypeAlias()
		{
			var op = new AddDataTypeOperation(SchemaName, Name, From);

			var expectedQuery = "create type [schemaName].[name] from uniqueidentifier";
			Assert.AreEqual(expectedQuery, op.ToQuery());
		}

		[Test]
		public void ShouldWriteQueryForAddDataTypeUserDefinedType()
		{
			var op = new AddDataTypeOperation(SchemaName, Name, AssemblyName, ClassName);

			var expectedQuery = "create type [schemaName].[name] external name assemblyName.[className]";
			Assert.AreEqual(expectedQuery, op.ToQuery());
		}

		[Test]
		public void ShouldWriteQueryForAddDataTypeUserDefinedTableType()
		{
			var op = new AddDataTypeOperation(SchemaName, Name, AsTable, TableConstraint);
			var expectedQuery =
				 "create type [schemaName].[name] as table (" +
				$"[name] varchar(50) not null constraint [{DefaultConstraintName}] default '', " +
				 "[int column] int identity not null constraint1, constraint2" +
				 ")";
			Assert.AreEqual(expectedQuery, op.ToQuery());
		}

		[Test]
		public void ShouldMergeIfDataTypeRemoved()
		{
			var op = new AddDataTypeOperation("schema", "name", "from");
			var removeDataTypeOp = new RemoveDataTypeOperation("SCHEMA", "NAME");
			op.Merge(removeDataTypeOp);
			Assert.That(op.Disabled, Is.True);
			Assert.That(removeDataTypeOp.Disabled, Is.True);
		}
	}

}


text:
package org.springframework.web.reactive.socket.server.upgrade;

import java.util.Map;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.websocket.server.ServerEndpointConfig;
import org.apache.tomcat.websocket.server.WsServerContainer;

/**
 * A WebSocket {@code RequestUpgradeStrategy} for Apache Tomcat. Compatible with Tomcat 10
 * and higher, in particular with Tomcat 10.0 (not based on Jakarta WebSocket 2.1 yet).
 *
 * @author Violeta Georgieva
 * @author Rossen Stoyanchev
 * @author Juergen Hoeller
 * @since 5.0
 * @see org.apache.tomcat.websocket.server.WsServerContainer#upgradeHttpToWebSocket
 */
public class TomcatRequestUpgradeStrategy extends StandardWebSocketUpgradeStrategy {

	@Override
	protected void upgradeHttpToWebSocket(HttpServletRequest request, HttpServletResponse response,
			ServerEndpointConfig endpointConfig, Map<String, String> pathParams) throws Exception {

		((WsServerContainer) getContainer(request)).upgradeHttpToWebSocket(
				request, response, endpointConfig, pathParams);
	}

}


text:
``` diff
 {
     namespace Microsoft.AspNetCore.Builder {
+        public static class CertificateForwardingBuilderExtensions {
+            public static IApplicationBuilder UseCertificateForwarding(this IApplicationBuilder app);
+        }
     }
     namespace Microsoft.AspNetCore.HttpOverrides {
+        public class CertificateForwardingMiddleware {
+            public CertificateForwardingMiddleware(RequestDelegate next, ILoggerFactory loggerFactory, IOptions<CertificateForwardingOptions> options);
+            public Task Invoke(HttpContext httpContext);
+        }
+        public class CertificateForwardingOptions {
+            public Func<string, X509Certificate2> HeaderConverter;
+            public CertificateForwardingOptions();
+            public string CertificateHeader { get; set; }
+        }
     }
-    namespace Microsoft.AspNetCore.HttpOverrides.Internal {
 {
-        public static class IPEndPointParser {
 {
-            public static bool TryParse(string addressWithPort, out IPEndPoint endpoint);

-        }
-    }
+    namespace Microsoft.Extensions.DependencyInjection {
+        public static class CertificateForwardingServiceExtensions {
+            public static IServiceCollection AddCertificateForwarding(this IServiceCollection services, Action<CertificateForwardingOptions> configure);
+        }
+    }
 }
```


text:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soap.api.controller.web.payjar.com/"
    xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <SOAP-ENV:Header>
        <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:UsernameToken wsu:Id="UsernameToken-9" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                <wsse:Username>{username}</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">{password}</wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <ns1:setTransaction>
            <Api>ONE_ZERO</Api>
            <Safekey>{safekey}</</Safekey>
            <TransactionType>PAYMENT</TransactionType>
            <AdditionalInformation>
                <merchantReference>{merchant_ref}</merchantReference>
                <cancelUrl>{cancel_url}</cancelUrl>
                <notificationUrl>{notification_url}</notificationUrl>
                <returnUrl>{return_url}</returnUrl>
                <supportedPaymentMethods>CREDITCARD</supportedPaymentMethods>
                <showBudget>false</showBudget>
            </AdditionalInformation>
            <Customer>
                <email>{customer_email}</email>
                <firstName>{customer_firstname}</firstName>
                <lastName>{customer_lastname}</lastName>
                <mobile>{customer_mobile}</mobile>
            </Customer>
            <Basket>
                <amountInCents>{basket_amount}</amountInCents>
                <currencyCode>{basket_currency_code}</currencyCode>
                <description>{basket_description}</description>
                <!--Zero or more repetitions:-->
                <productLineItem>
                    <amount>{product_lineitem_amount}</amount>
                    <costAmount>{product_lineitem_cost}</costAmount>
                    <description>{product_lineitem_description}</description>
                    <giftMessage>{product_lineitem_giftmessage}</giftMessage>
                    <productCode>{product_lineitem_productcode}</productCode>
                    <quantity>{product_lineitem_quantity}</quantity>
                    <recipientAddress1>{product_lineitem_address}</recipientAddress1>
                    <recipientCity>{product_lineitem_city}</recipientCity>
                    <recipientCountryCode>{product_lineitem_country_code}</recipientCountryCode>
                    <recipientPostalCode>{product_lineitem_postal_code}</recipientPostalCode>
                    <recipientFirstName>{product_lineitem_firstname}</recipientFirstName>
                    <recipientLastName>{product_lineitem_lastname}</recipientLastName>
                </productLineItem>
                <shippingDetails>
                    <shippingAddress1>{shipping_details_address}</shippingAddress1>
                    <shippingAddressCity>{shipping_details_city}</shippingAddressCity>
                    <shippingEmail>{shipping_details_email}</shippingEmail>
                    <shippingCountryCode>{shipping_details_country_code}</shippingCountryCode>
                    <shippingMethod>{shipping_details_method}</shippingMethod>
                    <shppingFirstName>{shipping_details_firstname}</shppingFirstName>
                    <shippingLastName>{shipping_details_lastname}</shippingLastName>
                    <shippingFax>{shipping_details_fax}</shippingFax>shippingFax>
                    <shippingPhone>{shipping_details_phone}</shippingPhone>shippingPhone>
                </shippingDetails>
            </Basket>
            <Fraud>
                <checkFraudOverride>{check_fraud_override}</checkFraudOverride>
                <merchantWebSite>{check_fraud_merchant_website}</merchantWebSite>
                <pcFingerPrint>{check_fraud_pc_fingerprint}</pcFingerPrint>
            </Fraud>
        </ns1:setTransaction>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


text:
package org.apache.zeppelin.spark;

import static org.junit.Assert.assertEquals;

import java.io.IOException;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Properties;

import org.apache.zeppelin.display.AngularObjectRegistry;
import org.apache.zeppelin.user.AuthenticationInfo;
import org.apache.zeppelin.display.GUI;
import org.apache.zeppelin.interpreter.*;
import org.apache.zeppelin.interpreter.InterpreterResult.Code;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;

public class DepInterpreterTest {

  @Rule
  public TemporaryFolder tmpDir = new TemporaryFolder();

  private DepInterpreter dep;
  private InterpreterContext context;

  private Properties getTestProperties() throws IOException {
    Properties p = new Properties();
    p.setProperty("zeppelin.dep.localrepo", tmpDir.newFolder().getAbsolutePath());
    p.setProperty("zeppelin.dep.additionalRemoteRepository", "spark-packages,http://dl.bintray.com/spark-packages/maven,false;");
    return p;
  }

  @Before
  public void setUp() throws Exception {
    Properties p = getTestProperties();

    dep = new DepInterpreter(p);
    dep.open();

    InterpreterGroup intpGroup = new InterpreterGroup();
    intpGroup.put("note", new LinkedList<Interpreter>());
    intpGroup.get("note").add(new SparkInterpreter(p));
    intpGroup.get("note").add(dep);
    dep.setInterpreterGroup(intpGroup);

    context = new InterpreterContext("note", "id", null, "title", "text", new AuthenticationInfo(),
        new HashMap<String, Object>(), new GUI(),
        new AngularObjectRegistry(intpGroup.getId(), null),
        null,
        new LinkedList<InterpreterContextRunner>(), null);
  }

  @After
  public void tearDown() throws Exception {
    dep.close();
  }

  @Test
  public void testDefault() {
    dep.getDependencyContext().reset();
    InterpreterResult ret = dep.interpret("z.load(\"org.apache.commons:commons-csv:1.1\")", context);
    assertEquals(Code.SUCCESS, ret.code());

    assertEquals(1, dep.getDependencyContext().getFiles().size());
    assertEquals(1, dep.getDependencyContext().getFilesDist().size());

    // Add a test for the spark-packages repo - default in additionalRemoteRepository
    ret = dep.interpret("z.load(\"amplab:spark-indexedrdd:0.3\")", context);
    assertEquals(Code.SUCCESS, ret.code());

    // Reset at the end of the test
    dep.getDependencyContext().reset();
  }
}


text:
package org.apache.jena.sparql.algebra;

import org.junit.runner.RunWith ;
import org.junit.runners.Suite ;

@RunWith(Suite.class)
@Suite.SuiteClasses( {
    // This package
    TestAlgebraTranslate.class
    , TestClassify.class
    , TestOpAsQuery.class
    , TestOpVars.class
    , TestPattern2Join.class
    , TestTransformQuads.class
    , TestVarFinder.class
    , TestTransformOpExt.class
})

public class TS_Algebra
{ }


text:
The Web Enquiry program for the Pool Doctors Genero Mobile demo application

This has been consolidated into https://github.com/FourjsGenero/pool_doctors_server
Please use the example there


text:
<?php

require_once 'client_test_setup.php';
require_once 'classes/client_test_lock_auth.php';

class ezcWebdavClientTestLockPluginSetup extends ezcWebdavClientTestSetup
{
    protected $testDataDir;

    protected $testSetId;

    protected $tokenReplacement = array();

    protected $tokenAssignement = array();

    public function performSetup( ezcWebdavClientTest $test, $testSetId )
    {
        $this->testSetId   = $testSetId;
        $this->testDataDir = dirname( __FILE__ ) . '/lock_plugin';

        $test->server = $this->getServer(
            new ezcWebdavBasicPathFactory( 'http://example.com' )
        );
        $test->server->pluginRegistry->registerPlugin(
            new ezcWebdavLockPluginConfiguration(
                new ezcWebdavLockPluginOptions(
                    array(
                        'lockTimeout'        => 604800,
                        'backendLockTimeout' => 2000000,
                    )
                )
            )
        );
        $test->server->auth = new ezcWebdavClientTestRfcLockAuth();
        $test->server->auth->credentials['foo'] = 'bar';

        $test->backend = $this->getBackend( $testSetId );

        $test->server->auth->tokenAssignement = $this->getTokenAssignement(
            $testSetId
        );
    }

    public function adjustRequest( array &$request )
    {
        parent::adjustRequest( $request );
        foreach ( $this->tokenReplacement as $from => $to )
        {
            if ( isset( $request['server']['HTTP_IF'] ) )
            {
                $request['server']['HTTP_IF'] = preg_replace(
                    '(' . preg_quote( $from ) . ')',
                    $to,
                    $request['server']['HTTP_IF']
                );
            }
            if ( isset( $request['server']['HTTP_LOCK_TOKEN'] ) )
            {
                $request['server']['HTTP_LOCK_TOKEN'] = preg_replace(
                    '(' . preg_quote( $from ) . ')',
                    $to,
                    $request['server']['HTTP_LOCK_TOKEN']
                );
            }
        }
    }

    public function adjustResponse( array &$realResponse, array &$expectedResponse )
    {
        parent::adjustResponse( $realResponse, $expectedResponse );
        if ( isset( $realResponse['headers']['Lock-Token'] ) && !isset( $expectedResponse['headers']['Lock-Token'] ) )
        {
            throw new RuntimeException( 'Real response had Lock-Token, expected not!' );
        }
        if ( !isset( $realResponse['headers']['Lock-Token'] ) && isset( $expectedResponse['headers']['Lock-Token'] ) )
        {
            throw new RuntimeException( 'Expected response had Lock-Token, real not!' );
        }

        if ( isset( $realResponse['headers']['Lock-Token'] ) )
        {
            $toReplace   = $expectedResponse['headers']['Lock-Token'];
            $replaceWith = $realResponse['headers']['Lock-Token'];

            $this->tokenReplacement[$toReplace]       = $replaceWith;
            $expectedResponse['headers']['Lock-Token'] = $realResponse['headers']['Lock-Token'];
        }

        foreach ( $this->tokenReplacement as $from => $to )
        {
            $expectedResponse['body'] = preg_replace(
                '(' . preg_quote( $from ) . ')',
                $to,
                $expectedResponse['body']
            );
        }

        // Unify last access dates
        $realResponse['body'] = preg_replace(
            '([0-9]{4}-[0-9]{2}-[0-9]{2}[0-9T:+]+)',
            '2008-11-09T22:14:18+00:00',
            $realResponse['body']
        );
        $expectedResponse['body'] = preg_replace(
            '([0-9]{4}-[0-9]{2}-[0-9]{2}[0-9T:+]+)',
            '2008-11-09T22:14:18+00:00',
            $expectedResponse['body']
        );
    }

    public function assertCustomAssertions( ezcWebdavClientTest $test )
    {
        $assertions = $this->getCustomAssertions( $this->testSetId );
        if ( $assertions !== null )
        {
            $refObj = new ReflectionObject( $assertions );
            foreach ( $refObj->getMethods() as $refMethod )
            {
                if ( $refMethod->isPublic() )
                {
                    $refMethod->invoke( $assertions, $test->backend );
                }
            }
        }
    }

    protected function getBackend( $testSetId )
    {
        return require $this->getDataFile( $testSetId, 'backend.php' );
    }

    protected function getTokenAssignement( $testSetId )
    {
        try
        {
            return require $this->getDataFile( $testSetId, 'tokens.php' );
        }
        catch ( RuntimeException $e )
        {
            return array();
        }
    }

    protected function getCustomAssertions( $testSetId )
    {
        try
        {
            return require $this->getDataFile( $testSetId, 'assertions.php' );
        }
        catch ( RuntimeException $e )
        {
            return null;
        }
    }

    protected function getDataFile( $testSetId, $suffix )
    {
        $glob = sprintf(
            '%s/%03s_*_%s',
            $this->testDataDir,
            $testSetId,
            $suffix
        );

        $potentialDataFiles = glob( $glob );

        if ( $potentialDataFiles === array() )
        {
            throw new RuntimeException(
                sprintf(
                    'No data file found with test ID %s and suffix "%s".',
                    $testSetId,
                    $suffix
                )
            );
        }

        return $potentialDataFiles[0];
    }
}

?>


text:
.class Lcom/samsung/android/support/sesl/core/app/SeslFragmentManagerImpl$AnimationListenerWrapper;
.super Ljava/lang/Object;
.source "SeslFragmentManager.java"

# interfaces
.implements Landroid/view/animation/Animation$AnimationListener;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/samsung/android/support/sesl/core/app/SeslFragmentManagerImpl;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0xa
    name = "AnimationListenerWrapper"
.end annotation

# instance fields
.field private final mWrapped:Landroid/view/animation/Animation$AnimationListener;

# direct methods
.method private constructor <init>(Landroid/view/animation/Animation$AnimationListener;)V
    .locals 0

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

    iput-object p1, p0, Lcom/samsung/android/support/sesl/core/app/SeslFragmentManagerImpl$AnimationListenerWrapper;->mWrapped:Landroid/view/animation/Animation$AnimationListener;

    return-void
.end method

.method synthetic constructor <init>(Landroid/view/animation/Animation$AnimationListener;Lcom/samsung/android/support/sesl/core/app/SeslFragmentManagerImpl$1;)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/samsung/android/support/sesl/core/app/SeslFragmentManagerImpl$AnimationListenerWrapper;-><init>(Landroid/view/animation/Animation$AnimationListener;)V

    return-void
.end method

# virtual methods
.method public onAnimationEnd(Landroid/view/animation/Animation;)V
    .locals 1
    .annotation build Landroid/support/annotation/CallSuper;
    .end annotation

    iget-object v0, p0, Lcom/samsung/android/support/sesl/core/app/SeslFragmentManagerImpl$AnimationListenerWrapper;->mWrapped:Landroid/view/animation/Animation$AnimationListener;

    if-nez v0, :cond_0

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/samsung/android/support/sesl/core/app/SeslFragmentManagerImpl$AnimationListenerWrapper;->mWrapped:Landroid/view/animation/Animation$AnimationListener;

    invoke-interface {v0, p1}, Landroid/view/animation/Animation$AnimationListener;->onAnimationEnd(Landroid/view/animation/Animation;)V

    goto :goto_0
.end method

.method public onAnimationRepeat(Landroid/view/animation/Animation;)V
    .locals 1
    .annotation build Landroid/support/annotation/CallSuper;
    .end annotation

    iget-object v0, p0, Lcom/samsung/android/support/sesl/core/app/SeslFragmentManagerImpl$AnimationListenerWrapper;->mWrapped:Landroid/view/animation/Animation$AnimationListener;

    if-nez v0, :cond_0

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/samsung/android/support/sesl/core/app/SeslFragmentManagerImpl$AnimationListenerWrapper;->mWrapped:Landroid/view/animation/Animation$AnimationListener;

    invoke-interface {v0, p1}, Landroid/view/animation/Animation$AnimationListener;->onAnimationRepeat(Landroid/view/animation/Animation;)V

    goto :goto_0
.end method

.method public onAnimationStart(Landroid/view/animation/Animation;)V
    .locals 1
    .annotation build Landroid/support/annotation/CallSuper;
    .end annotation

    iget-object v0, p0, Lcom/samsung/android/support/sesl/core/app/SeslFragmentManagerImpl$AnimationListenerWrapper;->mWrapped:Landroid/view/animation/Animation$AnimationListener;

    if-nez v0, :cond_0

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/samsung/android/support/sesl/core/app/SeslFragmentManagerImpl$AnimationListenerWrapper;->mWrapped:Landroid/view/animation/Animation$AnimationListener;

    invoke-interface {v0, p1}, Landroid/view/animation/Animation$AnimationListener;->onAnimationStart(Landroid/view/animation/Animation;)V

    goto :goto_0
.end method


text:
require 'test_helper'

class SessionsControllerTest < ActionDispatch::IntegrationTest
  setup do
    @userpwd = "testpassword"
    @user = User.find_or_create_by name: "michael"
    @user.password = @userpwd
    @user.save!
  end

  test "should get new" do
    get new_session_url
    assert_response :success
  end

  test "should login successfully" do
    post sessions_url, params: { name: @user.name, password: @userpwd }
    assert_redirected_to root_url
  end

  test "should not login successfully" do
    post sessions_url, params: { name: @user.name, password: "bad#{@userpwd}" }
    assert_response :success
  end

end


text:
@import GoogleMobileAds;

@interface ViewController : UIViewController<GADBannerViewDelegate,UITableViewDelegate, UIWebViewDelegate>{

    GADBannerView *bannerView_;

    IBOutlet UILabel *AppQuote;
    IBOutlet UIImageView *StatusBar;
    IBOutlet UIImageView *HeaderShadow;
    IBOutlet UIScrollView *HeaderContainer;
    IBOutlet UILabel *HeaderLabel;
    IBOutlet UITableView *MenuTable;
    IBOutlet UIScrollView *WebViewContainer;
    IBOutlet UIImageView *WebViewImageView;
    IBOutlet UIButton *MenuButton;
    IBOutlet UIButton *DetailsButton;

    IBOutlet UIWebView *WebView;
    IBOutlet UIToolbar *WebViewControls;
    IBOutlet UIActivityIndicatorView *ActivityIndicator;

    IBOutlet UIImageView *LogoImageView;
    IBOutlet UIImageView *BackgroundImageView;
    IBOutlet UIImageView *DarkImageView;
    BOOL MenuShow;
    NSArray *SettingsArray;
    NSArray *MenuArray;
    NSArray *AlertArray;

    NSMutableArray *ContentArray;
    NSString *AppNameString;
    NSString *AlertMessageString;

    int AlertSelected;
    int AdState;
    int MenuItems;
    BOOL PreiOS8;
    BOOL HomeShow;
    BOOL AdsEnabled;
    float r;
    float g;
    float b;
    float rShadow;
    float gShadow;
    float bShadow;
}

- (IBAction) MenuAction;
- (IBAction) DetailsAction;
- (void) PurchasedIAP1;
//- (void) PurchasedIAP2;

- (void) RefreshView;

@end


text:
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>OpenTK.GLControl</name>
    </assembly>
    <members>
        <member name="T:OpenTK.GLControl">

            Defines a UserControl with OpenGL rendering capabilities.

        </member>
        <member name="F:OpenTK.GLControl.components">

            Required designer variable.

        </member>
        <member name="M:OpenTK.GLControl.Dispose(System.Boolean)">

            Clean up any resources being used.

            <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        </member>
        <member name="M:OpenTK.GLControl.InitializeComponent">

            Required method for Designer support - do not modify
            the contents of this method with the code editor.

        </member>
        <member name="M:OpenTK.GLControl.#ctor">

            Constructs a new GLControl.

        </member>
        <member name="M:OpenTK.GLControl.#ctor(OpenTK.Graphics.GraphicsMode)">

            Constructs a new GLControl with the specified GraphicsMode.

            <param name="mode">The OpenTK.Graphics.GraphicsMode of the control.</param>
        </member>
        <member name="M:OpenTK.GLControl.#ctor(OpenTK.Graphics.GraphicsMode,System.Int32,System.Int32,OpenTK.Graphics.GraphicsContextFlags)">

            Constructs a new GLControl with the specified GraphicsMode.

            <param name="mode">The OpenTK.Graphics.GraphicsMode of the control.</param>
            <param name="major">The major version for the OpenGL GraphicsContext.</param>
            <param name="minor">The minor version for the OpenGL GraphicsContext.</param>
            <param name="flags">The GraphicsContextFlags for the OpenGL GraphicsContext.</param>
        </member>
        <member name="M:OpenTK.GLControl.OnHandleCreated(System.EventArgs)">
            Raises the HandleCreated event.
            <param name="e">Not used.</param>
        </member>
        <member name="M:OpenTK.GLControl.OnHandleDestroyed(System.EventArgs)">
            Raises the HandleDestroyed event.
            <param name="e">Not used.</param>
        </member>
        <member name="M:OpenTK.GLControl.OnPaint(System.Windows.Forms.PaintEventArgs)">

            Raises the System.Windows.Forms.Control.Paint event.

            <param name="e">A System.Windows.Forms.PaintEventArgs that contains the event data.</param>
        </member>
        <member name="M:OpenTK.GLControl.OnResize(System.EventArgs)">

            Raises the Resize event.
            Note: this method may be called before the OpenGL context is ready.
            Check that IsHandleCreated is true before using any OpenGL methods.

            <param name="e">A System.EventArgs that contains the event data.</param>
        </member>
        <member name="M:OpenTK.GLControl.OnParentChanged(System.EventArgs)">

            Raises the ParentChanged event.

            <param name="e">A System.EventArgs that contains the event data.</param>
        </member>
        <member name="M:OpenTK.GLControl.SwapBuffers">

            Swaps the front and back buffers, presenting the rendered scene to the screen.

        </member>
        <member name="M:OpenTK.GLControl.MakeCurrent">

            Makes the underlying this GLControl current in the calling thread.
            All OpenGL commands issued are hereafter interpreted by this GLControl.

        </member>
        <member name="M:OpenTK.GLControl.GrabScreenshot">
            Grabs a screenshot of the frontbuffer contents.
            <returns>A System.Drawing.Bitmap, containing the contents of the frontbuffer.</returns>
            <exception cref="T:OpenTK.Graphics.GraphicsContextException">
            Occurs when no OpenTK.Graphics.GraphicsContext is current in the calling thread.
            </exception>
        </member>
        <member name="P:OpenTK.GLControl.IsIdle">

            Gets a value indicating whether the current thread contains pending system messages.

        </member>
        <member name="P:OpenTK.GLControl.Context">

            Gets an interface to the underlying GraphicsContext used by this GLControl.

        </member>
        <member name="P:OpenTK.GLControl.AspectRatio">

            Gets the aspect ratio of this GLControl.

        </member>
        <member name="P:OpenTK.GLControl.VSync">

            Gets or sets a value indicating whether vsync is active for this GLControl.

        </member>
        <member name="P:OpenTK.GLControl.GraphicsMode">

            Gets the GraphicsMode of the GraphicsContext attached to this GLControl.

            <remarks>
            To change the GraphicsMode, you must destroy and recreate the GLControl.
            </remarks>
        </member>
        <member name="P:OpenTK.GLControl.WindowInfo">

            Gets the <see cref="T:OpenTK.Platform.IWindowInfo"/> for this instance.

        </member>
    </members>
</doc>


text:
package org.switchyard.quickstarts.camel.sap.binding;

import org.switchyard.quickstarts.camel.sap.binding.bean.FlightConnectionInfo;
import org.switchyard.quickstarts.camel.sap.binding.jaxb.BookFlightRequest;

public interface FlightConnectionInfoService {
    FlightConnectionInfo getFlightConnectionInfo(BookFlightRequest request);
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Interface net.sf.jasperreports.engine.export.JRHtmlExporterContext (JasperReports 5.6.0 API)</title>
<meta name="date" content="2014-05-27">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Interface
net.sf.jasperreports.engine.export.JRHtmlExporterContext

Packages that use JRHtmlExporterContext

Package
Description

net.sf.jasperreports.components.iconlabel

Contains classes for the built-in Icon Label component.

net.sf.jasperreports.components.map

Contains classes for the built-in Google Map component.

net.sf.jasperreports.components.sort

Contains classes for the built-in Sort component.

net.sf.jasperreports.engine.export

Provides utility classes for exporting reports to various popular formats such as
 PDF, HTML, RTF, CSV, Excel, DOCX, PPTX, ODT, ODS, XML, Text, etc.

Uses of JRHtmlExporterContext in net.sf.jasperreports.components.iconlabel

Methods in net.sf.jasperreports.components.iconlabel with parameters of type JRHtmlExporterContext

Modifier and Type
Method and Description

java.lang.String
IconLabelElementHtmlHandler.getHtmlFragment(JRHtmlExporterContext context,
               JRGenericPrintElement element)

Uses of JRHtmlExporterContext in net.sf.jasperreports.components.map

Methods in net.sf.jasperreports.components.map with parameters of type JRHtmlExporterContext

Modifier and Type
Method and Description

java.lang.String
MapElementHtmlHandler.getHtmlFragment(JRHtmlExporterContext context,
               JRGenericPrintElement element)

Uses of JRHtmlExporterContext in net.sf.jasperreports.components.sort

Methods in net.sf.jasperreports.components.sort with parameters of type JRHtmlExporterContext

Modifier and Type
Method and Description

java.lang.String
SortElementHtmlHandler.getHtmlFragment(JRHtmlExporterContext context,
               JRGenericPrintElement element)

Uses of JRHtmlExporterContext in net.sf.jasperreports.engine.export

Classes in net.sf.jasperreports.engine.export that implement JRHtmlExporterContext

Modifier and Type
Class and Description

protected class
HtmlExporter.ExporterContext

protected class
JRHtmlExporter.ExporterContext

Deprecated.

protected class
JRXhtmlExporter.ExporterContext

Deprecated.

Methods in net.sf.jasperreports.engine.export with parameters of type JRHtmlExporterContext

Modifier and Type
Method and Description

java.lang.String
GenericElementHtmlHandler.getHtmlFragment(JRHtmlExporterContext exporterContext,
               JRGenericPrintElement element)

Returns an HTML fragment that is to be inserted in the export output.

java.lang.String
FlashHtmlHandler.getHtmlFragment(JRHtmlExporterContext exporterContext,
               JRGenericPrintElement element)

Outputs an HTML fragment that embeds a Flash movie.

Constructors in net.sf.jasperreports.engine.export with parameters of type JRHtmlExporterContext

Constructor and Description

HtmlExporterHyperlinkProducerAdapter(JRHtmlExporterContext exporterContext)

Creates an adapter.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com


text:
@interface ViewController ()

@end

@implementation ViewController

- (IBAction)showButtonPressed:(id)sender {

    UIButton *showBtn = (UIButton *)sender;

    if ([GSStatusBar isVisible]) {
        [GSStatusBar hide];
        [showBtn setTitle:@"Show" forState:UIControlStateNormal];
        return;
    }

    [GSStatusBar show];
    [showBtn setTitle:@"Hide" forState:UIControlStateNormal];

    double delayInSeconds = 2.0;
    dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
    dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
        [GSStatusBar setMessage:@"Waiting..." animated:NO];
    });
}

- (IBAction)hideButtonPressed:(id)sender {
    [GSStatusBar hide];
}

@end


text:
<?php
defined('C5_EXECUTE') or die("Access Denied.");
class Concrete5_Model_FilePermissionAssignment extends PermissionAssignment {

	protected $permissionObjectToCheck;

	protected $inheritedPermissions = array(
		'view_file' => 'view_file_set_file',
		'view_file_in_file_manager' => 'search_file_set',
		'edit_file_properties' => 'edit_file_set_file_properties',
		'edit_file_contents' => 'edit_file_set_file_contents',
		'copy_file' => 'copy_file_set_files',
		'edit_file_permissions' => 'edit_file_set_permissions',
		'delete_file' => 'delete_file_set_files'
	);

	public function getPermissionAccessObject() {
		$db = Loader::db();
		if ($this->permissionObjectToCheck instanceof File) {
 			$r = $db->GetCol('select paID from FilePermissionAssignments where fID = ? and pkID = ?', array(
 			$this->permissionObject->getFileID(), $this->pk->getPermissionKeyID()
 			));
 		} else if (is_array($this->permissionObjectToCheck)) { // sets
			$sets = array();
			foreach($this->permissionObjectToCheck as $fs) {
				$sets[] = $fs->getFileSetID();
			}
			$inheritedPKID = $db->GetOne('select pkID from PermissionKeys where pkHandle = ?', array($this->inheritedPermissions[$this->pk->getPermissionKeyHandle()]));
			$r = $db->GetCol('select distinct paID from FileSetPermissionAssignments where fsID in (' . implode(',', $sets) . ') and pkID = ? ' . $filterString, array(
				$inheritedPKID
			));
		} else if ($this->permissionObjectToCheck instanceof FileSet && isset($this->inheritedPermissions[$this->pk->getPermissionKeyHandle()])) {
			$inheritedPKID = $db->GetOne('select pkID from PermissionKeys where pkHandle = ?', array($this->inheritedPermissions[$this->pk->getPermissionKeyHandle()]));
			$r = $db->GetCol('select distinct paID from FileSetPermissionAssignments where fsID = ? and pkID = ?', array(
				$this->permissionObjectToCheck->getFileSetID(), $inheritedPKID
			));
		} else {
			return false;
		}

		if (count($r) == 1) {
			$permID = $r[0];
		}
		if (count($r) > 1) {
			$permID = $r;
		}

		if (is_array($permID)) {
			foreach($permID as $paID) {
				$pa = PermissionAccess::getByID($paID, $this->pk);
				if (is_object($pa)) {
					$perms[] = $pa;
				}
			}
			return PermissionAccess::createByMerge($perms);
		} else {
			return PermissionAccess::getByID($permID, $this->pk);
		}
	}

	public function setPermissionObject(File $f) {
		$this->permissionObject = $f;

		if ($f->overrideFileSetPermissions()) {
			$this->permissionObjectToCheck = $f;
		} else {
			$sets = $f->getFileSets();
			$permsets = array();
			foreach($sets as $fs) {
				if ($fs->overrideGlobalPermissions()) {
					$permsets[] = $fs;
				}
			}
			if (count($permsets) > 0) {
				$this->permissionObjectToCheck = $permsets;
			} else {
				$fs = FileSet::getGlobal();
				$this->permissionObjectToCheck = $fs;
			}
		}
	}

	public function clearPermissionAssignment() {
		$db = Loader::db();
		$db->Execute('update FilePermissionAssignments set paID = 0 where pkID = ? and fID = ?', array($this->pk->getPermissionKeyID(), $this->permissionObject->getFileID()));
	}

	public function assignPermissionAccess(PermissionAccess $pa) {
		$db = Loader::db();
		$db->Replace('FilePermissionAssignments', array('fID' => $this->getPermissionObject()->getFileID(), 'paID' => $pa->getPermissionAccessID(), 'pkID' => $this->pk->getPermissionKeyID()), array('fID', 'pkID'), true);
		$pa->markAsInUse();
	}

	public function getPermissionKeyToolsURL($task = false) {
		return parent::getPermissionKeyToolsURL($task) . '&fID=' . $this->getPermissionObject()->getFileID();
	}

}


text:
package com.igormaznitsa.jjjvm.stubgen.jjjvmwrapper;

import com.igormaznitsa.jjjvm.stubgen.utils.SplashDialog;
import javax.swing.SwingUtilities;

public class main {

  public static final String APPLICATION = "MJVM Stub Generator";
  public static final String VERSION = "1.0.5";
  public static final String AUTHOR = "Igor Maznitsa (rrg4400@gmail.com)";

  public static final void main(String... _args) {
    SwingUtilities.invokeLater(new Runnable() {
      @Override
      public void run() {
        new SplashDialog("images/splash.jpg", 3000L);
        new MainForm();
      }
    });
  }
}


text:
SYNONYM

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

#### Published in
Enum. pl. (Kjbenhavn) 2: 383 (1803)

#### Original name
Boletus giganteus Schumach., 1803

### Remarks
null