text:
namespace xwalk {
namespace application {

namespace {

#if defined(OS_TIZEN)
bool ValidateImeCategory(const ApplicationData& application,
    std::string* error) {
  namespace keys = application_widget_keys;
  // if config contains tizen:ime tag, proper category should be specified
  if (application.GetManifestData(keys::kTizenImeKey)) {
    const CategoryInfoList* categories_list =
        static_cast<const CategoryInfoList*>(
            application.GetManifestData(keys::kTizenCategoryKey));

    if (categories_list) {
      const char imeCategory[] = "http://tizen.org/category/ime";
      for (const std::string& category : categories_list->categories) {
        if (category == imeCategory)
          return true;
      }
    }
    *error = "tizen:ime is specified but not proper category added";
    return false;
  }
  return true;
}
#endif

}  // namespace

ManifestHandler::~ManifestHandler() {
}

bool ManifestHandler::Validate(scoped_refptr<const ApplicationData> application,
                               std::string* error) const {
  return true;
}

bool ManifestHandler::AlwaysParseForType(Manifest::Type type) const {
  return false;
}

bool ManifestHandler::AlwaysValidateForType(Manifest::Type type) const {
  return false;
}

std::vector<std::string> ManifestHandler::PrerequisiteKeys() const {
  return std::vector<std::string>();
}

ManifestHandlerRegistry* ManifestHandlerRegistry::xpk_registry_ = NULL;
ManifestHandlerRegistry* ManifestHandlerRegistry::widget_registry_ = NULL;

ManifestHandlerRegistry::ManifestHandlerRegistry(
    const std::vector<ManifestHandler*>& handlers) {
  for (std::vector<ManifestHandler*>::const_iterator it = handlers.begin();
       it != handlers.end(); ++it) {
    Register(*it);
  }

  ReorderHandlersGivenDependencies();
}

ManifestHandlerRegistry::~ManifestHandlerRegistry() {
}

ManifestHandlerRegistry*
ManifestHandlerRegistry::GetInstance(Manifest::Type type) {
  if (type == Manifest::TYPE_WIDGET)
    return GetInstanceForWGT();
  return GetInstanceForXPK();
}

ManifestHandlerRegistry*
ManifestHandlerRegistry::GetInstanceForWGT() {
  if (widget_registry_)
    return widget_registry_;

  std::vector<ManifestHandler*> handlers;
  // We can put WGT specific manifest handlers here.
  handlers.push_back(new WidgetHandler);
  handlers.push_back(new WARPHandler);
#if defined(OS_TIZEN)
  handlers.push_back(new CSPHandler(Manifest::TYPE_WIDGET));
  handlers.push_back(new TizenAppControlHandler);
  handlers.push_back(new TizenApplicationHandler);
  handlers.push_back(new TizenAppWidgetHandler);
  handlers.push_back(new TizenCategoryHandler);
  handlers.push_back(new TizenImeHandler);
  handlers.push_back(new TizenMetaDataHandler);
  handlers.push_back(new TizenNavigationHandler);
  handlers.push_back(new TizenSettingHandler);
  handlers.push_back(new TizenSplashScreenHandler);
#endif
  widget_registry_ = new ManifestHandlerRegistry(handlers);
  return widget_registry_;
}

ManifestHandlerRegistry*
ManifestHandlerRegistry::GetInstanceForXPK() {
  if (xpk_registry_)
    return xpk_registry_;

  std::vector<ManifestHandler*> handlers;
  // FIXME: Add manifest handlers here like this:
  // handlers.push_back(new xxxHandler);
  handlers.push_back(new CSPHandler(Manifest::TYPE_MANIFEST));
  handlers.push_back(new PermissionsHandler);
  xpk_registry_ = new ManifestHandlerRegistry(handlers);
  return xpk_registry_;
}

void ManifestHandlerRegistry::Register(ManifestHandler* handler) {
  const std::vector<std::string>& keys = handler->Keys();
  for (size_t i = 0; i < keys.size(); ++i) {
    handlers_[keys[i]] = handler;
  }
}

bool ManifestHandlerRegistry::ParseAppManifest(
    scoped_refptr<ApplicationData> application, base::string16* error) {
  std::map<int, ManifestHandler*> handlers_by_order;
  for (ManifestHandlerMap::iterator iter = handlers_.begin();
       iter != handlers_.end(); ++iter) {
    ManifestHandler* handler = iter->second;
    if (application->GetManifest()->HasPath(iter->first) ||
        handler->AlwaysParseForType(application->manifest_type())) {
      handlers_by_order[order_map_[handler]] = handler;
    }
  }
  for (std::map<int, ManifestHandler*>::iterator iter =
           handlers_by_order.begin();
       iter != handlers_by_order.end(); ++iter) {
    if (!(iter->second)->Parse(application, error))
      return false;
  }
  return true;
}

bool ManifestHandlerRegistry::ValidateAppManifest(
    scoped_refptr<const ApplicationData> application,
    std::string* error) {
  for (ManifestHandlerMap::iterator iter = handlers_.begin();
       iter != handlers_.end(); ++iter) {
    ManifestHandler* handler = iter->second;
    if ((application->GetManifest()->HasPath(iter->first) ||
         handler->AlwaysValidateForType(application->manifest_type())) &&
        !handler->Validate(application, error))
      return false;
  }

#if defined(OS_TIZEN)
  if (!ValidateImeCategory(*application, error))
    return false;
#endif

  return true;
}

// static
void ManifestHandlerRegistry::SetInstanceForTesting(
    ManifestHandlerRegistry* registry, Manifest::Type type) {
  if (type == Manifest::TYPE_WIDGET) {
    widget_registry_ = registry;
    return;
  }

  xpk_registry_ = registry;
}

void ManifestHandlerRegistry::ReorderHandlersGivenDependencies() {
  std::set<ManifestHandler*> unsorted_handlers;
  for (ManifestHandlerMap::const_iterator iter = handlers_.begin();
       iter != handlers_.end(); ++iter) {
    unsorted_handlers.insert(iter->second);
  }

  int order = 0;
  while (true) {
    std::set<ManifestHandler*> next_unsorted_handlers;
    for (std::set<ManifestHandler*>::const_iterator iter =
             unsorted_handlers.begin();
         iter != unsorted_handlers.end(); ++iter) {
      ManifestHandler* handler = *iter;
      const std::vector<std::string>& prerequisites =
          handler->PrerequisiteKeys();
      size_t unsatisfied = prerequisites.size();
      for (size_t i = 0; i < prerequisites.size(); ++i) {
        ManifestHandlerMap::const_iterator prereq_iter =
            handlers_.find(prerequisites[i]);
        CHECK(prereq_iter != handlers_.end())
            << "Application manifest handler depends on unrecognized key "
            << prerequisites[i];
        // Prerequisite is in our map.
        if (ContainsKey(order_map_, prereq_iter->second))
          unsatisfied--;
      }
      if (unsatisfied == 0) {
        order_map_[handler] = order;
        order++;
      } else {
        // Put in the list for next time.
        next_unsorted_handlers.insert(handler);
      }
    }
    if (next_unsorted_handlers.size() == unsorted_handlers.size())
      break;
    unsorted_handlers.swap(next_unsorted_handlers);
  }

  // If there are any leftover unsorted handlers, they must have had
  // circular dependencies.
  CHECK(unsorted_handlers.empty()) << "Application manifest handlers have "
                                   << "circular dependencies!";
}

}  // namespace application
}  // namespace xwalk


text:
require "nokogiri"
require "open-uri"

module IvySearch
  module HttpUtil
    def fetch_web_page(url)
      raise ArgumentError unless url

      begin
        Nokogiri::HTML.parse(open(url).read)
      rescue
        raise HttpError
      end
    end
  end

  class HttpError < RuntimeError; end
end

redpajama_set_name: RedPajamaGithub


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Cercospora heterophragmiae M.S. Patil

### Remarks
null


text:
package multiplicity3.commons.archiving;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;
import java.util.zip.ZipFile;
import java.util.zip.ZipOutputStream;

/**
 * The Class ZipDirectory.
 */
public class ZipDirectory
{

	/**
	 * Unzip directory.
	 *
	 * @param file
	 *            the file
	 * @param destinationDirectory
	 *            the destination directory
	 * @return true, if successful
	 * @throws ZipException
	 *             the zip exception
	 * @throws IOException
	 *             Signals that an I/O exception has occurred.
	 */
	public static boolean unzipDirectory(File file, File destinationDirectory) throws ZipException, IOException
	{
		ZipFile zipFile = new ZipFile(file);
		Enumeration<? extends ZipEntry> zipEntries = zipFile.entries();
		while (zipEntries.hasMoreElements())
		{
			ZipEntry entry = zipEntries.nextElement();
			unzipZipEntry(zipFile, destinationDirectory, entry);
		}
		return true;
	}

	/**
	 * Zip directory.
	 *
	 * @param directory
	 *            the directory
	 * @param zipFileDestination
	 *            the zip file destination
	 * @return true, if successful
	 * @throws IOException
	 *             Signals that an I/O exception has occurred.
	 */
	public static boolean zipDirectory(File directory, File zipFileDestination) throws IOException
	{
		if (!directory.exists())
		{
			return false;
		}

		ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFileDestination));
		String path = "";
		zipDir(directory, zos, path);
		zos.close();
		return true;
	}

	// private methods

	/**
	 * Adds the path component.
	 *
	 * @param path
	 *            the path
	 * @param component
	 *            the component
	 * @return the string
	 */
	private static String addPathComponent(String path, String component)
	{
		return path + "/" + component;
	}

	/**
	 * Ensure directory exists for file.
	 *
	 * @param fileToWrite
	 *            the file to write
	 */
	private static void ensureDirectoryExistsForFile(File fileToWrite)
	{
		File parentDirectory = fileToWrite.getParentFile();
		if (!parentDirectory.exists())
		{
			parentDirectory.mkdirs();
		}
	}

	/**
	 * Checks if is directory entry.
	 *
	 * @param entry
	 *            the entry
	 * @return true, if is directory entry
	 */
	private static boolean isDirectoryEntry(ZipEntry entry)
	{
		return entry.getName().endsWith("/");
	}

	/**
	 * Make entry name safe.
	 *
	 * @param unsafeEntryName
	 *            the unsafe entry name
	 * @return the string
	 */
	private static String makeEntryNameSafe(String unsafeEntryName)
	{
		if (unsafeEntryName.startsWith("/"))
		{
			return unsafeEntryName.substring(1);
		}
		String safeEntryName = unsafeEntryName;
		return safeEntryName;
	}

	/**
	 * Unzip zip entry.
	 *
	 * @param zipFile
	 *            the zip file
	 * @param destinationDirectory
	 *            the destination directory
	 * @param entry
	 *            the entry
	 * @throws IOException
	 *             Signals that an I/O exception has occurred.
	 */
	private static void unzipZipEntry(ZipFile zipFile, File destinationDirectory, ZipEntry entry) throws IOException
	{
		if (isDirectoryEntry(entry))
		{
			return;
		}

		String safeEntryName = makeEntryNameSafe(entry.getName());
		File fileToWrite = new File(destinationDirectory, safeEntryName);
		ensureDirectoryExistsForFile(fileToWrite);
		writeFileForEntry(zipFile, entry, fileToWrite);
	}

	/**
	 * Write file for entry.
	 *
	 * @param zipFile
	 *            the zip file
	 * @param entry
	 *            the entry
	 * @param destinationFile
	 *            the destination file
	 * @throws IOException
	 *             Signals that an I/O exception has occurred.
	 */
	private static void writeFileForEntry(ZipFile zipFile, ZipEntry entry, File destinationFile) throws IOException
	{
		FileOutputStream fileOutputStream = new FileOutputStream(destinationFile);
		InputStream fileDataInputStream = zipFile.getInputStream(entry);
		int bytesRead = 0;
		byte[] buffer = new byte[4 * 1024];
		while ((bytesRead = fileDataInputStream.read(buffer)) > 0)
		{
			fileOutputStream.write(buffer, 0, bytesRead);
		}
		fileDataInputStream.close();
		fileOutputStream.close();
	}

	/**
	 * Zip dir.
	 *
	 * @param directoryToZip
	 *            the directory to zip
	 * @param zipOutputStream
	 *            the zip output stream
	 * @param path
	 *            the path
	 * @throws IOException
	 *             Signals that an I/O exception has occurred.
	 */
	private static void zipDir(File directoryToZip, ZipOutputStream zipOutputStream, String path) throws IOException
	{
		String[] directoryContentsList = directoryToZip.list();

		for (String currentFileName : directoryContentsList)
		{
			File currentFile = new File(directoryToZip, currentFileName);
			String currentFileZipPath = addPathComponent(path, currentFile.getName());

			if (currentFile.isDirectory())
			{
				zipDir(currentFile, zipOutputStream, currentFileZipPath);
			}
			else
			{
				ZipEntry zipEntry = new ZipEntry(currentFileZipPath);
				zipFile(currentFile, zipOutputStream, zipEntry);
			}
		}
	}

	/**
	 * Zip file.
	 *
	 * @param fileToAdd
	 *            the file to add
	 * @param zipOutputStream
	 *            the zip output stream
	 * @param zipEntry
	 *            the zip entry
	 * @throws IOException
	 *             Signals that an I/O exception has occurred.
	 */
	private static void zipFile(File fileToAdd, ZipOutputStream zipOutputStream, ZipEntry zipEntry) throws IOException
	{
		FileInputStream fis = new FileInputStream(fileToAdd);
		try
		{
			byte[] readBuffer = new byte[4 * 1024];
			int bytesReadCount = 0;
			zipOutputStream.putNextEntry(zipEntry);
			bytesReadCount = fis.read(readBuffer);
			while (bytesReadCount != -1)
			{
				zipOutputStream.write(readBuffer, 0, bytesReadCount);
				bytesReadCount = fis.read(readBuffer);
			}
		}
		finally
		{
			fis.close();
		}
	}

}


text:
package org.openntf.domino.nsfdata.structs.cd;

import org.openntf.domino.nsfdata.structs.LSIG;
import org.openntf.domino.nsfdata.structs.SIG;

/**
 * This structure defines the image segment data of a JPEG or GIF image and follows a CDIMAGEHEADER structure. The number of segments in the
 * image is contained in the CDIMAGEHEADER and specifies the number of CDIMAGESEGMENT structures to follow. An image segment size is 10250
 * bytes. (editods.h)
 *
 * @since Lotus Notes/Domino 5.0
 *
 */
@SuppressWarnings("nls")
public class CDIMAGESEGMENT extends CDRecord {

	public final LSIG Header = inner(new LSIG());
	public final Unsigned16 DataSize = new Unsigned16();
	public final Unsigned16 SegSize = new Unsigned16();

	static {
		addVariableData("Data", "DataSize");
	}

	@Override
	public SIG getHeader() {
		return Header;
	}

	public byte[] getImageData() {
		return (byte[]) getVariableElement("Data");
	}
}


text:
# 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.

module Buildr #:nodoc:

  # The underlying compiler used by CompileTask.
  # To add a new compiler, extend Compiler::Base and add your compiler using:
  #   Buildr::Compiler.add MyCompiler
  module Compiler

    class << self

      # Returns true if the specified compiler exists.
      def has?(name)
        compilers.any? { |compiler| compiler.to_sym == name.to_sym }
      end

      # Select a compiler by its name.
      def select(name)
        compilers.detect { |compiler| compiler.to_sym == name.to_sym }
      end

      # Adds a compiler to the list of supported compiler.
      #
      # For example:
      #   Buildr::Compiler << Buildr::Javac
      def add(compiler)
        @compilers ||= []
        @compilers |= [compiler]
      end
      alias :<< :add

      # Returns a list of available compilers.
      def compilers
        @compilers ||= []
      end

      private

      # Only used by our specs.
      def compilers=(compilers)
        @compilers = compilers
      end
    end

    # Base class for all compilers, with common functionality.  Extend and over-ride as you see fit
    # (see Javac as an example).
    class Base #:nodoc:

      class << self

        # The compiler's identifier (e.g. :javac).  Inferred from the class name.
        def to_sym
          @symbol ||= name.split('::').last.downcase.to_sym
        end

        # The compiled language (e.g. :java).
        attr_reader :language
        # Source directories to use if none were specified (e.g. 'java').  Defaults to #language.
        attr_reader :sources
        # Extension for source files (e.g. 'java').  Defaults to language.
        attr_reader :source_ext
        # The target path (e.g. 'classes')
        attr_reader :target
        # Extension for target files (e.g. 'class').
        attr_reader :target_ext
        # The default packaging type (e.g. :jar).
        attr_reader :packaging

        # Returns true if this compiler applies to any source code found in the listed source
        # directories.  For example, Javac returns true if any of the source directories contains
        # a .java file.  The default implementation looks to see if there are any files in the
        # specified path with the extension #source_ext.
        def applies_to?(project, task)
          paths = task.sources + [sources].flatten.map { |src| Array(project.path_to(:source, task.usage, src.to_sym)) }
          paths.flatten!
          ext_glob = Array(source_ext).join(',')

          paths.each { |path|
            Find.find(path) {|found|
              if (!File.directory?(found)) && found.match(/.*\.#{Array(source_ext).join('|')}/)
                return true
              end
              } if File.exist? path
            }
          false
        end

        # Implementations can use this method to specify various compiler attributes.
        # For example:
        #   specify :language=>:java, :target=>'classes', :target_ext=>'class', :packaging=>:jar
        def specify(attrs)
          attrs[:sources] ||= attrs[:language].to_s
          attrs[:source_ext] ||= attrs[:language].to_s
          attrs.each { |name, value| instance_variable_set("@#{name}", value) }
        end

        # Returns additional dependencies required by this language.  For example, since the
        # test framework picks on these, you can use the JUnit framework with Scala.
        # Defaults to obtaining a list of artifact specifications from the REQUIRES constant.
        def dependencies
          []
        end

      end

      # Construct a new compiler with the specified options.  Note that options may
      # change before the compiler is run.
      def initialize(project, options)
        @project = project
        @options = options
      end

      # Options for this compiler.
      attr_reader :options

      # Determines if the compiler needs to run by checking if the target files exist,
      # and if any source files or dependencies are newer than corresponding target files.
      def needed?(sources, target, dependencies)
        map = compile_map(sources, target)
        return false if map.empty?
        return true unless File.exist?(target.to_s)
        source_files_not_yet_compiled = map.select { |source, target| !File.exist?(target) }.to_a
        trace "Compile needed because source file #{source_files_not_yet_compiled[0][0]} has no corresponding #{source_files_not_yet_compiled[0][1]}" unless source_files_not_yet_compiled.empty?
        return true if map.any? { |source, target| !File.exist?(target) || File.stat(source).mtime > File.stat(target).mtime }
        oldest = map.map { |source, target| File.stat(target).mtime }.min
        return dependencies.any? { |path| file(path).timestamp > oldest }
      end

      # Compile all files lists in sources (files and directories) into target using the
      # specified dependencies.
      def compile(sources, target, dependencies)
        raise 'Not implemented'
      end

      # Returns additional dependencies required by this language.  For example, since the
      # test framework picks on these, you can use the JUnit framework with Scala.
      def dependencies
        self.class.dependencies
      end

    protected

      # Use this to complain about CompileTask options not supported by this compiler.
      #
      # For example:
      #   def compile(files, task)
      #     check_options task, OPTIONS
      #     . . .
      #   end
      def check_options(options, *supported)
        unsupported = options.to_hash.keys - supported.flatten
        raise ArgumentError, "No such option: #{unsupported.join(' ')}" unless unsupported.empty?
      end

      # Expands a list of source directories/files into a list of files that have the #source_ext extension.
      def files_from_sources(sources)
        ext_glob = Array(self.class.source_ext).join(',')
        sources.flatten.map { |source| File.directory?(source) ? FileList["#{source}/**/*.{#{ext_glob}}"] : source }.
          flatten.reject { |file| File.directory?(file) }.map { |file| File.expand_path(file) }.uniq
      end

      # The compile map is a hash that associates source files with target files based
      # on a list of source directories and target directory.  The compile task uses this
      # to determine if there are source files to compile, and which source files to compile.
      # The default method maps all files in the source directories with #source_ext into
      # paths in the target directory with #target_ext (e.g. 'source/foo.java'=>'target/foo.class').
      def compile_map(sources, target)
        target_ext = self.class.target_ext
        ext_glob = Array(self.class.source_ext).join(',')
        sources.flatten.map{|f| File.expand_path(f)}.inject({}) do |map, source|
          if File.directory?(source)
            FileList["#{source}/**/*.{#{ext_glob}}"].reject { |file| File.directory?(file) }.
              each { |file| map[file] = File.join(target, Util.relative_path(file, source).ext(target_ext)) }
          else
            # try to extract package name from .java or .scala files
            if ['.java', '.scala', '.groovy'].include? File.extname(source)
              package = findFirst(source, /^\s*package\s+([^\s;]+)\s*;?\s*/)
              map[source] = package ? File.join(target, package[1].gsub('.', '/'), File.basename(source).ext(target_ext)) : target
            elsif
              map[source] = target
            end
          end
          map
        end
      end

    private

      def findFirst(file, pattern)
        match = nil
        File.open(file, "r") do |infile|
          while (line = infile.gets)
            match = line.match(pattern)
            break if match
          end
        end
        match
      end

    end
  end

  # Compile task.
  #
  # Attempts to determine which compiler to use based on the project layout, for example,
  # uses the Javac compiler if it finds any .java files in src/main/java.  You can also
  # select the compiler explicitly:
  #   compile.using(:scalac)
  #
  # Accepts multiple source directories that are invoked as prerequisites before compilation.
  # You can pass a task as a source directory:
  #   compile.from(apt)
  #
  # Likewise, dependencies are invoked before compiling. All dependencies are evaluated as
  # #artifacts, so you can pass artifact specifications and even projects:
  #   compile.with('module1.jar', 'log4j:log4j:jar:1.0', project('foo'))
  #
  # Creates a file task for the target directory, so executing that task as a dependency will
  # execute the compile task first.
  #
  # Compiler options are inherited form a parent task, e.g. the foo:bar:compile task inherits
  # its options from the foo:compile task. Even if foo is an empty project that does not compile
  # any classes itself, you can use it to set compile options for all its sub-projects.
  #
  # Normally, the project will take care of setting the source and target directory, and you
  # only need to set options and dependencies. See Project#compile.
  class CompileTask < Rake::Task

    def initialize(*args) #:nodoc:
      super
      parent_task = Project.parent_task(name)
      inherit = lambda { |hash, key| parent_task.options[key] } if parent_task.respond_to?(:options)
      @options = OpenObject.new &inherit
      @sources = FileList[]
      @dependencies = FileList[]

      enhance do |task|
        unless sources.empty?
          raise 'No compiler selected and can\'t determine which compiler to use' unless compiler
          raise 'No target directory specified' unless target
          mkpath target.to_s
          info "Compiling #{task.name.gsub(/:[^:]*$/, '')} into #{target.to_s}"
          @compiler.compile(sources.map(&:to_s), target.to_s, dependencies.map(&:to_s))
          # By touching the target we let other tasks know we did something,
          # and also prevent recompiling again for dependencies.
          touch target.to_s
        end
      end
    end

    # Source directories.
    attr_accessor :sources

    # :call-seq:
    #   from(*sources) => self
    #
    # Adds source directories and files to compile, and returns self.
    #
    # For example:
    #   compile.from('src/java').into('classes').with('module1.jar')
    def from(*sources)
      @sources |= sources.flatten
      guess_compiler if @compiler.nil? && sources.flatten.any? { |source| File.exist?(source.to_s) }
      self
    end

    # *Deprecated*: Use dependencies instead.
    def classpath
      Buildr.application.deprecated 'Use dependencies instead.'
      dependencies
    end

    # *Deprecated*: Use dependencies= instead.
    def classpath=(artifacts)
      Buildr.application.deprecated 'Use dependencies= instead.'
      self.dependencies = artifacts
    end

    # Compilation dependencies.
    attr_accessor :dependencies

    # :call-seq:
    #   with(*artifacts) => self
    #
    # Adds files and artifacts as dependencies, and returns self.
    #
    # Calls #artifacts on the arguments, so you can pass artifact specifications,
    # tasks, projects, etc. Use this rather than setting the dependencies array directly.
    #
    # For example:
    #   compile.with('module1.jar', 'log4j:log4j:jar:1.0', project('foo'))
    def with(*specs)
      @dependencies |= Buildr.artifacts(specs.flatten).uniq
      self
    end

    # The target directory for the compiled code.
    attr_reader :target

    # :call-seq:
    #   into(path) => self
    #
    # Sets the target directory and returns self. This will also set the compile task
    # as a prerequisite to a file task on the target directory.
    #
    # For example:
    #   compile(src_dir).into(target_dir).with(artifacts)
    # Both compile.invoke and file(target_dir).invoke will compile the source files.
    def into(path)
      @target = file(path.to_s).enhance([self]) unless @target.to_s == path.to_s
      self
    end

    # Returns the compiler options.
    attr_reader :options

    # :call-seq:
    #   using(options) => self
    #
    # Sets the compiler options from a hash and returns self.  Can also be used to
    # select the compiler.
    #
    # For example:
    #   compile.using(:warnings=>true, :source=>'1.5')
    #   compile.using(:scala)
    def using(*args)
      args.pop.each { |key, value| options.send "#{key}=", value } if Hash === args.last
      self.compiler = args.pop until args.empty?
      self
    end

    # Returns the compiler if known.  The compiler is either automatically selected
    # based on existing source directories (e.g. src/main/java), or by requesting
    # a specific compiler (see #using).
    def compiler
      guess_compiler unless @compiler
      @compiler && @compiler.class.to_sym
    end

    # Returns the compiled language, if known.  See also #compiler.
    def language
      compiler && @compiler.class.language
    end

    # Returns the default packaging type for this compiler, if known.
    def packaging
      compiler && @compiler.class.packaging
    end

    def timestamp #:nodoc:
      # If we compiled successfully, then the target directory reflects that.
      # If we didn't, see needed?
      target ? target.timestamp : Rake::EARLY
    end

    # The project this task belongs to.
    attr_reader :project

    # The usage, one of :main or :test.
    attr_reader :usage

  protected

    # Selects which compiler to use.
    def compiler=(name) #:nodoc:
      cls = Compiler.select(name) or raise ArgumentError, "No #{name} compiler available. Did you install it?"
      return self if cls === @compiler
      @compiler = cls.new(project, options)
      from Array(cls.sources).map { |path| project.path_to(:source, usage, path) }.
        select { |path| File.exist?(path) } if sources.empty?
      into project.path_to(:target, usage, cls.target) unless target
      with Array(@compiler.dependencies)
      self
    end

    # Associates this task with project and particular usage (:main, :test).
    def associate_with(project, usage) #:nodoc:
      @project, @usage = project, usage
      guess_compiler
    end

    # Try to guess if we have a compiler to match source files.
    def guess_compiler #:nodoc:
      candidate = Compiler.compilers.detect { |cls| cls.applies_to?(project, self) }
      self.compiler = candidate if candidate
    end

  private

    def needed? #:nodoc:
      return false if sources.empty?
      # Fail during invoke.
      return true unless @compiler && target
      return @compiler.needed?(sources.map(&:to_s), target.to_s, dependencies.map(&:to_s))
    end

    def invoke_prerequisites(args, chain) #:nodoc:
      @sources = Array(@sources).map(&:to_s).uniq
      @dependencies = FileList[@dependencies.uniq]
      @prerequisites |= @dependencies + @sources
      super
    end

  end

  # The resources task is executed by the compile task to copy resource files over
  # to the target directory. You can enhance this task in the normal way, but mostly
  # you will use the task's filter.
  #
  # For example:
  #   resources.filter.using 'Copyright'=>'Acme Inc, 2007'
  class ResourcesTask < Rake::Task

    # Returns the filter used to copy resources over. See Buildr::Filter.
    attr_reader :filter

    def initialize(*args) #:nodoc:
      super
      @filter = Buildr::Filter.new
      @filter.using Buildr.settings.profile['filter'] if Hash === Buildr.settings.profile['filter']
      enhance do
        target.invoke if target
      end
    end

    # :call-seq:
    #   include(*files) => self
    #
    # Includes the specified files in the filter and returns self.
    def include(*files)
      filter.include *files
      self
    end

    # :call-seq:
    #   exclude(*files) => self
    #
    # Excludes the specified files in the filter and returns self.
    def exclude(*files)
      filter.exclude *files
      self
    end

    # :call-seq:
    #   from(*sources) => self
    #
    # Adds additional directories from which to copy resources.
    #
    # For example:
    #   resources.from _('src/etc')
    def from(*sources)
      filter.from *sources
      self
    end

    # Returns the list of source directories (each being a file task).
    def sources
      filter.sources
    end

    # :call-seq:
    #   target => task
    #
    # Returns the filter's target directory as a file task.
    def target
      filter.into @project.path_to(:target, @usage, :resources) unless filter.target || sources.empty?
      filter.target
    end

    def prerequisites #:nodoc:
      super + filter.sources.flatten
    end

  protected

    # Associates this task with project and particular usage (:main, :test).
    def associate_with(project, usage) #:nodoc:
      @project, @usage = project, usage
    end

  end

  # Methods added to Project for compiling, handling of resources and generating source documentation.
  module Compile

    include Extension

    first_time do
      desc 'Compile all projects'
      Project.local_task('compile') { |name| "Compiling #{name}" }
    end

    before_define(:compile) do |project|
      resources = ResourcesTask.define_task('resources')
      resources.send :associate_with, project, :main
      project.path_to(:source, :main, :resources).tap { |dir| resources.from dir if File.exist?(dir) }

      compile = CompileTask.define_task('compile'=>resources)
      compile.send :associate_with, project, :main
      project.recursive_task('compile')
    end

    after_define(:compile) do |project|
      if project.compile.target
        # This comes last because the target path is set inside the project definition.
        project.build project.compile.target
        project.clean do
          rm_rf project.compile.target.to_s, :verbose=>false
        end
      end
    end

    # :call-seq:
    #   compile(*sources) => CompileTask
    #   compile(*sources) { |task| .. } => CompileTask
    #
    # The compile task does what its name suggests. This method returns the project's
    # CompileTask. It also accepts a list of source directories and files to compile
    # (equivalent to calling CompileTask#from on the task), and a block for any
    # post-compilation work.
    #
    # The compile task attempts to guess which compiler to use.  For example, if it finds
    # any Java files in the src/main/java directory, it will use the Java compiler and
    # create class files in the target/classes directory.
    #
    # You can also configure it yourself by telling it which compiler to use, pointing
    # it as source directories and chooing a different target directory.
    #
    # For example:
    #   # Include Log4J and the api sub-project artifacts.
    #   compile.with 'log4j:log4j:jar:1.2', project('api')
    #   # Include Apt-generated source files.
    #   compile.from apt
    #   # For JavaC, force target compatibility.
    #   compile.options.source = '1.6'
    #   # Run the OpenJPA bytecode enhancer after compilation.
    #   compile { open_jpa_enhance }
    #   # Pick a given compiler.
    #   compile.using(:scalac).from('src/scala')
    #
    # For more information, see CompileTask.
    def compile(*sources, &block)
      task('compile').from(sources).enhance &block
    end

    # :call-seq:
    #   resources(*prereqs) => ResourcesTask
    #   resources(*prereqs) { |task| .. } => ResourcesTask
    #
    # The resources task is executed by the compile task to copy resources files
    # from the resource directory into the target directory. By default the resources
    # task copies files from the src/main/resources into the target/resources directory.
    #
    # This method returns the project's resources task. It also accepts a list of
    # prerequisites and a block, used to enhance the resources task.
    #
    # Resources files are copied and filtered (see Buildr::Filter for more information).
    # The default filter uses the profile properties for the current environment.
    #
    # For example:
    #   resources.from _('src/etc')
    #   resources.filter.using 'Copyright'=>'Acme Inc, 2007'
    #
    # Or in your profiles.yaml file:
    #   common:
    #     Copyright: Acme Inc, 2007
    def resources(*prereqs, &block)
      task('resources').enhance prereqs, &block
    end

  end

  class Options

    # Returns the debug option (environment variable DEBUG).
    def debug
      (ENV['DEBUG'] || ENV['debug']) !~ /(no|off|false)/
    end

    # Sets the debug option (environment variable DEBUG).
    #
    # You can turn this option off directly, or by setting the environment variable
    # DEBUG to +no+. For example:
    #   buildr build DEBUG=no
    #
    # The release tasks runs a build with <tt>DEBUG=no</tt>.
    def debug=(flag)
      ENV['debug'] = nil
      ENV['DEBUG'] = flag.to_s
    end

  end

end

class Buildr::Project
  include Buildr::Compile
end


text:
<?php

namespace SlmQueueAmqTest\Asset;

use Exception;
use SlmQueue\Job\AbstractJob;

class ExceptionJob extends AbstractJob
{
    /**
     * {@inheritDoc}
     */
    public function execute()
    {
        throw new Exception();
    }
}


text:
#pragma once

#include <stdint.h>

#include <lib/core/CHIPConfig.h>
#include <lib/support/TypeTraits.h>

#if CHIP_CONFIG_IM_STATUS_CODE_VERBOSE_FORMAT
#define ChipLogFormatIMStatus "0x%02x (%s)"
#define ChipLogValueIMStatus(status) chip::to_underlying(status), chip::Protocols::InteractionModel::StatusName(status)
#else // CHIP_CONFIG_IM_STATUS_CODE_VERBOSE_FORMAT
#define ChipLogFormatIMStatus "0x%02x"
#define ChipLogValueIMStatus(status) chip::to_underlying(status)
#endif // CHIP_CONFIG_IM_STATUS_CODE_VERBOSE_FORMAT

namespace chip {
namespace Protocols {
namespace InteractionModel {

// This table comes from the IM's "Status Code Table" section from the Interaction Model spec.
enum class Status : uint8_t
{
#define CHIP_IM_STATUS_CODE(name, spec_name, value) name = value,
#include <protocols/interaction_model/StatusCodeList.h>
#undef CHIP_IM_STATUS_CODE

    InvalidValue = ConstraintError, // Deprecated
};

#if CHIP_CONFIG_IM_STATUS_CODE_VERBOSE_FORMAT
const char * StatusName(Status status);
#endif // CHIP_CONFIG_IM_STATUS_CODE_VERBOSE_FORMAT

} // namespace InteractionModel
} // namespace Protocols
} // namespace chip


text:
API Pagination
==============

.. note::

	This feature requires the :doc:`API listener<api>` to work.

This listener appends pagination information to the API responses that is contain
pagination information.

Setup
-----

Attach it on the fly in your controller beforeFilter, this is recommended if
you want to attach it only to specific controllers and actions

.. code-block:: php

	<?php
	class SamplesController extends AppController {

		public function beforeFilter(\Cake\Event\Event $event) {
			$this->Crud->addListener('Crud.Api'); // Required
			$this->Crud->addListener('Crud.ApiPagination');
		}

	}

Attach it using components array, this is recommended if you want to
attach it to all controllers, application wide

.. code-block:: php

	<?php
	class SamplesController extends AppController {

		public $components = [
			'RequestHandler',
			'Crud.Crud' => [
				'listeners' => [
					'Crud.Api', // Required
					'Crud.ApiPagination'
				]
			];

	}

Output
------

Paginated results will include a

.. code-block:: json

	{
		"success": true,
		"data":[

		],
		"pagination":{
			"page_count": 13,
			"current_page": 1,
			"count": 25,
			"has_prev_page": false,
			"has_next_page": true
		}
	}


text:
import { Prisma, PrismaClient } from '@prisma/client'

// This file will not be executed, just compiled to check if the typings are valid
async function main() {
  const prisma = new PrismaClient()

  await prisma.user.findFirst({
    where: {
      info: {
        gt: 4,
      },
    },
  })

  await prisma.user.findFirst({
    where: {
      info: {
        path: 'any',
        gt: 4,
      },
    },
  })
}

main().catch((e) => {
  console.error(e)
})


text:
from __future__ import absolute_import

from uuid import uuid1

import pytest
from exam import before, fixture
from mock import patch
from django.core.cache.backends.locmem import LocMemCache

from sentry.models import Option
from sentry.options.store import OptionsStore
from sentry.testutils import TestCase

class OptionsStoreTest(TestCase):
    @fixture
    def store(self):
        c = LocMemCache("test", {})
        c.clear()
        return OptionsStore(cache=c)

    @fixture
    def key(self):
        return self.make_key()

    @before
    def flush_local_cache(self):
        self.store.flush_local_cache()

    def make_key(self, ttl=10, grace=10):
        return self.store.make_key(uuid1().hex, "", object, 0, ttl, grace)

    def test_simple(self):
        store, key = self.store, self.key

        assert store.get(key) is None
        assert store.set(key, "bar")
        assert store.get(key) == "bar"
        assert store.delete(key)

    def test_simple_without_cache(self):
        store = OptionsStore(cache=None)
        key = self.key

        assert store.get(key) is None

        with pytest.raises(AssertionError):
            store.set(key, "bar")

        with pytest.raises(AssertionError):
            store.delete(key)

    def test_db_and_cache_unavailable(self):
        store, key = self.store, self.key
        with patch.object(Option.objects, "get_queryset", side_effect=Exception()):
            # we can't update options if the db is unavailable
            with self.assertRaises(Exception):
                store.set(key, "bar")

        # Assert nothing was written to the local_cache
        assert not store._local_cache

        store.set(key, "bar")

        with patch.object(Option.objects, "get_queryset", side_effect=Exception()):
            assert store.get(key) == "bar"

            with patch.object(store.cache, "get", side_effect=Exception()):
                assert store.get(key) == "bar"
                store.flush_local_cache()
                assert store.get(key) is None

    @patch("sentry.options.store.time")
    def test_key_with_grace(self, mocked_time):
        store, key = self.store, self.make_key(10, 10)

        mocked_time.return_value = 0
        store.set(key, "bar")

        with patch.object(Option.objects, "get_queryset", side_effect=Exception()):
            with patch.object(store.cache, "get", side_effect=Exception()):
                # Serves the value beyond TTL
                mocked_time.return_value = 15
                assert store.get(key) == "bar"

                mocked_time.return_value = 21
                assert store.get(key) is None

                # It should have also been evicted
                assert not store._local_cache

    @patch("sentry.options.store.time")
    def test_key_ttl(self, mocked_time):
        store, key = self.store, self.make_key(10, 0)

        mocked_time.return_value = 0
        store.set(key, "bar")

        with patch.object(Option.objects, "get_queryset", side_effect=Exception()):
            with patch.object(store.cache, "get", side_effect=Exception()):
                assert store.get(key) == "bar"

        Option.objects.filter(key=key.name).update(value="lol")
        store.cache.delete(key.cache_key)
        # Still within TTL, so don't check database
        assert store.get(key) == "bar"

        mocked_time.return_value = 15

        with patch.object(Option.objects, "get_queryset", side_effect=Exception()):
            with patch.object(store.cache, "get", side_effect=Exception()):
                assert store.get(key) is None

        assert store.get(key) == "lol"

    @patch("sentry.options.store.time")
    def test_clean_local_cache(self, mocked_time):
        store = self.store

        mocked_time.return_value = 0

        key1 = self.make_key(10, 0)  # should expire after 10
        key2 = self.make_key(10, 5)  # should expire after 15
        key3 = self.make_key(10, 10)  # should expire after 20
        key4 = self.make_key(10, 15)  # should expire after 25

        store.set(key1, "x")
        store.set(key2, "x")
        store.set(key3, "x")
        store.set(key4, "x")

        assert len(store._local_cache) == 4

        mocked_time.return_value = 0
        store.clean_local_cache()
        assert len(store._local_cache) == 4

        mocked_time.return_value = 11
        store.clean_local_cache()
        assert len(store._local_cache) == 3
        assert key1.cache_key not in store._local_cache

        mocked_time.return_value = 21
        store.clean_local_cache()
        assert len(store._local_cache) == 1
        assert key1.cache_key not in store._local_cache
        assert key2.cache_key not in store._local_cache
        assert key3.cache_key not in store._local_cache

        mocked_time.return_value = 26
        store.clean_local_cache()
        assert not store._local_cache


text:
import {Inferno, Component} from './../../lib/infernowrapper';
import {InputPage} from './pages/inputpage';
import {DropdownPage} from './pages/dropdownpage';
import {AvatarPage} from './pages/avatarpage';
import {CalendarPage} from './pages/calendarpage';
import {CheckboxPage} from './pages/checkboxpage';

function is_touch_device() {
    return (('ontouchstart' in window)
    || (navigator.MaxTouchPoints > 0)
    || (navigator.msMaxTouchPoints > 0));
}

if (!is_touch_device()) {
    document.body.classList.add('no-touch');
}

export class Page extends Component {
    constructor(props) {
        super(props);
    }

    render() {
        return (
            <div>
                <InputPage />
                <DropdownPage />
                <AvatarPage />
                <CalendarPage />
                <CheckboxPage />
            </div>
        )
    }
}


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

namespace OutLoud_Text_Reader.Properties {

    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.0.1.0")]
    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {

        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

        public static Settings Default {
            get {
                return defaultInstance;
            }
        }

        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("True")]
        public bool RealtimeHighlightText {
            get {
                return ((bool)(this["RealtimeHighlightText"]));
            }
            set {
                this["RealtimeHighlightText"] = value;
            }
        }

        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("False")]
        public bool StopSpeakOnClick {
            get {
                return ((bool)(this["StopSpeakOnClick"]));
            }
            set {
                this["StopSpeakOnClick"] = value;
            }
        }

        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("Lucida Console, 9.75pt")]
        public global::System.Drawing.Font TextFont {
            get {
                return ((global::System.Drawing.Font)(this["TextFont"]));
            }
            set {
                this["TextFont"] = value;
            }
        }

        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("False")]
        public bool HideOnCloseButton {
            get {
                return ((bool)(this["HideOnCloseButton"]));
            }
            set {
                this["HideOnCloseButton"] = value;
            }
        }

        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("False")]
        public bool EnableClipboardReading {
            get {
                return ((bool)(this["EnableClipboardReading"]));
            }
            set {
                this["EnableClipboardReading"] = value;
            }
        }

        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("False")]
        public bool EnableSSML {
            get {
                return ((bool)(this["EnableSSML"]));
            }
            set {
                this["EnableSSML"] = value;
            }
        }
    }
}


text:
<?php

namespace DCarbone\PHPFHIRGenerated\STU3\FHIRResource;

use DCarbone\PHPFHIRGenerated\STU3\FHIRElement\FHIRExtension;
use DCarbone\PHPFHIRGenerated\STU3\FHIRElement\FHIRNarrative;
use DCarbone\PHPFHIRGenerated\STU3\FHIRResource;
use DCarbone\PHPFHIRGenerated\STU3\PHPFHIRConstants;
use DCarbone\PHPFHIRGenerated\STU3\PHPFHIRContainedTypeInterface;
use DCarbone\PHPFHIRGenerated\STU3\PHPFHIRTypeInterface;
use DCarbone\PHPFHIRGenerated\STU3\PHPFHIRTypeMap;

/**
 * A resource that includes narrative, extensions, and contained resources.
 *
 * Class FHIRDomainResource
 * @package \DCarbone\PHPFHIRGenerated\STU3\FHIRResource
 */
class FHIRDomainResource extends FHIRResource
{
    // name of FHIR type this class describes
    const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE;
    const FIELD_CONTAINED = 'contained';
    const FIELD_EXTENSION = 'extension';
    const FIELD_MODIFIER_EXTENSION = 'modifierExtension';
    const FIELD_TEXT = 'text';

    /** @var string */
    private $_xmlns = 'http://hl7.org/fhir';

    /**
     * These resources do not have an independent existence apart from the resource
     * that contains them - they cannot be identified independently, and nor can they
     * have their own independent transaction scope.
     *
     * @var null|\DCarbone\PHPFHIRGenerated\STU3\PHPFHIRContainedTypeInterface[]
     */
    protected $contained = [];

    /**
     * Optional Extension Element - found in all resources.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * May be used to represent additional information that is not part of the basic
     * definition of the resource. In order to make the use of extensions safe and
     * manageable, there is a strict set of governance applied to the definition and
     * use of extensions. Though any implementer is allowed to define an extension,
     * there is a set of requirements that SHALL be met as part of the definition of
     * the extension.
     *
     * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRElement\FHIRExtension[]
     */
    protected $extension = [];

    /**
     * Optional Extension Element - found in all resources.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * May be used to represent additional information that is not part of the basic
     * definition of the resource, and that modifies the understanding of the element
     * that contains it. Usually modifier elements provide negation or qualification.
     * In order to make the use of extensions safe and manageable, there is a strict
     * set of governance applied to the definition and use of extensions. Though any
     * implementer is allowed to define an extension, there is a set of requirements
     * that SHALL be met as part of the definition of the extension. Applications
     * processing a resource are required to check for modifier extensions.
     *
     * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRElement\FHIRExtension[]
     */
    protected $modifierExtension = [];

    /**
     * A human-readable formatted text, including images.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * A human-readable narrative that contains a summary of the resource, and may be
     * used to represent the content of the resource to a human. The narrative need not
     * encode all the structured data, but is required to contain sufficient detail to
     * make it "clinically safe" for a human to just read the narrative. Resource
     * definitions may define what content should be represented in the narrative to
     * ensure clinical safety.
     *
     * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRElement\FHIRNarrative
     */
    protected $text = null;

    /**
     * Validation map for fields in type DomainResource
     * @var array
     */
    private static $_validationRules = [    ];

    /**
     * FHIRDomainResource Constructor
     * @param null|array $data
     */
    public function __construct($data = null)
    {
        if (null === $data || [] === $data) {
            return;
        }
        if (!is_array($data)) {
            throw new \InvalidArgumentException(sprintf(
                'FHIRDomainResource::_construct - $data expected to be null or array, %s seen',
                gettype($data)
            ));
        }
        parent::__construct($data);
        if (isset($data[self::FIELD_CONTAINED])) {
            if (is_array($data[self::FIELD_CONTAINED])) {
                if (is_int(key($data[self::FIELD_CONTAINED]))) {
                    $this->setContained($data[self::FIELD_CONTAINED]);
                } else {
                    $typeClass = PHPFHIRTypeMap::getContainedTypeFromArray($data[self::FIELD_CONTAINED]);
                    if (null === $typeClass) {
                        throw new \InvalidArgumentException(sprintf(
                            'FHIRDomainResource - Unable to determine class for field "contained" from value: %s',
                            json_encode($data[self::FIELD_CONTAINED])
                        ));
                    }
                    $this->addContained(new $typeClass($data[self::FIELD_CONTAINED]));
                }
            } else if ($data[self::FIELD_CONTAINED] instanceof PHPFHIRContainedTypeInterface) {
                $this->addContained($data[self::FIELD_CONTAINED]);
            }
        }
        if (isset($data[self::FIELD_EXTENSION])) {
            if (is_array($data[self::FIELD_EXTENSION])) {
                foreach($data[self::FIELD_EXTENSION] as $v) {
                    if (null === $v) {
                        continue;
                    }
                    if ($v instanceof FHIRExtension) {
                        $this->addExtension($v);
                    } else {
                        $this->addExtension(new FHIRExtension($v));
                    }
                }
            } else if ($data[self::FIELD_EXTENSION] instanceof FHIRExtension) {
                $this->addExtension($data[self::FIELD_EXTENSION]);
            } else {
                $this->addExtension(new FHIRExtension($data[self::FIELD_EXTENSION]));
            }
        }
        if (isset($data[self::FIELD_MODIFIER_EXTENSION])) {
            if (is_array($data[self::FIELD_MODIFIER_EXTENSION])) {
                foreach($data[self::FIELD_MODIFIER_EXTENSION] as $v) {
                    if (null === $v) {
                        continue;
                    }
                    if ($v instanceof FHIRExtension) {
                        $this->addModifierExtension($v);
                    } else {
                        $this->addModifierExtension(new FHIRExtension($v));
                    }
                }
            } else if ($data[self::FIELD_MODIFIER_EXTENSION] instanceof FHIRExtension) {
                $this->addModifierExtension($data[self::FIELD_MODIFIER_EXTENSION]);
            } else {
                $this->addModifierExtension(new FHIRExtension($data[self::FIELD_MODIFIER_EXTENSION]));
            }
        }
        if (isset($data[self::FIELD_TEXT])) {
            if ($data[self::FIELD_TEXT] instanceof FHIRNarrative) {
                $this->setText($data[self::FIELD_TEXT]);
            } else {
                $this->setText(new FHIRNarrative($data[self::FIELD_TEXT]));
            }
        }
    }

    /**
     * @return string
     */
    public function _getFHIRTypeName()
    {
        return self::FHIR_TYPE_NAME;
    }

    /**
     * @return string
     */
    public function _getFHIRXMLElementDefinition()
    {
        $xmlns = $this->_getFHIRXMLNamespace();
        if (null !== $xmlns) {
            $xmlns = " xmlns=\"{$xmlns}\"";
        }
        return "<DomainResource{$xmlns}></DomainResource>";
    }

    /**
     * These resources do not have an independent existence apart from the resource
     * that contains them - they cannot be identified independently, and nor can they
     * have their own independent transaction scope.
     *
     * @return null|\DCarbone\PHPFHIRGenerated\STU3\PHPFHIRContainedTypeInterface[]
     */
    public function getContained()
    {
        return $this->contained;
    }

    /**
     * These resources do not have an independent existence apart from the resource
     * that contains them - they cannot be identified independently, and nor can they
     * have their own independent transaction scope.
     *
     * @param null|\DCarbone\PHPFHIRGenerated\STU3\PHPFHIRContainedTypeInterface $contained
     * @return static
     */
    public function addContained(PHPFHIRContainedTypeInterface $contained = null)
    {
        $this->contained[] = $contained;
        return $this;
    }

    /**
     * These resources do not have an independent existence apart from the resource
     * that contains them - they cannot be identified independently, and nor can they
     * have their own independent transaction scope.
     *
     * @param \DCarbone\PHPFHIRGenerated\STU3\PHPFHIRContainedTypeInterface[] $contained
     * @return static
     */
    public function setContained(array $contained = [])
    {
        $this->contained = [];
        if ([] === $contained) {
            return $this;
        }
        foreach($contained as $v) {
            if (null === $v) {
                continue;
            }
            if (is_object($v)) {
                if ($v instanceof PHPFHIRContainedTypeInterface) {
                    $this->addContained($v);
                } else {
                    throw new \InvalidArgumentException(sprintf(
                        'FHIRDomainResource - Field "contained" must be an array of objects implementing PHPFHIRContainedTypeInterface, object of type %s seen',
                        get_class($v)
                    ));
                }
            } else if (is_array($v)) {
                $typeClass = PHPFHIRTypeMap::getContainedTypeFromArray($v);
                if (null === $typeClass) {
                    throw new \InvalidArgumentException(sprintf(
                        'FHIRDomainResource - Unable to determine class for field "contained" from value: %s',
                        json_encode($v)
                    ));
                }
                $this->addContained(new $typeClass($v));
            } else {
                throw new \InvalidArgumentException(sprintf(
                    'FHIRDomainResource - Unable to determine class for field "contained" from value: %s',
                    json_encode($v)
                ));
            }
        }
        return $this;
    }

    /**
     * Optional Extension Element - found in all resources.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * May be used to represent additional information that is not part of the basic
     * definition of the resource. In order to make the use of extensions safe and
     * manageable, there is a strict set of governance applied to the definition and
     * use of extensions. Though any implementer is allowed to define an extension,
     * there is a set of requirements that SHALL be met as part of the definition of
     * the extension.
     *
     * @return null|\DCarbone\PHPFHIRGenerated\STU3\FHIRElement\FHIRExtension[]
     */
    public function getExtension()
    {
        return $this->extension;
    }

    /**
     * Optional Extension Element - found in all resources.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * May be used to represent additional information that is not part of the basic
     * definition of the resource. In order to make the use of extensions safe and
     * manageable, there is a strict set of governance applied to the definition and
     * use of extensions. Though any implementer is allowed to define an extension,
     * there is a set of requirements that SHALL be met as part of the definition of
     * the extension.
     *
     * @param null|\DCarbone\PHPFHIRGenerated\STU3\FHIRElement\FHIRExtension $extension
     * @return static
     */
    public function addExtension(FHIRExtension $extension = null)
    {
        $this->extension[] = $extension;
        return $this;
    }

    /**
     * Optional Extension Element - found in all resources.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * May be used to represent additional information that is not part of the basic
     * definition of the resource. In order to make the use of extensions safe and
     * manageable, there is a strict set of governance applied to the definition and
     * use of extensions. Though any implementer is allowed to define an extension,
     * there is a set of requirements that SHALL be met as part of the definition of
     * the extension.
     *
     * @param \DCarbone\PHPFHIRGenerated\STU3\FHIRElement\FHIRExtension[] $extension
     * @return static
     */
    public function setExtension(array $extension = [])
    {
        $this->extension = [];
        if ([] === $extension) {
            return $this;
        }
        foreach($extension as $v) {
            if ($v instanceof FHIRExtension) {
                $this->addExtension($v);
            } else {
                $this->addExtension(new FHIRExtension($v));
            }
        }
        return $this;
    }

    /**
     * Optional Extension Element - found in all resources.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * May be used to represent additional information that is not part of the basic
     * definition of the resource, and that modifies the understanding of the element
     * that contains it. Usually modifier elements provide negation or qualification.
     * In order to make the use of extensions safe and manageable, there is a strict
     * set of governance applied to the definition and use of extensions. Though any
     * implementer is allowed to define an extension, there is a set of requirements
     * that SHALL be met as part of the definition of the extension. Applications
     * processing a resource are required to check for modifier extensions.
     *
     * @return null|\DCarbone\PHPFHIRGenerated\STU3\FHIRElement\FHIRExtension[]
     */
    public function getModifierExtension()
    {
        return $this->modifierExtension;
    }

    /**
     * Optional Extension Element - found in all resources.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * May be used to represent additional information that is not part of the basic
     * definition of the resource, and that modifies the understanding of the element
     * that contains it. Usually modifier elements provide negation or qualification.
     * In order to make the use of extensions safe and manageable, there is a strict
     * set of governance applied to the definition and use of extensions. Though any
     * implementer is allowed to define an extension, there is a set of requirements
     * that SHALL be met as part of the definition of the extension. Applications
     * processing a resource are required to check for modifier extensions.
     *
     * @param null|\DCarbone\PHPFHIRGenerated\STU3\FHIRElement\FHIRExtension $modifierExtension
     * @return static
     */
    public function addModifierExtension(FHIRExtension $modifierExtension = null)
    {
        $this->modifierExtension[] = $modifierExtension;
        return $this;
    }

    /**
     * Optional Extension Element - found in all resources.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * May be used to represent additional information that is not part of the basic
     * definition of the resource, and that modifies the understanding of the element
     * that contains it. Usually modifier elements provide negation or qualification.
     * In order to make the use of extensions safe and manageable, there is a strict
     * set of governance applied to the definition and use of extensions. Though any
     * implementer is allowed to define an extension, there is a set of requirements
     * that SHALL be met as part of the definition of the extension. Applications
     * processing a resource are required to check for modifier extensions.
     *
     * @param \DCarbone\PHPFHIRGenerated\STU3\FHIRElement\FHIRExtension[] $modifierExtension
     * @return static
     */
    public function setModifierExtension(array $modifierExtension = [])
    {
        $this->modifierExtension = [];
        if ([] === $modifierExtension) {
            return $this;
        }
        foreach($modifierExtension as $v) {
            if ($v instanceof FHIRExtension) {
                $this->addModifierExtension($v);
            } else {
                $this->addModifierExtension(new FHIRExtension($v));
            }
        }
        return $this;
    }

    /**
     * A human-readable formatted text, including images.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * A human-readable narrative that contains a summary of the resource, and may be
     * used to represent the content of the resource to a human. The narrative need not
     * encode all the structured data, but is required to contain sufficient detail to
     * make it "clinically safe" for a human to just read the narrative. Resource
     * definitions may define what content should be represented in the narrative to
     * ensure clinical safety.
     *
     * @return null|\DCarbone\PHPFHIRGenerated\STU3\FHIRElement\FHIRNarrative
     */
    public function getText()
    {
        return $this->text;
    }

    /**
     * A human-readable formatted text, including images.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * A human-readable narrative that contains a summary of the resource, and may be
     * used to represent the content of the resource to a human. The narrative need not
     * encode all the structured data, but is required to contain sufficient detail to
     * make it "clinically safe" for a human to just read the narrative. Resource
     * definitions may define what content should be represented in the narrative to
     * ensure clinical safety.
     *
     * @param null|\DCarbone\PHPFHIRGenerated\STU3\FHIRElement\FHIRNarrative $text
     * @return static
     */
    public function setText(FHIRNarrative $text = null)
    {
        $this->text = $text;
        return $this;
    }

    /**
     * Returns the validation rules that this type's fields must comply with to be considered "valid"
     * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]]
     *
     * @return array
     */
    public function _getValidationRules()
    {
        return self::$_validationRules;
    }

    /**
     * Validates that this type conforms to the specifications set forth for it by FHIR.  An empty array must be seen as
     * passing.
     *
     * @return array
     */
    public function _getValidationErrors()
    {
        $errs = parent::_getValidationErrors();
        $validationRules = $this->_getValidationRules();
        if ([] !== ($vs = $this->getContained())) {
            foreach($vs as $i => $v) {
                if ([] !== ($fieldErrs = $v->_getValidationErrors())) {
                    $errs[sprintf('%s.%d', self::FIELD_CONTAINED, $i)] = $fieldErrs;
                }
            }
        }
        if ([] !== ($vs = $this->getExtension())) {
            foreach($vs as $i => $v) {
                if ([] !== ($fieldErrs = $v->_getValidationErrors())) {
                    $errs[sprintf('%s.%d', self::FIELD_EXTENSION, $i)] = $fieldErrs;
                }
            }
        }
        if ([] !== ($vs = $this->getModifierExtension())) {
            foreach($vs as $i => $v) {
                if ([] !== ($fieldErrs = $v->_getValidationErrors())) {
                    $errs[sprintf('%s.%d', self::FIELD_MODIFIER_EXTENSION, $i)] = $fieldErrs;
                }
            }
        }
        if (null !== ($v = $this->getText())) {
            if ([] !== ($fieldErrs = $v->_getValidationErrors())) {
                $errs[self::FIELD_TEXT] = $fieldErrs;
            }
        }
        if (isset($validationRules[self::FIELD_CONTAINED])) {
            $v = $this->getContained();
            foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {
                $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v);
                if (null !== $err) {
                    if (!isset($errs[self::FIELD_CONTAINED])) {
                        $errs[self::FIELD_CONTAINED] = [];
                    }
                    $errs[self::FIELD_CONTAINED][$rule] = $err;
                }
            }
        }
        if (isset($validationRules[self::FIELD_EXTENSION])) {
            $v = $this->getExtension();
            foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {
                $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v);
                if (null !== $err) {
                    if (!isset($errs[self::FIELD_EXTENSION])) {
                        $errs[self::FIELD_EXTENSION] = [];
                    }
                    $errs[self::FIELD_EXTENSION][$rule] = $err;
                }
            }
        }
        if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {
            $v = $this->getModifierExtension();
            foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {
                $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v);
                if (null !== $err) {
                    if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {
                        $errs[self::FIELD_MODIFIER_EXTENSION] = [];
                    }
                    $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;
                }
            }
        }
        if (isset($validationRules[self::FIELD_TEXT])) {
            $v = $this->getText();
            foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {
                $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v);
                if (null !== $err) {
                    if (!isset($errs[self::FIELD_TEXT])) {
                        $errs[self::FIELD_TEXT] = [];
                    }
                    $errs[self::FIELD_TEXT][$rule] = $err;
                }
            }
        }
        if (isset($validationRules[self::FIELD_ID])) {
            $v = $this->getId();
            foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {
                $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v);
                if (null !== $err) {
                    if (!isset($errs[self::FIELD_ID])) {
                        $errs[self::FIELD_ID] = [];
                    }
                    $errs[self::FIELD_ID][$rule] = $err;
                }
            }
        }
        if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {
            $v = $this->getImplicitRules();
            foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {
                $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v);
                if (null !== $err) {
                    if (!isset($errs[self::FIELD_IMPLICIT_RULES])) {
                        $errs[self::FIELD_IMPLICIT_RULES] = [];
                    }
                    $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;
                }
            }
        }
        if (isset($validationRules[self::FIELD_LANGUAGE])) {
            $v = $this->getLanguage();
            foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {
                $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v);
                if (null !== $err) {
                    if (!isset($errs[self::FIELD_LANGUAGE])) {
                        $errs[self::FIELD_LANGUAGE] = [];
                    }
                    $errs[self::FIELD_LANGUAGE][$rule] = $err;
                }
            }
        }
        if (isset($validationRules[self::FIELD_META])) {
            $v = $this->getMeta();
            foreach($validationRules[self::FIELD_META] as $rule => $constraint) {
                $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v);
                if (null !== $err) {
                    if (!isset($errs[self::FIELD_META])) {
                        $errs[self::FIELD_META] = [];
                    }
                    $errs[self::FIELD_META][$rule] = $err;
                }
            }
        }
        return $errs;
    }

    /**
     * @param \SimpleXMLElement|string|null $sxe
     * @param null|\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource $type
     * @param null|int $libxmlOpts
     * @return null|\DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource
     */
    public static function xmlUnserialize($sxe = null, PHPFHIRTypeInterface $type = null, $libxmlOpts = 591872)
    {
        if (null === $sxe) {
            return null;
        }
        if (is_string($sxe)) {
            libxml_use_internal_errors(true);
            $sxe = new \SimpleXMLElement($sxe, $libxmlOpts, false);
            if ($sxe === false) {
                throw new \DomainException(sprintf('FHIRDomainResource::xmlUnserialize - String provided is not parseable as XML: %s', implode(', ', array_map(function(\libXMLError $err) { return $err->message; }, libxml_get_errors()))));
            }
            libxml_use_internal_errors(false);
        }
        if (!($sxe instanceof \SimpleXMLElement)) {
            throw new \InvalidArgumentException(sprintf('FHIRDomainResource::xmlUnserialize - $sxe value must be null, \\SimpleXMLElement, or valid XML string, %s seen', gettype($sxe)));
        }
        if (null === $type) {
            $type = new FHIRDomainResource;
        } elseif (!is_object($type) || !($type instanceof FHIRDomainResource)) {
            throw new \RuntimeException(sprintf(
                'FHIRDomainResource::xmlUnserialize - $type must be instance of \DCarbone\PHPFHIRGenerated\STU3\FHIRResource\FHIRDomainResource or null, %s seen.',
                is_object($type) ? get_class($type) : gettype($type)
            ));
        }
        FHIRResource::xmlUnserialize($sxe, $type);
        $xmlNamespaces = $sxe->getDocNamespaces(false, false);
        if ([] !== $xmlNamespaces) {
            $ns = reset($xmlNamespaces);
            if (false !== $ns && '' !== $ns) {
                $type->_xmlns = $ns;
            }
        }
        $attributes = $sxe->attributes();
        $children = $sxe->children();
        if (isset($children->contained)) {
            foreach($children->contained as $child) {
                foreach($child->children() as $babe) {
                    $type->addContained(PHPFHIRTypeMap::getContainedTypeFromXML($babe));
                    continue 2;
                }
            }
        }
        if (isset($children->extension)) {
            foreach($children->extension as $child) {
                $type->addExtension(FHIRExtension::xmlUnserialize($child));
            }
        }
        if (isset($children->modifierExtension)) {
            foreach($children->modifierExtension as $child) {
                $type->addModifierExtension(FHIRExtension::xmlUnserialize($child));
            }
        }
        if (isset($children->text)) {
            $type->setText(FHIRNarrative::xmlUnserialize($children->text));
        }
        return $type;
    }

    /**
     * @param null|\SimpleXMLElement $sxe
     * @param null|int $libxmlOpts
     * @return \SimpleXMLElement
     */
    public function xmlSerialize(\SimpleXMLElement $sxe = null, $libxmlOpts = 591872)
    {
        if (null === $sxe) {
            $sxe = new \SimpleXMLElement($this->_getFHIRXMLElementDefinition(), $libxmlOpts, false);
        }
        parent::xmlSerialize($sxe);
        if ([] !== ($vs = $this->getContained())) {
            foreach($vs as $v) {
                if (null === $v) {
                    continue;
                }
                $tsxe = $sxe->addChild(self::FIELD_CONTAINED);
                $v->xmlSerialize($tsxe->addChild($v->_getFHIRTypeName(), null, $v->_getFHIRXMLNamespace()));
            }
        }        if ([] !== ($vs = $this->getExtension())) {
            foreach($vs as $v) {
                if (null === $v) {
                    continue;
                }
                $v->xmlSerialize($sxe->addChild(self::FIELD_EXTENSION, null, $v->_getFHIRXMLNamespace()));
            }
        }
        if ([] !== ($vs = $this->getModifierExtension())) {
            foreach($vs as $v) {
                if (null === $v) {
                    continue;
                }
                $v->xmlSerialize($sxe->addChild(self::FIELD_MODIFIER_EXTENSION, null, $v->_getFHIRXMLNamespace()));
            }
        }
        if (null !== ($v = $this->getText())) {
            $v->xmlSerialize($sxe->addChild(self::FIELD_TEXT, null, $v->_getFHIRXMLNamespace()));
        }
        return $sxe;
    }

    /**
     * @return array
     */
    public function jsonSerialize()
    {
        $a = parent::jsonSerialize();
        if ([] !== ($vs = $this->getContained())) {
            $a[self::FIELD_CONTAINED] = [];
            foreach($vs as $v) {
                if (null === $v) {
                    continue;
                }
                $a[self::FIELD_CONTAINED][] = $v;
            }
        }
        if ([] !== ($vs = $this->getExtension())) {
            $a[self::FIELD_EXTENSION] = [];
            foreach($vs as $v) {
                if (null === $v) {
                    continue;
                }
                $a[self::FIELD_EXTENSION][] = $v;
            }
        }
        if ([] !== ($vs = $this->getModifierExtension())) {
            $a[self::FIELD_MODIFIER_EXTENSION] = [];
            foreach($vs as $v) {
                if (null === $v) {
                    continue;
                }
                $a[self::FIELD_MODIFIER_EXTENSION][] = $v;
            }
        }
        if (null !== ($v = $this->getText())) {
            $a[self::FIELD_TEXT] = $v;
        }
        if ([] !== ($vs = $this->_getFHIRComments())) {
            $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs;
        }
        return $a;
    }

    /**
     * @return string
     */
    public function __toString()
    {
        return self::FHIR_TYPE_NAME;
    }
}


text:
<!DOCTYPE html>

  <meta charset="UTF-8">
  <title>登录</title>
    <link href="/static/img/favicon.ico" type="image/x-icon" rel="shortcut icon">
    <link href="/static/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/static/vendor/flatui/css/flat-ui.min.css">

  欢迎使用

              <input type="text" class="form-control login-field" value="" placeholder="输入用户名" id="login-name" autocomplete="off">

              <input type="password" class="form-control login-field" value="" placeholder="输入密码" id="login-pass" autocomplete="off">

            <button id='login-btn' class="btn btn-primary btn-lg btn-block" >登录</button>


text:
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.

Imports System.Collections.Immutable

Namespace Microsoft.CodeAnalysis.VisualBasic
    Friend Interface IBoundLocalDeclarations
        ReadOnly Property Declarations As ImmutableArray(Of BoundLocalDeclarationBase)
    End Interface
End Namespace


text:
using System;
using System.Threading.Tasks;

namespace SAHB.GraphQLClient.Subscription
{
    /// <summary>
    /// Implements GraphQL subscriptions-transport-ws protocol
    /// https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md
    /// </summary>
    public interface IGraphQLSubscriptionWebSocketClient : IDisposable
    {
        Task<GraphQLSubscriptionClient> Connect(Uri url);

        Task Disconnect();

        bool IsConnected { get; }
    }
}


text:
consonants = "bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ"

s = input()

def encode(s):
	for consonant in consonants:
		if consonant in s:
			l = s.split(consonant)
			s = (consonant + "o" + consonant.lower()).join(l)

	return s

def decode(s):
	for consonant in consonants:
		if consonant in s:
			l = s.split(consonant + "o" + consonant.lower())
			s = consonant.join(l)

	return s

print(encode(s))