text:
include(CMakeParseArguments)
function(target_imported_libraries target)
  list(REMOVE_AT ARGV 0) #pop the target
  cmake_parse_arguments(target_imported_libraries "" "LINK_TYPE" "" ${ARGV})

  set(_library_list ${target_imported_libraries_UNPARSED_ARGUMENTS})
  target_link_libraries(${target} ${target_imported_libraries_LINK_TYPE} ${_library_list})

  #early out if the target isn't an EXECUTABLE
  get_target_property(_target_type ${target} TYPE)
  if(NOT ${_target_type} STREQUAL EXECUTABLE)
    return()
  endif()

  #setup custom commands to copy .dll/dylib files for all dependencies
  set(_lib_index 0 )
  list(LENGTH _library_list _lib_length)

  #foreach doesn't allow you to append to the list from within the loop.
  while(_lib_index LESS _lib_length)
    list(GET _library_list ${_lib_index} _import_lib)

    if(TARGET ${_import_lib})
      get_target_property(_depends ${_import_lib} INTERFACE_LINK_LIBRARIES)
      foreach(_depend ${_depends})
        if(TARGET ${_depend})
          list(FIND _library_list ${_depend} _found_lib)
          if(_found_lib EQUAL -1) #make sure we don't do duplicate adds.
            verbose_message("${target}:Adding nested dependency ${_depend}")
            list(APPEND _library_list ${_depend})
          else()
            verbose_message("${target}:skipping duplicate nested dependency ${_depend}")
          endif()

        endif()
      endforeach()

      get_target_property(_type ${_import_lib} TYPE)
      get_target_property(_imported ${_import_lib} IMPORTED)
      if(${_type} STREQUAL SHARED_LIBRARY AND ${_imported})

        set(_found_configs_expr)
        set(_imported_location)

        #if only the _<Config> variants are set, create a generator expression.
        get_target_property(_imported_location ${_import_lib} IMPORTED_LOCATION)
        if(NOT _imported_location)
          get_target_property(_imported_location_debug ${_import_lib} IMPORTED_LOCATION_DEBUG)
          get_target_property(_imported_location_release ${_import_lib} IMPORTED_LOCATION_RELEASE)
          if(NOT _imported_location_debug AND NOT _imported_location_release)
            message(FATAL_ERROR "No IMPORTED_LOCATION specified for SHARED import target ${_import_lib}")
          endif()
          set(_imported_location "$<$<CONFIG:DEBUG>:${_imported_location_debug}>$<$<CONFIG:RELEASE>:${_imported_location_release}>")
        endif()

        verbose_message("Adding copy command for ${_import_lib}: ${_imported_location}")

        if(MSVC)
          add_custom_command(TARGET ${target} POST_BUILD
            COMMAND ${CMAKE_COMMAND} -E copy_if_different \"${_imported_location}\" \"$<TARGET_FILE_DIR:${target}>\")
        elseif(APPLE)
          get_target_property(_is_bundle ${target} MACOSX_BUNDLE)
          if(_is_bundle)
            add_custom_command(TARGET ${target} POST_BUILD
              COMMAND ${CMAKE_COMMAND} -E make_directory "$<TARGET_FILE_DIR:${target}>/../Frameworks/"
              COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_imported_location}" "$<TARGET_FILE_DIR:${target}>/../Frameworks/"
              COMMAND install_name_tool -change @loader_path/libLeap.dylib @loader_path/../Frameworks/libLeap.dylib "$<TARGET_FILE:${target}>")
            #call install_name_tool and fixup the dylib paths here:
          endif()
        else()
          message(WARNING "Automatic handling of shared libraries is unimplemented on this platform")
        endif()
      endif()
    endif()

    math(EXPR _lib_index "${_lib_index} + 1") #an extremely verbose i++...
    #if this is expensive, simply increment it when adding to the list.
    list(LENGTH _library_list _lib_length) #this is likely to have changed
  endwhile()
endfunction()

#This function wraps find_package, then calls target_imported_libraries on the generated package)
function(target_package target package )
  list(REMOVE_AT ARGV 0) # pop the target
  cmake_parse_arguments(target_package "" "LINK_TYPE" "" ${ARGV})

  if(TARGET ${package}::${package})
    verbose_message("${package}::${package} already exists, skipping find op")
  else()
    find_package(${target_package_UNPARSED_ARGUMENTS})
  endif()

  if(target_package_LINK_TYPE)
    target_imported_libraries(${target} ${package}::${package} LINK_TYPE ${target_package_LINK_TYPE})
  else()
    target_imported_libraries(${target} ${package}::${package})
  endif()
endfunction()


text:
package com.gs.collections.impl.set.mutable;

import java.util.Collection;
import java.util.Set;

import com.gs.collections.api.LazyIterable;
import com.gs.collections.api.block.function.Function;
import com.gs.collections.api.block.function.Function2;
import com.gs.collections.api.block.predicate.Predicate;
import com.gs.collections.api.block.predicate.Predicate2;
import com.gs.collections.api.multimap.set.MutableSetMultimap;
import com.gs.collections.api.partition.set.PartitionMutableSet;
import com.gs.collections.api.set.ImmutableSet;
import com.gs.collections.api.set.MutableSet;
import com.gs.collections.api.set.SetIterable;
import com.gs.collections.api.set.UnsortedSetIterable;
import com.gs.collections.api.tuple.Pair;
import com.gs.collections.impl.collection.mutable.SynchronizedMutableCollection;
import com.gs.collections.impl.factory.Sets;
import net.jcip.annotations.GuardedBy;
import net.jcip.annotations.ThreadSafe;

/**
 * A synchronized view of a set.
 *
 * @see MutableSet#asSynchronized()
 */
@ThreadSafe
public class SynchronizedMutableSet<E>
        extends SynchronizedMutableCollection<E>
        implements MutableSet<E>
{
    private static final long serialVersionUID = 1L;

    public SynchronizedMutableSet(MutableSet<E> set)
    {
        super(set);
    }

    public SynchronizedMutableSet(MutableSet<E> set, Object newLock)
    {
        super(set, newLock);
    }

    /**
     * This method will take a MutableSet and wrap it directly in a SynchronizedMutableSet.  It will
     * take any other non-GS-collection and first adapt it will a SetAdapter, and then return a
     * SynchronizedMutableSet that wraps the adapter.
     */
    public static <E, S extends Set<E>> SynchronizedMutableSet<E> of(S set)
    {
        return new SynchronizedMutableSet<E>(SetAdapter.adapt(set));
    }

    /**
     * This method will take a MutableSet and wrap it directly in a SynchronizedMutableSet.  It will
     * take any other non-GS-collection and first adapt it will a SetAdapter, and then return a
     * SynchronizedMutableSet that wraps the adapter.  Additionally, a developer specifies which lock to use
     * with the collection.
     */
    public static <E, S extends Set<E>> SynchronizedMutableSet<E> of(S set, Object lock)
    {
        return new SynchronizedMutableSet<E>(SetAdapter.adapt(set), lock);
    }

    @GuardedBy("getLock()")
    private MutableSet<E> getMutableSet()
    {
        return (MutableSet<E>) this.getCollection();
    }

    @Override
    public MutableSet<E> asUnmodifiable()
    {
        synchronized (this.getLock())
        {
            return UnmodifiableMutableSet.of(this);
        }
    }

    @Override
    public ImmutableSet<E> toImmutable()
    {
        synchronized (this.getLock())
        {
            return Sets.immutable.ofAll(this.getMutableSet());
        }
    }

    @Override
    public MutableSet<E> asSynchronized()
    {
        return this;
    }

    @Override
    public MutableSet<E> clone()
    {
        synchronized (this.getLock())
        {
            return of(this.getMutableSet().clone());
        }
    }

    @Override
    public <V> MutableSet<V> collect(Function<? super E, ? extends V> function)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().collect(function);
        }
    }

    @Override
    public <V> MutableSet<V> flatCollect(Function<? super E, ? extends Iterable<V>> function)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().flatCollect(function);
        }
    }

    @Override
    public <V> MutableSet<V> collectIf(
            Predicate<? super E> predicate,
            Function<? super E, ? extends V> function)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().collectIf(predicate, function);
        }
    }

    @Override
    public <P, V> MutableSet<V> collectWith(Function2<? super E, ? super P, ? extends V> function, P parameter)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().collectWith(function, parameter);
        }
    }

    @Override
    public <V> MutableSetMultimap<V, E> groupBy(Function<? super E, ? extends V> function)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().groupBy(function);
        }
    }

    @Override
    public <V> MutableSetMultimap<V, E> groupByEach(Function<? super E, ? extends Iterable<V>> function)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().groupByEach(function);
        }
    }

    @Override
    public MutableSet<E> newEmpty()
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().newEmpty();
        }
    }

    @Override
    public MutableSet<E> reject(Predicate<? super E> predicate)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().reject(predicate);
        }
    }

    @Override
    public <P> MutableSet<E> rejectWith(Predicate2<? super E, ? super P> predicate, P parameter)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().rejectWith(predicate, parameter);
        }
    }

    @Override
    public MutableSet<E> select(Predicate<? super E> predicate)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().select(predicate);
        }
    }

    @Override
    public <P> MutableSet<E> selectWith(Predicate2<? super E, ? super P> predicate, P parameter)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().selectWith(predicate, parameter);
        }
    }

    @Override
    public PartitionMutableSet<E> partition(Predicate<? super E> predicate)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().partition(predicate);
        }
    }

    @Override
    public boolean equals(Object obj)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().equals(obj);
        }
    }

    @Override
    public int hashCode()
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().hashCode();
        }
    }

    @Override
    public <S> MutableSet<Pair<E, S>> zip(Iterable<S> that)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().zip(that);
        }
    }

    @Override
    public <S, R extends Collection<Pair<E, S>>> R zip(Iterable<S> that, R target)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().zip(that, target);
        }
    }

    @Override
    public MutableSet<Pair<E, Integer>> zipWithIndex()
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().zipWithIndex();
        }
    }

    @Override
    public <R extends Collection<Pair<E, Integer>>> R zipWithIndex(R target)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().zipWithIndex(target);
        }
    }

    public MutableSet<E> union(SetIterable<? extends E> set)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().union(set);
        }
    }

    public <R extends Set<E>> R unionInto(SetIterable<? extends E> set, R targetSet)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().unionInto(set, targetSet);
        }
    }

    public MutableSet<E> intersect(SetIterable<? extends E> set)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().intersect(set);
        }
    }

    public <R extends Set<E>> R intersectInto(SetIterable<? extends E> set, R targetSet)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().intersectInto(set, targetSet);
        }
    }

    public MutableSet<E> difference(SetIterable<? extends E> subtrahendSet)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().difference(subtrahendSet);
        }
    }

    public <R extends Set<E>> R differenceInto(SetIterable<? extends E> subtrahendSet, R targetSet)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().differenceInto(subtrahendSet, targetSet);
        }
    }

    public MutableSet<E> symmetricDifference(SetIterable<? extends E> setB)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().symmetricDifference(setB);
        }
    }

    public <R extends Set<E>> R symmetricDifferenceInto(SetIterable<? extends E> set, R targetSet)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().symmetricDifferenceInto(set, targetSet);
        }
    }

    public boolean isSubsetOf(SetIterable<? extends E> candidateSuperset)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().isSubsetOf(candidateSuperset);
        }
    }

    public boolean isProperSubsetOf(SetIterable<? extends E> candidateSuperset)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().isProperSubsetOf(candidateSuperset);
        }
    }

    public MutableSet<UnsortedSetIterable<E>> powerSet()
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().powerSet();
        }
    }

    public <B> LazyIterable<Pair<E, B>> cartesianProduct(SetIterable<B> set)
    {
        synchronized (this.getLock())
        {
            return this.getMutableSet().cartesianProduct(set);
        }
    }

    @Override
    public MutableSet<E> with(E element)
    {
        this.add(element);
        return this;
    }

    @Override
    public MutableSet<E> without(E element)
    {
        this.remove(element);
        return this;
    }

    @Override
    public MutableSet<E> withAll(Iterable<? extends E> elements)
    {
        this.addAllIterable(elements);
        return this;
    }

    @Override
    public MutableSet<E> withoutAll(Iterable<? extends E> elements)
    {
        this.removeAllIterable(elements);
        return this;
    }
}

redpajama_set_name: RedPajamaGithub


text:
/*
 Zachary Willson
 15 October 2015
 CSE 143 AI (Anna Pendleton)
 Homework 2 - Melody

 This Class holds Notes in a Melody
 Methods include ways to print to a String, get the Duration of the Melody,
 change the tempo, reverse the song, append one to another, or play the Melody
 */

import java.util.*;

public class Melody {

    //Queue to hold notes
    //double to hold song length (seconds)
    private Queue<Note> notes;
    private double duration;

    //Initializes Melody to store the passed Queue of Notes
    //Throws an IllegalArgumentException if Queue passed in is null
    public Melody(Queue<Note> song) {
        if (song == null) {
            throw new IllegalArgumentException();
        }
        this.notes = new LinkedList<Note>(song);
        findDuration(song);
    }

    //Takes the original Queue and finds the song length,
    //Takes in a Queue<Note> parameter
    //Calls the repeatHelper to add durations for repeating sections
    private void findDuration(Queue<Note> song) {
        for (int i = 0; i < this.notes.size(); i++) {
            if (song.peek().isRepeat()) {
                i += repeatDurationHelp(song.remove());
                while (!song.peek().isRepeat()) {
                    i += repeatDurationHelp(song.remove());
                }
                i += repeatDurationHelp(song.remove());
            } else {
                this.duration += song.remove().getDuration();
            }
        }
    }

    //Doubles length of note and adds to the length of Melody
    //Takes in parameter Note s
    //Returns 1 to the method that called it
    private int repeatDurationHelp(Note s) {
        this.duration += (s.getDuration() * 2);
        return 1;
    }

    //Returns a double of the total length of the song in seconds
    //If song has repeated sections, those sections will be counted twice
    public double getTotalDuration() {
        return this.duration;
    }

    //Returns a String representation of the Melody
    public String toString() {
        String returned = "";
        for (int i = 0; i < this.notes.size(); i++) {
            returned += this.notes.peek().toString() + "\n";
            this.notes.add(this.notes.remove());
        }
        return returned;
    }

    //Changes the tempo of the Melody, takes in a double as a multiplier
    //Tempos passed < 1.0 will speed the song up, while > 1.0 will slow the song down
    //Throws IllegalArgumentException if tempo is less than 0
    public void changeTempo(double tempo) {
        if (tempo < 0) {
            throw new IllegalArgumentException();
        }
        for (int i = 0; i < this.notes.size(); i++) {
            this.notes.peek().setDuration(this.notes.peek().getDuration() * tempo);
            this.notes.add(this.notes.remove());
        }
        this.duration *= tempo;
    }

    //Reverses the order of the song. Notes that play first will now play last
    //Pre: Order is A, B, C, D
    //Post: Order is D, C, B, A
    public void reverse() {
        Stack<Note> temp = new Stack<Note>();
        while (!this.notes.isEmpty()) {
            temp.push(this.notes.remove());
        }
        while (!temp.isEmpty()) {
            this.notes.add(temp.pop());
        }
    }

    //Adds all Notes from the given other song to the end of this song.
    //Parameters are a Melody object, IllegalArguementException thrown if null
    public void append(Melody other) {
        if (other == null) {
            throw new IllegalArgumentException();
        }
        this.duration += other.duration;
        for (int i = 0; i < other.notes.size(); i++) {
            this.notes.add(other.notes.peek());
            other.notes.add(other.notes.remove());
        }
    }

    //Plays the Melody by calling all the Note's play method
    //Can be called more than once
    public void play() {
        for (int i = 0; i < this.notes.size(); i++) {
            if (this.notes.peek().isRepeat()) {
                i += playRepeat(new LinkedList<Note>(), 0);
            } else {
                this.notes.peek().play();
                this.notes.add(this.notes.remove());
            }
        }
    }

    //Handles the task of playing the repeated sections
    //Takes in Queue<Note> and int i and returns i's value
    //Calls repeat method to handle taking the Note into the temp Queue
    //And adding it back into the Melody
    private int playRepeat(Queue<Note> temp, int i) {
        i += repeatHelp(temp);
        while (!this.notes.peek().isRepeat()) {
            i += repeatHelp(temp);
        }
        i += repeatHelp(temp);
        for (int j = 0; j < temp.size() * 2; j++) {
            temp.peek().play();
            temp.add(temp.remove());
        }
        return i;
    }

    //Adds next Note to temp Queue<Note> (passed as parameter)
    //Adds back to Melody and returns the int 1
    private int repeatHelp(Queue<Note> temp) {
        temp.add(this.notes.peek());
        this.notes.add(this.notes.remove());
        return 1;
    }
}


text:
using System.Collections.Generic;
using System.Web.Mvc;
using IndicatorsUI.DataAccess;
using IndicatorsUI.DomainObjects;
using IndicatorsUI.MainUI.Caching;
using IndicatorsUI.MainUI.Helpers;
using IndicatorsUI.MainUI.Models;

namespace IndicatorsUI.MainUI.Controllers
{
    [FingertipsOutputCache]
    public class ProfileController : BaseController
    {
        public ProfileController(IAppConfig appConfig) : base(appConfig)
        {

        }

        protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            base.OnActionExecuting(filterContext);

            // Called here because the Request object is not available in the constructor
            InitPageModel();
        }

        /// <summary>
        /// Front page of site.
        /// Route defined in RouteConfig.
        /// </summary>
        public ActionResult FrontPage()
        {
            // Get a list of ProfileCollections for this skin
            IList<SkinProfileCollection> skinProfileCollections =
                ProfileCollectionProvider.GetSkinProfileCollections(PageModel.Skin.Id);
            foreach (SkinProfileCollection skinProfileCollection in skinProfileCollections)
            {
                PageModel.ProfileCollections.Add(
                    ProfileCollectionBuilder.GetCollection(skinProfileCollection.ProfileCollectionId));
            }

            ConfigureFingertipsProfileAndPageModelWithProfileDetails(PageModel.Skin.TemplateProfileUrlKey);

            PageModel.PageType = PageType.SiteFrontPage;

            ViewBag.ShowUpdateDelayedMessage = _appConfig.ShowUpdateDelayedMessage;

            return View("~/Views/FingertipsLandingPage/Frontpage.cshtml", PageModel);
        }

        /// <summary>
        /// Data page used for standalone profiles without a front page.
        /// Route defined in RouteConfig.
        /// </summary>
        public ActionResult Data(string profileKey)
        {
            PageModel.DisplayProfileTitle = true;

            var details = ConfigureFingertipsProfileAndPageModelWithProfileDetails(profileKey);

            if (AccessControlHelper.ShouldDenyAccess(details))
            {
                return AccessControlHelper.GetAccessNotAllowedActionResult();
            }

            PageModel.PageType = PageType.DataPageOfProfileWithoutFrontPage;
            return View(PageModel);
        }
    }
}


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.INITIAL_STATE = exports.loadListFailure = exports.applyList = exports.loadList = exports.clearList = exports.LOAD_LIST_FAILURE = exports.APPLY_LIST = exports.LOAD_LIST = exports.CLEAR_LIST = undefined;

var _reduxActions = require('redux-actions');

var _seamlessImmutable = require('seamless-immutable');

var _seamlessImmutable2 = _interopRequireDefault(_seamlessImmutable);

var _lodash = require('lodash');

var _lodash2 = _interopRequireDefault(_lodash);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const CLEAR_LIST = exports.CLEAR_LIST = 'CLEAR_LIST';
const LOAD_LIST = exports.LOAD_LIST = 'LOAD_LIST';
const APPLY_LIST = exports.APPLY_LIST = 'APPLY_LIST';
const LOAD_LIST_FAILURE = exports.LOAD_LIST_FAILURE = 'LOAD_LIST_FAILURE';

/**
 * 清空列表 action
 * @params {string} [key] 要清空的列表key,空代表清空全部
 */
const clearList = exports.clearList = (0, _reduxActions.createAction)(CLEAR_LIST, key => ({ key }));

/**
 * 加载列表
 * @param {Object} options
 * @param {string} options.service
 * @param {string} options.model
 * @param {string} options.key
 * @param {number} options.page
 * @param {Object} options.filters
 * @param {string} options.search
 * @param {string} options.sort
 */
const loadList = exports.loadList = (0, _reduxActions.createAction)(LOAD_LIST);
/**
 * 加载成功
 * @param {string} key
 * @param {Object} res
 */
const applyList = exports.applyList = (0, _reduxActions.createAction)(APPLY_LIST, (key, res) => Object.assign({ key }, res));
/**
 * 加载失败
 * @param {string} key
 * @param {Error} error
 */
const loadListFailure = exports.loadListFailure = (0, _reduxActions.createAction)(LOAD_LIST_FAILURE, (key, error) => ({ key, error }));

// 初始state
const INITIAL_STATE = exports.INITIAL_STATE = (0, _seamlessImmutable2.default)({});

exports.default = (0, _reduxActions.handleActions)({
  LOAD_LIST: (state, { payload }) => {
    let list = state[payload.key] || (0, _seamlessImmutable2.default)({ results: [] });
    list = list.merge(_lodash2.default.assign({}, payload, { fetching: true }));
    return state.set(payload.key, list);
  },
  CLEAR_LIST: (state, { payload }) => payload.key ? state.without(payload.key) : INITIAL_STATE,
  APPLY_LIST: (state, { payload }) => {
    let key = payload.key;
    let info = _lodash2.default.omit(payload, 'results');
    let list = state[payload.key] || (0, _seamlessImmutable2.default)({});

    list = list.merge(_lodash2.default.assign({}, info, { error: '', fetching: false }));

    if (payload.page === 1) {
      list = list.set('results', payload.results);
    } else {
      let results = list.results || (0, _seamlessImmutable2.default)([]);
      list = list.set('results', results.concat(payload.results));
    }
    return state.set(key, list);
  },
  LOAD_LIST_FAILURE: (state, { payload }) => {
    let list = state[payload.key] || (0, _seamlessImmutable2.default)({});
    return state.set(payload.key, list.merge({ error: payload.error.message, fetching: false }));
  },
  SAVE: (state, { payload }) => {
    let { key, data, sort } = payload;
    let asc = true;
    if (sort) {
      sort = sort.split(' ')[0];
      if (sort[0] === '-') {
        asc = false;
        sort = sort.substr(1);
      }
    }

    function forEach(raw) {
      if (!raw.id) return; // 是新建记录,不用更新
      let list = state[key];
      if (!list) return;
      let results = _lodash2.default.map(list.results, record => {
        if (record._id === raw.id) {
          return record.merge(_lodash2.default.omit(raw, 'id'));
        }
        return record;
      });
      if (sort) {
        results = _lodash2.default.sortBy(results, [sort]);
        if (!asc) {
          _lodash2.default.reverse(results);
        }
      }
      list = list.set('results', results);
      state = state.set(key, list);
    }

    if (_lodash2.default.isArray(data)) {
      _lodash2.default.forEach(data, forEach);
    } else {
      forEach(data);
    }
    return state;
  },
  APPLY_DETAILS: (state, { payload }) => {
    let { key, data } = payload;

    function forEach(raw) {
      let list = state[key];
      if (!list) return;
      let found = false;
      let results = _lodash2.default.map(list.results, record => {
        if (record._id === raw._id) {
          found = true;
          return record.merge(raw);
        }
        return record;
      });
      if (!found) return;
      list = list.set('results', results);
      state = state.set(key, list);
    }

    if (_lodash2.default.isArray(data)) {
      _lodash2.default.forEach(data, forEach);
    } else {
      forEach(data);
    }
    return state;
  },
  LOGOUT: () => INITIAL_STATE
}, INITIAL_STATE);


text:
        Menu

About Us

News

Tour

Media

Contact


text:
<?php
return array(
    'mongo' => array(
        'server'    => 'mongodb://localhost:27017',
        'database'  => 'dbname',
        //profiling enable
        'profiling' => false,
        //class to use as default collection support
        'collection'=> 'Mongo_Collection',
    ),

    'service_manager' => array(
        'invokables' => array(
        ),
        'factories'  => array(
        ),
    ),
);


text:
package observer;

public class DataParser1 implements DataParserInterface{

	@Override
	public void dataParse() {
		System.out.println("parse method 1");
	}
}


text:
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace HOLMS.Types.Reporting.RPC {

  /// Holder for reflection information generated from reporting/rpc/front_desk_reporting_svc.proto
  public static partial class FrontDeskReportingSvcReflection {

    #region Descriptor
    /// File descriptor for reporting/rpc/front_desk_reporting_svc.proto
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static FrontDeskReportingSvcReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "CixyZXBvcnRpbmcvcnBjL2Zyb250X2Rlc2tfcmVwb3J0aW5nX3N2Yy5wcm90",
            "bxIZaG9sbXMudHlwZXMucmVwb3J0aW5nLnJwYxogaWFtL3N0YWZmX21lbWJl",
            "cl9pbmRpY2F0b3IucHJvdG8aHXByaW1pdGl2ZS9wYl9sb2NhbF9kYXRlLnBy",
            "b3RvGjhyZXBvcnRpbmcvaW5wdXRfcGFyYW1zL2Zyb250X2Rlc2tfcmVwb3J0",
            "X21hbmlmZXN0cy5wcm90bxoscmVwb3J0aW5nL291dHB1dHMvaHRtbF9yZXBv",
            "cnRfcmVzcG9uc2UucHJvdG8aMnRlbmFuY3lfY29uZmlnL2luZGljYXRvcnMv",
            "cHJvcGVydHlfaW5kaWNhdG9yLnByb3RvIrEDCiFGcm9udERlc2tCYXRjaFJl",
            "cG9ydGluZ1N2Y1JlcXVlc3QSTAoKcHJvcGVydGllcxgBIAMoCzI4LmhvbG1z",
            "LnR5cGVzLnRlbmFuY3lfY29uZmlnLmluZGljYXRvcnMuUHJvcGVydHlJbmRp",
            "Y2F0b3ISbgoeY2FsZW5kYXJfZGF0ZV9yZXBvcnRzX21hbmlmZXN0GAIgASgL",
            "MkYuaG9sbXMudHlwZXMucmVwb3J0aW5nLmlucHV0X3BhcmFtcy5Gcm9udERl",
            "c2tDdXJyZW50RGF0ZVJlcG9ydE1hbmlmZXN0Em8KHm9wc2RhdGVfcmFuZ2Vf",
            "cmVwb3J0c19tYW5pZmVzdBgDIAEoCzJHLmhvbG1zLnR5cGVzLnJlcG9ydGlu",
            "Zy5pbnB1dF9wYXJhbXMuRnJvbnREZXNrT3BzZGF0ZVJhbmdlUmVwb3J0TWFu",
            "aWZlc3QSGgoSaW5jbHVkZV9jaGVja2VkX2luGAQgASgIEhsKE2luY2x1ZGVf",
            "Y2hlY2tlZF9vdXQYBSABKAgSJAocaW5jbHVkZV9jaGVja2VkX2luX2RhdGVy",
            "YW5nZRgGIAEoCCKtAQooRnJvbnREZXNrUmVwb3J0aW5nU3ZjSG91c2VrZWVw",
            "aW5nUmVxdWVzdBI8Cg1zdGFmZl9tZW1iZXJzGAEgAygLMiUuaG9sbXMudHlw",
            "ZXMuaWFtLlN0YWZmTWVtYmVySW5kaWNhdG9yEhEKCWFkZF9ub3RlcxgCIAEo",
            "CRIwCgRkYXRlGAMgASgLMiIuaG9sbXMudHlwZXMucHJpbWl0aXZlLlBiTG9j",
            "YWxEYXRlMr0CChVGcm9udERlc2tSZXBvcnRpbmdTdmMShgEKE0dldEZyb250",
            "RGVza1JlcG9ydHMSPC5ob2xtcy50eXBlcy5yZXBvcnRpbmcucnBjLkZyb250",
            "RGVza0JhdGNoUmVwb3J0aW5nU3ZjUmVxdWVzdBoxLmhvbG1zLnR5cGVzLnJl",
            "cG9ydGluZy5vdXRwdXRzLkh0bWxSZXBvcnRSZXNwb25zZRKaAQogR2V0SG91",
            "c2VrZWVwaW5nQXNzaWdubWVudHNSZXBvcnQSQy5ob2xtcy50eXBlcy5yZXBv",
            "cnRpbmcucnBjLkZyb250RGVza1JlcG9ydGluZ1N2Y0hvdXNla2VlcGluZ1Jl",
            "cXVlc3QaMS5ob2xtcy50eXBlcy5yZXBvcnRpbmcub3V0cHV0cy5IdG1sUmVw",
            "b3J0UmVzcG9uc2VCHKoCGUhPTE1TLlR5cGVzLlJlcG9ydGluZy5SUENiBnBy",
            "b3RvMw=="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::HOLMS.Types.IAM.StaffMemberIndicatorReflection.Descriptor, global::HOLMS.Types.Primitive.PbLocalDateReflection.Descriptor, global::HOLMS.Types.Reporting.ReportParams.FrontDeskReportManifestsReflection.Descriptor, global::HOLMS.Types.Reporting.Outputs.HtmlReportResponseReflection.Descriptor, global::HOLMS.Types.TenancyConfig.Indicators.PropertyIndicatorReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::HOLMS.Types.Reporting.RPC.FrontDeskBatchReportingSvcRequest), global::HOLMS.Types.Reporting.RPC.FrontDeskBatchReportingSvcRequest.Parser, new[]{ "Properties", "CalendarDateReportsManifest", "OpsdateRangeReportsManifest", "IncludeCheckedIn", "IncludeCheckedOut", "IncludeCheckedInDaterange" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::HOLMS.Types.Reporting.RPC.FrontDeskReportingSvcHousekeepingRequest), global::HOLMS.Types.Reporting.RPC.FrontDeskReportingSvcHousekeepingRequest.Parser, new[]{ "StaffMembers", "AddNotes", "Date" }, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  public sealed partial class FrontDeskBatchReportingSvcRequest : pb::IMessage<FrontDeskBatchReportingSvcRequest> {
    private static readonly pb::MessageParser<FrontDeskBatchReportingSvcRequest> _parser = new pb::MessageParser<FrontDeskBatchReportingSvcRequest>(() => new FrontDeskBatchReportingSvcRequest());
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<FrontDeskBatchReportingSvcRequest> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::HOLMS.Types.Reporting.RPC.FrontDeskReportingSvcReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public FrontDeskBatchReportingSvcRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public FrontDeskBatchReportingSvcRequest(FrontDeskBatchReportingSvcRequest other) : this() {
      properties_ = other.properties_.Clone();
      CalendarDateReportsManifest = other.calendarDateReportsManifest_ != null ? other.CalendarDateReportsManifest.Clone() : null;
      OpsdateRangeReportsManifest = other.opsdateRangeReportsManifest_ != null ? other.OpsdateRangeReportsManifest.Clone() : null;
      includeCheckedIn_ = other.includeCheckedIn_;
      includeCheckedOut_ = other.includeCheckedOut_;
      includeCheckedInDaterange_ = other.includeCheckedInDaterange_;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public FrontDeskBatchReportingSvcRequest Clone() {
      return new FrontDeskBatchReportingSvcRequest(this);
    }

    /// Field number for the "properties" field.
    public const int PropertiesFieldNumber = 1;
    private static readonly pb::FieldCodec<global::HOLMS.Types.TenancyConfig.Indicators.PropertyIndicator> _repeated_properties_codec
        = pb::FieldCodec.ForMessage(10, global::HOLMS.Types.TenancyConfig.Indicators.PropertyIndicator.Parser);
    private readonly pbc::RepeatedField<global::HOLMS.Types.TenancyConfig.Indicators.PropertyIndicator> properties_ = new pbc::RepeatedField<global::HOLMS.Types.TenancyConfig.Indicators.PropertyIndicator>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::HOLMS.Types.TenancyConfig.Indicators.PropertyIndicator> Properties {
      get { return properties_; }
    }

    /// Field number for the "calendar_date_reports_manifest" field.
    public const int CalendarDateReportsManifestFieldNumber = 2;
    private global::HOLMS.Types.Reporting.ReportParams.FrontDeskCurrentDateReportManifest calendarDateReportsManifest_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::HOLMS.Types.Reporting.ReportParams.FrontDeskCurrentDateReportManifest CalendarDateReportsManifest {
      get { return calendarDateReportsManifest_; }
      set {
        calendarDateReportsManifest_ = value;
      }
    }

    /// Field number for the "opsdate_range_reports_manifest" field.
    public const int OpsdateRangeReportsManifestFieldNumber = 3;
    private global::HOLMS.Types.Reporting.ReportParams.FrontDeskOpsdateRangeReportManifest opsdateRangeReportsManifest_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::HOLMS.Types.Reporting.ReportParams.FrontDeskOpsdateRangeReportManifest OpsdateRangeReportsManifest {
      get { return opsdateRangeReportsManifest_; }
      set {
        opsdateRangeReportsManifest_ = value;
      }
    }

    /// Field number for the "include_checked_in" field.
    public const int IncludeCheckedInFieldNumber = 4;
    private bool includeCheckedIn_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool IncludeCheckedIn {
      get { return includeCheckedIn_; }
      set {
        includeCheckedIn_ = value;
      }
    }

    /// Field number for the "include_checked_out" field.
    public const int IncludeCheckedOutFieldNumber = 5;
    private bool includeCheckedOut_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool IncludeCheckedOut {
      get { return includeCheckedOut_; }
      set {
        includeCheckedOut_ = value;
      }
    }

    /// Field number for the "include_checked_in_daterange" field.
    public const int IncludeCheckedInDaterangeFieldNumber = 6;
    private bool includeCheckedInDaterange_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool IncludeCheckedInDaterange {
      get { return includeCheckedInDaterange_; }
      set {
        includeCheckedInDaterange_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as FrontDeskBatchReportingSvcRequest);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(FrontDeskBatchReportingSvcRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!properties_.Equals(other.properties_)) return false;
      if (!object.Equals(CalendarDateReportsManifest, other.CalendarDateReportsManifest)) return false;
      if (!object.Equals(OpsdateRangeReportsManifest, other.OpsdateRangeReportsManifest)) return false;
      if (IncludeCheckedIn != other.IncludeCheckedIn) return false;
      if (IncludeCheckedOut != other.IncludeCheckedOut) return false;
      if (IncludeCheckedInDaterange != other.IncludeCheckedInDaterange) return false;
      return true;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      hash ^= properties_.GetHashCode();
      if (calendarDateReportsManifest_ != null) hash ^= CalendarDateReportsManifest.GetHashCode();
      if (opsdateRangeReportsManifest_ != null) hash ^= OpsdateRangeReportsManifest.GetHashCode();
      if (IncludeCheckedIn != false) hash ^= IncludeCheckedIn.GetHashCode();
      if (IncludeCheckedOut != false) hash ^= IncludeCheckedOut.GetHashCode();
      if (IncludeCheckedInDaterange != false) hash ^= IncludeCheckedInDaterange.GetHashCode();
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      properties_.WriteTo(output, _repeated_properties_codec);
      if (calendarDateReportsManifest_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(CalendarDateReportsManifest);
      }
      if (opsdateRangeReportsManifest_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(OpsdateRangeReportsManifest);
      }
      if (IncludeCheckedIn != false) {
        output.WriteRawTag(32);
        output.WriteBool(IncludeCheckedIn);
      }
      if (IncludeCheckedOut != false) {
        output.WriteRawTag(40);
        output.WriteBool(IncludeCheckedOut);
      }
      if (IncludeCheckedInDaterange != false) {
        output.WriteRawTag(48);
        output.WriteBool(IncludeCheckedInDaterange);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      size += properties_.CalculateSize(_repeated_properties_codec);
      if (calendarDateReportsManifest_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(CalendarDateReportsManifest);
      }
      if (opsdateRangeReportsManifest_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(OpsdateRangeReportsManifest);
      }
      if (IncludeCheckedIn != false) {
        size += 1 + 1;
      }
      if (IncludeCheckedOut != false) {
        size += 1 + 1;
      }
      if (IncludeCheckedInDaterange != false) {
        size += 1 + 1;
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(FrontDeskBatchReportingSvcRequest other) {
      if (other == null) {
        return;
      }
      properties_.Add(other.properties_);
      if (other.calendarDateReportsManifest_ != null) {
        if (calendarDateReportsManifest_ == null) {
          calendarDateReportsManifest_ = new global::HOLMS.Types.Reporting.ReportParams.FrontDeskCurrentDateReportManifest();
        }
        CalendarDateReportsManifest.MergeFrom(other.CalendarDateReportsManifest);
      }
      if (other.opsdateRangeReportsManifest_ != null) {
        if (opsdateRangeReportsManifest_ == null) {
          opsdateRangeReportsManifest_ = new global::HOLMS.Types.Reporting.ReportParams.FrontDeskOpsdateRangeReportManifest();
        }
        OpsdateRangeReportsManifest.MergeFrom(other.OpsdateRangeReportsManifest);
      }
      if (other.IncludeCheckedIn != false) {
        IncludeCheckedIn = other.IncludeCheckedIn;
      }
      if (other.IncludeCheckedOut != false) {
        IncludeCheckedOut = other.IncludeCheckedOut;
      }
      if (other.IncludeCheckedInDaterange != false) {
        IncludeCheckedInDaterange = other.IncludeCheckedInDaterange;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            properties_.AddEntriesFrom(input, _repeated_properties_codec);
            break;
          }
          case 18: {
            if (calendarDateReportsManifest_ == null) {
              calendarDateReportsManifest_ = new global::HOLMS.Types.Reporting.ReportParams.FrontDeskCurrentDateReportManifest();
            }
            input.ReadMessage(calendarDateReportsManifest_);
            break;
          }
          case 26: {
            if (opsdateRangeReportsManifest_ == null) {
              opsdateRangeReportsManifest_ = new global::HOLMS.Types.Reporting.ReportParams.FrontDeskOpsdateRangeReportManifest();
            }
            input.ReadMessage(opsdateRangeReportsManifest_);
            break;
          }
          case 32: {
            IncludeCheckedIn = input.ReadBool();
            break;
          }
          case 40: {
            IncludeCheckedOut = input.ReadBool();
            break;
          }
          case 48: {
            IncludeCheckedInDaterange = input.ReadBool();
            break;
          }
        }
      }
    }

  }

  public sealed partial class FrontDeskReportingSvcHousekeepingRequest : pb::IMessage<FrontDeskReportingSvcHousekeepingRequest> {
    private static readonly pb::MessageParser<FrontDeskReportingSvcHousekeepingRequest> _parser = new pb::MessageParser<FrontDeskReportingSvcHousekeepingRequest>(() => new FrontDeskReportingSvcHousekeepingRequest());
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<FrontDeskReportingSvcHousekeepingRequest> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::HOLMS.Types.Reporting.RPC.FrontDeskReportingSvcReflection.Descriptor.MessageTypes[1]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public FrontDeskReportingSvcHousekeepingRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public FrontDeskReportingSvcHousekeepingRequest(FrontDeskReportingSvcHousekeepingRequest other) : this() {
      staffMembers_ = other.staffMembers_.Clone();
      addNotes_ = other.addNotes_;
      Date = other.date_ != null ? other.Date.Clone() : null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public FrontDeskReportingSvcHousekeepingRequest Clone() {
      return new FrontDeskReportingSvcHousekeepingRequest(this);
    }

    /// Field number for the "staff_members" field.
    public const int StaffMembersFieldNumber = 1;
    private static readonly pb::FieldCodec<global::HOLMS.Types.IAM.StaffMemberIndicator> _repeated_staffMembers_codec
        = pb::FieldCodec.ForMessage(10, global::HOLMS.Types.IAM.StaffMemberIndicator.Parser);
    private readonly pbc::RepeatedField<global::HOLMS.Types.IAM.StaffMemberIndicator> staffMembers_ = new pbc::RepeatedField<global::HOLMS.Types.IAM.StaffMemberIndicator>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::HOLMS.Types.IAM.StaffMemberIndicator> StaffMembers {
      get { return staffMembers_; }
    }

    /// Field number for the "add_notes" field.
    public const int AddNotesFieldNumber = 2;
    private string addNotes_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string AddNotes {
      get { return addNotes_; }
      set {
        addNotes_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "date" field.
    public const int DateFieldNumber = 3;
    private global::HOLMS.Types.Primitive.PbLocalDate date_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::HOLMS.Types.Primitive.PbLocalDate Date {
      get { return date_; }
      set {
        date_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as FrontDeskReportingSvcHousekeepingRequest);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(FrontDeskReportingSvcHousekeepingRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!staffMembers_.Equals(other.staffMembers_)) return false;
      if (AddNotes != other.AddNotes) return false;
      if (!object.Equals(Date, other.Date)) return false;
      return true;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      hash ^= staffMembers_.GetHashCode();
      if (AddNotes.Length != 0) hash ^= AddNotes.GetHashCode();
      if (date_ != null) hash ^= Date.GetHashCode();
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      staffMembers_.WriteTo(output, _repeated_staffMembers_codec);
      if (AddNotes.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(AddNotes);
      }
      if (date_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(Date);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      size += staffMembers_.CalculateSize(_repeated_staffMembers_codec);
      if (AddNotes.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(AddNotes);
      }
      if (date_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Date);
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(FrontDeskReportingSvcHousekeepingRequest other) {
      if (other == null) {
        return;
      }
      staffMembers_.Add(other.staffMembers_);
      if (other.AddNotes.Length != 0) {
        AddNotes = other.AddNotes;
      }
      if (other.date_ != null) {
        if (date_ == null) {
          date_ = new global::HOLMS.Types.Primitive.PbLocalDate();
        }
        Date.MergeFrom(other.Date);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            staffMembers_.AddEntriesFrom(input, _repeated_staffMembers_codec);
            break;
          }
          case 18: {
            AddNotes = input.ReadString();
            break;
          }
          case 26: {
            if (date_ == null) {
              date_ = new global::HOLMS.Types.Primitive.PbLocalDate();
            }
            input.ReadMessage(date_);
            break;
          }
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code


text:
package com.github.robozonky.api.strategies;

import static org.assertj.core.api.Assertions.*;
import static org.mockito.Mockito.*;

import java.time.OffsetDateTime;

import org.junit.jupiter.api.Test;

import com.github.robozonky.api.Money;
import com.github.robozonky.api.remote.entities.Loan;
import com.github.robozonky.api.remote.entities.MyReservation;
import com.github.robozonky.api.remote.entities.Reservation;
import com.github.robozonky.api.remote.enums.Rating;
import com.github.robozonky.internal.remote.entities.LoanImpl;
import com.github.robozonky.internal.remote.entities.MyReservationImpl;
import com.github.robozonky.internal.remote.entities.ReservationImpl;

class ReservationDescriptorTest {

    private static Reservation mockReservation() {
        return mockReservation(Rating.D);
    }

    private static Reservation mockReservation(final Rating r) {
        final MyReservation mr = mock(MyReservationImpl.class);
        when(mr.getReservedAmount()).thenReturn(Money.from(1_000));
        final Reservation rs = mock(ReservationImpl.class);
        when(rs.getId()).thenReturn(1);
        when(rs.getInterestRate()).thenReturn(r.getInterestRate());
        when(rs.getAmount()).thenReturn(Money.from(2_000));
        when(rs.getNonReservedRemainingInvestment()).thenReturn(Money.from(1_000));
        when(rs.getDatePublished()).thenReturn(OffsetDateTime.now());
        when(rs.getMyReservation()).thenReturn(mr);
        return rs;
    }

    @Test
    void constructor() {
        final Loan l = mock(LoanImpl.class);
        final Reservation mockedReservation = ReservationDescriptorTest.mockReservation(Rating.AAAAA);
        final ReservationDescriptor ld = new ReservationDescriptor(mockedReservation, () -> l);
        assertThat(ld.item()).isSameAs(mockedReservation);
        assertThat(ld.related()).isSameAs(l);
    }

    @Test
    void equalsSelf() {
        final Reservation mockedReservation = ReservationDescriptorTest.mockReservation();
        final ReservationDescriptor ld = new ReservationDescriptor(mockedReservation, () -> null);
        assertThat(ld)
            .isNotEqualTo(null)
            .isEqualTo(ld);
        final ReservationDescriptor ld2 = new ReservationDescriptor(mockedReservation, () -> null);
        assertThat(ld).isEqualTo(ld2);
    }

}


text:
package org.pentaho.di.trans.steps.memgroupby;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.pentaho.di.core.Const;
import org.pentaho.di.core.KettleEnvironment;
import org.pentaho.di.core.RowMetaAndData;
import org.pentaho.di.core.exception.KettleException;
import org.pentaho.di.core.row.RowMeta;
import org.pentaho.di.core.row.RowMetaInterface;
import org.pentaho.di.core.row.ValueMetaInterface;
import org.pentaho.di.core.row.value.ValueMetaBigNumber;
import org.pentaho.di.core.row.value.ValueMetaInteger;
import org.pentaho.di.core.row.value.ValueMetaNumber;
import org.pentaho.di.core.row.value.ValueMetaString;
import org.pentaho.di.trans.TransMeta;
import org.pentaho.di.trans.TransTestFactory;
import org.pentaho.di.trans.steps.groupby.GroupByMeta;

public class MemoryGroupByIntTest {

  public static final String stepName = "MemoryGroupBY";
  public static final String KEY1 = "s1";
  public static final String KEY2 = "i2";
  public static final String KEY3 = "n3";
  public static final String KEY4 = "bn4";

  public static final String OUT1 = "out1";
  public static final String OUT2 = "out2";
  public static final String OUT3 = "out3";
  public static final String OUT4 = "out4";

  @BeforeClass
  public static void before() throws KettleException {
    KettleEnvironment.init( false );
  }

  RowMetaInterface getTestRowMeta() {
    RowMetaInterface rm = new RowMeta();
    rm.addValueMeta( new ValueMetaString( KEY1 ) );
    rm.addValueMeta( new ValueMetaInteger( KEY2 ) );
    rm.addValueMeta( new ValueMetaNumber( KEY3 ) );
    rm.addValueMeta( new ValueMetaBigNumber( KEY4 ) );
    return rm;
  }

  List<RowMetaAndData> getTestRowMetaAndData( int count, Integer[] nulls ) {
    List<RowMetaAndData> list = new ArrayList<RowMetaAndData>();
    RowMetaInterface rm = getTestRowMeta();

    Object[] row = new Object[4];
    List<Integer> nullsList = Arrays.asList( nulls );

    for ( int i = 0; i < count; i++ ) {
      if ( nullsList.contains( i ) ) {
        for ( int j = 0; j < row.length; j++ ) {
          row[j] = null;
        }
      } else {
        row[0] = "";
        row[1] = 1L;
        row[2] = 2.0;
        row[3] = new BigDecimal( 3 );
      }
      list.add( new RowMetaAndData( rm, row ) );
    }
    return list;
  }

  /**
   * This case tests when the MemoryGroupBy step receives 0 input rows, and also no row meta is in the previous step,
   * whether it throws an error and fails, or ends successfully without error, while passing no output rows.
   * See PDI-12501 for details
   */
  @Test
  public void testMemoryGroupByNoInputData() throws KettleException {
    MemoryGroupByMeta meta = new MemoryGroupByMeta();
    meta.setSubjectField( new String[]{ KEY2 } );
    meta.setAggregateField( new String[]{ OUT1 } );
    meta.setGroupField( new String[]{ KEY1 } );
    meta.setAggregateType( new int[] { GroupByMeta.TYPE_GROUP_CONCAT_COMMA } );

    TransMeta transMeta = TransTestFactory.generateTestTransformation( null, meta, stepName, getTestRowMeta() );
    List<RowMetaAndData> inputList = new ArrayList<RowMetaAndData>();
    List<RowMetaAndData> result = null;
    try {
      result =
        TransTestFactory.executeTestTransformation( transMeta, stepName, inputList );
    } catch ( KettleException e ) {
      Assert.fail();
    }
    Assert.assertNotNull( result );
    Assert.assertEquals( 0, result.size() );
  }

  /**
   * This case tests when the MemoryGroupBy step receives 0 input rows, and also no row meta is in the previous step,
   * whether it throws an error and fails, or ends successfully without error, while passing no output rows.
   * See PDI-15415 for details
   */
  @Test
  public void testMemoryGroupByAlwaysReturnARow() throws KettleException {
    MemoryGroupByMeta meta = new MemoryGroupByMeta();
    meta.setSubjectField( new String[]{ KEY2 } );
    meta.setAggregateField( new String[]{ OUT1 } );
    meta.setGroupField( new String[]{ KEY1 } );
    meta.setAggregateType( new int[] { GroupByMeta.TYPE_GROUP_CONCAT_COMMA } );
    meta.setAlwaysGivingBackOneRow( true );

    TransMeta transMeta = TransTestFactory.generateTestTransformation( null, meta, stepName, getTestRowMeta() );
    List<RowMetaAndData> inputList = new ArrayList<RowMetaAndData>();
    List<RowMetaAndData> result = null;
    try {
      result =
        TransTestFactory.executeTestTransformation( transMeta, stepName, inputList );
    } catch ( KettleException e ) {
      Assert.fail();
    }
    Assert.assertNotNull( result );
    Assert.assertEquals( 1, result.size() );
    Assert.assertEquals( KEY1, result.get( 0 ).getValueMeta( 0 ).getName() );
    Assert.assertEquals( ValueMetaInterface.TYPE_STRING, result.get( 0 ).getValueMeta( 0 ).getType() );
    Assert.assertNull( result.get( 0 ).getString( 0, null ) );
    Assert.assertEquals( OUT1, result.get( 0 ).getValueMeta( 1 ).getName() );
    Assert.assertEquals( ValueMetaInterface.TYPE_STRING, result.get( 0 ).getValueMeta( 1 ).getType() );
    Assert.assertNull( result.get( 0 ).getString( 1, null ) );
  }

  /**
   * This case to test calculation value conversion for MemoryGroupBy, see PDI-11530
   * See PDI-11897 for additional details - this case has commented lines which can be real
   * bugs. Uncomment code when PDI-11897 will be fixed some day.
   */
  @Test
  public void testMemoryGroupByNullAggregationsConversion() throws KettleException {
    // this to force null aggregations becomes nulls
    System.getProperties().setProperty( Const.KETTLE_AGGREGATION_ALL_NULLS_ARE_ZERO, "Y" );

    MemoryGroupByMeta meta = new MemoryGroupByMeta();
    meta.setSubjectField( new String[] { KEY1, KEY2, KEY3, KEY4 } );
    meta.setAggregateField( new String[] { OUT1, OUT2, OUT3, OUT4 } );
    meta.setGroupField( new String[] { KEY1 } );
    meta.setAggregateType( new int[] { GroupByMeta.TYPE_GROUP_CONCAT_COMMA, GroupByMeta.TYPE_GROUP_SUM,
      GroupByMeta.TYPE_GROUP_SUM, GroupByMeta.TYPE_GROUP_SUM } );

    TransMeta transMeta = TransTestFactory.generateTestTransformation( null, meta, stepName );
    List<RowMetaAndData> inputList = getTestRowMetaAndData( 2, new Integer[] { 0, 1 } );
    List<RowMetaAndData> ret =
      TransTestFactory.executeTestTransformation( transMeta, stepName, inputList );

    Assert.assertNotNull( "At least it is not null", ret );
    Assert.assertEquals( "Ouput is just one row", 1, ret.size() );

    RowMetaAndData rmd = ret.get( 0 );
    // now take a closer look at value meta types we do have at the end:
    ValueMetaInterface vmi = rmd.getValueMeta( 0 );
    Assert.assertEquals( "First is usually is grouping field", ValueMetaInterface.TYPE_STRING, vmi.getType() );
    Assert.assertEquals( "This is key1 field", KEY1, vmi.getName() );

    vmi = rmd.getValueMeta( 1 );
    Assert.assertEquals( "The next value is first aggregation", OUT1, vmi.getName() );
    Assert.assertEquals( "Since it was null String output will be empty string", "", rmd.getData()[1] );

    vmi = rmd.getValueMeta( 2 );
    Assert.assertEquals( "Third field is second output field", OUT2, vmi.getName() );
    // TODO fix it for GroupBy or MemoryGroupBy
    /*
     * Assert.assertEquals( "This is a bug of MemoryGroupBy - memory group by returns Double, while" +
     * "GroupBy returns Long. So this test will fail here", 0L, rmd .getData()[2] );
     */

    vmi = rmd.getValueMeta( 3 );
    Assert.assertEquals( "4 is 3 output field", OUT3, vmi.getName() );
    Assert.assertEquals( "And since it was null it become correct 0", 0.0, rmd.getData()[3] );

    // TODO fix Memory Group By. Waiting for clarification.
    /*vmi = rmd.getValueMeta( 4 );
    Assert.assertEquals( "For this case we have silent BigDecimal to Double conversion that can"
        + " lead to loss of accuracy. This is serious issue and we can't just ignore it.", BigDecimal.class, rmd
        .getData()[4].getClass() );
    Assert.assertEquals( "And the last one is null which becomes 0 BigNumber", new BigDecimal( 0 ),
        rmd.getData()[4] );*/
  }

}