text:
r""" Installation of Astrolyze using distutils.core.setup.
Basically it copies all scripts to
"""

import os
import sys
import site
import subprocess
from distutils.core import setup

USER = os.getenv("SUDO_USER")
if not USER:
    USER = os.getenv("USER")

data_files=[]

CONFIG_FOLDER = "/home/{}/.astrolyze/".format(USER)

data_files = [("/home/{}/.astrolyze/cfg/".format(USER),
              ["cfg/calibration_error.txt", "cfg/galaxy_parameter.txt",
               "cfg/line_parameter.txt"]),
              ("/home/{}/.ipython/profile_astrolyze/".format(USER),
               ["cfg/ipython_config.py"]),
              ("/home/{}/.astrolyze/".format(USER),
               ["cfg/astrolyze.cfg"])
]

if str(USER) == "None":
    data_files = []

setup(
    name='astrolyze',
    version=open('VERSION').read().strip(),
    author='Christof Buchbender',
    author_email='buchbend@ph1.uni-koeln.de',
    url='https://github.com/buchbend/astrolyze.git',
    packages=['astrolyze',
              'astrolyze/maps',
              'astrolyze/spectra',
              'astrolyze/sed',
              'astrolyze/lte',
              'astrolyze/functions',
             ],
    package_data={"astrolyze":["VERSION"]},
    data_files = data_files,
    license='LICENSE.txt',
    description=('Reduction and analysing tools for (mainly)'
                 'Radioastronomical Data.'),
    long_description=open('README.rst').read(),
    requires=[
        "astropy",
        "numpy",
        "scipy",
        "matplotlib",
        "pysqlite2",
        "docutils",
        "generaltools"
    ],
    classifiers=[
        'Intended Audience :: Science/Research',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: C',
        'Programming Language :: Python :: 2.7',
        'Topic :: Scientific/Engineering :: Astronomy',
        'Topic :: Scientific/Engineering :: Physics'
      ],
    scripts=['scripts/astrolyze_opt_db_setup.py',
             'scripts/astrolyze']
)

subprocess.call("chown -R {0}:{0} {1}".format(USER,
                                              CONFIG_FOLDER),
                shell=True)


text:
var ClientEvents = {};

ClientEvents.OnEnterChatRoom = 'enterChatRoom';
ClientEvents.OnNotifyTyping = 'notifyTyping';
ClientEvents.OnStoppedTyping = 'stoppedTyping';
ClientEvents.OnMessageReceived = 'message';
ClientEvents.OnLeave = 'leave';
ClientEvents.OnDisconnect = 'disconnect';
ClientEvents.OnBootUser = 'bootUser';
ClientEvents.OnWeatherRequested = 'getWeather';

module.exports = ClientEvents;

redpajama_set_name: RedPajamaGithub


text:
require 'rubygems'
# Auto-generated ruby debug require
require "ruby-debug"
Debugger.start
Debugger.settings[:autoeval] = true if Debugger.respond_to?(:settings)

class WarningShot::PermissionResolver
  include WarningShot::Resolver
  add_dependency :core, 'etc'
  add_dependency :core, 'fileutils'

  order  1000
  branch :directory, :file, :symlink
  description 'Validates mode, user, and group permission on files and directories'

  PermissionResource = Struct.new(:target,:target_mode,:target_user,:target_group,:recursive,:no_follow) do
    # Get File.stat by stat name
    # param s [Symbol]
    #   self.stat(:ftype) => File.stat(self.target).ftype
    #
    def stat(s)
      #Read with links because WS will need to read the actual link if its set to no follow for symlinks
      # For files, lstat still works for files
      File.lstat(self.target).send(s)
    rescue Exception => ex
      nil
    end

    def exists?
      @exists ||= File.exist?(self.target)
    end

    # @param type [Symbol]
    #   Retreive the target's current user ID or Name (:id,:name)
    #
    def user(type=:name)
      file_uid = self.stat(:uid)
      (type == :name) ? Etc.getpwuid(file_uid).name : file_uid
    end

    # @param type [Symbol]
    #   Retreive the targets's current group ID or Name (:id,:name)
    #
    def group(type=:name)
      file_gid = self.stat(:gid)
      (type == :name) ? Etc.getgrgid(file_gid).name : file_gid
    end

    # Retreive the target's current mode
    #
    def mode
      "%o" % (self.stat(:mode) & 007777)
    end

    #Attempt to change the user
    def change_user!
      tgt_uid = self.target_user.is_a?(Fixnum) ? self.target_user : Etc.getpwnam(self.target_user).uid
      chown_params = [tgt_uid, nil, self.target]

      if(File.symlink?(self.target) && (self.no_follow == 'both' || self.no_follow == 'chown'))
        File.lchown *chown_params
      elsif(self.stat(:ftype) == 'directory' && (self.recursive == 'both' || self.recursive == 'chown'))
        #DOcumenation for FileUtils.chown_R is wrong (at least for Ubuntu 8.1, takes ID as String.)
        chown_params[1] = chown_params[1].to_s
        FileUtils.chown_R *chown_params
      else
        File.chown *chown_params
      end
    rescue NotImplementedError => ex
      WarningShot::PermissionResolver.logger.error("lchown is not implemented on this machine, (disable nofollow).")
      return false
    rescue Exception => ex
      WarningShot::PermissionResolver.logger.error("Unable to change user for file: #{self.target}; Exception: #{ex.message}")
      return false
    end

    #Attempt to change the group
    def change_group!
      tgt_gid = self.target_group.is_a?(Fixnum) ? self.target_group : Etc.getgrnam(self.target_group).gid
      chown_params = [nil, tgt_gid, self.target]

      if(File.symlink?(self.target) && (self.no_follow == 'both' || self.no_follow == 'chown'))
        File.lchown *chown_params
      elsif(self.stat(:ftype) == 'directory' && (self.recursive == 'both' || self.recursive == 'chown'))
        #DOcumenation for FileUtils.chown_R is wrong (at least for Ubuntu 8.1, takes ID as String.)
        chown_params[1] = chown_params[1].to_s
        FileUtils.chown_R *chown_params
      else
        File.chown *chown_params
      end
    rescue NotImplementedError => ex
      WarningShot::PermissionResolver.logger.error("lchown is not implemented on this machine, (disable nofollow).")
      return false
    rescue Exception => ex
      WarningShot::PermissionResolver.logger.error("Unable to change group for file: #{self.target}; Exception: #{ex.message}")
      return false
    end

    #Attempt to change the mode
    def change_mode!
      chmod_params = [Integer("0" + self.target_mode), self.target]

      if(File.symlink?(self.target) && (self.no_follow == 'both' || self.no_follow == 'chmod'))
        File.lchmod *chmod_params
      elsif(self.stat(:ftype) == 'directory' && (self.recursive == 'both' || self.recursive == 'chmod'))
        FileUtils.chmod_R *chmod_params
      else
        File.chmod *chmod_params
      end
    rescue NotImplementedError => ex
      WarningShot::PermissionResolver.logger.error("lchmod is not implemented on this machine, (disable nofollow).")
      return false
    rescue Exception => ex
      WarningShot::PermissionResolver.logger.error("Unable to change mode for file: #{self.target}; Exception: #{ex.message}")
      return false
    end

    #Are all permissions correct
    def permissions_correct?
      (self.exists? & self.valid_user? & self.valid_group? & self.valid_mode?)
    end

    #Where permissions supplied by the dependency requirement
    def permissions_supplied?
      !!(self.target_mode || self.target_user || self.target_group)
    end

    # is the target's current user correct
    def valid_user?
      unless self.target_user.nil?
        if self.target_user.is_a? String
          !!(self.target_user == self.user)
        else
          !!(self.target_user == self.user(:id))
        end
      else
        # The user is OK if it wasn't specified
        return true
      end
    rescue ArgumentError => ex
      # The user is NOT OK if the user doesn't exist
      WarningShot::PermissionResolver.logger.error("User [#{self.target_user}] does not exist: #{ex.message}")
      return false
    end

    # is the target's current group correct
    def valid_group?
      unless self.target_group.nil?
        if self.target_group.is_a? String
          !!(self.target_group == self.group)
        else
          !!(self.target_group == self.group(:id))
        end
      else
        # The group is OK if it wasn't specified
        return true
      end
    rescue ArgumentError => ex
      # The group is NOT OK if the group doesn't exist
      WarningShot::PermissionResolver.logger.error("Group [#{self.target_group}] does not exist: #{ex.message}")
      return false
    end

    def wrong_permissions
      @wrong_permissions = []
      @wrong_permissions << :user unless valid_user?
      @wrong_permissions << :group unless valid_group?
      @wrong_permissions << :mode unless valid_mode?
      @wrong_permissions
    end

    # is the target's current mode correct
    def valid_mode?
      unless self.target_mode.nil?
        !!(self.mode == ("%o" % self.target_mode))
      else
        return true
      end
    end
  end

  typecast Hash do |yaml|
    PermissionResource.new  File.expand_path(yaml[:target]),
                            yaml[:mode],
                            yaml[:user],
                            yaml[:group],
                            yaml[:recursive],
                            yaml[:no_follow]
  end

  #Symlinks, directories and files are sometimes plain strings, these cant be resolved
  # as far as permissions go, but should at least be cast properly
  typecast(String){|target| PermissionResource.new File.expand_path(target), nil, nil, nil, nil, nil }

  register :test do |resource|
    _valid = resource.exists?

    if _valid
      if resource.permissions_supplied?
        _valid &= resource.valid_user?
        _valid &= resource.valid_group?
        _valid &= resource.valid_mode?

        if _valid
          logger.debug "[PASSED] Permission correct on: #{resource.target}"
        else
          logger.warn "[FAILED] Permission incorrect on: #{resource.target}"
        end
      else
        logger.debug "[N/A] No permissions supplied for: #{resource.target}"
      end
    else
      logger.warn "[FAILED] Resource does not exist: #{resource.target}"
    end

    _valid
  end

  register :resolution do |resource|
    _valid = resource.exists?

    if _valid
      if _valid = resource.permissions_supplied?

        resource.change_user! unless resource.valid_user?
        resource.change_group! unless resource.valid_group?
        resource.change_mode! unless resource.valid_mode?

        if _valid = resource.permissions_correct?
          logger.debug "[RESOLVED] Corrected permission on: #{resource.target}"
        else
          logger.error "[UNRESOLVED] Could not correct permission (#{resource.wrong_permissions.join(',')}) on: #{resource.target}"
        end
      else
        logger.error "[UNRESOLVED] No permissions supplied for: #{resource.target}"
      end
    else
      logger.error "[UNRESOLVED] Resource does not exist: #{resource.target}"
    end

    _valid
  end
end


text:
<?php

/**
 * @namespace
 */
namespace RestPHP\Request\Header;

/**
 * IfUnmodifiedSinceTest - Tests the If-Unmodified-Since header behaves as documented in RFC 2616
 * Section 14
 *
 * @category   RestPHP
 * @package    RestPHP
 * @subpackage Test
 * @author     Joshua Johnston <johnston.joshua@gmail.com>
 * @copyright  2011 RestPHP Framework
 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
 * @link       http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html RFC 2616 Sec 14
 */
class IfUnmodifiedSinceTest extends \PHPUnit_Framework_TestCase
{
    /**
     *
     * @var \RestPHP\Request\Header\IfUnmodifiedSince
     */
    protected $header;

    public function setUp()
    {
        $this->header = new \RestPHP\Request\Header\IfUnmodifiedSince();
    }

    public function testParse()
    {
        $this->markTestIncomplete('No tests implemented');
    }
}


text:
import { Context, Middleware } from '../core/road';

export interface StoreValsContext extends Context {
	/**
	 * Stores a value
	 * @param field string
	 * @param val unknown
	 */
	storeVal: (field: string, val: unknown) => void,
	/**
	 * Retrieves a value
	 * @param field string
	 */
	getVal: (field: string) => unknown,
	/**
	 * Retrieves all values
	 */
	getAllVals: () => { [key: string]: unknown }
}

/**
 * Exposes two functions on the context that allow you to store and retrieve values.
 * 	You can of course apply values directly to the context, but this is useful
 * 	to reduce polluting the context
 */
export const middleware: Middleware<StoreValsContext> = function (method, path, body, headers, next) {
	const storedVals: {[key: string]: unknown} = {};

	this.storeVal = (field, val) => {
		storedVals[field] = val;
	};

	this.getVal = (field) => {
		return storedVals[field];
	};

	this.getAllVals = () => {
		return storedVals;
	};

	return next();
};


text:
/*-------------------------------------------------------------------------
 *
 * getaddrinfo.h
 *	  Support getaddrinfo() on platforms that don't have it.
 *
 * Note: we use our own routines on platforms that don't HAVE_STRUCT_ADDRINFO,
 * whether or not the library routine getaddrinfo() can be found.  This
 * policy is needed because on some platforms a manually installed libbind.a
 * may provide getaddrinfo(), yet the system headers may not provide the
 * struct definitions needed to call it.  To avoid conflict with the libbind
 * definition in such cases, we rename our routines to pg_xxx() via macros.
 *
 * This code will also work on platforms where struct addrinfo is defined
 * in the system headers but no getaddrinfo() can be located.
 *
 * Copyright (c) 2003-2007, PostgreSQL Global Development Group
 *
 *-------------------------------------------------------------------------
 */
#ifndef ADDRINFO_H
#define ADDRINFO_H

/* Various macros that ought to be in <netdb.h>, but might not be */

#ifndef EAI_FAIL
#define EAI_BADFLAGS	(-1)
#define EAI_NONAME		(-2)
#define EAI_AGAIN		(-3)
#define EAI_FAIL		(-4)
#define EAI_FAMILY		(-6)
#define EAI_SOCKTYPE	(-7)
#define EAI_SERVICE		(-8)
#define EAI_MEMORY		(-10)
#define EAI_SYSTEM		(-11)
#endif   /* !EAI_FAIL */

#ifndef AI_PASSIVE
#define AI_PASSIVE		0x0001
#endif

#ifndef AI_NUMERICHOST
/*
 * some platforms don't support AI_NUMERICHOST; define as zero if using
 * the system version of getaddrinfo...
 */
#if defined(HAVE_STRUCT_ADDRINFO) && defined(HAVE_GETADDRINFO)
#define AI_NUMERICHOST	0
#else
#define AI_NUMERICHOST	0x0004
#endif
#endif

#ifndef AI_CANONNAME
#if defined(HAVE_STRUCT_ADDRINFO) && defined(HAVE_GETADDRINFO)
#define AI_CANONNAME 0
#else
#define AI_CANONNAME 0x0008
#endif
#endif

#ifndef AI_NUMERICSERV
#if defined(HAVE_STRUCT_ADDRINFO) && defined(HAVE_GETADDRINFO)
#define AI_NUMERICSERV 0
#else
#define AI_NUMERICSERV 0x0010
#endif
#endif

#ifndef NI_NUMERICHOST
#define NI_NUMERICHOST	1
#endif

#ifndef NI_NUMERICSERV
#define NI_NUMERICSERV	2
#endif

#ifndef NI_NOFQDN
#define NI_NOFQDN	4
#endif

#ifndef NI_NAMEREQD
#define NI_NAMEREQD 	8
#endif

#ifndef NI_DGRAM
#define NI_DGRAM	16
#endif

#ifndef NI_MAXHOST
#define NI_MAXHOST	1025
#endif

#ifndef NI_MAXSERV
#define NI_MAXSERV	32
#endif

#ifndef HAVE_STRUCT_ADDRINFO
struct addrinfo
{
	int			ai_flags;
	int			ai_family;
	int			ai_socktype;
	int			ai_protocol;
	size_t		ai_addrlen;
	struct sockaddr *ai_addr;
	char	   *ai_canonname;
	struct addrinfo *ai_next;
};
#endif   /* !HAVE_STRUCT_ADDRINFO */

#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
struct sockaddr_storage {
	unsigned short ss_family;
	unsigned long ss_align;
	char ss_padding[128 - sizeof (unsigned long)];
};
#endif	/* !HAVE_STRUCT_SOCKADDR_STORAGE */

#ifndef HAVE_GETADDRINFO

/* Rename private copies per comments above */
#ifdef getaddrinfo
#undef getaddrinfo
#endif
#define getaddrinfo pg_getaddrinfo

#ifdef freeaddrinfo
#undef freeaddrinfo
#endif
#define freeaddrinfo pg_freeaddrinfo

#ifdef gai_strerror
#undef gai_strerror
#endif
#define gai_strerror pg_gai_strerror

#ifdef getnameinfo
#undef getnameinfo
#endif
#define getnameinfo pg_getnameinfo

extern int getaddrinfo(const char *node, const char *service,
			const struct addrinfo * hints, struct addrinfo ** res);
extern void freeaddrinfo(struct addrinfo * res);
extern const char *gai_strerror(int errcode);
extern int getnameinfo(const struct sockaddr * sa, socklen_t salen,
			char *node, size_t nodelen,
			char *service, size_t servicelen, int flags);
#endif   /* !HAVE_GETADDRINFO */

#endif   /* ADDRINFO_H */


text:
/**
 * This code is released under the
 * Apache License Version 2.0 http://www.apache.org/licenses/.
 *
 * (c) Daniel Lemire, http://lemire.me/en/
 */
#ifndef SIMD_COMPRESSION_COMPOSITECODEC_H_
#define SIMD_COMPRESSION_COMPOSITECODEC_H_

#include "common.h"
#include "util.h"
#include "codecs.h"

namespace SIMDCompression
{

/**
 * This is a useful class for CODEC that only compress
 * data having length a multiple of some unit length.
 */
template<class Codec1, class Codec2>
class CompositeCodec: public IntegerCODEC {
public:
    CompositeCodec() :
        codec1(), codec2() {
    }
    Codec1 codec1;
    Codec2 codec2;
    void encodeArray(uint32_t *in, const size_t length, uint32_t *out,
                     size_t &nvalue) {
        const size_t roundedlength = length / Codec1::BlockSize
                                     * Codec1::BlockSize;
        size_t nvalue1 = nvalue;
        codec1.encodeArray(in, roundedlength, out, nvalue1);

        if (roundedlength < length) {
            ASSERT(nvalue >= nvalue1, nvalue << " " << nvalue1);
            size_t nvalue2 = nvalue - nvalue1;
            codec2.encodeArray(in + roundedlength, length - roundedlength,
                               out + nvalue1, nvalue2);
            nvalue = nvalue1 + nvalue2;
        } else {
            nvalue = nvalue1;
        }
    }
    const uint32_t *decodeArray(const uint32_t *in, const size_t length,
                                uint32_t *out, size_t &nvalue) {
#ifndef NDEBUG
        const uint32_t *const initin(in);
#endif
        size_t mynvalue1 = nvalue;
        const uint32_t *in2 = codec1.decodeArray(in, length, out, mynvalue1);
        if (length + in > in2) {
            assert(nvalue > mynvalue1);
            size_t nvalue2 = nvalue - mynvalue1;
            const uint32_t *in3 = codec2.decodeArray(in2, length - (in2 - in),
                                  out + mynvalue1, nvalue2);
            nvalue = mynvalue1 + nvalue2;
            assert(initin + length >= in3);
            return in3;
        }
        nvalue = mynvalue1;
        assert(initin + length >= in2);
        return in2;
    }
    std::string name() const {
        std::ostringstream convert;
        convert << codec1.name() << "+" << codec2.name();
        return convert.str();
    }
};

}

#endif /* COMPOSITECODEC_H_ */


text:
// Copyright 2014 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.devtools.build.buildjar.javac.plugins.dependency;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Joiner;
import com.google.common.base.Splitter;
import com.google.common.base.Verify;
import com.google.devtools.build.buildjar.JarOwner;
import com.google.devtools.build.buildjar.javac.plugins.BlazeJavaCompilerPlugin;
import com.google.devtools.build.lib.view.proto.Deps;
import com.google.devtools.build.lib.view.proto.Deps.Dependency.Kind;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Wrapper class for managing dependencies on top of
 * {@link com.google.devtools.build.buildjar.javac.BlazeJavaCompiler}. If strict_java_deps is
 * enabled, it keeps two maps between jar names (as they appear on the classpath) and their
 * originating targets, one for direct dependencies and the other for transitive (indirect)
 * dependencies, and enables the {@link StrictJavaDepsPlugin} to perform the actual checks. The
 * plugin also collects dependency information during compilation, and DependencyModule generates a
 * .jdeps artifact summarizing the discovered dependencies.
 */
public final class DependencyModule {

  public static enum StrictJavaDeps {
    /** Legacy behavior: Silently allow referencing transitive dependencies. */
    OFF(false),
    /** Warn about transitive dependencies being used directly. */
    WARN(true),
    /** Fail the build when transitive dependencies are used directly. */
    ERROR(true);

    private final boolean enabled;

    StrictJavaDeps(boolean enabled) {
      this.enabled = enabled;
    }

    /** Convenience method for just checking if it's not OFF */
    public boolean isEnabled() {
      return enabled;
    }
  }

  private final StrictJavaDeps strictJavaDeps;
  private final Map<String, JarOwner> directJarsToTargets;
  private final Map<String, JarOwner> indirectJarsToTargets;
  private final boolean strictClasspathMode;
  private final Set<String> depsArtifacts;
  private final String ruleKind;
  private final String targetLabel;
  private final String outputDepsProtoFile;
  private final Set<String> usedClasspath;
  private final Map<String, Deps.Dependency> explicitDependenciesMap;
  private final Map<String, Deps.Dependency> implicitDependenciesMap;
  Set<String> requiredClasspath;
  private final FixMessage fixMessage;
  private final Set<String> exemptGenerators;

  DependencyModule(
      StrictJavaDeps strictJavaDeps,
      Map<String, JarOwner> directJarsToTargets,
      Map<String, JarOwner> indirectJarsToTargets,
      boolean strictClasspathMode,
      Set<String> depsArtifacts,
      String ruleKind,
      String targetLabel,
      String outputDepsProtoFile,
      FixMessage fixMessage,
      Set<String> exemptGenerators) {
    this.strictJavaDeps = strictJavaDeps;
    this.directJarsToTargets = directJarsToTargets;
    this.indirectJarsToTargets = indirectJarsToTargets;
    this.strictClasspathMode = strictClasspathMode;
    this.depsArtifacts = depsArtifacts;
    this.ruleKind = ruleKind;
    this.targetLabel = targetLabel;
    this.outputDepsProtoFile = outputDepsProtoFile;
    this.explicitDependenciesMap = new HashMap<>();
    this.implicitDependenciesMap = new HashMap<>();
    this.usedClasspath = new HashSet<>();
    this.fixMessage = fixMessage;
    this.exemptGenerators = exemptGenerators;
  }

  /**
   * Returns a plugin to be enabled in the compiler.
   */
  public BlazeJavaCompilerPlugin getPlugin() {
    return new StrictJavaDepsPlugin(this);
  }

  /**
   * Writes dependency information to the deps file in proto format, if specified.
   *
   * This is a replacement for {@link #emitUsedClasspath} above, which only outputs the used
   * classpath. We collect more precise dependency information to allow Blaze to analyze both
   * strict and unused dependencies based on the new deps.proto.
   */
  public void emitDependencyInformation(String classpath, boolean successful) throws IOException {
    if (outputDepsProtoFile == null) {
      return;
    }

    try (BufferedOutputStream out =
             new BufferedOutputStream(new FileOutputStream(outputDepsProtoFile))) {
      buildDependenciesProto(classpath, successful).writeTo(out);
    } catch (IOException ex) {
      throw new IOException("Cannot write dependencies to " + outputDepsProtoFile, ex);
    }
  }

  @VisibleForTesting
  Deps.Dependencies buildDependenciesProto(String classpath, boolean successful) {
    Deps.Dependencies.Builder deps = Deps.Dependencies.newBuilder();
    if (targetLabel != null) {
      deps.setRuleLabel(targetLabel);
    }
    deps.setSuccess(successful);
    // Filter using the original classpath, to preserve ordering.
    for (String entry : classpath.split(":")) {
      if (explicitDependenciesMap.containsKey(entry)) {
        deps.addDependency(explicitDependenciesMap.get(entry));
      } else if (implicitDependenciesMap.containsKey(entry)) {
        deps.addDependency(implicitDependenciesMap.get(entry));
      }
    }
    return deps.build();
  }

  /**
   * Returns whether strict dependency checks (strictJavaDeps) are enabled.
   */
  public boolean isStrictDepsEnabled() {
    return strictJavaDeps.isEnabled();
  }

  /**
   * Returns the mapping for jars of direct dependencies. The keys are full paths (as seen on the
   * classpath), and the values are build target names.
   */
  public Map<String, JarOwner> getDirectMapping() {
    return directJarsToTargets;
  }

  /**
   * Returns the mapping for jars of indirect dependencies. The keys are full paths (as seen on the
   * classpath), and the values are build target names.
   */
  public Map<String, JarOwner> getIndirectMapping() {
    return indirectJarsToTargets;
  }

  /**
   * Returns the strict dependency checking (strictJavaDeps) setting.
   */
  public StrictJavaDeps getStrictJavaDeps() {
    return strictJavaDeps;
  }

  /**
   * Returns the map collecting precise explicit dependency information.
   */
  public Map<String, Deps.Dependency> getExplicitDependenciesMap() {
    return explicitDependenciesMap;
  }

  /**
   * Returns the map collecting precise implicit dependency information.
   */
  public Map<String, Deps.Dependency> getImplicitDependenciesMap() {
    return implicitDependenciesMap;
  }

  /**
   * Returns the type (rule kind) of the originating target.
   */
  public String getRuleKind() {
    return ruleKind;
  }

  /**
   * Returns the name (label) of the originating target.
   */
  public String getTargetLabel() {
    return targetLabel;
  }

  /**
   * Returns the file name collecting dependency information.
   */
  public String getOutputDepsProtoFile() {
    return outputDepsProtoFile;
  }

  @VisibleForTesting
  Set<String> getUsedClasspath() {
    return usedClasspath;
  }

  /** Returns a message to suggest fix when a missing indirect dependency is found. */
  public FixMessage getFixMessage() {
    return fixMessage;
  }

  /**
   * Return a set of generator values that are exempt from strict dependencies.
   */
  public Set<String> getExemptGenerators() {
    return exemptGenerators;
  }

  /**
   * Returns whether classpath reduction is enabled for this invocation.
   */
  public boolean reduceClasspath() {
    return strictClasspathMode;
  }

  private static final Splitter CLASSPATH_SPLITTER = Splitter.on(':');
  private static final Joiner CLASSPATH_JOINER = Joiner.on(File.pathSeparator);

  /**
   * Computes a reduced compile-time classpath from the union of direct dependencies and their
   * dependencies, as listed in the associated .deps artifacts.
   */
  public String computeStrictClasspath(String originalClasspath) throws IOException {
    if (!strictClasspathMode) {
      return originalClasspath;
    }

    return CLASSPATH_JOINER.join(
        computeStrictClasspath(CLASSPATH_SPLITTER.split(originalClasspath)));
  }

  /**
   * Computes a reduced compile-time classpath from the union of direct dependencies and their
   * dependencies, as listed in the associated .deps artifacts.
   */
  public List<String> computeStrictClasspath(Iterable<String> originalClasspath)
      throws IOException {
    Verify.verify(strictClasspathMode);

    // Classpath = direct deps + runtime direct deps + their .deps
    requiredClasspath = new HashSet<>(directJarsToTargets.keySet());

    for (String depsArtifact : depsArtifacts) {
       collectDependenciesFromArtifact(depsArtifact);
    }

    // Filter the initial classpath and keep the original order
    List<String> filteredClasspath = new ArrayList<>();
    for (String entry : originalClasspath) {
      if (requiredClasspath.contains(entry)) {
        filteredClasspath.add(entry);
      }
    }
    return filteredClasspath;
  }

  @VisibleForTesting
  void setStrictClasspath(Set<String> strictClasspath) {
    this.requiredClasspath = strictClasspath;
  }

  /**
   * Updates {@link #requiredClasspath} to include dependencies from the given output artifact.
   */
  private void collectDependenciesFromArtifact(String path) throws IOException {
    try (BufferedInputStream bis = new BufferedInputStream(new FileInputStream(path))) {
      Deps.Dependencies deps = Deps.Dependencies.parseFrom(bis);
      // Sanity check to make sure we have a valid proto.
      if (!deps.hasRuleLabel()) {
        throw new IOException("Could not parse Deps.Dependencies message from proto.");
      }
      for (Deps.Dependency dep : deps.getDependencyList()) {
        if (dep.getKind() == Kind.EXPLICIT
            || dep.getKind() == Kind.IMPLICIT
            || dep.getKind() == Kind.INCOMPLETE) {
          requiredClasspath.add(dep.getPath());
        }
      }
    } catch (IOException e) {
      throw new IOException(String.format("error reading deps artifact: %s", path), e);
    }
  }

  /**
   * A functional that formats a message for the user about a missing dependency that they should
   * add to unbreak their build.
   */
  public interface FixMessage {
    String get(Iterable<JarOwner> missing, String recipient, boolean useColor);
  }

  /**
   * Builder for {@link DependencyModule}.
   */
  public static class Builder {

    private StrictJavaDeps strictJavaDeps = StrictJavaDeps.OFF;
    private final Map<String, JarOwner> directJarsToTargets = new HashMap<>();
    private final Map<String, JarOwner> indirectJarsToTargets = new HashMap<>();
    private final Set<String> depsArtifacts = new HashSet<>();
    private String ruleKind;
    private String targetLabel;
    private String outputDepsProtoFile;
    private boolean strictClasspathMode = false;
    private FixMessage fixMessage = new DefaultFixMessage();
    private final Set<String> exemptGenerators = new HashSet<>();

    private static class DefaultFixMessage implements DependencyModule.FixMessage {
      @Override
      public String get(Iterable<JarOwner> missing, String recipient, boolean useColor) {
        StringBuilder missingTargetsStr = new StringBuilder();
        for (JarOwner owner : missing) {
          missingTargetsStr.append(owner.label());
          missingTargetsStr.append(" ");
        }

        return String.format(
            "%s** Please add the following dependencies:%s\n  %s to %s\n\n",
            useColor ? "\033[35m\033[1m" : "",
            useColor ? "\033[0m" : "",
            missingTargetsStr.toString(),
            recipient);
      }
    }

    /**
     * Constructs the DependencyModule, guaranteeing that the maps are
     * never null (they may be empty), and the default strictJavaDeps setting
     * is OFF.
     *
     * @return an instance of DependencyModule
     */
    public DependencyModule build() {
      return new DependencyModule(
          strictJavaDeps,
          directJarsToTargets,
          indirectJarsToTargets,
          strictClasspathMode,
          depsArtifacts,
          ruleKind,
          targetLabel,
          outputDepsProtoFile,
          fixMessage,
          exemptGenerators);
    }

    /**
     * Sets the strictness level for dependency checking.
     *
     * @param strictJavaDeps level, as specified by {@link StrictJavaDeps}
     * @return this Builder instance
     */
    public Builder setStrictJavaDeps(String strictJavaDeps) {
      this.strictJavaDeps = StrictJavaDeps.valueOf(strictJavaDeps);
      return this;
    }

    /**
     * Sets the type (rule kind) of the originating target.
     *
     * @param ruleKind kind, such as the rule kind of a RuleConfiguredTarget
     * @return this Builder instance
     */
    public Builder setRuleKind(String ruleKind) {
      this.ruleKind = ruleKind;
      return this;
    }

    /**
     * Sets the name (label) of the originating target.
     *
     * @param targetLabel label, such as the label of a RuleConfiguredTarget.
     * @return this Builder instance.
     */
    public Builder setTargetLabel(String targetLabel) {
      this.targetLabel = targetLabel;
      return this;
    }

    /**
     * Adds direct mappings to the existing map for direct dependencies.
     *
     * @param directMappings a map of paths of jar artifacts, as seen on classpath, to full names of
     *     build targets providing the jar.
     * @return this Builder instance
     */
    public Builder addDirectMappings(Map<String, JarOwner> directMappings) {
      directJarsToTargets.putAll(directMappings);
      return this;
    }

    /**
     * Adds an indirect mapping to the existing map for indirect dependencies.
     *
     * @param jar path of jar artifact, as seen on classpath.
     * @param target full name of build target providing the jar.
     * @return this Builder instance
     */
    public Builder addIndirectMapping(String jar, JarOwner target) {
      indirectJarsToTargets.put(jar, target);
      return this;
    }

    /**
     * Adds indirect mappings to the existing map for indirect dependencies.
     *
     * @param indirectMappings a map of paths of jar artifacts, as seen on classpath, to full names
     *     of build targets providing the jar.
     * @return this Builder instance
     */
    public Builder addIndirectMappings(Map<String, JarOwner> indirectMappings) {
      indirectJarsToTargets.putAll(indirectMappings);
      return this;
    }

    /**
     * Sets the name of the file that will contain dependency information in the protocol buffer
     * format.
     *
     * @param outputDepsProtoFile output file name for dependency information
     * @return this Builder instance
     */
    public Builder setOutputDepsProtoFile(String outputDepsProtoFile) {
      this.outputDepsProtoFile = outputDepsProtoFile;
      return this;
    }

    /**
     * Adds a collection of dependency artifacts to use when reducing the compile-time classpath.
     *
     * @param depsArtifacts dependency artifacts
     * @return this Builder instance
     */
    public Builder addDepsArtifacts(Collection<String> depsArtifacts) {
      this.depsArtifacts.addAll(depsArtifacts);
      return this;
    }

    /**
     * Requests compile-time classpath reduction based on provided dependency artifacts.
     *
     * @return this Builder instance
     */
    public Builder setReduceClasspath() {
      this.strictClasspathMode = true;
      return this;
    }

    /**
     * Set the message to display when a missing indirect dependency is found.
     *
     * @param fixMessage the fix message
     * @return this Builder instance
     */
    public Builder setFixMessage(FixMessage fixMessage) {
      this.fixMessage = fixMessage;
      return this;
    }

    /**
     * Add a generator to the exempt set.
     *
     * @param exemptGenerator the generator class name
     * @return this Builder instance
     */
    public Builder addExemptGenerator(String exemptGenerator) {
      exemptGenerators.add(exemptGenerator);
      return this;
    }
  }
}


text:
class Profile;

namespace chromeos {

bool IsAccountManagerAvailable(const Profile* const profile);

// Initializes account manager if it has not been initialized yet. Safe to call
// multiple times. |cryptohome_root_dir| is root of user's home partition (same
// as the Profile directory). |initialization_callback| is used by the caller to
// inform itself about a successful initialization.
void InitializeAccountManager(const base::FilePath& cryptohome_root_dir,
                              base::OnceClosure initialization_callback);

}  // namespace chromeos

#endif  // CHROME_BROWSER_CHROMEOS_ACCOUNT_MANAGER_ACCOUNT_MANAGER_UTIL_H_


text:
/** Space for all imported Fonts **/

/** Main Style goes here**/

/** Place here all Media Queries and it's styles.**/

/** Default Style. Don't change. (320px) **/
@media screen and  (max-width: 20em) {}

/** Extra Small Devices, Phones (480px) **/
@media screen and (min-width : 30em) {

}

/** Small Screens, Tablets (720px) **/
@media screen and (min-width: 45em) {

}

/** Medium Devices, Desktops (992px)**/
@media screen and (min-width: 62em) {

}

/** HD Screen, Large Devices, Wide Screens (1200px) **/
@media screen and (min-width: 75em) {

}

/** Full HD Screen, Large Devices, Wide Screens (1920px) **/
@media screen and (min-width: 120em) {

}

/** Retina Screen , Large Devices, Wide Screens(2560px) **/
@media screen and (min-width: 160em) {

}

/** 4k Screens, Large Devices, Wide Screens (3840px) **/
@media screen and (min-width: 240em) {

}

/** 5k Screens, Large Devices, Wide Screens (5120px) **/
@media screen and (min-width: 320em) {

}

/** CSS for Printing **/
@media print {

}


text:
Toto je **tučný text** a toto *zvýraznění*. Toto je [odkaz](http://voho.eu).

- nečíslovaný seznam 1
- nečíslovaný seznam 2
- nečíslovaný seznam 3

1. číslovaný seznam 1
1. číslovaný seznam 2
1. číslovaný seznam 3

### Runkit (Javascript)

```runkit:js
var getJSON = require("async-get-json");
await getJSON("https://storage.googleapis.com/maps-devrel/google.json");
```

### Zdrojový kód (bez syntaxe)

```
test
```

### Zdrojový kód (Java)

```java
public static BigInteger power(final BigInteger base, final BigInteger power) {
    if (BigInteger.ZERO.compareTo(power) > 0) {
        // power < 0
        throw new IllegalArgumentException("Power must be >= 0.");
    } else if (BigInteger.ZERO.equals(power)) {
        // power = 0
        return BigInteger.ONE;
    } else {
        BigInteger result = base;
        BigInteger remains = power;
        while (remains.compareTo(BigInteger.ONE) > 0) {
            result = result.multiply(base);
            remains = remains.subtract(BigInteger.ONE);
        }
        return result;
    }
}
```

### Zdrojový kód (Java z Githubu)

```include:java
LZ77Codeword.java
```

### UML

```uml:class
class Responsible <<interface>> {
  handle(request: Request)
}
Client -right-> Responsible : " first"
Responsible --> Responsible : next
```

```uml:seq
User -> View : perform action via UI
View -> Controller : invoke action
Controller -> Model : change
Model --> Controller
Model --> View : notifies about change
View -> Model : request current state
Model --> View
View --> User : update UI
```

### Dot

```dot:digraph
splines=ortho
table [shape=record,label="<n>_ _ _|<h>hello|world|this|is|...|<t>queue"]
head [shape=none]
tail [shape=none]
head->table:h
tail->table:t
add->table:n
table:t->take
{rank=same;add;take;}
```

```dot:graph
rankdir=LR
1--2 [label=" e1"];
1--3 [label=" e2"];
1--4 [label=" e3"];
3--4 [label=" e4"];
```

### TeX

€€ \sum _{k=1}^{n}I_{k}=0, \sum _{k=1}^{n}U_{k}=0 €€

### Definice

enqueue(*a*)
: vloží prvek *a* na konec fronty

dequeue()
: vrátí první (nejstarší) prvek ze začátku fronty a odebere jej

### Tabulka

| Skupina | Frekvence
|---|---
| radiové vlny | 3 kHz až 300 MHz
| mikrovlny | 0.3 až stovky GHz
| infračervené záření | 1e11 až 4e14 Hz

### Obrázek

![hradlo NOR](gates_nor.png)

### TODO indikátor

!TODO!

### Citát

> Good design adds value faster than it adds cost. *Thomas C. Gale*


text:
package com.hazelcast.map.impl.operation;

import com.hazelcast.internal.serialization.Data;
import com.hazelcast.map.impl.MapDataSerializerHook;
import com.hazelcast.map.impl.record.Record;
import com.hazelcast.nio.ObjectDataInput;
import com.hazelcast.nio.ObjectDataOutput;
import com.hazelcast.spi.impl.operationservice.BackupAwareOperation;
import com.hazelcast.spi.impl.operationservice.Operation;
import com.hazelcast.spi.impl.operationservice.PartitionAwareOperation;
import com.hazelcast.spi.merge.SplitBrainMergePolicy;
import com.hazelcast.spi.merge.SplitBrainMergeTypes.MapMergeTypes;

import javax.annotation.Nonnull;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import static com.hazelcast.core.EntryEventType.MERGED;

/**
 * Contains multiple merge entries for split-brain
 * healing with a {@link SplitBrainMergePolicy}.
 *
 * @since 3.10
 */
public class MergeOperation extends MapOperation
        implements PartitionAwareOperation, BackupAwareOperation {

    private boolean disableWanReplicationEvent;
    private List<MapMergeTypes<Object, Object>> mergingEntries;
    private SplitBrainMergePolicy<Object, MapMergeTypes<Object, Object>, Object> mergePolicy;

    private transient int currentIndex;
    private transient boolean hasMapListener;
    private transient boolean hasWanReplication;
    private transient boolean hasBackups;
    private transient boolean hasInvalidation;

    private transient List<Data> invalidationKeys;
    private transient boolean hasMergedValues;

    private List backupPairs;

    public MergeOperation() {
    }

    public MergeOperation(String name, List<MapMergeTypes<Object, Object>> mergingEntries,
                          SplitBrainMergePolicy<Object, MapMergeTypes<Object, Object>, Object> mergePolicy,
                          boolean disableWanReplicationEvent) {
        super(name);
        this.mergingEntries = mergingEntries;
        this.mergePolicy = mergePolicy;
        this.disableWanReplicationEvent = disableWanReplicationEvent;
    }

    @Override
    protected boolean disableWanReplicationEvent() {
        return disableWanReplicationEvent;
    }

    @Override
    protected void runInternal() {
        hasMapListener = mapEventPublisher.hasEventListener(name);
        hasWanReplication = mapContainer.isWanReplicationEnabled()
                && !disableWanReplicationEvent;
        hasBackups = mapContainer.getTotalBackupCount() > 0;
        hasInvalidation = mapContainer.hasInvalidationListener();

        if (hasBackups) {
            backupPairs = new ArrayList(2 * mergingEntries.size());
        }

        if (hasInvalidation) {
            invalidationKeys = new ArrayList<>(mergingEntries.size());
        }

        // if currentIndex is not zero, this is a
        // continuation of the operation after a NativeOOME
        int size = mergingEntries.size();
        while (currentIndex < size) {
            merge(mergingEntries.get(currentIndex));
            currentIndex++;
        }
    }

    private void merge(MapMergeTypes<Object, Object> mergingEntry) {
        Data dataKey = getNodeEngine().toData(mergingEntry.getRawKey());
        Data oldValue = hasMapListener ? getValue(dataKey) : null;

        if (recordStore.merge(mergingEntry, mergePolicy, getCallerProvenance())) {
            hasMergedValues = true;

            Data dataValue = getValueOrPostProcessedValue(dataKey, getValue(dataKey));
            mapServiceContext.interceptAfterPut(mapContainer.getInterceptorRegistry(), dataValue);

            if (hasMapListener) {
                mapEventPublisher.publishEvent(getCallerAddress(), name, MERGED, dataKey, oldValue, dataValue);
            }

            if (hasWanReplication) {
                publishWanUpdate(dataKey, dataValue);
            }

            if (hasInvalidation) {
                invalidationKeys.add(dataKey);
            }

            if (hasBackups) {
                backupPairs.add(dataKey);
                backupPairs.add(dataValue);
            }

            evict(dataKey);
        }
    }

    private Data getValueOrPostProcessedValue(Data dataKey, Data dataValue) {
        if (!isPostProcessing(recordStore)) {
            return dataValue;
        }
        Record record = recordStore.getRecord(dataKey);
        return mapServiceContext.toData(record.getValue());
    }

    private Data getValue(Data dataKey) {
        Record record = recordStore.getRecord(dataKey);
        if (record != null) {
            return mapServiceContext.toData(record.getValue());
        }
        return null;
    }

    @Override
    public Object getResponse() {
        return hasMergedValues;
    }

    @Override
    public boolean shouldBackup() {
        return hasBackups && !backupPairs.isEmpty();
    }

    @Override
    public int getSyncBackupCount() {
        return mapContainer.getBackupCount();
    }

    @Override
    public int getAsyncBackupCount() {
        return mapContainer.getAsyncBackupCount();
    }

    @Override
    protected void afterRunInternal() {
        invalidateNearCache(invalidationKeys);

        super.afterRunInternal();
    }

    @Override
    public Operation getBackupOperation() {
        return new PutAllBackupOperation(name,
                toBackupListByRemovingEvictedRecords(), disableWanReplicationEvent);
    }

    /**
     * Since records may get evicted on NOOME after
     * they have been merged. We are re-checking
     * backup pair list to eliminate evicted entries.
     *
     * @return list of existing records which can
     * safely be transferred to backup replica.
     */
    @Nonnull
    private List toBackupListByRemovingEvictedRecords() {
        List toBackupList = new ArrayList(backupPairs.size());
        for (int i = 0; i < backupPairs.size(); i += 2) {
            Data dataKey = ((Data) backupPairs.get(i));
            Record record = recordStore.getRecord(dataKey);
            if (record != null) {
                toBackupList.add(dataKey);
                toBackupList.add(backupPairs.get(i + 1));
                toBackupList.add(record);
            }
        }
        return toBackupList;
    }

    @Override
    protected void writeInternal(ObjectDataOutput out) throws IOException {
        super.writeInternal(out);

        out.writeInt(mergingEntries.size());
        for (MapMergeTypes mergingEntry : mergingEntries) {
            out.writeObject(mergingEntry);
        }
        out.writeObject(mergePolicy);
        out.writeBoolean(disableWanReplicationEvent);
    }

    @Override
    protected void readInternal(ObjectDataInput in) throws IOException {
        super.readInternal(in);

        int size = in.readInt();
        mergingEntries = new ArrayList<>(size);
        for (int i = 0; i < size; i++) {
            MapMergeTypes mergingEntry = in.readObject();
            mergingEntries.add(mergingEntry);
        }
        mergePolicy = in.readObject();
        disableWanReplicationEvent = in.readBoolean();
    }

    @Override
    public int getClassId() {
        return MapDataSerializerHook.MERGE;
    }
}


text:
package be.acrosoft.gaia.shared.util;

/**
 * This class contains global constants that can be used both on server and
 * client side.
 */
public class GaiaConstants
{

  /**
   * Windows.
   */
  public static final String OS_NAME_WINDOWS="Windows"; //$NON-NLS-1$

  /**
   * Linux.
   */
  public static final String OS_NAME_LINUX="Linux"; //$NON-NLS-1$

  /**
   * Mac OS X
   */
  public static final String OS_NAME_MACOSX="Mac OS X"; //$NON-NLS-1$

}


text:
<!doctype html>

    <meta charset="utf-8">

    <title>LUG@GT - Presentation</title>

    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <link rel="stylesheet" href="css/reveal.min.css">
    <link rel="stylesheet" href="css/theme/solarized.css" id="theme">

    <link rel="stylesheet" href="lib/css/zenburn.css">

Linux Users Group

Georgia Tech

Spring 2015

          Chat at #lugatgt on irc.freenode.net

What is

              DuckDuckGo has everything you expect a search engine to have, including images, news and places, all while respecting your privacy. Great results without tracking you. That's DuckDuckGo in a nutshell.

Why use DuckDuckGo?

Respects your privacy

Zero Click Info

Bang! syntax

Time to Improve It!

DuckDuckGo makes it very easy to contribute instant answers through
            DuckDuckHack

Demo Time!

            Github Repo

But first...

Let's learn just enough Perl.

Hello World

#!/usr/bin/perl
use strict;
use warnings;

print "Hello World!\n";

Using Variables

my $x = 10; #scalar variables begin with a $
my @a = (10,12,43); #arrays begin with a @
my %h = ( name => 'Collin', age => 19); #hashes begin with a %
$_ = 10; #perl has a special variable called the default variable

Subroutines (functions)

sub foo {
    my ($p1, $p2) = @_; #destructuring arguments
    return 'bar';
}

foo(); #calling the subroutine

Types

Types in perl are kind of weird.
            Basically the type information can be encoded in the operators.*

my $day = 21;
print "Today is January " . $day . " !";

            *Disclaimer: I don't know perl very well.

Regex

$_ = 'foobar';

if (/.*bar.*/) { # $var =~ /.*bar.*/
    print "$_ contains bar";
} else {
    print "$_ does not match";
}

References

NerdBusiness.com

DuckDuckGo Tour

Image References

DuckDuckGo Logo


text:
package com.drop.spper.di.component;

import com.drop.spper.di.moudle.SetVoiceModule;
import com.drop.spper.mvp.ui.activity.SetVoiceActivity;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.di.scope.ActivityScope;

import dagger.Component;

/**
 * 通过Template生成对应页面的MVP和Dagger代码,请注意输入框中输入的名字必须相同
 * 由于每个项目包结构都不一定相同,所以每生成一个文件需要自己导入import包名,可以在设置中设置自动导入包名
 * 请在对应包下按以下顺序生成对应代码,Contract->Model->Presenter->Activity->Module->Component
 * 因为生成Activity时,Module和Component还没生成,但是Activity中有它们的引用,所以会报错,但是不用理会
 * 继续将Module和Component生成完后,编译一下项目再回到Activity,按提示修改一个方法名即可
 * 如果想生成Fragment的相关文件,则将上面构建顺序中的Activity换为Fragment,并将Component中inject方法的参数改为此Fragment
 */

/**
 * Created by Drop on 2017/5/22.
 */

@ActivityScope
@Component(modules = SetVoiceModule.class, dependencies = AppComponent.class)
public interface SetVoiceComponent {
    void inject(SetVoiceActivity activity);
}


text:
package org.gradle.api.internal.artifacts.ivyservice.moduleconverter.dependencies;

import com.google.common.collect.ImmutableList;
import org.gradle.api.InvalidUserDataException;
import org.gradle.api.artifacts.DependencyConstraint;
import org.gradle.api.artifacts.ModuleDependency;
import org.gradle.api.artifacts.component.ComponentIdentifier;
import org.gradle.api.artifacts.component.ModuleComponentSelector;
import org.gradle.api.attributes.AttributeContainer;
import org.gradle.api.internal.artifacts.DefaultModuleIdentifier;
import org.gradle.api.internal.artifacts.dependencies.DependencyConstraintInternal;
import org.gradle.internal.component.external.model.DefaultModuleComponentSelector;
import org.gradle.internal.component.model.ExcludeMetadata;
import org.gradle.internal.component.model.IvyArtifactName;
import org.gradle.internal.component.model.LocalComponentDependencyMetadata;
import org.gradle.internal.component.model.LocalOriginDependencyMetadata;
import org.gradle.util.WrapUtil;

import java.util.Collections;
import java.util.List;

public class DefaultDependencyDescriptorFactory implements DependencyDescriptorFactory {
    private List<IvyDependencyDescriptorFactory> dependencyDescriptorFactories;

    public DefaultDependencyDescriptorFactory(IvyDependencyDescriptorFactory... dependencyDescriptorFactories) {
        this.dependencyDescriptorFactories = WrapUtil.toList(dependencyDescriptorFactories);
    }

    @Override
    public LocalOriginDependencyMetadata createDependencyDescriptor(ComponentIdentifier componentId, String clientConfiguration, AttributeContainer attributes, ModuleDependency dependency) {
        IvyDependencyDescriptorFactory factoryInternal = findFactoryForDependency(dependency);
        return factoryInternal.createDependencyDescriptor(componentId, clientConfiguration, attributes, dependency);
    }

    @Override
    public LocalOriginDependencyMetadata createDependencyConstraintDescriptor(ComponentIdentifier componentId, String clientConfiguration, AttributeContainer attributes, DependencyConstraint dependencyConstraint) {
        ModuleComponentSelector selector = DefaultModuleComponentSelector.newSelector(
            DefaultModuleIdentifier.newId(nullToEmpty(dependencyConstraint.getGroup()), nullToEmpty(dependencyConstraint.getName())), dependencyConstraint.getVersionConstraint(), dependencyConstraint.getAttributes(), ImmutableList.of());
        return new LocalComponentDependencyMetadata(componentId, selector, clientConfiguration, attributes, dependencyConstraint.getAttributes(), null,
                Collections.<IvyArtifactName>emptyList(), Collections.<ExcludeMetadata>emptyList(), ((DependencyConstraintInternal)dependencyConstraint).isForce(), false, false, true, false, dependencyConstraint.getReason());
    }

    private IvyDependencyDescriptorFactory findFactoryForDependency(ModuleDependency dependency) {
        for (IvyDependencyDescriptorFactory ivyDependencyDescriptorFactory : dependencyDescriptorFactories) {
            if (ivyDependencyDescriptorFactory.canConvert(dependency)) {
                return ivyDependencyDescriptorFactory;
            }
        }
        throw new InvalidUserDataException("Can't map dependency of type: " + dependency.getClass());
    }

    private String nullToEmpty(String input) {
        return input == null ? "" : input;
    }
}


text:
#ifndef ATEMA_CORE_VARIANT_HPP
#define ATEMA_CORE_VARIANT_HPP

#include <Atema/Core/Hash.hpp>

#include <variant>

namespace at
{
	template <typename ... Args>
	class Variant
	{
	public:
		Variant();
		Variant(Variant<Args...>& other);
		Variant(const Variant<Args...>& other);
		Variant(Variant<Args...>&& other) noexcept;
		Variant(const Variant<Args...>&& other) noexcept;
		template <typename T>
		Variant(T&& value);

		~Variant();

		template <typename T>
		bool is() const noexcept;

		template <typename First, typename ... Rest>
		bool isOneOf() const noexcept;

		template <typename T>
		T& get();

		template <typename T>
		const T& get() const;

		Variant<Args...>& operator=(Variant<Args...>& other);
		Variant<Args...>& operator=(const Variant<Args...>& other);
		Variant<Args...>& operator=(Variant<Args...>&& other) noexcept;
		Variant<Args...>& operator=(const Variant<Args...>&& other) noexcept;
		template <typename T>
		Variant<Args...>& operator=(T&& value);

		bool operator==(const Variant& other) const;
		template <typename T>
		bool operator==(const T& value) const noexcept;

	private:
		std::variant<Args...> m_value;
	};
}

namespace std
{
	template <typename ... Args>
	struct hash<at::Variant<Args...>>
	{
		std::size_t operator()(const at::Variant<Args...>& object) const
		{
			return at::DefaultStdHasher::hash(object);
		}
	};
}

#include <Atema/Core/Variant.inl>

#endif


text:
using System;
using System.Diagnostics;
using System.Web;
using log4net;
using log4net.Config;
using log4net.Core;

using StarterKit.Framework.Exceptions;

namespace StarterKit.Framework.Logging.Log4Net
{
    public class Log4NetLogger : ILogger
    {
        private readonly ILog _log;

        public static void Configure()
        {
            XmlConfigurator.Configure();
        }

        public bool IncludeTrace { get; set; } //if true do a stack trace and include the source line number the logger was called from on every line

        public Log4NetLogger()
        {
            _log = LogManager.GetLogger("Logger");
        }

        protected string Prefix
        { //add this data to every line
            get
            {
                string prefix;
                if (IncludeTrace)
                {
                    var st = new StackTrace();
                    StackFrame f = null;
                    var n = st.FrameCount;
                    for (var i = 1; i < n; i++)
                    {
                        f = st.GetFrame(i);
                        if (f.GetMethod().DeclaringType != typeof(Log4NetLogger))
                            break;
                    }
                    if (f == null)
                        prefix = "[no stack frame]";
                    else
                        prefix = f.GetFileName() + ":" + f.GetFileLineNumber() + " " + f.GetMethod().Name + "()";
                }
                else
                    prefix = "";

                var hc = HttpContext.Current;
                if (hc != null)
                {
                    var machineId = hc.Application["MachineId"] as string;
                    if (machineId != null)
                        prefix += " machine:" + machineId;

                    var reqId = hc.Items.Contains("__requestId__") ? hc.Items["__requestId__"] as string : null;
                    if (reqId != null)
                        prefix += " req:" + reqId;

                    var t0 = hc.Items.Contains("__requestStartTime__") ? (DateTime)hc.Items["__requestStartTime__"] : default(DateTime);
                    if (t0 != default(DateTime))
                    {
                        var dt = Math.Floor((DateTime.UtcNow - t0).TotalMilliseconds) / 1000.0;
                        prefix += " t:" + dt + "s";
                    }
                }

                prefix += " ";
                return prefix;
            }
        }

        protected void SetupCustomProperties(Exception e)
        {
            var properties = e.GetCustomProperties();

            foreach (var property in properties)
            {
                LogicalThreadContext.Properties[property.Key] = property.Value;
            }
        }

        //one very generic log method to implement all others
        public void Log(Level level, Exception e = null, string fmt = null, params object[] args)
        {
            if ((e != null))
                SetupCustomProperties(e);

            _log.Logger.Log(typeof(Log4NetLogger), level, Prefix + (args.Length > 0 ? string.Format(fmt ?? "", args) : fmt), e);
        }

        //per level calls as expected by the current client code
        public void Debug(Exception exception, string message = null, params object[] args)
        {
            Log(Level.Debug, exception, message, args);
        }
        public void Debug(string message = null, params object[] args)
        {
            Log(Level.Debug, null, message, args);
        }

        public void Info(Exception exception, string message = null, params object[] args)
        {
            Log(Level.Info, exception, message, args);
        }
        public void Info(string message = null, params object[] args)
        {
            Log(Level.Info, null, message, args);
        }

        public void Warning(Exception exception, string message = null, params object[] args)
        {
            Log(Level.Warn, exception, message, args);
        }
        public void Warning(string message = null, params object[] args)
        {
            Log(Level.Warn, null, message, args);
        }

        public void Error(Exception exception, string message = null, params object[] args)
        {
            Log(Level.Error, exception, message, args);
        }
        public void Error(string message = null, params object[] args)
        {
            Log(Level.Error, null, message, args);
        }

        public void Fatal(Exception exception, string message = null, params object[] args)
        {
            Log(Level.Fatal, exception, message, args);
        }
        public void Fatal(string message = null, params object[] args)
        {
            Log(Level.Fatal, null, message, args);
        }
    }
}


text:
import {ɵPLATFORM_WORKER_UI_ID as PLATFORM_WORKER_UI_ID} from '@angular/common';
import {ResourceLoader, platformCoreDynamic} from '@angular/compiler';
import {COMPILER_OPTIONS, PLATFORM_ID, PlatformRef, Provider, createPlatformFactory} from '@angular/core';
import {ɵResourceLoaderImpl as ResourceLoaderImpl} from '@angular/platform-browser-dynamic';
export {VERSION} from './version';

/**
 * @experimental API related to bootstrapping are still under review.
 */
export const platformWorkerAppDynamic =
    createPlatformFactory(platformCoreDynamic, 'workerAppDynamic', [
      {
        provide: COMPILER_OPTIONS,
        useValue: {providers: [{provide: ResourceLoader, useClass: ResourceLoaderImpl}]},
        multi: true
      },
      {provide: PLATFORM_ID, useValue: PLATFORM_WORKER_UI_ID}
    ]);


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
in Majchrowicz & Dominik, Ekon. pol. , Ser. A 17(4): 102 (1969)

#### Original name
Torula kortasii Dominik & Majchr.

### Remarks
null


text:
<?xml version="1.0"?>

<Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Basic>
    <Title>Title01</Title>
    <Buttons>
    </Buttons>
    <WindowLocation X="99999" Y="0" />
  </Basic>
  <ApplicationGroups>
    <ApplicationGroup Name="CLIP STUDIO PAINT">
      <MatchingRoule>
        <ExeName>ClipStudioPaint.exe</ExeName>
        <WindowTitlePatterns>
          <Pattern>*CLIP STUDIO PAINT</Pattern>
          <Pattern>ショートカット設定</Pattern>
        </WindowTitlePatterns>
      </MatchingRoule>
      <Banks>
        <Bank Name="">
          <Entry Trigger="F" LabelText="F">
            <ActionItem NextBank="Bank01" />
          </Entry>
          <Entry Trigger="R" LabelText="F">
            <ActionItem ActionType="Send" ActionValue="a" NextBank="" />
          </Entry>
        </Bank>
        <Bank Name="Bank01">
          <Entry Trigger="G" LabelText="F">
            <ActionItem ActionType="Send" ActionValue="r" NextBank="" />
          </Entry>
          <Entry Trigger="R" LabelText="F">
            <ActionItem ActionType="Send" ActionValue="b" NextBank="" />
          </Entry>
        </Bank>
      </Banks>
      <Menus>
      </Menus>
    </ApplicationGroup>
  </ApplicationGroups>
</Config>


text:
package com.uprised.twitch4j;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.List;

import org.apache.http.client.ClientProtocolException;
import org.junit.Test;

import com.uprised.twitch4j.beans.FeaturedStream;
import com.uprised.twitch4j.beans.Stream;
import com.uprised.twitch4j.utils.StreamRestCalls;
import com.uprised.twitch4j.utils.exceptions.ChannelNotFoundException;

public class TestStreamUtils {

	/**
	 * Will succeed only if stream is offline
	 * @throws ClientProtocolException
	 * @throws URISyntaxException
	 * @throws IOException
	 * @throws ChannelNotFoundException
	 */
	@Test
	public void testGetOfflineStream() throws ClientProtocolException, URISyntaxException, IOException, ChannelNotFoundException {
		Stream stream = StreamRestCalls.getChannelStream("athenelive");
		assertNull(stream);
	}

	/**
	 * Will succeed only if stream is online
	 * @throws ClientProtocolException
	 * @throws URISyntaxException
	 * @throws IOException
	 * @throws ChannelNotFoundException
	 */
	@Test
	public void testGetOnlineStream() throws ClientProtocolException, URISyntaxException, IOException, ChannelNotFoundException {
		Stream stream = StreamRestCalls.getChannelStream("athenelive");
		assertNotNull(stream);
	}

	@Test
	public void testGetWrongStream() throws ClientProtocolException, URISyntaxException, IOException {
		try {
			@SuppressWarnings("unused")
			Stream stream = StreamRestCalls.getChannelStream("blahblahblahblah");
		} catch (ChannelNotFoundException e) {
			assertNotNull(e);
		}
	}

	@Test
	public void testGetGameStreams() throws ClientProtocolException, IOException, URISyntaxException {
		List<Stream> streams = StreamRestCalls.getStreams("League of Legends");
		assertNotNull(streams);
	}

	@Test
	public void testGetGameStreamsWithLimitOffset() throws ClientProtocolException, IOException, URISyntaxException {

		int limit = 10;

		List<Stream> firstBatch = StreamRestCalls.getStreams("League of Legends", limit, 0);
		List<Stream> secondBatch = StreamRestCalls.getStreams("League of Legends", limit, limit);

		assertTrue(firstBatch.size() == limit);
		assertTrue(secondBatch.size() == limit);

		for (Stream first : firstBatch) {
			for (Stream second : secondBatch) {
				assertTrue(!(first.getID() == second.getID()));
			}
		}
	}

	@Test
	public void testGetFeaturedStreams() throws ClientProtocolException, IOException, URISyntaxException {
		List<FeaturedStream> streams = StreamRestCalls.getFeaturedStreams();
		assertNotNull(streams);
	}

	@Test
	public void testGetFeaturedStreamsWithLimitOffset() throws ClientProtocolException, IOException, URISyntaxException {

		int limit = 10;

		List<FeaturedStream> firstBatch = StreamRestCalls.getFeaturedStreams(limit, 0);
		List<FeaturedStream> secondBatch = StreamRestCalls.getFeaturedStreams(limit, limit);

		assertTrue(firstBatch.size() == limit);
		assertTrue(secondBatch.size() == limit);

		for (FeaturedStream first : firstBatch) {
			for (FeaturedStream second : secondBatch) {
				assertTrue(!(first.getStream().getID() == second.getStream().getID()));
			}
		}
	}

}


text:
package rotation

import (
	"context"
	"runtime"

	"go.opentelemetry.io/otel/attribute"
	"go.opentelemetry.io/otel/metric"
	"go.opentelemetry.io/otel/metric/global"
)

var (
	providerKey                 = "provider"
	errorKey                    = "error_type"
	osTypeKey                   = "os_type"
	rotatedKey                  = "rotated"
	rotationReconcileTotal      metric.Int64Counter
	rotationReconcileErrorTotal metric.Int64Counter
	rotationReconcileDuration   metric.Float64ValueRecorder
	runtimeOS                   = runtime.GOOS
)

type reporter struct {
	meter metric.Meter
}

type StatsReporter interface {
	reportRotationCtMetric(provider string, wasRotated bool)
	reportRotationErrorCtMetric(provider, errType string, wasRotated bool)
	reportRotationDuration(duration float64)
}

func newStatsReporter() StatsReporter {
	meter := global.Meter("secretsstore")
	rotationReconcileTotal = metric.Must(meter).NewInt64Counter("total_rotation_reconcile", metric.WithDescription("Total number of rotation reconciles"))
	rotationReconcileErrorTotal = metric.Must(meter).NewInt64Counter("total_rotation_reconcile_error", metric.WithDescription("Total number of rotation reconciles with error"))
	rotationReconcileDuration = metric.Must(meter).NewFloat64ValueRecorder("rotation_reconcile_duration_sec", metric.WithDescription("Distribution of how long it took to rotate secrets-store content for pods"))
	return &reporter{meter: meter}
}

func (r *reporter) reportRotationCtMetric(provider string, wasRotated bool) {
	labels := []attribute.KeyValue{attribute.String(providerKey, provider), attribute.String(osTypeKey, runtimeOS), attribute.Bool(rotatedKey, wasRotated)}
	rotationReconcileTotal.Add(context.Background(), 1, labels...)
}

func (r *reporter) reportRotationErrorCtMetric(provider, errType string, wasRotated bool) {
	labels := []attribute.KeyValue{attribute.String(providerKey, provider), attribute.String(errorKey, errType), attribute.String(osTypeKey, runtimeOS), attribute.Bool(rotatedKey, wasRotated)}
	rotationReconcileErrorTotal.Add(context.Background(), 1, labels...)
}

func (r *reporter) reportRotationDuration(duration float64) {
	r.meter.RecordBatch(context.Background(), []attribute.KeyValue{attribute.String(osTypeKey, runtimeOS)}, rotationReconcileDuration.Measurement(duration))
}


text:
#include "ForLoopNodeHandler.h"
#include<lang/log/LogLevel.h>

#include <commonlib/commonlib.h>
#include <lang/model/allmodel.h>

#include "../CallbackRegister.h"

namespace IAS {
namespace Lang {
namespace Export{
namespace Text {
namespace Stmt {

/*************************************************************************/
ForLoopNodeHandler::ForLoopNodeHandler(){
	IAS_TRACER;
	ptrDftStepExpr=IAS_DFT_FACTORY<Model::Expr::ConstNode>::Create(Model::Expr::ConstNode::CN_INTEGER,"1");
}
/*************************************************************************/
ForLoopNodeHandler::~ForLoopNodeHandler() throw(){
	IAS_TRACER;
}
/*************************************************************************/
void ForLoopNodeHandler::call(const Model::Node* pNode,
						    CallbackCtx *pCtx,
						    CallbackSignature::Result& aResult){
	IAS_TRACER;

	IAS_TYPEID_CHECK(Model::Stmt::ForLoopNode, pNode);
	const Model::Stmt::ForLoopNode *pForLoopNode = IAS_DYNAMICCAST_CONST(Model::Stmt::ForLoopNode, pNode);

	const Model::Expr::XPath::XPathAccessNode  *pXPathAccessNode = pForLoopNode->getXPathAccessNode();

	const Model::Expr::ExprNode      *pStartExprNode = pForLoopNode->getStartExprNode();
	const Model::Expr::ExprNode      *pStopExprNode = pForLoopNode->getStopExprNode();
	const Model::Stmt::StatementNode *pStatementNode = pForLoopNode->getStatementNode();

	printIndent(pCtx,aResult);
	printKeyword(aResult,"FOR");
	CallbackRegister::SubCall(pXPathAccessNode,pCtx,aResult);
	aResult.ssOutput<<" = ";
	CallbackRegister::SubCall(pStartExprNode,pCtx,aResult);
  aResult.ssOutput<<" ";
	printKeyword(aResult,"TO");
  aResult.ssOutput<<" ";
	CallbackRegister::SubCall(pStopExprNode,pCtx,aResult);

	if(pForLoopNode->hasStepNode()){
    aResult.ssOutput<<" ";
		printKeyword(aResult,"STEP");
    aResult.ssOutput<<" ";
		CallbackRegister::SubCall(pForLoopNode->getStepExprNode(),pCtx,aResult);
	}
  aResult.ssOutput<<" ";
	printKeyword(aResult,"DO");
  aResult.ssOutput<<std::endl;
	pCtx->iIndent++;
	CallbackRegister::SubCall(pStatementNode,pCtx,aResult);
	pCtx->iIndent--;
}
/*************************************************************************/
}
}
}
}
}


text:
/**************************************************************************
 * FILE NAME
 *
 *       remoteproc_loader.h
 *
 * COMPONENT
 *
 *         OpenAMP stack.
 *
 * DESCRIPTION
 *
 *       This file provides definitions for remoteproc loader
 *
 *
 **************************************************************************/
#ifndef REMOTEPROC_LOADER_H_
#define REMOTEPROC_LOADER_H_

#include <metal/io.h>
#include <metal/list.h>
#include <metal/sys.h>
#include <openamp/remoteproc.h>

#if defined __cplusplus
extern "C" {
#endif

/* Loader feature macros */
#define SUPPORT_SEEK 1UL

/* Remoteproc loader any address */
#define RPROC_LOAD_ANYADDR ((metal_phys_addr_t)-1)

/* Remoteproc loader Exectuable Image Parsing States */
/* Remoteproc loader parser intial state */
#define RPROC_LOADER_NOT_READY      0x0UL
/* Remoteproc loader ready to load, even it can be not finish parsing */
#define RPROC_LOADER_READY_TO_LOAD  0x10000UL
/* Remoteproc loader post data load */
#define RPROC_LOADER_POST_DATA_LOAD 0x20000UL
/* Remoteproc loader finished loading */
#define RPROC_LOADER_LOAD_COMPLETE  0x40000UL
/* Remoteproc loader state mask */
#define RPROC_LOADER_MASK           0x00FF0000UL
/* Remoteproc loader private mask */
#define RPROC_LOADER_PRIVATE_MASK   0x0000FFFFUL
/* Remoteproc loader reserved mask */
#define RPROC_LOADER_RESERVED_MASK  0x0F000000UL

/**
 * struct image_store_ops - user defined image store operations
 * @open: user defined callback to open the "firmware" to prepare loading
 * @close: user defined callback to close the "firmware" to clean up
 *         after loading
 * @load: user defined callback to load the firmware contents to target
 *        memory or local memory
 * @features: loader supported features. e.g. seek
 */
struct image_store_ops {
	int (*open)(void *store, const char *path, const void **img_data);
	void (*close)(void *store);
	int (*load)(void *store, size_t offset, size_t size,
		    const void **data,
		    metal_phys_addr_t pa,
		    struct metal_io_region *io, char is_blocking);
	unsigned int features;
};

/**
 * struct loader_ops - loader oeprations
 * @load_header: define how to get the executable headers
 * @load_data: define how to load the target data
 * @locate_rsc_table: define how to get the resource table target address,
 *                    offset to the ELF image file and size of the resource
 *                    table.
 * @release: define how to release the loader
 * @get_entry: get entry address
 * @get_load_state: get load state from the image information
 */
struct loader_ops {
	int (*load_header)(const void *img_data, size_t offset, size_t len,
			   void **img_info, int last_state,
			   size_t *noffset, size_t *nlen);
	int (*load_data)(struct remoteproc *rproc,
			 const void *img_data, size_t offset, size_t len,
			 void **img_info, int last_load_state,
			 metal_phys_addr_t *da,
			 size_t *noffset, size_t *nlen,
			 unsigned char *padding, size_t *nmemsize);
	int (*locate_rsc_table)(void *img_info, metal_phys_addr_t *da,
				size_t *offset, size_t *size);
	void (*release)(void *img_info);
	metal_phys_addr_t (*get_entry)(void *img_info);
	int (*get_load_state)(void *img_info);
};

#if defined __cplusplus
}
#endif

#endif /* REMOTEPROC_LOADER_H_ */


text:
"""Tests that step_data can accept multiple specs at once."""

from recipe_engine import post_process
from recipe_engine.recipe_api import Property
from recipe_engine.post_process import Filter, DoesNotRun, MustRun

PYTHON_VERSION_COMPATIBILITY = 'PY2+3'

DEPS = [
  'context',
  'step',
  'properties',
]

PROPERTIES = {
  'fakeit': Property(kind=bool, default=True),
}

def RunSteps(api, fakeit):
  api.step('something unimportant', ['echo', 'sup doc'])
  with api.context(env={'FLEEM': 'VERY YES'}):
    api.step('something important', ['echo', 'crazy!'])
  api.step('another important', ['echo', 'INSANITY'])
  if fakeit:
    api.step('fakestep', ['echo', 'FAAAAKE'])
  step_result = api.step('set build properties', ['dummy'])
  step_result.presentation.properties['test_build_property'] = True

def GenTests(api):
  yield api.test('all_steps') + api.post_process(MustRun, 'fakestep')

  yield (api.test('single_step')
    + api.post_process(Filter('something important'))
  )

  yield (api.test('two_steps')
    + api.post_process(Filter('something important', 'another important'))
  )

  f = Filter()
  f = f.include_re(r'.*\bimportant', ['cmd', 'env'], at_least=2, at_most=2)
  yield (api.test('selection')
    + api.properties(fakeit=False)
    + api.post_process(DoesNotRun, 'fakestep')
    + api.post_process(f)
  )

  yield api.test('result') + api.post_process(Filter('$result'))

  def assert_stuff(check, results):
    check('something important' in results)
    if check('another important' in results):
      check('INSANITY' in results['another important'].cmd)
    # drop the whole expectations, we're done here
    return {}

  yield api.test('custom_func') + api.post_process(assert_stuff)

  yield (
      api.test('set_build_properties') +
      api.post_process(post_process.PropertyEquals,
                       'test_build_property', True) +
      api.post_process(post_process.PropertiesDoNotContain,
                       'build_property_not_present') +
      api.post_process(post_process.DropExpectation)
  )


text:
NSString* const FLDefaultsKeyWizardLastUserNameKey = @"CredentialStorageLastUser";
NSString* const FLDefaultsKeyWizardSavePasswordKey = @"CredentialStorageServiceSavePassword";

@interface FLUserDefaultsCredentialStorage ()

- (NSString*) readPasswordForUserName:(NSString*) userName;
- (void) removePasswordForUser:(NSString*) userName;
- (void) writePassword:(NSString*) password forUserName:(NSString*) userName;

@end

@implementation FLUserDefaultsCredentialStorage

FLSynthesizeSingleton(FLUserDefaultsCredentialStorage);

- (id<FLAuthenticationCredentials>) credentialsForLastUser {
    NSString* userName = [[NSUserDefaults standardUserDefaults] objectForKey:FLDefaultsKeyWizardLastUserNameKey];
    return FLStringIsNotEmpty(userName) ? [self readCredentialsForUserName:userName] : nil;
}

- (void) setCredentialsForLastUser:(id<FLAuthenticationCredentials>) newLastUser {
    NSString* lastUserName = [[NSUserDefaults standardUserDefaults] objectForKey:FLDefaultsKeyWizardLastUserNameKey];
    if(lastUserName && ![lastUserName isEqualToString:newLastUser.userName]) {
        [self removePasswordForUser:lastUserName];
    }

    [self writeCredentials:newLastUser];

    [[NSUserDefaults standardUserDefaults] setObject:newLastUser.userName forKey:FLDefaultsKeyWizardLastUserNameKey];
    [[NSUserDefaults standardUserDefaults] synchronize];
}

- (BOOL) rememberPasswordSetting {
    NSNumber* remember = [[NSUserDefaults standardUserDefaults] objectForKey:FLDefaultsKeyWizardSavePasswordKey];
    return remember && [remember boolValue];
}

- (void) setRememberPasswordSetting:(BOOL)savePasswordSetting {
    [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:savePasswordSetting]
                                              forKey:FLDefaultsKeyWizardSavePasswordKey];

    [[NSUserDefaults standardUserDefaults] synchronize];
}

- (NSString*) readPasswordForUserName:(NSString*) userName {
    FLAssertStringIsNotEmpty([NSBundle bundleIdentifier], @"bundle identifier must be set to use keychain for password");

    FLAssertStringIsNotEmpty(userName);

    if(userName) {
        return [FLKeychain httpPasswordForUserName:userName withDomain:[NSBundle bundleIdentifier]];
    }

    return nil;
}

- (void) writePassword:(NSString*) password forUserName:(NSString*) userName {
    FLAssertStringIsNotEmpty([NSBundle bundleIdentifier], @"bundle identifier must be set to use keychain for password");

    NSString* existingPassword = [self readPasswordForUserName:userName];

    if(FLStringsAreNotEqual(existingPassword, password)) {
        [FLKeychain setHttpPassword:password forUserName:userName withDomain:[NSBundle bundleIdentifier]];
    }
}

- (void) writeCredentials:(id<FLAuthenticationCredentials>) creds {
    if(FLStringIsNotEmpty(creds.userName)) {
        if([self rememberPasswordSetting]) {
            [self writePassword:creds.password forUserName:creds.userName];
        }
        else {
            [self removePasswordForUser:creds.userName];
        }
    }
}

- (void) removePasswordForUser:(NSString*) userName {
    FLAssertStringIsNotEmpty([NSBundle bundleIdentifier], @"bundle identifier must be set to use keychain for password");

    if(FLStringIsNotEmpty(userName)) {
        [FLKeychain removeHttpPasswordForUserName:userName withDomain:[NSBundle bundleIdentifier]];
    }
}

- (void) removeCredentials:(id<FLAuthenticationCredentials>) credentials {
    FLAssertNotNil(credentials);
    [self removePasswordForUser:credentials.userName];
}

- (FLAuthenticationCredentials*) readCredentialsForUserName:(NSString*) userName {

    if(FLStringIsNotEmpty(userName)) {

        if([self rememberPasswordSetting]) {

            return [FLAuthenticationCredentials authenticationCredentials:userName
                                                                 password:[self readPasswordForUserName:userName]];
        }
        else {
            [self removePasswordForUser:userName];

            return [FLAuthenticationCredentials authenticationCredentials:userName password:nil];
        }

    }

    return nil;
}

@end

//@implementation FLAuthenticationCredentials (NSUserDefaults)
//
//+ (id) authCredentialsFromUserDefaults {
//    FLAuthenticationCredentials* credentials = FLAutorelease([[[self class] alloc] init]);
//    [credentials readFromUserDefaults];
//    return credentials;
//}
//
//- (void) writeToUserDefaults {
//    [[FLUserDefaultsCredentialStorage instance] writeCredentials:self];
//}
//
//- (void) writePasswordToKeychain {
//    [[FLUserDefaultsCredentialStorage instance] writePasswordToKeychain:self];
//}
//
//- (void) readFromUserDefaults {
//    if(!self.userName) {
//        self.rememberPassword = NO;
//        self.password = @"";
//
//        self.userName =
//
//        NSNumber* saved = [[NSUserDefaults standardUserDefaults] objectForKey:FLDefaultsKeyWizardSavePasswordKey];
//        self.rememberPassword = saved ? [saved boolValue] : NO;
//
//        [self readPasswordFromKeychain];
//    }
//}
//
//
//
//
//
//@end


text:
namespace Facebook.Unity.Mobile.IOS
{
    using System.Collections;
    using UnityEngine;

    internal class IOSFacebookLoader : FB.CompiledFacebookLoader
    {
        protected override FacebookGameObject FBGameObject
        {
            get
            {
                IOSFacebookGameObject iosFB = ComponentFactory.GetComponent<IOSFacebookGameObject>();
                if (iosFB.Facebook == null)
                {
                    iosFB.Facebook = new IOSFacebook();
                }

                return iosFB;
            }
        }
    }
}


text:
package com.link_intersystems.gitdirstat.domain;

public interface TreeFileUpdate {

	public abstract void delete();

	public abstract String getPath();

}


text:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/* Author: Karthik PKS
 * Description: CapacityMasterTable model class
 */
class CapacityMasterTable extends CI_Model{

	private $capacityColumn;
	private $table_name;
	private $cm_id ;
	private $data;

	function __construct() {
		$this->capacityColumn = array();
		$this->data = array();
		$this->cm_id = $this->session->userdata('cm_id');
		$this->table_name = "tm_capacity_master";

		$this->capacityColumn[0] = "cp_id";
		$this->capacityColumn[1] = "cp_desc";
		$this->capacityColumn[2] = "cp_remark";
		$this->capacityColumn[3] = "cp_created_date";
		$this->capacityColumn[4] = "cp_modified_date";
		$this->capacityColumn[5] = "cp_status";
		$this->capacityColumn[6] = "cp_cm_id";

	}

	public function insertCapacity() {
		$this->capacityMasterDesc = strtolower($this->security->xss_clean($this->input->post('capacityMasterDesc')));

		$this->capacityMasterRemark = strtolower(trim($this->security->xss_clean($this->input->post('capacityMasterRemark'))));

		if($this->checkCapacityExits($this->capacityMasterDesc) && !empty($this->capacityMasterRemark)) {
			$insertData = array(
					$this->capacityColumn[1] => $this->capacityMasterDesc,
					$this->capacityColumn[2] => $this->capacityMasterRemark,
					$this->capacityColumn[3] => date('Y-m-d'),
					$this->capacityColumn[5] => 1,
					$this->capacityColumn[6] => $this->cm_id
				);
			$this->db->insert($this->table_name, $insertData);
			if($this->db->insert_id()) {
				return $this->db->insert_id();
			}
		}
		return false;
	}
	public function updateCapacity() {
		$this->capacityMasterId = strtolower($this->security->xss_clean($this->input->post('capacityMasterId')));
		$this->capacityMasterDesc = strtolower($this->security->xss_clean($this->input->post('capacityMasterDesc')));

		$this->capacityMasterRemark = strtolower(trim($this->security->xss_clean($this->input->post('capacityMasterRemark'))));

		if($this->checkCapacityExits($this->capacityMasterDesc, $this->capacityMasterRemark) && !empty($this->capacityMasterRemark)) {
			$insertData = array(
					$this->capacityColumn[1] => $this->capacityMasterDesc,
					$this->capacityColumn[2] => $this->capacityMasterRemark,
					$this->capacityColumn[4] => date('Y-m-d'),
					$this->capacityColumn[5] => 1,
					$this->capacityColumn[6] => $this->cm_id
				);
			$this->db->where($this->capacityColumn[0], $this->capacityMasterId);
			if($this->db->update($this->table_name, $insertData)) {
				return $this->capacityMasterId;
			}
		}
		return false;
	}

	public function getCapacity() {
		$conditon = array($this->capacityColumn[5]  => 1, $this->capacityColumn[6] => $this->cm_id );
		$this->db->where($conditon);
		$query=$this->db->get($this->table_name);
		if($query->num_rows() >= 1)
        {
            // If there is a user, then create session data
           	foreach ($query->result() as $row) {
   				$this->data[] = array(
	                $this->capacityColumn[0] => $row->cp_id,
	                $this->capacityColumn[1] => $row->cp_desc,
	                $this->capacityColumn[2] => $row->cp_remark,
	                $this->capacityColumn[3] => $row->cp_created_date
	            );
           	}
           	echo json_encode($this->data);
        } else {
        	echo json_encode($this->data);
        }
        exit();
	}

	public function getAllCapacityList() {

		$this->searchKey = $this->security->xss_clean($this->input->get('searchKey'));
		$this->offset = $this->security->xss_clean($this->input->get('offset'));
		if(!empty($this->searchKey)) {
            $this->db->or_like(array($this->capacityColumn[1] => $this->searchKey));
        }
        $this->db->limit(0, $this->offset);
		$conditon = array($this->capacityColumn[5]  => 1, $this->capacityColumn[6] => $this->cm_id );
		$this->db->where($conditon);
		$query=$this->db->get($this->table_name);
		if($query->num_rows() >= 1)
        {
            // If there is a user, then create session data
           	foreach ($query->result() as $row) {
   				$this->data[] = array(
	                $this->capacityColumn[0] => $row->cp_id,
	                $this->capacityColumn[1] => $row->cp_desc,
	                $this->capacityColumn[2] => $row->cp_remark,
	                $this->capacityColumn[3] => $row->cp_created_date
	            );
           	}
           	echo json_encode($this->data);
        } else {
        	echo json_encode($this->data);
        }
        exit();
	}

	private function checkCapacityExits($capacityDec, $capacityMasterRemark) {
		$this->db->where($this->capacityColumn[1], $capacityDec);
		$this->db->where($this->capacityColumn[2], $capacityMasterRemark);
		$query_num = $this->db->get($this->table_name)->num_rows();
		if(!$query_num) {
			return true;
		}
		return false;
	}
}
?>


text:
"""Module providing views for the folderish content page type"""
import urllib
from Acquisition import aq_inner
from Products.Five.browser import BrowserView
from plone import api
from plone.i18n.normalizer.interfaces import IIDNormalizer
from zope.component import getUtility

from newe.sitecontent import utils
from newe.sitecontent.interfaces import IResponsiveImagesTool
from newe.sitecontent.saleitem import ISaleItem

class SalesFolderView(BrowserView):
    """ Sales folder masonry view """

    def has_image(self, uuid):
        context = api.content.get(UID=uuid)
        try:
            lead_img = context.image
        except AttributeError:
            lead_img = None
        if lead_img is not None:
            return True
        return False

    def has_sale_items(self):
        return len(self.sale_items())

    def sale_items(self):
        context = aq_inner(self.context)
        query = dict(
            context=context,
            object_provides=ISaleItem,
            portal_state='published',
            sort_on='getObjPositionInParent'
        )
        items = api.content.find(**query)
        return items

    def sales_content_listing(self):
        context = aq_inner(self.context)
        template = context.restrictedTraverse('@@sales-folder-listing')()
        return template

    def get_image_data(self, uuid):
        tool = getUtility(IResponsiveImagesTool)
        return tool.create(uuid)

    def normalize_subject(self, subject):
        """ Normalizer for project filter categories

            This function is called by the isotope filter navigation
        """
        normalizer = getUtility(IIDNormalizer)
        return normalizer.normalize(subject)

    def url_encode_subject_query(self, subject):
        """ Quote subject query string """
        return urllib.quote(subject)

    def computed_class(self, uuid):
        item = api.content.get(UID=uuid)
        klass = 'app-sale-item-{0}'.format(uuid)
        subjects = item.Subject()
        for subject in subjects:
            pretty_subject = self.normalize_subject(subject)
            klass = '{0} {1}'.format(klass, pretty_subject)
        return klass

    def available_filter(self):
        context = aq_inner(self.context)
        context_subjects = utils.keywords_filtered_by_context(context)
        return context_subjects

    def filter_map(self):
        idx = 0
        mapping = {}
        for subject in self.available_filter():
            idx += 1
            mapping[subject] = idx
        return mapping

    def filter_map_keys(self):
        return self.filter_map().keys()

    def item_filter_category(self, uuid):
        item = api.content.get(UID=uuid)
        subjects = item.Subject()
        filter_map = self.filter_map()
        if len(subjects) > 1:
            item_categories = list()
            for subject in subjects:
                item_categories.append(filter_map[subject])
            return ', '.join(item_categories)
        else:
            return filter_map[subjects[0]]

class SalesFolderContentView(BrowserView):
    """ Embeddable content list """

    def __call__(self):
        return self.render()

    def render(self):
        return self.index()

    @property
    def traverse_subpath(self):
        return self.subpath

    def publishTraverse(self, request, name):
        if not hasattr(self, 'subpath'):
            self.subpath = []
        self.subpath.append(name)
        return self

    def active_filter_category(self):
        try:
            active_category = self.traverse_subpath[0]
            return active_category
        except AttributeError:
            return None

    def has_sale_items(self):
        return len(self.sale_items())

    def sale_items(self):
        context = aq_inner(self.context)
        query = dict(
            context=context,
            object_provides=ISaleItem,
            portal_state='published',
            sort_on='getObjPositionInParent'
        )
        if self.active_filter_category():
            active_filter = self.active_filter_category()
            for key, value in self.filter_map().items():
                if str(value) == active_filter:
                    query['Subject'] = key
        items = api.content.find(**query)
        return items

    def has_image(self, uuid):
        context = api.content.get(UID=uuid)
        try:
            lead_img = context.image
        except AttributeError:
            lead_img = None
        if lead_img is not None:
            return True
        return False

    def get_image_data(self, uuid):
        tool = getUtility(IResponsiveImagesTool)
        return tool.create(uuid)

    def normalize_subject(self, subject):
        """ Normalizer for project filter categories

            This function is called by the isotope filter navigation
        """
        normalizer = getUtility(IIDNormalizer)
        return normalizer.normalize(subject)

    def computed_class(self, uuid):
        item = api.content.get(UID=uuid)
        klass = 'app-sale-item-{0}'.format(uuid)
        subjects = item.Subject()
        for subject in subjects:
            pretty_subject = self.normalize_subject(subject)
            klass = '{0} {1}'.format(klass, pretty_subject)
        return klass

    def available_filter(self):
        context = aq_inner(self.context)
        context_subjects = utils.keywords_filtered_by_context(context)
        return context_subjects

    def filter_map(self):
        idx = 0
        mapping = {}
        for subject in self.available_filter():
            idx += 1
            mapping[subject] = idx
        return mapping

    def filter_map_keys(self):
        return self.filter_map().keys()

    def item_filter_category(self, uuid):
        item = api.content.get(UID=uuid)
        subjects = item.Subject()
        filter_map = self.filter_map()
        if len(subjects) > 1:
            item_categories = list()
            for subject in subjects:
                item_categories.append(filter_map[subject])
            return ', '.join(item_categories)
        else:
            return filter_map[subjects[0]]


text:
@interface EVButtonLayer : CALayer {
    CALayer* _highlightLayer;
    CALayer* _imageLayer;
    CALayer* _backgroundLayer;
}

@property (nonatomic, strong) CALayer* highlightLayer;
@property (nonatomic, strong) CALayer* imageLayer;
@property (nonatomic, strong) CALayer* backgroundLayer;

- (void)touched;
- (void)released;

@end


text:
mining
======

[![Build Status](http://img.shields.io/travis/btcsuite/btcd.svg)](https://travis-ci.org/btcsuite/btcd)
[![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/btcsuite/btcd/mining)

## Overview

This package is currently a work in progress.

## Installation and Updating

```bash
$ go get -u github.com/btcsuite/btcd/mining
```

## License

Package mining is licensed under the [copyfree](http://copyfree.org) ISC
License.


text:
<?php
#**************************************************************************
#  openSIS is a free student information system for public and non-public
#  schools from Open Solutions for Education, Inc. web: www.os4ed.com
#
#  openSIS is  web-based, open source, and comes packed with features that
#  include student demographic info, scheduling, grade book, attendance,
#  report cards, eligibility, transcripts, parent portal,
#  student portal and more.
#
#  Visit the openSIS web site at http://www.opensis.com to learn more.
#  If you have question regarding this system or the license, please send
#  an email to info@os4ed.com.
#
#  This program is released under the terms of the GNU General Public License as
#  published by the Free Software Foundation, version 2 of the License.
#  See license.txt.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#***************************************************************************************
include('../../../Redirect_includes.php');
include_once('modules/Students/includes/functions.php');

if(($_REQUEST['month_values'] && ($_POST['month_values'] || $_REQUEST['ajax'])) || ($_REQUEST['values']['student_enrollment'] && ($_POST['values']['student_enrollment'] || $_REQUEST['ajax'])))
{
	if(!$_REQUEST['values']['student_enrollment']['new']['ENROLLMENT_CODE'] && !$_REQUEST['month_values']['student_enrollment']['new']['START_DATE'])
	{
		unset($_REQUEST['values']['student_enrollment']['new']);
		unset($_REQUEST['day_values']['student_enrollment']['new']);
		unset($_REQUEST['month_values']['student_enrollment']['new']);
		unset($_REQUEST['year_values']['student_enrollment']['new']);
	}
	else
	{
		$date = $_REQUEST['day_values']['student_enrollment']['new']['START_DATE'].'-'.$_REQUEST['month_values']['student_enrollment']['new']['START_DATE'].'-'.$_REQUEST['year_values']['student_enrollment']['new']['START_DATE'];
		$found_RET = DBGet(DBQuery("SELECT ID FROM student_enrollment WHERE STUDENT_ID='".UserStudentID()."' AND SYEAR='".UserSyear()."' AND '" . date("Y-m-d",strtotime($date))."' BETWEEN START_DATE AND END_DATE"));
		if(count($found_RET))
		{
			unset($_REQUEST['values']['student_enrollment']['new']);
			unset($_REQUEST['day_values']['student_enrollment']['new']);
			unset($_REQUEST['month_values']['student_enrollment']['new']);
			unset($_REQUEST['year_values']['student_enrollment']['new']);
			echo ErrorMessage(array('The student is already enrolled on that date, and could not be enrolled a second time on the date you specified.  Please fix, and try enrolling the student again.'));
		}
	}

	$iu_extra['student_enrollment'] = "STUDENT_ID='".UserStudentID()."' AND ID='__ID__'";
	$iu_extra['fields']['student_enrollment'] = 'SYEAR,STUDENT_ID,';
	$iu_extra['values']['student_enrollment'] = "'".UserSyear()."','".UserStudentID()."',";
	if(!$new_student)
		SaveData($iu_extra,'',$field_names);
}

$functions = array('START_DATE'=>'_makeStartInput','END_DATE'=>'_makeEndInput','SCHOOL_ID'=>'_makeSchoolInput');
unset($THIS_RET);
$RET = DBGet(DBQuery('SELECT e.ID,e.ENROLLMENT_CODE,e.START_DATE,e.DROP_CODE,e.END_DATE,e.END_DATE AS END,e.SCHOOL_ID,e.NEXT_SCHOOL,e.CALENDAR_ID FROM student_enrollment e WHERE e.STUDENT_ID=\''.UserStudentID().'\' AND e.SYEAR=\''.UserSyear().'\' ORDER BY e.START_DATE'),$functions);

$add = true;
if(count($RET))
{
	foreach($RET as $value)
	{
		if($value['DROP_CODE']=='' || !$value['DROP_CODE'])
			$add = false;
	}
}
if($add)
	$link['add']['html'] = array('START_DATE'=>_makeStartInput('','START_DATE'),'SCHOOL_ID'=>_makeSchoolInput('','SCHOOL_ID'));

$columns = array('START_DATE'=>'Attendance Start Date this School Year','END_DATE'=>'Dropped','SCHOOL_ID'=>'School');
//$_REQUEST['modfunc'] = '';
$schools_RET = DBGet(DBQuery('SELECT ID,TITLE FROM schools WHERE ID!=\''.UserSchool().'\''));
$next_school_options = array(UserSchool()=>'Next grade at current school','0'=>'Retain','-1'=>'Do not enroll after this school year');
if(count($schools_RET))
{
	foreach($schools_RET as $school)
		$next_school_options[$school['ID']] = $school['TITLE'];
}

$calendars_RET = DBGet(DBQuery('SELECT CALENDAR_ID,DEFAULT_CALENDAR,TITLE FROM attendance_calendars WHERE SYEAR=\''.UserSyear().'\' AND SCHOOL_ID=\''.UserSchool().'\' ORDER BY DEFAULT_CALENDAR ASC'));
if(count($calendars_RET))
{
	foreach($calendars_RET as $calendar)
		$calendar_options[$calendar['CALENDAR_ID']] = $calendar['TITLE'];
}
if($_REQUEST['student_id']!='new')
{
	if(count($RET))
		$id = $RET[count($RET)]['ID'];
	else
		$id = 'new';

	ListOutput($RET,$columns,'Enrollment Record','Enrollment Records',$link);
	if($id!='new')
		$next_school = $RET[count($RET)]['NEXT_SCHOOL'];
	if($id!='new')
		$calendar = $RET[count($RET)]['CALENDAR_ID'];
	$div = true;
}
else
{
 	$id = 'new';
	ListOutputMod($RET,$columns,'Enrollment Record','Enrollment Records',$link,array(),array('count'=>false));
	$next_school = UserSchool();
	$calendar = $calendars_RET[1]['CALENDAR_ID'];
	$div = false;
}
echo '

'.SelectInput($calendar,"values[student_enrollment][$id][CALENDAR_ID]",(!$calendar||!$div?'':'').'Calendar'.(!$calendar||!$div?'':''),$calendar_options,false,'',$div).'		'.SelectInput($next_school,"values[student_enrollment][$id][NEXT_SCHOOL]",(!$next_school||!$div?'':'').'Rolling / Retention Options'.(!$next_school||!$div?'':''),$next_school_options,false,'',$div).'

';

?>


text:
Overview
========

**Hyperledger Fabric** is a platform for distributed ledger solutions, underpinned
by a modular architecture delivering high degrees of confidentiality, resiliency,
flexibility and scalability.  It is designed to support pluggable implementations
of different components, and accomodate the complexity and intricacies that exist
across the economic ecosystem.

This section provides a high-level overview of key Fabric concepts:

* :ref:`Assets`
* :ref:`Chaincode`
* :ref:`Ledger-Features`
* :ref:`Privacy-through-Channels`
* :ref:`Security-Membership-Services`
* :ref:`Consensus`


text:
class CreatePeriods < ActiveRecord::Migration[5.0]
  def change
    create_table :periods do |t|
      t.string :department_code
      t.string :section_name
      t.string :course_name
      t.string :course_number
      t.string :day
      t.string :start_time
      t.string :end_time
      t.string :course_type

      t.timestamps
    end
  end
end


text:
FROM node:6.7

ENV WORK_DIR /app

WORKDIR $WORK_DIR

ADD package.json $WORK_DIR
RUN npm install

EXPOSE 3000
EXPOSE 3001

ADD . $WORK_DIR

CMD npm start


text:
package com.eixox.reflection;

import java.lang.reflect.AnnotatedElement;

public interface Aspect extends AnnotatedElement {

	public Class<?> getDataType();

	public String getName();
}