text:
package com.feilong.taglib.display.httpconcat.handler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.feilong.security.oneway.MD5Util;
import com.feilong.security.oneway.SHA1Util;

/**
 * 独立成一个类,避免没有依赖 security 报错.
 *
 * @author feilong
 * @since 1.11.1
 */
public final class VersionEncodeUtil{

    /** The Constant LOGGER. */
    private static final Logger LOGGER = LoggerFactory.getLogger(VersionEncodeUtil.class);

    /** Don't let anyone instantiate this class. */
    private VersionEncodeUtil(){
        //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.
        //see 《Effective Java》 2nd
        throw new AssertionError("No " + getClass().getName() + " instances for you!");
    }

    //---------------------------------------------------------------

    /**
     * Encode.
     *
     * @param version
     *            the version
     * @param versionEncode
     *            the version encode
     * @return the string
     */
    static String encode(String version,String versionEncode){
        //后缀
        String suffix = VersionEncodeUtil.class.getName();

        if ("md5".equalsIgnoreCase(versionEncode)){
            return MD5Util.encode(version + suffix);
        }

        if ("sha1".equalsIgnoreCase(versionEncode)){
            return SHA1Util.encode(version + suffix);
        }

        LOGGER.warn("versionEncode:[{}] ,not md5 and not sha1", versionEncode);
        return version;
    }
}


text:
/**
 * Main application file
 */

'use strict';

import express from 'express';
import mongoose from 'mongoose';
import config from './config/environment';
import http from 'http';

// Connect to MongoDB
mongoose.connect(config.mongo.uri, config.mongo.options);
mongoose.connection.on('error', function(err) {
  console.error('MongoDB connection error: ' + err);
  process.exit(-1);
});

// Populate databases with sample data
if (config.seedDB) { require('./config/seed'); }

// Setup server
var app = express();
var server = http.createServer(app);
require('./config/express')(app);
require('./routes')(app);

// Start server
function startServer() {
  server.listen(config.port, config.ip, function() {
    console.log('Express server listening on %d, in %s mode', config.port, app.get('env'));
  });
}

setImmediate(startServer);

// Expose app
exports = module.exports = app;

redpajama_set_name: RedPajamaGithub


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

<TITLE>
Uses of Class net.floodlightcontroller.devicemanager.internal.IndexedEntity
</TITLE>

<META NAME="date" CONTENT="2013-08-27">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Class
net.floodlightcontroller.devicemanager.internal.IndexedEntity

Packages that use IndexedEntity

datastore.util

net.floodlightcontroller.devicemanager.internal

net.floodlightcontroller.devicemanager.internal.original

Uses of IndexedEntity in datastore.util

Fields in datastore.util with type parameters of type IndexedEntity

static com.google.common.base.Function<byte[],IndexedEntity>
KeySerializationFunctions.INDEXED_ENTITY_DESERIALIZE

static com.google.common.base.Function<IndexedEntity,byte[]>
KeySerializationFunctions.INDEXED_ENTITY_SERIALIZE

Uses of IndexedEntity in net.floodlightcontroller.devicemanager.internal

Fields in net.floodlightcontroller.devicemanager.internal with type parameters of type IndexedEntity

private  Table<IndexedEntity,Device>
DeviceUniqueIndex.index

          The index

private  Table<IndexedEntity,java.util.HashSet<java.lang.Long>>
DeviceMultiIndex.index

          The index

private  java.util.Map<IndexedEntity,java.lang.Boolean>
DeviceUniqueIndex.semiBloom

Uses of IndexedEntity in net.floodlightcontroller.devicemanager.internal.original

Fields in net.floodlightcontroller.devicemanager.internal.original with type parameters of type IndexedEntity

private  java.util.concurrent.ConcurrentHashMap<IndexedEntity,java.lang.Long>
DeviceUniqueIndex.index

          The index

private  java.util.concurrent.ConcurrentHashMap<IndexedEntity,java.util.Collection<java.lang.Long>>
DeviceMultiIndex.index

          The index

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes


text:
const AnalogDisplay = function (props) {
  let date = new Date(props.time);
  let dialStyle = {
    position: 'relative',
    top: 0,
    left: 0,
    width: 200,
    height: 200,
    borderRadius: 20000,
    borderStyle: 'solid',
    borderColor: 'black'
  };
  let secondHandStyle = {
    position: 'relative',
    top: 100,
    left: 100,
    border: '1px solid red',
    width: '40%',
    height: 1,
    transform: 'rotate(' + (date.getSeconds() / 60 * 360 - 90).toString() + 'deg)',
    transformOrigin: '0% 0%',
    backgroundColor: 'red'
  };
  let minuteHandStyle = {
    position: 'relative',
    top: 100,
    left: 100,
    border: '1px solid grey',
    width: '40%',
    height: 3,
    transform: 'rotate(' + (date.getMinutes() / 60 * 360 - 90).toString() + 'deg)',
    transformOrigin: '0% 0%',
    backgroundColor: 'grey'
  };
  let hourHandStyle = {
    position: 'relative',
    top: 92,
    left: 106,
    border: '1px solid grey',
    width: '20%',
    height: 7,
    transform: 'rotate(' + (date.getHours() / 12 * 360 - 90).toString() + 'deg)',
    transformOrigin: '0% 0%',
    backgroundColor: 'grey'
  };
  return React.createElement(
    'div',
    null,
    React.createElement(
      'div',
      { style: dialStyle },
      React.createElement('div', { style: secondHandStyle }),
      React.createElement('div', { style: minuteHandStyle }),
      React.createElement('div', { style: hourHandStyle })
    )
  );
};


text:
/**
 * @fileoverview Startfile hook injects the CSS code at the end
 * of the <head> tag of the startfile or at the beginning of the
 * <body> tag if the <head> is not defined for some reason.
 */
define([], function () {
  return function (runtime, params, callback) {
    runtime.readFile('res/add2home.css', function (err, cnt) {
      if (err) return callback(err);

      params.content = runtime.headAppend(params.content,
        '<style type="text/css">\n' + cnt + '\n</style>');
      callback(null, params.content);
    });
  };
});


text:
package org.camunda.bpm.engine.test;

import java.util.Date;

import org.camunda.bpm.engine.AuthorizationService;
import org.camunda.bpm.engine.FormService;
import org.camunda.bpm.engine.HistoryService;
import org.camunda.bpm.engine.IdentityService;
import org.camunda.bpm.engine.ManagementService;
import org.camunda.bpm.engine.ProcessEngine;
import org.camunda.bpm.engine.RepositoryService;
import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.TaskService;
import org.camunda.bpm.engine.impl.test.TestHelper;
import org.camunda.bpm.engine.impl.util.ClockUtil;
import org.junit.rules.TestWatcher;
import org.junit.runner.Description;

/**
 * Rewrite of the ActivitiRule since TestWatchman is deprecated for junit>4.9.
 *
 * @author Jan Galinski, Holisticon AG (jan.galinski@holisticon.de)
 */
public class ProcessEngineTestWatcher extends TestWatcher implements ProcessEngineTestRule {

  /**
   * Default configuration file name when not used with needle.
   */
  private static final String ACTIVITI_CONFIG_RESOURCE = "activiti.cfg.xml";

  /**
   * Holds the deploymentId after execution of @Deployment. can be used to query
   * the {@link RepositoryService}.
   */
  protected String deploymentId;

  /**
   * The standalone process engine.
   */
  private final ProcessEngine processEngine;

  /**
   * Use default engine.
   *
   * @see #ProcessEngineTestWatcher(String)
   */
  public ProcessEngineTestWatcher() {
    this(ACTIVITI_CONFIG_RESOURCE);
  }

  /**
   * Create new instance with given configuration resource.
   *
   * @param configurationResource
   *          name of the configuration file (e.g. activiti.cfg.xml)
   * @see TestHelper#getProcessEngine(String)
   * @see #ProcessEngineTestWatcher(ProcessEngine)
   */
  public ProcessEngineTestWatcher(final String configurationResource) {
    this(TestHelper.getProcessEngine(configurationResource));
  }

  /**
   * Creates a new instance with given {@link ProcessEngine}.
   *
   * @param processEngine
   *          the ProcessEngine instance to use
   */
  public ProcessEngineTestWatcher(final ProcessEngine processEngine) {
    this.processEngine = processEngine;
  }

  @Override
  protected void starting(final Description description) {
    deploymentId = TestHelper.annotationDeploymentSetUp(processEngine, description.getTestClass(), description.getMethodName());
  }

  @Override
  protected void finished(final Description description) {
    TestHelper.annotationDeploymentTearDown(processEngine, deploymentId, description.getTestClass(), description.getMethodName());
    ClockUtil.reset();
  }

  @Override
  public void setCurrentTime(final Date currentTime) {
    ClockUtil.setCurrentTime(currentTime);
  }

  @Override
  public ProcessEngine getProcessEngine() {
    return processEngine;
  }

  @Override
  public String getDeploymentId() {
    return deploymentId;
  }

  @Override
  public RepositoryService getRepositoryService() {
    return processEngine.getRepositoryService();
  }

  @Override
  public RuntimeService getRuntimeService() {
    return processEngine.getRuntimeService();
  }

  @Override
  public FormService getFormService() {
    return processEngine.getFormService();
  }

  @Override
  public TaskService getTaskService() {
    return processEngine.getTaskService();
  }

  @Override
  public HistoryService getHistoryService() {
    return processEngine.getHistoryService();
  }

  @Override
  public IdentityService getIdentityService() {
    return processEngine.getIdentityService();
  }

  @Override
  public ManagementService getManagementService() {
    return processEngine.getManagementService();
  }

  @Override
  public String getName() {
    return processEngine.getName();
  }

  @Override
  public AuthorizationService getAuthorizationService() {
    return processEngine.getAuthorizationService();
  }

  @Override
  public void close() {
    processEngine.close();
  }

}


text:
The package contains the OpenJDK 7u75 RI release. Install this SEU-as-code package
using the following dependency:
```groovy
dependencies {
	software 'net.java:openjdk7:7u75'
}
```


text:
import collections
import copy
import errno
import itertools
import os
import os.path as osp

from peak.util.proxies import ObjectWrapper
import six
import yaml
from yaml import Loader

from . yaml_ext import load_all_yaml_constructors

load_all_yaml_constructors()

class nameddict(dict):
    """ Provides dictionary whose keys are accessible via the property
    syntax: `obj.key`
    """
    def __init__(self, *args, **kwargs):
        dict.__init__(self, *args, **kwargs)
        self.__dict__ = self
        self.__namify(self.__dict__)

    def __namify(self, a_dict):
        for key in a_dict.keys():
            if type(a_dict[key]) == dict:
                a_dict[key] = nameddict(a_dict[key])

    def __setitem__(self, key, value):
        if type(value) == dict:
            value = nameddict(value)
        super(nameddict, self).__setitem__(key, value)

    def __setattr__(self, key, value):
        if key != '__dict__' and type(value) == dict:
            value = nameddict(value)
        super(nameddict, self).__setattr__(key, value)

    def __deepcopy__(self, memo):
        cls = self.__class__
        content = dict()
        for k, v in self.iteritems():
            content[k] = copy.deepcopy(v, memo)
        result = cls.__new__(cls)
        result.__init__(content)
        return result

class Configuration(nameddict):
    @classmethod
    def from_file(cls, path):
        if not osp.exists(path) and not osp.isabs(path):
            path = osp.join(osp.dirname(osp.abspath(__file__)), path)
        with open(path, 'r') as istr:
            return Configuration(yaml.load(istr, Loader=Loader))

    @classmethod
    def from_env(cls, envvars, default, default_config):
        try:
            if isinstance(envvars, six.string_types):
                envvars = [envvars]
            config_file = default
            for envvar in envvars:
                envvalue = os.getenv(envvar)
                if envvalue is not None:
                    config_file = envvalue
                    break
            config = Configuration.from_file(config_file)
        except IOError as e:
            if e.errno in [errno.ENOENT, errno.ENOTDIR]:
                config = default_config
            else:
                raise
        return config

class contextobj(ObjectWrapper):
    """ Proxy a Python object, and provides a stack where copies of the
    wrapped object can be manipulated with `_push` and `_pop`
    member functions.

    `contextobj` can also be used in a Python with-statement.

        >>> o = contextobj(dict())
        >>> with o:
        >>>     o['foo'] = 'bar'
        >>> # the dict has been rollbacked: it is empty again
    """
    __obj_stack = None

    def __init__(self, *args, **kwargs):
        ObjectWrapper.__init__(self, *args, **kwargs)
        self.__obj_stack = []

    def _push(self):
        if not isinstance(self.__subject__, dict):
            raise NotImplementedError()
        self.__obj_stack.append(copy.deepcopy(self.__subject__))
        return self

    def _pop(self):
        self.__subject__.clear()
        self.__subject__.update(self.__obj_stack.pop())
        return self

    def __enter__(self):
        return self._push()

    def __exit__(self, type_, value, traceback):
        self._pop()
        return False

def chunks(it, n):
    """Split an iterator into chunks with `n` elements each.
    Examples
        # n == 2
        >>> x = chunks(iter([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), 2)
        >>> list(x)
        [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9], [10]]
        # n == 3
        >>> x = chunks(iter([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), 3)
        >>> list(x)
        [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9, 10]]
    """
    for first in it:
        yield [first] + list(itertools.islice(it, n - 1))

def flatten_dict(d, prefix='', sep='.'):
    """In place dict flattening.
    """
    def apply_and_resolve_conflicts(dest, item, prefix):
        for k, v in flatten_dict(item, prefix=prefix, sep=sep).items():
            new_key = k
            i = 2
            while new_key in d:
                new_key = '{key}{sep}{index}'.format(key=k, sep=sep, index=i)
                i += 1
            dest[new_key] = v

    for key in list(d.keys()):
        if any(unicode(prefix)):
            new_key = u'{p}{sep}{key}'.format(p=prefix, key=key, sep=sep)
        else:
            new_key = key
        if isinstance(d[key], (dict, collections.Mapping)):
            apply_and_resolve_conflicts(d, d.pop(key), new_key)
        elif isinstance(d[key], six.string_types):
            d[new_key] = d.pop(key)
        elif isinstance(d[key], (list, collections.Mapping)):
            array = d.pop(key)
            for i in range(len(array)):
                index_key = '{key}{sep}{i}'.format(key=key, sep=sep, i=i)
                while index_key in d:
                    i += 1
                apply_and_resolve_conflicts(d, array[i], index_key)
        else:
            d[new_key] = d.pop(key)
    return d

class hashabledict(dict):
    def __hash__(self):
        flatdict = flatten_dict(copy.deepcopy(self))
        return hash(tuple(sorted(flatdict.items())))


text:
#ifndef MAZEVIEWER_MAZE_HPP
#define MAZEVIEWER_MAZE_HPP

#include "defines.hpp"

#include <cstddef>
#include <ctime>
#include <random>
#include <algorithm>

MAZEVIEWER_NS_BEGIN

enum Direction {
	NORTH,
	EAST,
	SOUTH,
	WEST

}; // enum Direction;

enum GenMethod {
	METHOD_PRIMS,
	METHOD_RECURSIVE_BT

}; // enum GenMethod;

struct MazeOptions {
	unsigned int width, height;
	GenMethod method;

}; // struct MazeOptions;

struct Node {
	bool walls[4], inMaze, inPath, tried;

	Node() : inMaze(false), inPath(false), tried(false) {
		walls[NORTH] = true;
		walls[EAST] = true;
		walls[SOUTH] = true;
		walls[WEST] = true;

	} // Node() : inMaze(false), inPath(false), tried(false);

}; // struct Node;

struct Edge {
	int from, to, weight;
	Direction dir;

};// struct Edge;

class Maze {
public:
	Maze();

	void generate(MazeOptions options);
	void solve();

	int width, height;
	std::vector<Node> mazeGrid;

private:
	void doPrims();
	void doRecursiveBacktrack();

}; // class Maze;

MAZEVIEWER_NS_END

#endif // MAZEVIEWER_MAZE_HPP


text:
/**
 * @file
 * @brief Kernel initialization module
 *
 * This module contains routines that are used to initialize the kernel.
 */

#include <zephyr.h>
#include <offsets_short.h>
#include <kernel.h>
#include <misc/printk.h>
#include <misc/stack.h>
#include <drivers/rand32.h>
#include <sections.h>
#include <toolchain.h>
#include <kernel_structs.h>
#include <device.h>
#include <init.h>
#include <linker-defs.h>
#include <ksched.h>
#include <version.h>
#include <string.h>

/* kernel build timestamp items */

#define BUILD_TIMESTAMP "BUILD: " __DATE__ " " __TIME__

#ifdef CONFIG_BUILD_TIMESTAMP
const char * const build_timestamp = BUILD_TIMESTAMP;
#endif

/* boot banner items */

#define BOOT_BANNER "BOOTING ZEPHYR OS v" KERNEL_VERSION_STRING

#if !defined(CONFIG_BOOT_BANNER)
#define PRINT_BOOT_BANNER() do { } while (0)
#elif !defined(CONFIG_BUILD_TIMESTAMP)
#define PRINT_BOOT_BANNER() printk("***** " BOOT_BANNER " *****\n")
#else
#define PRINT_BOOT_BANNER() \
	printk("***** " BOOT_BANNER " - %s *****\n", build_timestamp)
#endif

/* boot time measurement items */

#ifdef CONFIG_BOOT_TIME_MEASUREMENT
uint64_t __noinit __start_tsc; /* timestamp when kernel starts */
uint64_t __noinit __main_tsc;  /* timestamp when main task starts */
uint64_t __noinit __idle_tsc;  /* timestamp when CPU goes idle */
#endif

/* init/main and idle threads */

#define IDLE_STACK_SIZE CONFIG_IDLE_STACK_SIZE

#if CONFIG_MAIN_STACK_SIZE & (STACK_ALIGN - 1)
    #error "MAIN_STACK_SIZE must be a multiple of the stack alignment"
#endif

#if IDLE_STACK_SIZE & (STACK_ALIGN - 1)
    #error "IDLE_STACK_SIZE must be a multiple of the stack alignment"
#endif

/* Some projects may specify their main thread and parameters in the
 * MDEF file. In this case, we need to use the stack size specified there
 * and not in Kconfig
 */
#if defined(MDEF_MAIN_STACK_SIZE) && \
		(MDEF_MAIN_STACK_SIZE > CONFIG_MAIN_STACK_SIZE)
#define MAIN_STACK_SIZE MDEF_MAIN_STACK_SIZE
#else
#define MAIN_STACK_SIZE CONFIG_MAIN_STACK_SIZE
#endif

char __noinit __stack _main_stack[MAIN_STACK_SIZE];
char __noinit __stack _idle_stack[IDLE_STACK_SIZE];

k_tid_t const _main_thread = (k_tid_t)_main_stack;
k_tid_t const _idle_thread = (k_tid_t)_idle_stack;

/*
 * storage space for the interrupt stack
 *
 * Note: This area is used as the system stack during kernel initialization,
 * since the kernel hasn't yet set up its own stack areas. The dual purposing
 * of this area is safe since interrupts are disabled until the kernel context
 * switches to the init thread.
 */
#if CONFIG_ISR_STACK_SIZE & (STACK_ALIGN - 1)
    #error "ISR_STACK_SIZE must be a multiple of the stack alignment"
#endif
char __noinit __stack _interrupt_stack[CONFIG_ISR_STACK_SIZE];

#ifdef CONFIG_SYS_CLOCK_EXISTS
	#include <misc/dlist.h>
	#define initialize_timeouts() do { \
		sys_dlist_init(&_timeout_q); \
	} while ((0))
#else
	#define initialize_timeouts() do { } while ((0))
#endif

extern void idle(void *unused1, void *unused2, void *unused3);

void k_call_stacks_analyze(void)
{
#if defined(CONFIG_INIT_STACKS) && defined(CONFIG_PRINTK)
	extern char sys_work_q_stack[CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE];
#if defined(CONFIG_ARC) && CONFIG_RGF_NUM_BANKS != 1
	extern char _firq_stack[CONFIG_FIRQ_STACK_SIZE];
#endif /* CONFIG_ARC */

	printk("Kernel stacks:\n");
	stack_analyze("main     ", _main_stack, sizeof(_main_stack));
	stack_analyze("idle     ", _idle_stack, sizeof(_idle_stack));
#if defined(CONFIG_ARC) && CONFIG_RGF_NUM_BANKS != 1
	stack_analyze("firq     ", _firq_stack, sizeof(_firq_stack));
#endif /* CONFIG_ARC */
	stack_analyze("interrupt", _interrupt_stack,
		      sizeof(_interrupt_stack));
	stack_analyze("workqueue", sys_work_q_stack,
		      sizeof(sys_work_q_stack));

#endif /* CONFIG_INIT_STACKS && CONFIG_PRINTK */
}

/**
 *
 * @brief Clear BSS
 *
 * This routine clears the BSS region, so all bytes are 0.
 *
 * @return N/A
 */
void _bss_zero(void)
{
	memset(&__bss_start, 0,
		 ((uint32_t) &__bss_end - (uint32_t) &__bss_start));
}

#ifdef CONFIG_XIP
/**
 *
 * @brief Copy the data section from ROM to RAM
 *
 * This routine copies the data section from ROM to RAM.
 *
 * @return N/A
 */
void _data_copy(void)
{
	memcpy(&__data_ram_start, &__data_rom_start,
		 ((uint32_t) &__data_ram_end - (uint32_t) &__data_ram_start));
}
#endif

/**
 *
 * @brief Mainline for kernel's background task
 *
 * This routine completes kernel initialization by invoking the remaining
 * init functions, then invokes application's main() routine.
 *
 * @return N/A
 */
static void _main(void *unused1, void *unused2, void *unused3)
{
	ARG_UNUSED(unused1);
	ARG_UNUSED(unused2);
	ARG_UNUSED(unused3);

	_sys_device_do_config_level(_SYS_INIT_LEVEL_POST_KERNEL);

	/* Final init level before app starts */
	_sys_device_do_config_level(_SYS_INIT_LEVEL_APPLICATION);

#ifdef CONFIG_CPLUSPLUS
	/* Process the .ctors and .init_array sections */
	extern void __do_global_ctors_aux(void);
	extern void __do_init_array_aux(void);
	__do_global_ctors_aux();
	__do_init_array_aux();
#endif

	_init_static_threads();

#ifdef CONFIG_BOOT_TIME_MEASUREMENT
	/* record timestamp for kernel's _main() function */
	extern uint64_t __main_tsc;

	__main_tsc = _tsc_read();
#endif

	extern void main(void);

	/* If we're going to load the MDEF main() in this context, we need
	 * to now set the priority to be what was specified in the MDEF file
	 */
#if defined(MDEF_MAIN_THREAD_PRIORITY) && \
		(MDEF_MAIN_THREAD_PRIORITY != CONFIG_MAIN_THREAD_PRIORITY)
	k_thread_priority_set(_main_thread, MDEF_MAIN_THREAD_PRIORITY);
#endif
	main();

	/* Terminate thread normally since it has no more work to do */
	_main_thread->base.user_options &= ~K_ESSENTIAL;
}

void __weak main(void)
{
	/* NOP default main() if the application does not provide one. */
}

/**
 *
 * @brief Initializes kernel data structures
 *
 * This routine initializes various kernel data structures, including
 * the init and idle threads and any architecture-specific initialization.
 *
 * Note that all fields of "_kernel" are set to zero on entry, which may
 * be all the initialization many of them require.
 *
 * @return N/A
 */
static void prepare_multithreading(struct k_thread *dummy_thread)
{
#ifdef CONFIG_ARCH_HAS_CUSTOM_SWAP_TO_MAIN
	ARG_UNUSED(dummy_thread);
#else
	/*
	 * Initialize the current execution thread to permit a level of
	 * debugging output if an exception should happen during kernel
	 * initialization.  However, don't waste effort initializing the
	 * fields of the dummy thread beyond those needed to identify it as a
	 * dummy thread.
	 */

	_current = dummy_thread;

	dummy_thread->base.user_options = K_ESSENTIAL;
#endif

	/* _kernel.ready_q is all zeroes */

	/*
	 * The interrupt library needs to be initialized early since a series
	 * of handlers are installed into the interrupt table to catch
	 * spurious interrupts. This must be performed before other kernel
	 * subsystems install bonafide handlers, or before hardware device
	 * drivers are initialized.
	 */

	_IntLibInit();

	/* ready the init/main and idle threads */

	for (int ii = 0; ii < K_NUM_PRIORITIES; ii++) {
		sys_dlist_init(&_ready_q.q[ii]);
	}

	/*
	 * prime the cache with the main thread since:
	 *
	 * - the cache can never be NULL
	 * - the main thread will be the one to run first
	 * - no other thread is initialized yet and thus their priority fields
	 *   contain garbage, which would prevent the cache loading algorithm
	 *   to work as intended
	 */
	_ready_q.cache = _main_thread;

	_new_thread(_main_stack, MAIN_STACK_SIZE,
		    _main, NULL, NULL, NULL,
		    CONFIG_MAIN_THREAD_PRIORITY, K_ESSENTIAL);
	_mark_thread_as_started(_main_thread);
	_add_thread_to_ready_q(_main_thread);

#ifdef CONFIG_MULTITHREADING
	_new_thread(_idle_stack, IDLE_STACK_SIZE,
		    idle, NULL, NULL, NULL,
		    K_LOWEST_THREAD_PRIO, K_ESSENTIAL);
	_mark_thread_as_started(_idle_thread);
	_add_thread_to_ready_q(_idle_thread);
#endif

	initialize_timeouts();

	/* perform any architecture-specific initialization */

	nanoArchInit();
}

static void switch_to_main_thread(void)
{
#ifdef CONFIG_ARCH_HAS_CUSTOM_SWAP_TO_MAIN
	_arch_switch_to_main_thread(_main_stack, MAIN_STACK_SIZE, _main);
#else
	/*
	 * Context switch to main task (entry function is _main()): the
	 * current fake thread is not on a wait queue or ready queue, so it
	 * will never be rescheduled in.
	 */

	_Swap(irq_lock());
#endif
}

#ifdef CONFIG_STACK_CANARIES
extern void *__stack_chk_guard;
#endif

/**
 *
 * @brief Initialize kernel
 *
 * This routine is invoked when the system is ready to run C code. The
 * processor must be running in 32-bit mode, and the BSS must have been
 * cleared/zeroed.
 *
 * @return Does not return
 */
FUNC_NORETURN void _Cstart(void)
{
#ifdef CONFIG_ARCH_HAS_CUSTOM_SWAP_TO_MAIN
	void *dummy_thread = NULL;
#else
	/* floating point is NOT used during kernel init */

	char __stack dummy_stack[_K_THREAD_NO_FLOAT_SIZEOF];
	void *dummy_thread = dummy_stack;
#endif

	/*
	 * Initialize kernel data structures. This step includes
	 * initializing the interrupt subsystem, which must be performed
	 * before the hardware initialization phase.
	 */

	prepare_multithreading(dummy_thread);

	/* perform basic hardware initialization */
	_sys_device_do_config_level(_SYS_INIT_LEVEL_PRE_KERNEL_1);
	_sys_device_do_config_level(_SYS_INIT_LEVEL_PRE_KERNEL_2);

	/* initialize stack canaries */
#ifdef CONFIG_STACK_CANARIES
	__stack_chk_guard = (void *)sys_rand32_get();
#endif

	/* display boot banner */

	PRINT_BOOT_BANNER();

	switch_to_main_thread();

	/*
	 * Compiler can't tell that the above routines won't return and issues
	 * a warning unless we explicitly tell it that control never gets this
	 * far.
	 */

	CODE_UNREACHABLE;
}


text:
import { Checkmark16 } from "../../";

export = Checkmark16;


text:
/** @file GeometryAll.h
	@author Jukka Jylänki
	@brief A conveniency file to include all files in the folder Geometry/. */

#pragma once

#include "../MathBuildConfig.h"
#include "../Math/MathNamespace.h"
#ifdef WIN32
// Windows GDI has a global function named Polygon. I am not renaming my Polygon object just for its sake, especially since
// I'm not expecting anyone to co-use this library with GDI. Kill the Polygon function from Windows. and force-include
// Windows.h here to erase that function signature.

// If this is an issue for you, do the following things to use MathGeoLib from behind a namespace:
// 1. Enable MATH_ENABLE_NAMESPACE and disable MATH_AUTO_USE_NAMESPACE in MathBuildConfig.h
// 2. Comment out the following three lines.
#define Polygon Polygon_unused
#include <Windows.h>
#undef Polygon
#endif

#include "AABB.h"
#include "AABB2D.h"
#include "Capsule.h"
#include "Circle.h"
#include "Frustum.h"
#include "GeometryAll.h"
#include "HitInfo.h"
#include "KDTree.h"
#include "Line.h"
#include "LineSegment.h"
#include "OBB.h"
#include "Plane.h"
#include "Polygon.h"
#include "Polyhedron.h"
#include "QuadTree.h"
#include "Ray.h"
#include "Sphere.h"
#include "Triangle.h"
#include "TriangleMesh.h"
#include "GeomType.h"


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace jsiSIE
{
    /// <summary>
    /// #KONTO
    /// </summary>
    [Serializable]
    public class SieAccount
    {
        public SieAccount()
        {
            SRU = new HashSet<string>();

            Name = "";
        }
        public string Number { get; set; }
        public string Name { get; set; }
        public string Unit { get; set; }
        public string Type { get; set; }
        public HashSet<string> SRU { get; set; }
    }
}


text:
package com.bah.culvert.accumulo;

import static org.apache.accumulo.core.Constants.NO_AUTHS;

import org.apache.accumulo.core.security.Authorizations;

import com.bah.culvert.data.CRange;
import com.bah.culvert.transactions.Get;

/**
 * A Get via Culvert that has {@link Authorizations} into an Accumulo table
 *
 * @see Get
 */
public class AccumuloGet extends Get {

  private final Authorizations auths;

  public AccumuloGet(CRange range, Authorizations auths) {
    super(range);
    this.auths = auths;
  }

  public AccumuloGet(CRange range) {
    this(range, NO_AUTHS);
  }

  public AccumuloGet(CRange range, byte[] columnFamily) {
    this(range, columnFamily, NO_AUTHS);
  }

  public AccumuloGet(CRange range, byte[] columnFamily, Authorizations auths) {
    super(range, columnFamily);
    this.auths = auths;
  }

  public AccumuloGet(CRange range, byte[] columnFamily, byte[] columnQualifier) {
    this(range, columnFamily, columnQualifier, NO_AUTHS);
  }

  public AccumuloGet(CRange range, byte[] columnFamily, byte[] columnQualifier,
      Authorizations auths) {
    super(range, columnFamily, columnQualifier);
    this.auths = auths;
  }

  public Authorizations getAuthorizations() {
    return this.auths;
  }

}


text:
package org.keycloak.storage.ldap.mappers;

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

import org.jboss.logging.Logger;
import org.keycloak.models.AbstractKeycloakTransaction;
import org.keycloak.storage.ldap.LDAPStorageProvider;
import org.keycloak.storage.ldap.idm.model.LDAPObject;

/**
 * @author Marek Posolda
 */
public class LDAPTransaction extends AbstractKeycloakTransaction {

    public static final Logger logger = Logger.getLogger(LDAPTransaction.class);

    private final LDAPStorageProvider ldapProvider;
    private final LDAPObject ldapUser;

    // Tracks the attributes updated in this transaction
    private final Set<String> updatedAttributes = new HashSet<>();

    public LDAPTransaction(LDAPStorageProvider ldapProvider, LDAPObject ldapUser) {
        this.ldapProvider = ldapProvider;
        this.ldapUser = ldapUser;
    }

    @Override
    protected void commitImpl() {
        if (logger.isTraceEnabled()) {
            logger.trace("Transaction commit! Updating LDAP attributes for object " + ldapUser.getDn().toString() + ", attributes: " + ldapUser.getAttributes());
        }

        ldapProvider.getLdapIdentityStore().update(ldapUser);
    }

    @Override
    protected void rollbackImpl() {
        logger.warn("Transaction rollback! Ignoring LDAP updates for object " + ldapUser.getDn().toString());
    }

    /**
     * Add attribute, which will be updated in LDAP in this transaction
     *
     * @param attributeName model attribute name (For example "firstName", "lastName", "street")
     */
    public void addUpdatedAttribute(String attributeName) {
        updatedAttributes.add(attributeName);
    }

    /**
     * @param attributeName model attribute name (For example "firstName", "lastName", "street")
     * @return true if attribute was updated in this transaction
     */
    public boolean isAttributeUpdated(String attributeName) {
        return updatedAttributes.contains(attributeName);
    }

    /**
     * Add required action, which will be updated in LDAP in this transaction
     *
     * @param requiredActionName
     */
    public void addUpdatedRequiredAction(String requiredActionName) {
        updatedAttributes.add("requiredAction(" + requiredActionName + ")");
    }

    /**
     *
     * @param requiredActionName
     * @return true if requiredAction was updated in this transaction
     */
    public boolean isRequiredActionUpdated(String requiredActionName) {
        return updatedAttributes.contains("requiredAction(" + requiredActionName + ")");
    }

}


text:
ACCEPTED

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

#### Published in
Bot. Gaz. 5:26. 1880

#### Original name
null

### Remarks
null


text:
package org.mitre.mrald.util;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
/**
 *  Description of the Class
 *
 *@author     ghamilton
 *@created    Jan 20th , 2005
 */
public class DataQuestKeywordSearch extends KeywordSearch
{

	/**
	 *  Constructor for the AllTablesListTag object
	 */
	public DataQuestKeywordSearch()
	{
		super();
	}

	/**
	 *  Description of the Method
	 *
	 *@param  searchParams        Description of the Parameter
	 *@return                     Description of the Return Value
	 *@exception  MraldException  Description of the Exception
	 */
	public String search(String[] searchParams) throws MraldException
	{
		try
		{
			Connection conn = new MraldConnection( "main" ).getConnection();

			Statement stmt = conn.createStatement();

			ArrayList<String> headers = new ArrayList<String>();

			StringBuffer strRtn = new StringBuffer();
			headers.add("piname");
			headers.add("granttitle");
			headers.add("fundingagency");
			headers.add("datasetid");
			String headerStr = "
<:" + headers.get(0).toString() + ":> - <:" + headers.get(1).toString() + ":> - <:" + headers.get(2).toString() + ":> (<a href=\"details.jsp?DataSetID=<:" + headers.get(3).toString() + ":>\">Details)
";

			if (searchParams.length < 1)
			{
				strRtn.append("\nYou must enter a search criteria.\n");
				return strRtn.toString();
			}
			//Must enter a search parameter

			/*
			 *  all tables and their metadata should now be in memory
			 */
            DBMetaData md = MetaData.getDbMetaData( datasource );

			Collection tableMetaData = md.getAllTableMetaData();
			TableMetaData tableInfo;
			Iterator iter = tableMetaData.iterator();
//			int orderNo = 1;
			/*
			 *  for each table . . .
			 */
			ResultSet rs;
			while (iter.hasNext())
			{
				tableInfo = (TableMetaData) iter.next();

				ArrayList fieldNames = (ArrayList) tableInfo.getColumnNames();
				Iterator iter2 = fieldNames.iterator();
				/*
				 *  and for each field, output a row of options
				 */
				String field;
				String whereClause = "";
				if (iter2 == null)
				{
					// MraldOutFile.logToFile(Config.getProperty("LOGFILE"), "Moogle:   No field info found ");
				} else if (!iter2.hasNext())
				{
					// MraldOutFile.logToFile(Config.getProperty("LOGFILE"), "Moogle:   No field info found ");
				}

				while (iter2.hasNext())
				{
					field = (String) iter2.next();

					Integer type = tableInfo.getFieldType(field);

					if (!FBUtils.isNumberType(type) && !FBUtils.isDateType(type) && !FBUtils.isBooleanType(type))
					{
						whereClause += " UPPER (" + field + ") like '%" + searchParams[0].toUpperCase() + "%' OR ";
					}
				}
				if (whereClause.equals(""))
				{
					continue;
				}
				whereClause += "1=0";

				String query = "select * from " + tableInfo.getName() + " where " + whereClause;

				rs = stmt.executeQuery(query);

				StringBuffer strOut = new StringBuffer();
				String projectId="-1";
				String dataSetId="-1";
				while (rs.next())
				{
					headerStr = "
<:" + headers.get(0).toString() + ":> - <:" + headers.get(1).toString() + ":> - <:" + headers.get(2).toString() + ":> (<A HREF=\"details.jsp?DataSetID=<:" + headers.get(3).toString() + ":>\">Details)
";

					strOut = new StringBuffer();
					strOut.append("\n\t");
					for (int i = 0; i < fieldNames.size(); i++)
					{

						String value = rs.getString(i + 1);
						if (value == null)
						{
							continue;
						}

						String fieldName = fieldNames.get(i).toString().toLowerCase();
						//do not show private data
						if (fieldName.equals("email") || fieldName.equals("phone") )
						{
							continue;
						}
						if (fieldName.equals("projectid"))
						{
							projectId = value;
						}
						if (fieldName.equals("datasetid"))
						{
							dataSetId = value;
						}

						if (headers.contains(fieldName))
						{

							headerStr = headerStr.replaceAll("<:" + fieldName + ":>", value);
						}
						strOut.append("
");
						strOut.append(fieldNames.get(i).toString());
						strOut.append("	");
						strOut.append(" " + value + "
");

					}
					if (tableInfo.getName().toLowerCase().equals("dataset"))
					{
						headerStr = getProjectInfo(headerStr, dataSetId, conn);
					}
					if (tableInfo.getName().toLowerCase().equals("project"))
					{
						headerStr = headerStr.replaceAll("DataSetID", "ProjectID");
						headerStr = headerStr.replaceAll("<:datasetid:>",projectId);
					}
					strRtn.append(headerStr + strOut.toString());
				}
			}
			return strRtn.toString();
		} catch (SQLException e)
		{
			MraldException se = new MraldException(e);
			throw se;
		}
	}

	/**
	 *  Description of the Method
	 *
	 *@param  header              Description of the Parameter
	 *@param  datasetid           Description of the Parameter
	 *@param  conn                Description of the Parameter
	 *@return                     The projectInfo value
	 *@exception  MraldException  Description of the Exception
	 */
	private String getProjectInfo(String header, String datasetid, Connection conn) throws MraldException
	{
		try
		{

			String sql = "select granttitle, grantnumber, fundingagency, piname from project, dataset where datasetid = '" + datasetid + "'";
			Statement stmt = conn.createStatement();
			ResultSet rs = stmt.executeQuery(sql);
			//headers.add("piname");
			//headers.add("granttitle");
			//headers.add("fundingagency");

			if (rs.next())
			{

				header = header.replaceAll("<:piname:>", rs.getString("piname"));
				header = header.replaceAll("<:granttitle:>", rs.getString("granttitle"));
				header = header.replaceAll("<:fundingagency:>", rs.getString("fundingagency"));
			}

			return header;
		} catch (SQLException e)
		{
			MraldException se = new MraldException(e);
			throw se;
		}

	}
}


text:
Configure and authenticate to Google with OAuth2 as an installed application.

This is for when your application needs to authenticate to Google services, as
opposed to your application's users.

Extracted from applications that use the DFP and Analytics APIs,
`google-oauth2-installed` helps with configuration (from `ENV`).
It also helps with setup by providing an easy command to generate your OAuth tokens.

For more information about Installed Apps: [https://developers.google.com/accounts/docs/OAuth2InstalledApp](https://developers.google.com/accounts/docs/OAuth2InstalledApp)

## Why

Google provides three ways to authenticate with OAuth2:

1. **Web application**. This is what you use when your application needs access
   as the user of your application.
2. **Service account**. This is really what you want, but can only be used by
   applications authenticating with a google apps account. If you have a google
   apps account, do not use GoogleOAuth2Installed, use service accounts instead.
3. **Installed application**. This allows you to authenticate as an application,
   but still requires an `access_token`, which requires user interaction through
   a browser. `google-oauth2-installed` tries to make this process as simple as
   possible. The bad news is that `access_token`s expire. The good news is that
   the `access_token` comes with a `refresh_token` that does not expire. So,
   once you've aquired your tokens, you can store them for later use and forget
   about it.

## Installation

Add this line to your application's Gemfile:

    gem 'google-oauth2-installed'

Or install it yourself as:

    $ gem install google-oauth2-installed

## Setup

### Create an application in Google Cloud Console

First, you need to create an application identifier in Google Cloud Console. Please follow
[these instructions](https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2#creating-an-application-identifier)
lovingly copied (and only slightly altered) from the
[google-api-ads-ruby library](https://github.com/googleads/google-api-ads-ruby).

> Visit [Google Cloud Console](https://cloud.google.com/console) and:
>
> 1. Click **CREATE PROJECT** to create a new project.
> 1. Enter the Project Name (and optionally, choose your own Project ID), and click **Create**.
> 1. The newly created project should automatically open. Click **APIs & auth** to expand the menu, and then click **Credentials**.
> 1. Click **CREATE NEW CLIENT ID** to create a new client identifier and client secret.
> 1. Choose **Installed application**, and **Other* for the "Installed application type".
> 1. Click **CREATE CLIENT ID** to complete the registration. Client ID and client secret will be created and displayed.
>
> ![API Access Page](https://developers.google.com/adwords/api/images/oauth2-client-id-secret.png)
>
> The Client ID and secret values are the parameters you will need in the next step.

Then go to **Concent screen** and make sure **Email addresses* and **Product name** are filled in
or you will get a `no application name` error.

### Set up your credentials in order to retrieve an access token

Define the following environment variables. I recommend using the
[`dotenv`](https://github.com/bkeepers/dotenv) gem (`dotenv-rails` in rails projects)
and adding these variables to a `.env` file.

```
OAUTH2_CLIENT_ID="..."
OAUTH2_CLIENT_SECRET="..."
OAUTH2_SCOPE="..."
```

`OAUTH2_SCOPE` is a space delimited list of the scopes your application will
need access to. For example, for readonly access to analytics, and write access to
DFP, use:

```
OAUTH2_SCOPE="https://www.googleapis.com/auth/analytics.readonly https://www.google.com/apis/ads/publisher"
```

### Get your access token

Once you have these environment variables defined, run this rake task and
authenticate to google with the user you need access as.

```
rake googleoauth2installed:get_access_token
```

This rake task will give you a url to load up in the browser. You will need to log in
to Google, allow access to the requested scopes, and copy the provided code. Paste
this code back in to the rake task that is waiting for you. It will then output the
rest of the environment variables you need to authenticate.

(If the URL shows an error, you may need to supply a Product Name under the Consent Screen section of your Google Developers Console.)

If you are using `.env`, it should now look something like:

```shell
OAUTH2_CLIENT_ID="..."
OAUTH2_CLIENT_SECRET="..."
OAUTH2_SCOPE="..."

OAUTH2_ACCESS_TOKEN="..."
OAUTH2_REFRESH_TOKEN="..."
OAUTH2_EXPIRES_AT="..."
```

### Not in Rails?

You might need to reference our rake task from your `Rakefile`. Try something like this:

```ruby
require 'rubygems'
require 'bundler/setup'
load 'tasks/get_access_token.rake'
```

## Usage

Once you have all of your environment variables set up, just ask `GoogleOauth2Installed`
for an access token. `GoogleOauth2Installed` will handle refreshing it if needed.

Example usage with `Legato` for Analytics:

```ruby
Legato::User.new GoogleOauth2Installed.access_token
```

If you just need the details (and not a refreshed access token), use
`GoogleOauth2Installed.credentials`.

Example usage with `DfpApi`:

```ruby
dfp_authentication = GoogleOauth2Installed.credentials.merge(
  application_name: ENV['DFP_APPLICATION_NAME'],
  network_code: ENV['DFP_NETWORK_CODE'],
)

::DfpApi::Api.new({
  authentication: dfp_authentication,
  service: { environment: 'PRODUCTION' },
})
```

## Contributing

1. Fork it ([http://github.com/carnesmedia/google-oauth2-installed/fork](http://github.com/carnesmedia/google-oauth2-installed/fork))
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>

    <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
            <!--param name="ConversionPattern" value="%d{ABSOLUTE} [%t] %-5p %-30c{1} %x - %m %n"/-->
            <param name="ConversionPattern" value=" %m %n"/>
        </layout>
    </appender>

    <logger name="org.dbmaintain">
        <level value="DEBUG" />
    </logger>

    <root>
        <priority value="INFO" />
        <appender-ref ref="STDOUT" />
    </root>

</log4j:configuration>


text: <canvas id="test-linechart"></canvas>


text:
<?php

namespace Magento\Setup\Module\Di\Code\Scanner;

class ArrayScanner implements ScannerInterface
{
    /**
     * Scan files
     *
     * @param array $files
     * @return array
     */
    public function collectEntities(array $files)
    {
        $output = [];
        foreach ($files as $file) {
            if (file_exists($file)) {
                $data = include $file;
                $output = array_merge($output, $data);
            }
        }
        return $output;
    }
}


text:
package com.itranswarp.recurring.product.pricing;

import static org.junit.Assert.*;

import org.junit.Test;

import com.itranswarp.recurring.product.pricing.info.UnitPriceInfo;

public class VolumePricingTest extends BaseTest {

    @Test(expected=IllegalArgumentException.class)
    public void testEmptyTier() {
        createVolumePricing().validate();
    }

    @Test(expected=IllegalArgumentException.class)
    public void testInvalidTiersWith0() {
        createVolumePricing(
                createFlatFeeTier(0.0, 19.9), // Error: units = 0.0
                createFlatFeeTier(20.0, 28.8),
                createFlatFeeTier(30.0, 37.7)
        ).validate();
    }

    @Test(expected=IllegalArgumentException.class)
    public void testInvalidTiersWithNegative() {
        createVolumePricing(
                createFlatFeeTier(-0.1, 19.9), // Error: units < 0.0
                createFlatFeeTier(20.0, 28.8),
                createFlatFeeTier(30.0, 37.7)
        ).validate();
    }

    @Test(expected=IllegalArgumentException.class)
    public void testInvalidTiersNotOrdered() {
        createVolumePricing(
                createFlatFeeTier(10.0, 19.9),
                createFlatFeeTier(30.0, 37.7),
                createFlatFeeTier(20.0, 28.8) // Error: units < last
        ).validate();
    }

    @Test(expected=IllegalArgumentException.class)
    public void testInvalidTiersWithTooLarge() {
        createVolumePricing(
                createFlatFeeTier(10.0, 19.9),
                createFlatFeeTier(20.0, 28.8),
                createFlatFeeTier(Pricing.MAX_UNITS + 1.0, 37.7) // Error: units too large
        ).validate();
    }

    @Test
    public void test3FlatFeeTiers() {
        VolumePricing vp = createVolumePricing(
                createFlatFeeTier(10.0, 19.9),
                createFlatFeeTier(20.0, 28.8),
                createFlatFeeTier(30.0, 37.7)
        );
        // 0 ~ 10.0
        assertEquals(19.9, vp.calculate(new UnitPriceInfo(0)), DELTA);
        assertEquals(19.9, vp.calculate(new UnitPriceInfo(0.1)), DELTA);
        assertEquals(19.9, vp.calculate(new UnitPriceInfo(1.0)), DELTA);
        assertEquals(19.9, vp.calculate(new UnitPriceInfo(9.9)), DELTA);
        assertEquals(19.9, vp.calculate(new UnitPriceInfo(10.0)), DELTA);
        // 10.0 ~ 20.0
        assertEquals(28.8, vp.calculate(new UnitPriceInfo(10.01)), DELTA);
        assertEquals(28.8, vp.calculate(new UnitPriceInfo(10.1)), DELTA);
        assertEquals(28.8, vp.calculate(new UnitPriceInfo(19.9)), DELTA);
        assertEquals(28.8, vp.calculate(new UnitPriceInfo(20.0)), DELTA);
        // 20.0 ~ 30.0
        assertEquals(37.7, vp.calculate(new UnitPriceInfo(20.01)), DELTA);
        assertEquals(37.7, vp.calculate(new UnitPriceInfo(20.1)), DELTA);
        assertEquals(37.7, vp.calculate(new UnitPriceInfo(21.0)), DELTA);
        assertEquals(37.7, vp.calculate(new UnitPriceInfo(29.9)), DELTA);
        assertEquals(37.7, vp.calculate(new UnitPriceInfo(30.0)), DELTA);
        // > 30:
        for (double x : new double[] { 30.01, 30.1, 31, 99, 10000 }) {
            assertEquals(37.7, vp.calculate(new UnitPriceInfo(x)), DELTA);
        }
    }

    @Test
    public void test3PerUnitTiers() {
        VolumePricing vp = createVolumePricing(
                createPerUnitTier(10.0, 9.9),
                createPerUnitTier(20.0, 8.8),
                createPerUnitTier(30.0, 7.7)
        );
        // 0 ~ 10.0
        assertEquals(0.0, vp.calculate(new UnitPriceInfo(0)), DELTA);
        assertEquals(0.99, vp.calculate(new UnitPriceInfo(0.1)), DELTA);
        assertEquals(9.9, vp.calculate(new UnitPriceInfo(1.0)), DELTA);
        assertEquals(9.9 * 9.9, vp.calculate(new UnitPriceInfo(9.9)), DELTA);
        assertEquals(99.0, vp.calculate(new UnitPriceInfo(10.0)), DELTA);
        // 10.0 ~ 20.0
        assertEquals(8.8 * 10.01, vp.calculate(new UnitPriceInfo(10.01)), DELTA);
        assertEquals(8.8 * 10.1, vp.calculate(new UnitPriceInfo(10.1)), DELTA);
        assertEquals(8.8 * 19.9, vp.calculate(new UnitPriceInfo(19.9)), DELTA);
        assertEquals(8.8 * 20.0, vp.calculate(new UnitPriceInfo(20.0)), DELTA);
        // 20.0 ~ 30.0
        assertEquals(7.7 * 20.01, vp.calculate(new UnitPriceInfo(20.01)), DELTA);
        assertEquals(7.7 * 20.1, vp.calculate(new UnitPriceInfo(20.1)), DELTA);
        assertEquals(7.7 * 21.0, vp.calculate(new UnitPriceInfo(21.0)), DELTA);
        assertEquals(7.7 * 29.9, vp.calculate(new UnitPriceInfo(29.9)), DELTA);
        assertEquals(7.7 * 30.0, vp.calculate(new UnitPriceInfo(30.0)), DELTA);
        // > 30:
        for (double x : new double[] { 30.01, 30.1, 31, 99, 10000 }) {
            assertEquals(7.7 * 30.0, vp.calculate(new UnitPriceInfo(x)), DELTA);
        }
    }

    @Test
    public void test3MixedTiers() {
        VolumePricing vp = createVolumePricing(
                createPerUnitTier(10.0, 9.9),
                createFlatFeeTier(20.0, 129.9),
                createPerUnitTier(30.0, 7.7)
        );
        // 0 ~ 10.0
        assertEquals(0.0, vp.calculate(new UnitPriceInfo(0)), DELTA);
        assertEquals(0.99, vp.calculate(new UnitPriceInfo(0.1)), DELTA);
        assertEquals(9.9, vp.calculate(new UnitPriceInfo(1.0)), DELTA);
        assertEquals(9.9 * 9.9, vp.calculate(new UnitPriceInfo(9.9)), DELTA);
        assertEquals(99.0, vp.calculate(new UnitPriceInfo(10.0)), DELTA);
        // 10.0 ~ 20.0
        assertEquals(129.9, vp.calculate(new UnitPriceInfo(10.01)), DELTA);
        assertEquals(129.9, vp.calculate(new UnitPriceInfo(10.1)), DELTA);
        assertEquals(129.9, vp.calculate(new UnitPriceInfo(19.9)), DELTA);
        assertEquals(129.9, vp.calculate(new UnitPriceInfo(20.0)), DELTA);
        // 20.0 ~ 30.0
        assertEquals(7.7 * 20.01, vp.calculate(new UnitPriceInfo(20.01)), DELTA);
        assertEquals(7.7 * 20.1, vp.calculate(new UnitPriceInfo(20.1)), DELTA);
        assertEquals(7.7 * 21.0, vp.calculate(new UnitPriceInfo(21.0)), DELTA);
        assertEquals(7.7 * 29.9, vp.calculate(new UnitPriceInfo(29.9)), DELTA);
        assertEquals(7.7 * 30.0, vp.calculate(new UnitPriceInfo(30.0)), DELTA);
        // > 30:
        for (double x : new double[] { 30.01, 30.1, 31, 99, 10000 }) {
            assertEquals(7.7 * 30.0, vp.calculate(new UnitPriceInfo(x)), DELTA);
        }
    }

    VolumePricing createVolumePricing(TieredPricing.Tier... tiers) {
        VolumePricing vp = new VolumePricing();
        vp.tiers = tiers;
        return vp;
    }

}


text:
import { Component } from "@angular/core";
import template from "./app.component.html";
import style from "./app.component.less";

@Component({
  selector: "app",
  template,
  styles: [ style ]
})
export class AppComponent {
  constructor() {
  }
}


text:
using AutoMapper;
using Microsoft.AspNet.Identity;
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using EmpMan.Model.Models;
using EmpMan.Service;
using EmpMan.Web.Infrastructure.Core;
using EmpMan.Web.Models.Common;
using EmpMan.Web.SignalR;

namespace EmpMan.Web.Controllers
{
    [RoutePrefix("api/Announcement")]
    public class AnnouncementController : ApiControllerBase
    {
        private IAnnouncementService _announcementService;

        public AnnouncementController(IErrorService errorService,
            IAnnouncementService announcementService)
            : base(errorService)
        {
            _announcementService = announcementService;
        }
        [Route("getTopMyAnnouncement")]
        [HttpGet]
        public HttpResponseMessage GetTopMyAnnouncement(HttpRequestMessage request)
        {
            return CreateHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;
                int totalRow = 0;
              List<Announcement> model = _announcementService.ListAllUnread(User.Identity.GetUserId(), 1, 10, out totalRow);
                IEnumerable<AnnouncementViewModel> modelVm = Mapper.Map<List<Announcement>, List<AnnouncementViewModel>>(model);

                PaginationSet<AnnouncementViewModel> pagedSet = new PaginationSet<AnnouncementViewModel>()
                {
                    PageIndex = 1,
                    TotalRows = totalRow,
                    PageSize = 10,
                    Items = modelVm
                };
                response = request.CreateResponse(HttpStatusCode.OK, modelVm);

                return response;
            });
        }

        [Route("getall")]
        [HttpGet]
        public HttpResponseMessage GetAll(HttpRequestMessage request, int pageIndex, int pageSize)
        {
            return CreateHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;
                int totalRow = 0;
                var model = _announcementService.GetListAll(pageIndex, pageSize, out totalRow);

                IEnumerable<AnnouncementViewModel> modelVm = Mapper.Map<List<Announcement>, List<AnnouncementViewModel>>(model);
                PaginationSet<AnnouncementViewModel> pagedSet = new PaginationSet<AnnouncementViewModel>()
                {
                    PageIndex = pageIndex,
                    TotalRows = totalRow,
                    PageSize = pageSize,
                    Items = modelVm
                };
                response = request.CreateResponse(HttpStatusCode.OK, pagedSet);

                return response;
            });
        }

        [Route("detail/{id}")]
        [HttpGet]
        public HttpResponseMessage Details(HttpRequestMessage request, int id)
        {
            if (id == 0)
            {
                return request.CreateErrorResponse(HttpStatusCode.BadRequest, nameof(id) + " không có giá trị.");
            }
            var announcement = _announcementService.GetDetail(id);
            if (announcement == null)
            {
                return request.CreateErrorResponse(HttpStatusCode.NoContent, "No data");
            }
            var modelVm = Mapper.Map<Announcement, AnnouncementViewModel>(announcement);

            return request.CreateResponse(HttpStatusCode.OK, modelVm);
        }

        [HttpPost]
        [Route("add")]
        public HttpResponseMessage Create(HttpRequestMessage request, AnnouncementViewModel announcementVm)
        {
            if (ModelState.IsValid)
            {
                var newAnnoun = new Announcement();
                try
                {
                    newAnnoun.Content = announcementVm.Content;
                    newAnnoun.Status = announcementVm.Status;
                    newAnnoun.Title = announcementVm.Title;
                    newAnnoun.CreatedDate = DateTime.Now;
                    newAnnoun.UserId = User.Identity.GetUserId();
                    foreach (var user in announcementVm.AnnouncementUsers)
                    {
                        newAnnoun.AnnouncementUsers.Add(new AnnouncementUser()
                        {
                            UserId = user.UserId,
                            HasRead = false
                        });
                    }
                    _announcementService.Create(newAnnoun);
                    _announcementService.Save();

                    var announ = _announcementService.GetDetail(newAnnoun.ID);
                    //push notification
                    EmpManHub.PushToAllUsers(Mapper.Map<Announcement, AnnouncementViewModel>(announ), null);

                    return request.CreateResponse(HttpStatusCode.OK, announcementVm);

                }
                catch (Exception dex)
                {
                    return request.CreateErrorResponse(HttpStatusCode.BadRequest, dex.Message);
                }
            }
            else
            {
                return request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }
        }

        [HttpGet]
        [Route("markAsRead")]
        public HttpResponseMessage MarkAsRead(HttpRequestMessage request, int announId)
        {
            try
            {
                _announcementService.MarkAsRead(User.Identity.GetUserId(), announId);
                _announcementService.Save();
                return request.CreateResponse(HttpStatusCode.OK, announId);

            }
            catch (Exception ex)
            {
                return request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message);
            }
        }

        [HttpDelete]
        [Route("delete")]
        public HttpResponseMessage Delete(HttpRequestMessage request, int id)
        {
            _announcementService.Delete(id);
            _announcementService.Save();

            return request.CreateResponse(HttpStatusCode.OK, id);
        }
    }
}


text:
  Define a path using only relative points. Most SVG drawing tools will export paths using absolute points though it can be nicer to tweak them manually when all the points are relative.

## Programatic Usage

With your favourite package manager:

- [packin](//github.com/jkroso/packin): `packin add jkroso/rel-svg-path`
- [component](//github.com/component/component#installing-packages): `component install jkroso/rel-svg-path`
- [npm](//npmjs.org/doc/cli/npm-install.html): `npm install rel-svg-path`

then in you code:

```js
var rel = require('rel-svg-path')
rel([['M',10,20],['L',50, 40]]) // => [['m',10,20],['l',40,20]]
```

## Command line usage

  Installation:

```sh
git clone https://github.com/jkroso/rel-svg-path.git
cd rel-svg-path
make install
```

  Then just pipe path data to it:

```sh
echo "M10 20 50 40" | rel-svg-path
```

## Running the tests

Just run `make` and navigate your browser to [test/index.html](test/index.html)


text:
package org.wso2.carbon.mdm.services.android.bean;

import java.io.Serializable;

/**
 * This class represents the information of sending notification operation.
 */
public class Notification extends AndroidOperation implements Serializable {

	private String message;

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}


text:
using namespace std;

#include "popTemplate.h"

static const bool kDelayMatch = false;

static const int kBlockSize = DETECTORS_BLOCK_SIZE;
static const int kLogBlockSize = 9;
static const int kSpectrumSize = kBlockSize/2;
static const int kWindowSize = kBlockSize;

static const int kNumSteps = 4;
static const int kStepSize = kBlockSize / kNumSteps;

static const size_t kMainBandLow = 40;
static const size_t kMainBandHi = 100;
static const size_t kOptionalBandHi = 180;

static const size_t kLowerBandLow = 3;
static const size_t kLowerBandHi = kMainBandLow;
static const size_t kUpperBandLo = kOptionalBandHi;
static const size_t kUpperBandHi = kSpectrumSize;

static const float kDefaultLowPassWeight = 0.6;
static const int kSpeechShadowTime = 100;
static const float kSpeechThresh = 0.5;

Detectors::Detectors() {
  m_overlapBuffer = new float[kBlockSize * 2];

  // === Tss Detection
  m_sensitivity = 5.0;
  m_hysterisisFactor = 0.4;
  m_minFrames = 20;
  m_minFramesLong = 100;
  m_lowPassWeight = kDefaultLowPassWeight;

  // === Pop detection
  m_startBin = 2;
  m_maxShiftDown = 4;
  m_maxShiftUp = 2;
  m_popSensitivity = 8.5;
  m_framesSincePop = 0;

  // debugLog = new std::ofstream("/Users/tristan/misc/popclick.log");

  // === FFT
  m_inReal = new float[kBlockSize];
  m_splitData.realp = new float[kSpectrumSize];
  m_splitData.imagp = new float[kSpectrumSize];
  m_window = new float[kWindowSize];
  memset(m_window, 0, sizeof(float) * kWindowSize);
  vDSP_hann_window(m_window, kWindowSize, vDSP_HANN_NORM);

  m_fftSetup = vDSP_create_fftsetup(kLogBlockSize, FFT_RADIX2);
}

Detectors::~Detectors() {
  delete[] m_overlapBuffer;

  delete[] m_inReal;
  delete[] m_splitData.realp;
  delete[] m_splitData.imagp;
  delete[] m_window;
  // delete debugLog;

  vDSP_destroy_fftsetup(m_fftSetup);
}

bool Detectors::initialise() {
  // Real initialisation work goes here!
  m_savedOtherBands = 0.0002;
  m_consecutiveMatches = 0;
  m_framesSinceSpeech = 1000;
  m_framesSinceMatch = 1000;
  m_lowPassBuffer.resize(kSpectrumSize, 0.0);

  m_spectrum.resize(kSpectrumSize, 0.0);
  m_popBuffer.clear();
  for(unsigned i = 0; i < kBufferSize; ++i) {
    m_popBuffer.push_back(0.0);
  }

  return true;
}

int Detectors::process(const float *buffer) {
  // return processChunk(buffer);
  // copy last frame to start of the buffer
  std::copy(m_overlapBuffer+kBlockSize, m_overlapBuffer+(kBlockSize*2), m_overlapBuffer);
  // copy new input to the second half of the overlap buffer
  std::copy(buffer,buffer+kBlockSize,m_overlapBuffer+kBlockSize);

  int result = 0;
  for(int i = 0; i < kNumSteps; ++i) {
    float *ptr = m_overlapBuffer+((i+1)*kStepSize);
    result |= processChunk(ptr);
  }
  return result;
}

void Detectors::doFFT(const float *buffer) {
  vDSP_vmul(buffer, 1, m_window, 1, m_inReal, 1, kBlockSize);
  vDSP_ctoz(reinterpret_cast<DSPComplex*>(m_inReal), 2, &m_splitData, 1, kSpectrumSize);
  vDSP_fft_zrip(m_fftSetup, &m_splitData, 1, kLogBlockSize, FFT_FORWARD);
  m_splitData.imagp[0] = 0.0f;

  float scale = 1.0f / static_cast<float>(2 * kBlockSize);
  vDSP_vsmul(m_splitData.realp, 1, &scale, m_splitData.realp, 1, kSpectrumSize);
  vDSP_vsmul(m_splitData.imagp, 1, &scale, m_splitData.imagp, 1, kSpectrumSize);
}

int Detectors::processChunk(const float *buffer) {
  doFFT(buffer);

  int result = 0;
  size_t n = kSpectrumSize;

  for (size_t i = 0; i < n; ++i) {
    float real = m_splitData.realp[i];
    float imag = m_splitData.imagp[i];
    float newVal = real * real + imag * imag;
    m_spectrum[i] = newVal;
    m_lowPassBuffer[i] = m_lowPassBuffer[i]*(1.0f-m_lowPassWeight) + newVal*m_lowPassWeight;

    // infinite values happen non-deterministically, probably due to glitchy audio input at start of recording
    // but inifinities it could mess up things forever
    if(m_lowPassBuffer[i] >= numeric_limits<float>::infinity()) {
      std::fill(m_lowPassBuffer.begin(), m_lowPassBuffer.end(), 0.0f);
      return 0; // discard the frame, it's probably garbage
    }
  }

  float lowerBand = avgBand(m_lowPassBuffer, kLowerBandLow, kLowerBandHi);
  float mainBand = avgBand(m_lowPassBuffer, kMainBandLow, kMainBandHi);
  float upperBand = avgBand(m_lowPassBuffer, kUpperBandLo, kUpperBandHi);

  m_framesSinceSpeech += 1;
  if(lowerBand > kSpeechThresh) {
    m_framesSinceSpeech = 0;
  }

  float debugMarker = 0.0002;
  float matchiness = mainBand / ((lowerBand+upperBand)/2.0f);
  bool outOfShadow = m_framesSinceSpeech > kSpeechShadowTime;
  int immediateMatchFrame = kDelayMatch ? m_minFramesLong : m_minFrames;
  m_framesSinceMatch += 1;
  if(((matchiness >= m_sensitivity) ||
      (m_consecutiveMatches > 0 && matchiness >= m_sensitivity*m_hysterisisFactor) ||
      (m_consecutiveMatches > immediateMatchFrame && (mainBand/m_savedOtherBands) >= m_sensitivity*m_hysterisisFactor*0.5f))
     && outOfShadow) {
    debugMarker = 0.01;
    // second one in double "tss" came earlier than trigger timer
    if(kDelayMatch && m_consecutiveMatches == 0 && m_framesSinceMatch <= m_minFramesLong) {
      result |= TSS_START_CODE;
      result |= TSS_STOP_CODE;
      m_framesSinceMatch = 1000;
    }

    m_consecutiveMatches += 1;
    if(kDelayMatch && m_consecutiveMatches == m_minFrames) {
      m_framesSinceMatch = m_consecutiveMatches;
    } else if(m_consecutiveMatches == immediateMatchFrame) {
      debugMarker = 1.0;
      result |= TSS_START_CODE;
      m_savedOtherBands = ((lowerBand+upperBand)/2.0f);
    }
  } else {
    bool delayedMatch = kDelayMatch && (m_framesSinceMatch == m_minFramesLong && outOfShadow);
    if(delayedMatch) {
      result |= TSS_START_CODE;
    }
    if(m_consecutiveMatches >= immediateMatchFrame || delayedMatch) {
      debugMarker = 2.0;
      result |= TSS_STOP_CODE;
    }
    m_consecutiveMatches = 0;
  }

  // ===================== Pop Detection =================================
  // update buffer forward one time step
  for(unsigned i = 0; i < kBufferPrimaryHeight; ++i) {
    m_popBuffer.pop_front();
    m_popBuffer.push_back(m_spectrum[i]);
  }
  // high frequencies aren't useful so we bin them all together
  m_popBuffer.pop_front();
  float highSum = accumulate(m_spectrum.begin()+kBufferPrimaryHeight,m_spectrum.end(),0.0);
  m_popBuffer.push_back(highSum);

  std::deque<float>::iterator maxIt = max_element(m_popBuffer.begin(), m_popBuffer.end());
  float minDiff = 10000000.0;
  for(int i = -m_maxShiftUp; i < m_maxShiftDown; ++i) {
    float diff = templateDiff(*maxIt, i);
    if(diff < minDiff) minDiff = diff;
  }

  m_framesSincePop += 1;
  if(minDiff < m_popSensitivity && m_framesSincePop > 15) {
    result |= POP_CODE; // Detected pop
    m_framesSincePop = 0;
  }

  // *debugLog << lowerBand << ' ' << mainBand << ' ' << optionalBand << ' ' << upperBand << '-' << matchiness << ' ' << debugMarker << std::endl;
  return result;
}

float Detectors::avgBand(std::vector<float> &frame, size_t low, size_t hi) {
  float sum = 0;
  for (size_t i = low; i < hi; ++i) {
    sum += frame[i];
  }
  return sum / (hi - low);
}

float Detectors::templateAt(int i, int shift) {
  int bin = i % kBufferHeight;
  if(i % kBufferHeight >= kBufferPrimaryHeight) {
    return kPopTemplate[i]/kPopTemplateMax;
  }
  if(bin+shift < 0 || bin+shift >= kBufferPrimaryHeight) {
    return 0.0;
  }
  return kPopTemplate[i+shift]/kPopTemplateMax;
}

float Detectors::diffCol(int templStart, int bufStart, float maxVal, int shift) {
  float diff = 0;
  for(unsigned i = m_startBin; i < kBufferHeight; ++i) {
    float d = templateAt(templStart+i, shift) - m_popBuffer[bufStart+i]/maxVal;
    diff += abs(d);
  }
  return diff;
}

float Detectors::templateDiff(float maxVal, int shift) {
  float diff = 0;
  for(unsigned i = 0; i < kBufferSize; i += kBufferHeight) {
    diff += diffCol(i,i, maxVal,shift);
  }
  return diff;
}

extern "C" {
  detectors_t *detectors_new() {
    Detectors *dets = new Detectors();
    dets->initialise();
    return reinterpret_cast<detectors_t*>(dets);
  }
  void detectors_free(detectors_t *detectors) {
    Detectors *dets = reinterpret_cast<Detectors*>(detectors);
    delete dets;
  }
  int detectors_process(detectors_t *detectors, const float *buffer) {
    Detectors *dets = reinterpret_cast<Detectors*>(detectors);
    return dets->process(buffer);
  }
}


text:
<?php defined('BX_DOL') or die('hack attempt');

/**
 * Category objects representation.
 * @see BxDolCategory
 */
class BxBaseCategory extends BxDolCategory
{
    protected $_oTemplate;
    protected $_sBrowseUrl;

    public function __construct ($aObject, $oTemplate = null)
    {
        parent::__construct ($aObject);

        if ($oTemplate)
            $this->_oTemplate = $oTemplate;
        else
            $this->_oTemplate = BxDolTemplate::getInstance();

		$this->_sBrowseUrl = bx_append_url_params('searchKeyword.php', array(
			'cat' => '{category}',
			'keyword' => '{keyword}'
		), true, ['{category}', '{keyword}']) . '{sections}' . '{context}';
    }

    public function getCategoryTitle($sValue)
    {
    	$a = BxDolForm::getDataItems($this->_aObject['list_name']);
        if (!$a || !isset($a[$sValue]))
            return '';

		return $a[$sValue];
    }

    public function getCategoryUrl($sValue, $aParams = [])
    {
        return BX_DOL_URL_ROOT . bx_replace_markers($this->_sBrowseUrl, array(
        	'category' => rawurlencode($this->getObjectName()),
        	'keyword' => rawurlencode($sValue),
    		'sections' => $this->_aObject['search_object'] ? '&section[]=' . rawurlencode($this->_aObject['search_object']) : '',
            'context' => isset($aParams['context_id']) ? '&context_id=' . $aParams['context_id'] : ''
        ));
    }

    /**
     * Get link to list all items with the same category
     * @param $sName category title
     * @param $sValue category value
     * @return category name wrapped with A tag
     */
    public function getCategoryLink($sName, $sValue)
    {
        $sUrl = $this->getCategoryUrl($sValue);
        return '' . $sName . '';
    }

    /**
     * Get all categories list
     * @param $bDisplayEmptyCats display categories with no items, true by default
     * @return categories list html
     */
    public function getCategoriesList($bDisplayEmptyCats = true, $bAsArray = false)
    {
        $aContextInfo = bx_get_page_info();

        $mProfileContextId = false;
        if ($aContextInfo !== false)
            $mProfileContextId = $aContextInfo['context_profile_id'];

        $a = BxDolForm::getDataItems($this->_aObject['list_name']);
        if (!$a)
            return $bAsArray ? array() : '';

        $aVars = array('bx_repeat:cats' => array());
        foreach ($a as $sValue => $sName) {
            if (!is_numeric($sValue) && !$sValue)
                continue;

            $iNum = $this->getItemsNum($sValue, ['context_id' => $mProfileContextId]);
            if (!$bDisplayEmptyCats && !$iNum)
                continue;

            $aVars['bx_repeat:cats'][] = array(
                'url' => $mProfileContextId? $this->getCategoryUrl($sValue, ['context_id' => $mProfileContextId]) : $this->getCategoryUrl($sValue),
                'name' => $sName,
                'value' => $sValue,
                'num' => $iNum,
            );
        }

        if ($bAsArray)
            return $aVars;

        if (!$aVars['bx_repeat:cats'])
            return '';

        return $this->_oTemplate->parseHtmlByName('category_list.html', $aVars);
    }
}

/** @} */


text:
ace.define('ace/ext/textarea', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/lib/useragent', 'ace/lib/net', 'ace/ace', 'ace/theme/textmate', 'ace/mode/text'], function(require, exports, module) {

var event = require("../lib/event");
var UA = require("../lib/useragent");
var net = require("../lib/net");
var ace = require("../ace");

require("../theme/textmate");

module.exports = exports = ace;
var getCSSProperty = function(element, container, property) {
    var ret = element.style[property];

    if (!ret) {
        if (window.getComputedStyle) {
            ret = window.getComputedStyle(element, '').getPropertyValue(property);
        } else {
            ret = element.currentStyle[property];
        }
    }

    if (!ret || ret == 'auto' || ret == 'intrinsic') {
        ret = container.style[property];
    }
    return ret;
};

function applyStyles(elm, styles) {
    for (var style in styles) {
        elm.style[style] = styles[style];
    }
}

function setupContainer(element, getValue) {
    if (element.type != 'textarea') {
        throw "Textarea required!";
    }

    var parentNode = element.parentNode;
    var container = document.createElement('div');
    var resizeEvent = function() {
        var style = 'position:relative;';
        [
            'margin-top', 'margin-left', 'margin-right', 'margin-bottom'
        ].forEach(function(item) {
            style += item + ':' +
                        getCSSProperty(element, container, item) + ';';
        });
        var width = getCSSProperty(element, container, 'width') || (element.clientWidth + "px");
        var height = getCSSProperty(element, container, 'height')  || (element.clientHeight + "px");
        style += 'height:' + height + ';width:' + width + ';';
        style += 'display:inline-block;';
        container.setAttribute('style', style);
    };
    event.addListener(window, 'resize', resizeEvent);
    resizeEvent();
    parentNode.insertBefore(container, element.nextSibling);
    while (parentNode !== document) {
        if (parentNode.tagName.toUpperCase() === 'FORM') {
            var oldSumit = parentNode.onsubmit;
            parentNode.onsubmit = function(evt) {
                element.value = getValue();
                if (oldSumit) {
                    oldSumit.call(this, evt);
                }
            };
            break;
        }
        parentNode = parentNode.parentNode;
    }
    return container;
}

exports.transformTextarea = function(element, loader) {
    var session;
    var container = setupContainer(element, function() {
        return session.getValue();
    });
    element.style.display = 'none';
    container.style.background = 'white';
    var editorDiv = document.createElement("div");
    applyStyles(editorDiv, {
        top: "0px",
        left: "0px",
        right: "0px",
        bottom: "0px",
        border: "1px solid gray",
        position: "absolute"
    });
    container.appendChild(editorDiv);

    var settingOpener = document.createElement("div");
    applyStyles(settingOpener, {
        position: "absolute",
        right: "0px",
        bottom: "0px",
        background: "red",
        cursor: "nw-resize",
        borderStyle: "solid",
        borderWidth: "9px 8px 10px 9px",
        width: "2px",
        borderColor: "lightblue gray gray lightblue",
        zIndex: 101
    });

    var settingDiv = document.createElement("div");
    var settingDivStyles = {
        top: "0px",
        left: "20%",
        right: "0px",
        bottom: "0px",
        position: "absolute",
        padding: "5px",
        zIndex: 100,
        color: "white",
        display: "none",
        overflow: "auto",
        fontSize: "14px",
        boxShadow: "-5px 2px 3px gray"
    };
    if (!UA.isOldIE) {
        settingDivStyles.backgroundColor = "rgba(0, 0, 0, 0.6)";
    } else {
        settingDivStyles.backgroundColor = "#333";
    }

    applyStyles(settingDiv, settingDivStyles);
    container.appendChild(settingDiv);
    var options = {};

    var editor = ace.edit(editorDiv);
    session = editor.getSession();

    session.setValue(element.value || element.innerHTML);
    editor.focus();
    container.appendChild(settingOpener);
    setupApi(editor, editorDiv, settingDiv, ace, options, loader);
    setupSettingPanel(settingDiv, settingOpener, editor, options);

    var state = "";
    event.addListener(settingOpener, "mousemove", function(e) {
        var rect = this.getBoundingClientRect();
        var x = e.clientX - rect.left, y = e.clientY - rect.top;
        if (x + y < (rect.width + rect.height)/2) {
            this.style.cursor = "pointer";
            state = "toggle";
        } else {
            state = "resize";
            this.style.cursor = "nw-resize";
        }
    });

    event.addListener(settingOpener, "mousedown", function(e) {
        if (state == "toggle") {
            editor.setDisplaySettings();
            return;
        }
        container.style.zIndex = 100000;
        var rect = container.getBoundingClientRect();
        var startX = rect.width  + rect.left - e.clientX;
        var startY = rect.height  + rect.top - e.clientY;
        event.capture(settingOpener, function(e) {
            container.style.width = e.clientX - rect.left + startX + "px";
            container.style.height = e.clientY - rect.top + startY + "px";
            editor.resize();
        }, function() {});
    });

    return editor;
};

function load(url, module, callback) {
    net.loadScript(url, function() {
        require([module], callback);
    });
}

function setupApi(editor, editorDiv, settingDiv, ace, options, loader) {
    var session = editor.getSession();
    var renderer = editor.renderer;
    loader = loader || load;

    function toBool(value) {
        return value === "true" || value == true;
    }

    editor.setDisplaySettings = function(display) {
        if (display == null)
            display = settingDiv.style.display == "none";
        if (display) {
            settingDiv.style.display = "block";
            settingDiv.hideButton.focus();
            editor.on("focus", function onFocus() {
                editor.removeListener("focus", onFocus);
                settingDiv.style.display = "none"
            });
        } else {
            editor.focus();
        };
    };

    editor.setOption = function(key, value) {
        if (options[key] == value) return;

        switch (key) {
            case "gutter":
                renderer.setShowGutter(toBool(value));
            break;

            case "mode":
                if (value != "text") {
                    loader("mode-" + value + ".js", "ace/mode/" + value, function() {
                        var aceMode = require("../mode/" + value).Mode;
                        session.setMode(new aceMode());
                    });
                } else {
                    session.setMode(new (require("../mode/text").Mode));
                }
            break;

            case "theme":
                if (value != "textmate") {
                    loader("theme-" + value + ".js", "ace/theme/" + value, function() {
                        editor.setTheme("ace/theme/" + value);
                    });
                } else {
                    editor.setTheme("ace/theme/textmate");
                }
            break;

            case "fontSize":
                editorDiv.style.fontSize = value;
            break;

            case "keybindings":
                switch (value) {
                    case "vim":
                        editor.setKeyboardHandler("ace/keyboard/vim");
                        break;
                    case "emacs":
                        editor.setKeyboardHandler("ace/keyboard/emacs");
                        break;
                    default:
                        editor.setKeyboardHandler(null);
                }
            break;

            case "softWrap":
                switch (value) {
                    case "off":
                        session.setUseWrapMode(false);
                        renderer.setPrintMarginColumn(80);
                    break;
                    case "40":
                        session.setUseWrapMode(true);
                        session.setWrapLimitRange(40, 40);
                        renderer.setPrintMarginColumn(40);
                    break;
                    case "80":
                        session.setUseWrapMode(true);
                        session.setWrapLimitRange(80, 80);
                        renderer.setPrintMarginColumn(80);
                    break;
                    case "free":
                        session.setUseWrapMode(true);
                        session.setWrapLimitRange(null, null);
                        renderer.setPrintMarginColumn(80);
                    break;
                }
            break;

            case "useSoftTabs":
                session.setUseSoftTabs(toBool(value));
            break;

            case "showPrintMargin":
                renderer.setShowPrintMargin(toBool(value));
            break;

            case "showInvisibles":
                editor.setShowInvisibles(toBool(value));
            break;
        }

        options[key] = value;
    };

    editor.getOption = function(key) {
        return options[key];
    };

    editor.getOptions = function() {
        return options;
    };

    for (var option in exports.options) {
        editor.setOption(option, exports.options[option]);
    }

    return editor;
}

function setupSettingPanel(settingDiv, settingOpener, editor, options) {
    var BOOL = null;

    var desc = {
        mode:            "Mode:",
        gutter:          "Display Gutter:",
        theme:           "Theme:",
        fontSize:        "Font Size:",
        softWrap:        "Soft Wrap:",
        keybindings:     "Keyboard",
        showPrintMargin: "Show Print Margin:",
        useSoftTabs:     "Use Soft Tabs:",
        showInvisibles:  "Show Invisibles"
    };

    var optionValues = {
        mode: {
            text:       "Plain",
            javascript: "JavaScript",
            xml:        "XML",
            html:       "HTML",
            css:        "CSS",
            scss:       "SCSS",
            python:     "Python",
            php:        "PHP",
            java:       "Java",
            ruby:       "Ruby",
            c_cpp:      "C/C++",
            coffee:     "CoffeeScript",
            json:       "json",
            perl:       "Perl",
            clojure:    "Clojure",
            ocaml:      "OCaml",
            csharp:     "C#",
            haxe:       "haXe",
            svg:        "SVG",
            textile:    "Textile",
            groovy:     "Groovy",
            liquid:     "Liquid",
            Scala:      "Scala"
        },
        theme: {
            clouds:           "Clouds",
            clouds_midnight:  "Clouds Midnight",
            cobalt:           "Cobalt",
            crimson_editor:   "Crimson Editor",
            dawn:             "Dawn",
            eclipse:          "Eclipse",
            idle_fingers:     "Idle Fingers",
            kr_theme:         "Kr Theme",
            merbivore:        "Merbivore",
            merbivore_soft:   "Merbivore Soft",
            mono_industrial:  "Mono Industrial",
            monokai:          "Monokai",
            pastel_on_dark:   "Pastel On Dark",
            solarized_dark:   "Solarized Dark",
            solarized_light:  "Solarized Light",
            textmate:         "Textmate",
            twilight:         "Twilight",
            vibrant_ink:      "Vibrant Ink"
        },
        gutter: BOOL,
        fontSize: {
            "10px": "10px",
            "11px": "11px",
            "12px": "12px",
            "14px": "14px",
            "16px": "16px"
        },
        softWrap: {
            off:    "Off",
            40:     "40",
            80:     "80",
            free:   "Free"
        },
        keybindings: {
            ace: "ace",
            vim: "vim",
            emacs: "emacs"
        },
        showPrintMargin:    BOOL,
        useSoftTabs:        BOOL,
        showInvisibles:     BOOL
    };

    var table = [];
    table.push("

Setting	Value
");

    function renderOption(builder, option, obj, cValue) {
        if (!obj) {
            builder.push(
                "<input type='checkbox' title='", option, "' ",
                    cValue == "true" ? "checked='true'" : "",
               "'></input>"
            );
            return
        }
        builder.push("<select title='" + option + "'>");
        for (var value in obj) {
            builder.push("<option value='" + value + "' ");

            if (cValue == value) {
                builder.push(" selected ");
            }

            builder.push(">",
                obj[value],
                "</option>");
        }
        builder.push("</select>");
    }

    for (var option in options) {
        table.push("
", desc[option], "	");
        table.push("");
        renderOption(table, option, optionValues[option], options[option]);
        table.push("
");
    }
    table.push("
");
    settingDiv.innerHTML = table.join("");

    var onChange = function(e) {
        var select = e.currentTarget;
        editor.setOption(select.title, select.value);
    };
    var onClick = function(e) {
        var cb = e.currentTarget;
        editor.setOption(cb.title, cb.checked);
    };
    var selects = settingDiv.getElementsByTagName("select");
    for (var i = 0; i < selects.length; i++)
        selects[i].onchange = onChange;
    var cbs = settingDiv.getElementsByTagName("input");
    for (var i = 0; i < cbs.length; i++)
        cbs[i].onclick = onClick;

    var button = document.createElement("input");
    button.type = "button";
    button.value = "Hide";
    event.addListener(button, "click", function() {
        editor.setDisplaySettings(false);
    });
    settingDiv.appendChild(button);
    settingDiv.hideButton = button;
}
exports.options = {
    mode:               "text",
    theme:              "textmate",
    gutter:             "false",
    fontSize:           "12px",
    softWrap:           "off",
    keybindings:        "ace",
    showPrintMargin:    "false",
    useSoftTabs:        "true",
    showInvisibles:     "false"
};

});


text:
/**
 * Pads numbers with zeros based on what it is provided. This is useful
 * for converting prices or time, ex:
 *
 * leftPad(1, 2) -> 01
 * leftPad(10, 2) -> 10
 * leftPad(100, 2) -> 100
 *
 * @param {integer} number Initial number
 * @param {integer} targetLength Desired minimum length after padding
 * @return {integer} Initial number with padding
 */
export function leftPad(number, targetLength) {
  var output = number + '';

  while (output.length < targetLength) {
    output = '0' + output;
  }

  return output;
}

/**
 * Converts minutes since midnight to 24 hour time. Useful to check
 * if a store is currently open.
 *
 * @param {string} msm Time in minutes since midnight
 * @return {array} Hours and minutes
 */
export function msmTo24time(msm) {
  var hour = Math.floor(parseInt(msm) / 60);
  var mins = Math.floor(parseInt(msm) % 60);

  return [hour, mins];
}

/**
 * Converts minutes since midnight to 12 hour time.
 * Useful for display purposes.
 *
 * @param {string} msm Time in minutes since midnight
 * @return {array} Hours, minutes, and AM or PM
 */
export function msmTo12time(msm) {
  var time = msmTo24time(msm);
  var h24  = time[0];
  var h12  = (0 == h24 ? 12 : (h24 > 12 ? (h24 - 10) - 2 : h24));
  var ampm = (h24 >= 12 ? 'PM' : 'AM');

  return [h12, time[1], ampm];
}

/**
 * Prettifies output from msmTo12time for display purposes. If the time
 * is NaN, then the store is closed, and return null.
 *
 * @param {array} arr Output from msmTo12time
 * @return {string} Time in 'HH:MM AM/PM' format
 */
export function prettify12Hr(arr) {
  return isNaN(arr[0]) || isNaN(arr[1]) ?
    null :
    arr[0] + ':' + leftPad(arr[1], 2) + ' ' + arr[2];
}

export const daysOfWeek = [
  'sunday',
  'monday',
  'tuesday',
  'wednesday',
  'thursday',
  'friday',
  'saturday'
];


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

<title>LIBM: gamma</title>

<meta name="description" content="LIBM: gamma">
<meta name="keywords" content="LIBM: gamma">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Document-Index.html#Document-Index" rel="index" title="Document Index">
<link href="Document-Index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Math.html#Math" rel="up" title="Math">
<link href="hypot.html#hypot" rel="next" title="hypot">
<link href="frexp.html#frexp" rel="prev" title="frexp">

Next: hypot, Previous: frexp, Up: Math   [Contents][Index]

1.27 gamma, gammaf, lgamma, lgammaf, gamma_r, gammaf_r, lgamma_r, lgammaf_r, tgamma, and tgammaf—logarithmic and plain gamma functions

Synopsis

#include <math.h>
double gamma(double <var>x</var>);
float gammaf(float <var>x</var>);
double lgamma(double <var>x</var>);
float lgammaf(float <var>x</var>);
double gamma_r(double <var>x</var>, int *<var>signgamp</var>);
float gammaf_r(float <var>x</var>, int *<var>signgamp</var>);
double lgamma_r(double <var>x</var>, int *<var>signgamp</var>);
float lgammaf_r(float <var>x</var>, int *<var>signgamp</var>);
double tgamma(double <var>x</var>);
float tgammaf(float <var>x</var>);

Description

gamma calculates
the natural logarithm of the gamma function of <var>x</var>.  The gamma function
(exp(gamma(<var>x</var>))) is a generalization of factorial, and retains
the property that
exp(gamma(N)) is equivalent to N*exp(gamma(N-1)).
Accordingly, the results of the gamma function itself grow very
quickly.  gamma is defined as
the natural log of the gamma function, rather than the gamma function
itself,
to extend the useful range of results representable.

The sign of the result is returned in the global variable signgam,
which is declared in math.h.

gammaf performs the same calculation as gamma, but uses and
returns float values.

lgamma and lgammaf are alternate names for gamma and
gammaf.  The use of lgamma instead of gamma is a reminder
that these functions compute the log of the gamma function, rather
than the gamma function itself.

The functions gamma_r, gammaf_r, lgamma_r, and
lgammaf_r are just like gamma, gammaf, lgamma, and
lgammaf, respectively, but take an additional argument.  This
additional argument is a pointer to an integer.  This additional
argument is used to return the sign of the result, and the global
variable signgam is not used.  These functions may be used for
reentrant calls (but they will still set the global variable errno
if an error occurs).

tgamma and tgammaf are the "true gamma" functions, returning
the gamma function of <var>x</var>–without a logarithm.
(They are apparently so named because of the prior existence of the old,
poorly-named gamma functions which returned the log of gamma up
through BSD 4.2.)

Returns

Normally, the computed result is returned.

When <var>x</var> is a nonpositive integer, gamma returns HUGE_VAL
and errno is set to EDOM.  If the result overflows, gamma
returns HUGE_VAL and errno is set to ERANGE.

You can modify this error treatment using matherr.

Portability

Neither gamma nor gammaf is ANSI C.  It is better not to use either
of these; use lgamma or tgamma instead.

lgamma, lgammaf, tgamma, and tgammaf are nominally C standard
in terms of the base return values, although the matherr error-handling
is not standard, nor is the <var>signgam</var> global for lgamma.

Next: hypot, Previous: frexp, Up: Math   [Contents][Index]


text:
var request = require('supertest');
var app = require('../../../app');
var View = require('../../../server/models/View');

var _viewName = 'route-test-view';
var _viewId;

describe('View Route Tests', function() {
    it('should add a view', function(done) {
        request(app)
            .post('/api/views/addView')
            .send({
                viewName: _viewName
            })
            .expect(200)
            .expect(function(result) {
                var body = result.body;
                if (body.title === _viewName && body.route === '/' + _viewName && body._id) {
                    _viewId = body._id;
                    return true;
                } else {
                    throw new Error('Could not fetch views');
                }
            })
            .end(done);
    });

    it('should get views editing', function(done) {
        request(app)
            .get('/api/views/edit/')
            .expect(200)
            .expect(function(result) {
                var body = result.body;
                if (body.length > 0) {
                    return true;
                } else {
                    throw new Error('Could not fetch views');
                }
            })
            .end(done);
    });

    it('should get created view', function(done) {
        request(app)
            .get('/api/views/' + _viewId)
            .expect(200)
            .expect(function(result) {
                var body = result.body;
                if (body.id) {
                    return true;
                } else {
                    throw new Error('Could not fetch views');
                }
            })
            .end(done);
    });

    it('should get created view for editing', function(done) {
        request(app)
            .get('/api/views/edit/' + _viewId)
            .expect(200)
            .expect(function(result) {
                var body = result.body;
                if (body._id) {
                    return true;
                } else {
                    throw new Error('Could not fetch views');
                }
            })
            .end(done);
    });

    it('should change view content', function(done) {
        request(app)
            .post('/api/views/')
            .send({
                viewId: _viewId,
                viewRoute: '/test',
                viewIsDefault: true
            })
            .expect(200)
            .expect(function(result) {
                var body = result.body;
                if (body === 204) {
                    return true;
                } else {
                    throw new Error('Could not fetch views');
                }
            })
            .end(done);
    });

    it('should delete the view it created', function(done) {
        request(app)
            .post('/api/views/deleteView')
            .send({
                viewId: _viewId
            })
            .expect(200)
            .end(done);
    });
});


text:
package loci.common.utests;

import static org.testng.AssertJUnit.assertEquals;

import java.io.IOException;

import loci.common.IRandomAccess;
import loci.common.utests.providers.IRandomAccessProvider;
import loci.common.utests.providers.IRandomAccessProviderFactory;

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

/**
 * Tests for reading floats from a loci.common.IRandomAccess.
 *
 * @see loci.common.IRandomAccess
 */
@Test(groups="readTests")
public class ReadFloatTest {

  private static final byte[] PAGE = new byte[] {
    // 0.0 (0x00000000)
    (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
    // 1.0 (0x3F800000)
    (byte) 0x3F, (byte) 0x80, (byte) 0x00, (byte) 0x00,
    // -1.0 (0xBF800000)
    (byte) 0xBF, (byte) 0x80, (byte) 0x00, (byte) 0x00,
    // 3.1415927 (0x40490FDB)
    (byte) 0x40, (byte) 0x49, (byte) 0x0F, (byte) 0xDB,
    // MAX_VALUE (0x7F7FFFFF)
    (byte) 0x7F, (byte) 0x7F, (byte) 0xFF, (byte) 0xFF,
    // NEGATIVE_INFINITY (0xFF800000)
    (byte) 0xFF, (byte) 0x80, (byte) 0x00, (byte) 0x00,
    // NaN (0x7FC00000)
    (byte) 0x7F, (byte) 0xC0, (byte) 0x00, (byte) 0x00
  };

  private static final String MODE = "r";

  private static final int BUFFER_SIZE = 1024;

  private IRandomAccess fileHandle;

  @Parameters({"provider"})
  @BeforeMethod
  public void setUp(String provider) throws IOException {
    IRandomAccessProviderFactory factory = new IRandomAccessProviderFactory();
    IRandomAccessProvider instance = factory.getInstance(provider);
    fileHandle = instance.createMock(PAGE, MODE, BUFFER_SIZE);
  }

  @Test
  public void testLength() throws IOException {
    assertEquals(28, fileHandle.length());
  }

  @Test
  public void testSequential() throws IOException {
    assertEquals(0.0f, fileHandle.readFloat());
    assertEquals(1.0f, fileHandle.readFloat());
    assertEquals(-1.0f, fileHandle.readFloat());
    assertEquals(3.1415927f, fileHandle.readFloat());
    assertEquals(Float.MAX_VALUE, fileHandle.readFloat());
    assertEquals(Float.NEGATIVE_INFINITY, fileHandle.readFloat());
    assertEquals(Float.NaN, fileHandle.readFloat());
  }

  @Test
  public void testSeekForward() throws IOException {
    fileHandle.seek(8);
    assertEquals(-1.0f, fileHandle.readFloat());
    assertEquals(3.1415927f, fileHandle.readFloat());
  }

  @Test
  public void testReset() throws IOException {
    assertEquals(0.0f, fileHandle.readFloat());
    assertEquals(1.0f, fileHandle.readFloat());
    fileHandle.seek(0);
    assertEquals(0.0f, fileHandle.readFloat());
    assertEquals(1.0f, fileHandle.readFloat());
  }

  @Test
  public void testSeekBack() throws IOException {
    fileHandle.seek(16);
    fileHandle.seek(8);
    assertEquals(-1.0f, fileHandle.readFloat());
    assertEquals(3.1415927f, fileHandle.readFloat());
  }

  @Test
  public void testRandomAccess() throws IOException {
    testSeekForward();
    testSeekBack();
    // The test relies on a "new" file or reset file pointer
    fileHandle.seek(0);
    testReset();
  }

}


text:
CI/CD Demo

# Screenshots

![1](screenshot1.png?raw=true)
![2](screenshot2.png?raw=true)
![3](screenshot3.png?raw=true)

# TODO

- [x] Obtain accounts:
  - [x] GitHub
  - [x] AWS Free Tier
- [x] Create a GitHub repo to hold non-sensitive project data.
- [x] Provision an EC2 instance (using one instance to
      minimize footprint to match use case).
- [x] Create/configure Jenkins server (only simple configurations needed here)
- [x] Create a text file with a single line that has your first and last name
      separated by ":".
- [x] Code up 2 applications/scripts and push them to a Github repo:
  - [x] one in bash that prints your first name extracted from the text file
        you created earlier,
  - [x] one in python that prints your last name extracted from the text file
        you created earlier.
- [x] Create a Jenkins job that will:
  - [x] take code changes merged from the Github repo (this needs to support
        future code merges),
  - [x] Run an Ansible Playbook,
  - [x] Build Docker container that  outputs both first and
        last names from the scripts upon `docker run`
  - [x] store the container artifact into an S3 bucket.
- [x] Terminate the following so no charges are incurred:
  - [x] EC2 instance(s)
  - [x] S3 buckets
- [x] Commit artifacts to GitHub and forward repo link via email:
  - [x] Jenkins config for the job
  - [x] Code
  - [x] Ansible playbook (do not include any secrets and server info, inventory
        file not needed)


text:
import pyvolve
import numpy as np # imported only to generate example amino-acid equilibrium frequencies

# Define a phylogeny, from a file containing a newick tree
my_tree = pyvolve.read_tree(file = "file_with_tree.tre")

# Define an amino-acid model, as a pyvolve.Model object. The first argument should be either "JTT", "WAG", "LG", "AB", "mtmam", "mtREV24", "DAYHOFF" (available empirical matrices in Pyvolve) Provide a parameters dictionary with key "state_freqs" to customize model. The provided frequency list must sum to 1!
aa_freqs = [0.06364529, 0.07224862, 0.06057557, 0.0487006 , 0.05994598, 0.01482058, 0.07141465, 0.03867427, 0.04562237, 0.02361059, 0.03897318, 0.04462156, 0.03720072, 0.06157329, 0.0150518, 0.03246979, 0.0617337 , 0.08068358, 0.07970379, 0.04873008]
my_model = pyvolve.Model("LG", {"state_freqs": aa_freqs})

# Assign the model to a pyvolve.Partition. The size argument indicates to evolve 250 positions
my_partition = pyvolve.Partition(models = my_model, size = 250)

# Evolve!
my_evolver = pyvolve.Evolver(partitions = my_partition, tree = my_tree)
my_evolver()


text:
package com.hotfixs.thinkinginjava.typeinfo.interfaces;

/**
 * @author Junwei Wang (i.junwei.wang@gmail.com)
 */
public interface A {
    void f();
}