text:
using System;
using System.Collections.Generic;
using Entitas;

public class CustomObject {
    public string name;

    public CustomObject(string name) {
        this.name = name;
    }
}

public class CustomObjectComponent : IComponent {
    public CustomObject customObject;
}

public class SystemObjectComponent : IComponent {
    public Object systemObject;
}

public class DateTimeComponent : IComponent {
    public DateTime date;
}

public class ArrayComponent : IComponent {
    public string[] array;
}

public class Array2DComponent : IComponent {
    public int[,] array2d;
}

public class Array3DComponent : IComponent {
    public int[,,] array3d;
}

public class JaggedArrayComponent : IComponent {
    public string[][] jaggedArray;
}

public class ListArrayComponent : IComponent {
    public List<string>[] listArray;
}

public class ListComponent : IComponent {
    public List<string> list;
}

public class DictionaryComponent : IComponent {
    public Dictionary<string, string> dict;
}

public class DictArrayComponent : IComponent {
    public Dictionary<int, string[]> dict;
    public Dictionary<int, string[]>[] dictArray;
}

public class HashSetComponent : IComponent {
    public HashSet<string> hashset;
}

public class UnsupportedObject {
    public string name;

    public UnsupportedObject(string name) {
        this.name = name;
    }
}

public class UnsupportedObjectComponent : IComponent {
    public UnsupportedObject unsupportedObject;
}


text:
// The MIT License (MIT)

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

#ifndef __LLBC_CORE_TIMER_TIMER_SCHEDULER_H__
#define __LLBC_CORE_TIMER_TIMER_SCHEDULER_H__

#include "llbc/common/Common.h"

#include "llbc/core/timer/BinaryHeap.h"

__LLBC_NS_BEGIN

class LLBC_Timer;
struct LLBC_TimerData;

__LLBC_NS_END

__LLBC_NS_BEGIN

/**
 * \brief The timer scheduler class encapsulation.
 */
class LLBC_EXPORT LLBC_TimerScheduler
{
    typedef LLBC_TimerScheduler _This;

    typedef LLBC_BinaryHeap<LLBC_TimerData *> _Heap;

public:
    LLBC_TimerScheduler();
    virtual ~LLBC_TimerScheduler();

public:
    /**
     * Get current thread timer scheduler, thread must be LLBC style thread.
     * @return _This * - timer scheduler pointer.
     */
    static _This *GetCurrentThreadScheduler();

public:
    /**
     * Timer manager update drive function.
     */
    void Update();

    /**
     * Check timer scheduler is enabled or not.
     * @return bool - enable flag.
     */
    bool IsEnabled() const;

    /**
     * Set timer scheduler enabled flag.
     * @param[in] enabled - the enabled flag.
     */
    void SetEnabled(bool enabled);

    /**
     * Get timer count in this scheduler.
     * @return size_t - the timer count.
     */
    size_t GetTimerCount() const;

public:
    /**
     * Cancel all timers.
     */
    virtual void CancelAll();

private:
    /**
     * Set friend class: LLBC_Timer.
     */
    friend class LLBC_Timer;

    /**
     * Get scheduler destroyed flag.
      *@return bool - destroyed flag.
     */
    bool IsDstroyed() const;

    /**
     * Schedule timer.
     * @param[in] timer   - timer object.
     * @param[in] dueTime - due time, in milli-seconds.
     * @param[in] period  - period time, in milli-seconds.
     * @return int - return 0 if success, otherwise return -1.
     */
    virtual int Schedule(LLBC_Timer *timer, sint64 dueTime, sint64 period);

    /**
     * Cancel timer.
     * @param[in] - timer object.
     * @return int - return 0 if success, otherwise return -1.
     */
    virtual int Cancel(LLBC_Timer *timer);

private:
    LLBC_DISABLE_ASSIGNMENT(LLBC_TimerScheduler);

private:
    LLBC_TimerId _maxTimerId;
    bool _enabled;
    bool _destroyed;

    _Heap _heap;
};

__LLBC_NS_END

#endif // !__LLBC_CORE_TIMER_TIMER_SCHEDULER_H__

redpajama_set_name: RedPajamaGithub


text:
require 'test_helper'

class Cms::PagesHelperTest < ActionView::TestCase
end


text:
class SearchController {

  constructor ($rootScope, $location, $log, notesGraph, openNotes) {
    this.$rootScope = $rootScope;
    this.$location = $location;
    this.$log = $log;
    this.notesGraph = notesGraph;
    this.openNotes = openNotes;
    this.activate();
  }

  activate () {
    this.searchTerms = '';
    this.isLoading = false;
    this.results = [];

    this.$rootScope.$watch(() => this.searchTerms, text => {
      if (!text) {
        this.isLoading = false;
        this.results = [];
        return;
      }
      this.$log.info('Searching for "' + text + '"');
      this.isLoading = true;
      // Todo: case insensitive
      var regex = new RegExp(text, 'gi');
      var contains = x => !!x && x.match(regex);
      this._search(note =>
        contains(this.notesGraph.body(note)) ||
        contains(this.notesGraph.title(note))
      );
    });
  }

  _search (predicate) {
    if (this.runningSearch) {
      clearTimeout(this.runningSearch);
      this.results.length = 0;
      console.info('clear', this.results);
    }
    var graph = this.notesGraph;
    var queue = graph.roots();
    console.warn('serach', queue);
    var digest = _ => this.$rootScope.$$phase || this.$rootScope.$apply();
    var process = _ => {
      var item = queue.shift();
      if (item === undefined) return;
      queue = queue.concat(graph.children(item));
      if (predicate(item) && this.results.indexOf(item) == -1) {
        this.results.push(item);
        digest();
        console.info('change', this.results);
      }
      if (queue.length) this.runningSearch = setTimeout(process, 0);
    };
    process();
    // on end: this.isLoading = false;
  }

  open (note) {
    // console.log(note);
    this.openNotes.open(note);
  }
}

angular.module('dyanote').controller('SearchController', SearchController);


text:
A lightweight server platform for Minecraft: Pocket edition and later on Minecraft: PC

### Compiling
To compile torchbox. First clone this repository onto your system and install maven onto your system.
CD to the directory that torchbox is cloned in and run "mvn clean verify" to build the JAR file.

### Downloading
To download the latest version of torchbox visit the [TeamCity](http://torchboxproject.org:8111) server