text:
namespace foundation
{

//
// Poisoning is the act of setting a variable or an object to a remarkable value
// that will help detect when it is used without being initialized.
//
// To poison a variable or object x:
//
//     foundation::poison(x);
//
// To implement poisoning of custom objects, specialize foundation::PoisonImpl:
//
//     namespace foundation
//     {
//         template <>
//         class PoisonImpl<ns::MyObject>
//         {
//           public:
//             static void do_poison(ns::MyObject& object)
//             {
//                 poison(object.x);
//                 poison(object.y);
//                 poison(object.z);
//             }
//         };
//     }
//

template <typename T>
void poison(T& x);

//
// Implementation.
//

template <typename T>
class PoisonImpl
{
  public:
    static void do_poison(T& x)
    {
        std::memset(&x, 0xADU, sizeof(x));
    }
};

template <typename T>
inline void poison(T& x)
{
    PoisonImpl<T>::do_poison(x);
}

template <typename T>
class PoisonImpl<T*>
{
  public:
    static void do_poison(T*& p)
    {
#ifdef APPLESEED_ARCH32
        p = reinterpret_cast<T*>(0xDEADBEEFUL);
#else
        p = reinterpret_cast<T*>(0xDEADBEEFDEADBEEFULL);
#endif
    }
};

template <>
class PoisonImpl<float>
{
  public:
    static void do_poison(float& x)
    {
        x = FP<float>::snan();
    }
};

template <>
class PoisonImpl<double>
{
  public:
    static void do_poison(double& x)
    {
        x = FP<double>::snan();
    }
};

}       // namespace foundation

#endif  // !APPLESEED_FOUNDATION_UTILITY_POISON_H

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Rexmac\Zyndax\View\Helper;

use \Zend_Registry;

/**
 * Helper class for generating CSS class names for body element
 *
 * @category   Zyndax
 * @package    Rexmac_Zyndax
 * @subpackage View_Helper
 * @copyright  Copyright (c) 2011-2012 Rex McConnell (http://rexmac.com/)
 * @license    http://rexmac.com/license/bsd2c.txt Modified BSD License
 * @author     Rex McConnell <rex@rexmac.com>
 */
class BodyClass extends \Zend_View_Helper_Abstract {

  /**
   * Helper method to generate CSS class names for <body>
   *
   * @return string
   */
  public function bodyClass() {
    if($this->view) {
      $class = array();

      $acl  = Zend_Registry::get('acl');
      $userCanViewAdmin = $acl->isUserAllowed('mvc:admin', 'view');

      if($page = $this->view->navigation()->findActive($this->view->navigation()->getContainer())) {
        $module = $page['page']->getModule();
        if($userCanViewAdmin && $module === 'default') $module = 'admin';
        $class[] = $module;
        $class[] = $page['page']->getController();
        $class[] = $page['page']->getAction();
      }

      return implode(' ', $class);
    }
  }
}


text:
package org.apache.spark.api.python

import java.nio.ByteOrder
import java.nio.charset.StandardCharsets
import java.util.{ArrayList => JArrayList}

import scala.collection.JavaConverters._
import scala.collection.mutable
import scala.util.Failure
import scala.util.Try

import net.razorvine.pickle.{Pickler, Unpickler}

import org.apache.spark.SparkException
import org.apache.spark.api.java.JavaRDD
import org.apache.spark.internal.Logging
import org.apache.spark.rdd.RDD

/** Utilities for serialization / deserialization between Python and Java, using Pickle. */
private[spark] object SerDeUtil extends Logging {
  // Unpickle array.array generated by Python 2.6
  class ArrayConstructor extends net.razorvine.pickle.objects.ArrayConstructor {
    //  /* Description of types */
    //  static struct arraydescr descriptors[] = {
    //    {'c', sizeof(char), c_getitem, c_setitem},
    //    {'b', sizeof(char), b_getitem, b_setitem},
    //    {'B', sizeof(char), BB_getitem, BB_setitem},
    //    #ifdef Py_USING_UNICODE
    //      {'u', sizeof(Py_UNICODE), u_getitem, u_setitem},
    //    #endif
    //    {'h', sizeof(short), h_getitem, h_setitem},
    //    {'H', sizeof(short), HH_getitem, HH_setitem},
    //    {'i', sizeof(int), i_getitem, i_setitem},
    //    {'I', sizeof(int), II_getitem, II_setitem},
    //    {'l', sizeof(long), l_getitem, l_setitem},
    //    {'L', sizeof(long), LL_getitem, LL_setitem},
    //    {'f', sizeof(float), f_getitem, f_setitem},
    //    {'d', sizeof(double), d_getitem, d_setitem},
    //    {'\0', 0, 0, 0} /* Sentinel */
    //  };
    // TODO: support Py_UNICODE with 2 bytes
    val machineCodes: Map[Char, Int] = if (ByteOrder.nativeOrder().equals(ByteOrder.BIG_ENDIAN)) {
      Map('c' -> 1, 'B' -> 0, 'b' -> 1, 'H' -> 3, 'h' -> 5, 'I' -> 7, 'i' -> 9,
        'L' -> 11, 'l' -> 13, 'f' -> 15, 'd' -> 17, 'u' -> 21
      )
    } else {
      Map('c' -> 1, 'B' -> 0, 'b' -> 1, 'H' -> 2, 'h' -> 4, 'I' -> 6, 'i' -> 8,
        'L' -> 10, 'l' -> 12, 'f' -> 14, 'd' -> 16, 'u' -> 20
      )
    }
    override def construct(args: Array[Object]): Object = {
      if (args.length == 1) {
        construct(args ++ Array(""))
      } else if (args.length == 2 && args(1).isInstanceOf[String]) {
        val typecode = args(0).asInstanceOf[String].charAt(0)
        // This must be ISO 8859-1 / Latin 1, not UTF-8, to interoperate correctly
        val data = args(1).asInstanceOf[String].getBytes(StandardCharsets.ISO_8859_1)
        construct(typecode, machineCodes(typecode), data)
      } else if (args.length == 2 && args(0) == "l") {
        // On Python 2, an array of typecode 'l' should be handled as long rather than int.
        val values = args(1).asInstanceOf[JArrayList[_]]
        val result = new Array[Long](values.size)
        var i = 0
        while (i < values.size) {
          result(i) = values.get(i).asInstanceOf[Number].longValue()
          i += 1
        }
        result
      } else {
        super.construct(args)
      }
    }
  }

  private var initialized = false
  // This should be called before trying to unpickle array.array from Python
  // In cluster mode, this should be put in closure
  def initialize(): Unit = {
    synchronized{
      if (!initialized) {
        Unpickler.registerConstructor("array", "array", new ArrayConstructor())
        initialized = true
      }
    }
  }
  initialize()

  /**
   * Convert an RDD of Java objects to Array (no recursive conversions).
   * It is only used by pyspark.sql.
   */
  def toJavaArray(jrdd: JavaRDD[Any]): JavaRDD[Array[_]] = {
    jrdd.rdd.map {
      case objs: JArrayList[_] =>
        objs.toArray
      case obj if obj.getClass.isArray =>
        obj.asInstanceOf[Array[_]].toArray
    }.toJavaRDD()
  }

  /**
   * Choose batch size based on size of objects
   */
  private[spark] class AutoBatchedPickler(iter: Iterator[Any]) extends Iterator[Array[Byte]] {
    private val pickle = new Pickler()
    private var batch = 1
    private val buffer = new mutable.ArrayBuffer[Any]

    override def hasNext: Boolean = iter.hasNext

    override def next(): Array[Byte] = {
      while (iter.hasNext && buffer.length < batch) {
        buffer += iter.next()
      }
      val bytes = pickle.dumps(buffer.toArray)
      val size = bytes.length
      // let  1M < size < 10M
      if (size < 1024 * 1024) {
        batch *= 2
      } else if (size > 1024 * 1024 * 10 && batch > 1) {
        batch /= 2
      }
      buffer.clear()
      bytes
    }
  }

  /**
   * Convert an RDD of Java objects to an RDD of serialized Python objects, that is usable by
   * PySpark.
   */
  def javaToPython(jRDD: JavaRDD[_]): JavaRDD[Array[Byte]] = {
    jRDD.rdd.mapPartitions { iter => new AutoBatchedPickler(iter) }
  }

  /**
   * Convert an RDD of serialized Python objects to RDD of objects, that is usable by PySpark.
   */
  def pythonToJava(pyRDD: JavaRDD[Array[Byte]], batched: Boolean): JavaRDD[Any] = {
    pyRDD.rdd.mapPartitions { iter =>
      initialize()
      val unpickle = new Unpickler
      iter.flatMap { row =>
        val obj = unpickle.loads(row)
        if (batched) {
          obj match {
            case array: Array[Any] => array.toSeq
            case _ => obj.asInstanceOf[JArrayList[_]].asScala
          }
        } else {
          Seq(obj)
        }
      }
    }.toJavaRDD()
  }

  private def checkPickle(t: (Any, Any)): (Boolean, Boolean) = {
    val pickle = new Pickler
    val kt = Try {
      pickle.dumps(t._1)
    }
    val vt = Try {
      pickle.dumps(t._2)
    }
    (kt, vt) match {
      case (Failure(kf), Failure(vf)) =>
        logWarning(s"""
               |Failed to pickle Java object as key: ${t._1.getClass.getSimpleName}, falling back
               |to 'toString'. Error: ${kf.getMessage}""".stripMargin)
        logWarning(s"""
               |Failed to pickle Java object as value: ${t._2.getClass.getSimpleName}, falling back
               |to 'toString'. Error: ${vf.getMessage}""".stripMargin)
        (true, true)
      case (Failure(kf), _) =>
        logWarning(s"""
               |Failed to pickle Java object as key: ${t._1.getClass.getSimpleName}, falling back
               |to 'toString'. Error: ${kf.getMessage}""".stripMargin)
        (true, false)
      case (_, Failure(vf)) =>
        logWarning(s"""
               |Failed to pickle Java object as value: ${t._2.getClass.getSimpleName}, falling back
               |to 'toString'. Error: ${vf.getMessage}""".stripMargin)
        (false, true)
      case _ =>
        (false, false)
    }
  }

  /**
   * Convert an RDD of key-value pairs to an RDD of serialized Python objects, that is usable
   * by PySpark. By default, if serialization fails, toString is called and the string
   * representation is serialized
   */
  def pairRDDToPython(rdd: RDD[(Any, Any)], batchSize: Int): RDD[Array[Byte]] = {
    val (keyFailed, valueFailed) = rdd.take(1) match {
      case Array() => (false, false)
      case Array(first) => checkPickle(first)
    }

    rdd.mapPartitions { iter =>
      val cleaned = iter.map { case (k, v) =>
        val key = if (keyFailed) k.toString else k
        val value = if (valueFailed) v.toString else v
        Array[Any](key, value)
      }
      if (batchSize == 0) {
        new AutoBatchedPickler(cleaned)
      } else {
        val pickle = new Pickler
        cleaned.grouped(batchSize).map(batched => pickle.dumps(batched.asJava))
      }
    }
  }

  /**
   * Convert an RDD of serialized Python tuple (K, V) to RDD[(K, V)].
   */
  def pythonToPairRDD[K, V](pyRDD: RDD[Array[Byte]], batched: Boolean): RDD[(K, V)] = {
    def isPair(obj: Any): Boolean = {
      Option(obj.getClass.getComponentType).exists(!_.isPrimitive) &&
        obj.asInstanceOf[Array[_]].length == 2
    }

    val rdd = pythonToJava(pyRDD, batched).rdd
    rdd.take(1) match {
      case Array(obj) if isPair(obj) =>
        // we only accept (K, V)
      case Array() =>
        // we also accept empty collections
      case Array(other) => throw new SparkException(
        s"RDD element of type ${other.getClass.getName} cannot be used")
    }
    rdd.map { obj =>
      val arr = obj.asInstanceOf[Array[_]]
      (arr.head.asInstanceOf[K], arr.last.asInstanceOf[V])
    }
  }
}


text:
#pragma once
#include <aws/drs/Drs_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace drs
{
namespace Model
{

  /**
   *
A set of filters by which to return Source Servers.

See Also:

   * AWS
   * API Reference

   */
  class AWS_DRS_API DescribeSourceServersRequestFilters
  {
  public:
    DescribeSourceServersRequestFilters();
    DescribeSourceServersRequestFilters(Aws::Utils::Json::JsonView jsonValue);
    DescribeSourceServersRequestFilters& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
An ID that describes the hardware of the Source Server. This is either an EC2
     * instance id, a VMware uuid or a mac address.

     */
    inline const Aws::String& GetHardwareId() const{ return m_hardwareId; }

    /**
     *
An ID that describes the hardware of the Source Server. This is either an EC2
     * instance id, a VMware uuid or a mac address.

     */
    inline bool HardwareIdHasBeenSet() const { return m_hardwareIdHasBeenSet; }

    /**
     *
An ID that describes the hardware of the Source Server. This is either an EC2
     * instance id, a VMware uuid or a mac address.

     */
    inline void SetHardwareId(const Aws::String& value) { m_hardwareIdHasBeenSet = true; m_hardwareId = value; }

    /**
     *
An ID that describes the hardware of the Source Server. This is either an EC2
     * instance id, a VMware uuid or a mac address.

     */
    inline void SetHardwareId(Aws::String&& value) { m_hardwareIdHasBeenSet = true; m_hardwareId = std::move(value); }

    /**
     *
An ID that describes the hardware of the Source Server. This is either an EC2
     * instance id, a VMware uuid or a mac address.

     */
    inline void SetHardwareId(const char* value) { m_hardwareIdHasBeenSet = true; m_hardwareId.assign(value); }

    /**
     *
An ID that describes the hardware of the Source Server. This is either an EC2
     * instance id, a VMware uuid or a mac address.

     */
    inline DescribeSourceServersRequestFilters& WithHardwareId(const Aws::String& value) { SetHardwareId(value); return *this;}

    /**
     *
An ID that describes the hardware of the Source Server. This is either an EC2
     * instance id, a VMware uuid or a mac address.

     */
    inline DescribeSourceServersRequestFilters& WithHardwareId(Aws::String&& value) { SetHardwareId(std::move(value)); return *this;}

    /**
     *
An ID that describes the hardware of the Source Server. This is either an EC2
     * instance id, a VMware uuid or a mac address.

     */
    inline DescribeSourceServersRequestFilters& WithHardwareId(const char* value) { SetHardwareId(value); return *this;}

    /**
     *
An array of Source Servers IDs that should be returned. An empty array means
     * all Source Servers.

     */
    inline const Aws::Vector<Aws::String>& GetSourceServerIDs() const{ return m_sourceServerIDs; }

    /**
     *
An array of Source Servers IDs that should be returned. An empty array means
     * all Source Servers.

     */
    inline bool SourceServerIDsHasBeenSet() const { return m_sourceServerIDsHasBeenSet; }

    /**
     *
An array of Source Servers IDs that should be returned. An empty array means
     * all Source Servers.

     */
    inline void SetSourceServerIDs(const Aws::Vector<Aws::String>& value) { m_sourceServerIDsHasBeenSet = true; m_sourceServerIDs = value; }

    /**
     *
An array of Source Servers IDs that should be returned. An empty array means
     * all Source Servers.

     */
    inline void SetSourceServerIDs(Aws::Vector<Aws::String>&& value) { m_sourceServerIDsHasBeenSet = true; m_sourceServerIDs = std::move(value); }

    /**
     *
An array of Source Servers IDs that should be returned. An empty array means
     * all Source Servers.

     */
    inline DescribeSourceServersRequestFilters& WithSourceServerIDs(const Aws::Vector<Aws::String>& value) { SetSourceServerIDs(value); return *this;}

    /**
     *
An array of Source Servers IDs that should be returned. An empty array means
     * all Source Servers.

     */
    inline DescribeSourceServersRequestFilters& WithSourceServerIDs(Aws::Vector<Aws::String>&& value) { SetSourceServerIDs(std::move(value)); return *this;}

    /**
     *
An array of Source Servers IDs that should be returned. An empty array means
     * all Source Servers.

     */
    inline DescribeSourceServersRequestFilters& AddSourceServerIDs(const Aws::String& value) { m_sourceServerIDsHasBeenSet = true; m_sourceServerIDs.push_back(value); return *this; }

    /**
     *
An array of Source Servers IDs that should be returned. An empty array means
     * all Source Servers.

     */
    inline DescribeSourceServersRequestFilters& AddSourceServerIDs(Aws::String&& value) { m_sourceServerIDsHasBeenSet = true; m_sourceServerIDs.push_back(std::move(value)); return *this; }

    /**
     *
An array of Source Servers IDs that should be returned. An empty array means
     * all Source Servers.

     */
    inline DescribeSourceServersRequestFilters& AddSourceServerIDs(const char* value) { m_sourceServerIDsHasBeenSet = true; m_sourceServerIDs.push_back(value); return *this; }

    /**
     *
An array of staging account IDs that extended source servers belong to. An
     * empty array means all source servers will be shown.

     */
    inline const Aws::Vector<Aws::String>& GetStagingAccountIDs() const{ return m_stagingAccountIDs; }

    /**
     *
An array of staging account IDs that extended source servers belong to. An
     * empty array means all source servers will be shown.

     */
    inline bool StagingAccountIDsHasBeenSet() const { return m_stagingAccountIDsHasBeenSet; }

    /**
     *
An array of staging account IDs that extended source servers belong to. An
     * empty array means all source servers will be shown.

     */
    inline void SetStagingAccountIDs(const Aws::Vector<Aws::String>& value) { m_stagingAccountIDsHasBeenSet = true; m_stagingAccountIDs = value; }

    /**
     *
An array of staging account IDs that extended source servers belong to. An
     * empty array means all source servers will be shown.

     */
    inline void SetStagingAccountIDs(Aws::Vector<Aws::String>&& value) { m_stagingAccountIDsHasBeenSet = true; m_stagingAccountIDs = std::move(value); }

    /**
     *
An array of staging account IDs that extended source servers belong to. An
     * empty array means all source servers will be shown.

     */
    inline DescribeSourceServersRequestFilters& WithStagingAccountIDs(const Aws::Vector<Aws::String>& value) { SetStagingAccountIDs(value); return *this;}

    /**
     *
An array of staging account IDs that extended source servers belong to. An
     * empty array means all source servers will be shown.

     */
    inline DescribeSourceServersRequestFilters& WithStagingAccountIDs(Aws::Vector<Aws::String>&& value) { SetStagingAccountIDs(std::move(value)); return *this;}

    /**
     *
An array of staging account IDs that extended source servers belong to. An
     * empty array means all source servers will be shown.

     */
    inline DescribeSourceServersRequestFilters& AddStagingAccountIDs(const Aws::String& value) { m_stagingAccountIDsHasBeenSet = true; m_stagingAccountIDs.push_back(value); return *this; }

    /**
     *
An array of staging account IDs that extended source servers belong to. An
     * empty array means all source servers will be shown.

     */
    inline DescribeSourceServersRequestFilters& AddStagingAccountIDs(Aws::String&& value) { m_stagingAccountIDsHasBeenSet = true; m_stagingAccountIDs.push_back(std::move(value)); return *this; }

    /**
     *
An array of staging account IDs that extended source servers belong to. An
     * empty array means all source servers will be shown.

     */
    inline DescribeSourceServersRequestFilters& AddStagingAccountIDs(const char* value) { m_stagingAccountIDsHasBeenSet = true; m_stagingAccountIDs.push_back(value); return *this; }

  private:

    Aws::String m_hardwareId;
    bool m_hardwareIdHasBeenSet = false;

    Aws::Vector<Aws::String> m_sourceServerIDs;
    bool m_sourceServerIDsHasBeenSet = false;

    Aws::Vector<Aws::String> m_stagingAccountIDs;
    bool m_stagingAccountIDsHasBeenSet = false;
  };

} // namespace Model
} // namespace drs
} // namespace Aws


text:
#include "process.h"

#include "target.h"
#include "source.h"

#include <core/helpers/statistics.h>
#include <core/system/timer.h>
#include <core/system/command.h>

#include <stdio.h>
#include <inttypes.h>
#include <stdint.h>

static void process_init(struct thorium_actor *self);
static void process_destroy(struct thorium_actor *self);
static void process_receive(struct thorium_actor *self, struct thorium_message *message);

struct thorium_script process_script = {
    .identifier = SCRIPT_LATENCY_PROCESS,
    .init = process_init,
    .destroy = process_destroy,
    .receive = process_receive,
    .size = sizeof(struct process),
    .name = "process"
};

static void process_init(struct thorium_actor *self)
{
    struct process *concrete_self;
    int argc;
    char **argv;

    concrete_self = thorium_actor_concrete_actor(self);
    core_vector_init(&concrete_self->actors, sizeof(int));
    core_vector_init(&concrete_self->children, sizeof(int));
    core_vector_init(&concrete_self->target_children, sizeof(int));
    core_vector_init(&concrete_self->initial_actors, sizeof(int));

#ifdef LATENCY_PROBE_USE_MULTIPLEXER
    concrete_self->actors_per_worker = thorium_actor_get_suggested_actor_count(self,
               THORIUM_ADAPTATION_FLAG_SMALL_MESSAGES | THORIUM_ADAPTATION_FLAG_SCOPE_WORKER);
#else
    concrete_self->actors_per_worker = THORIUM_LIGHTWEIGHT_ACTOR_COUNT_PER_WORKER;
#endif

    concrete_self->completed = 0;

    argc = thorium_actor_argc(self);
    argv = thorium_actor_argv(self);

    concrete_self->event_count = DEFAULT_EVENT_COUNT;

    if (core_command_has_argument(argc, argv, OPTION_EVENT_COUNT)) {
        concrete_self->event_count = core_command_get_argument_value_int(argc, argv, OPTION_EVENT_COUNT);
    }

    core_vector_init(&concrete_self->targets, sizeof(int));

    concrete_self->mode = SCRIPT_SOURCE;

    thorium_actor_add_script(self, SCRIPT_LATENCY_TARGET, &script_target);
    thorium_actor_add_script(self, SCRIPT_SOURCE, &script_source);
}

static void process_destroy(struct thorium_actor *self)
{
    struct process *concrete_self;

    concrete_self = (struct process *)thorium_actor_concrete_actor(self);
    core_vector_destroy(&concrete_self->actors);
    core_vector_destroy(&concrete_self->children);
    core_vector_destroy(&concrete_self->target_children);
    core_vector_destroy(&concrete_self->initial_actors);

    core_vector_destroy(&concrete_self->targets);
}

static void process_receive(struct thorium_actor *self, struct thorium_message *message)
{
    int action;
    uint64_t total;
    void *buffer;
    int leader;
    int worker_count;
    int source;
    int actors_per_worker;
    int i;
    int new_actor;
    uint64_t elapsed_time;
    double rate;
    double actor_throughput;
    double worker_throughput;
    double elapsed_seconds;
    struct process *concrete_self;
    struct core_vector actors;
    int name;
    int nodes;
    int number_of_actors;
    int workers;
    int expected;
    int workers_per_node;

    concrete_self = (struct process *)thorium_actor_concrete_actor(self);
    action = thorium_message_action(message);
    buffer = thorium_message_buffer(message);
    source = thorium_message_source(message);
    name = thorium_actor_name(self);
    worker_count = thorium_actor_node_worker_count(self);

    if (action == ACTION_START) {

        /*
         * Initial actors can not be NULL.
         */
        CORE_DEBUGGER_ASSERT_NOT_NULL(buffer);

        core_vector_unpack(&concrete_self->initial_actors, buffer);

        thorium_actor_send_to_self_empty(self, ACTION_GET_NODE_WORKER_COUNT);

    } else if (action == ACTION_GET_NODE_WORKER_COUNT_REPLY) {

        thorium_message_unpack_int(message, 0, &worker_count);

        /*
        printf("worker_count %d\n", worker_count);
        */
        actors_per_worker = concrete_self->actors_per_worker;
        concrete_self->size = worker_count * actors_per_worker;

        thorium_actor_send_to_self_int(self, ACTION_SPAWN,
                            SCRIPT_SOURCE);

    } else if (action == ACTION_SPAWN_REPLY
                    && concrete_self->mode == (int)SCRIPT_SOURCE) {

        thorium_message_unpack_int(message, 0, &new_actor);

        core_vector_push_back_int(&concrete_self->children, new_actor);

        /*
        printf("receive %d\n", new_actor);
        */

        if (core_vector_size(&concrete_self->children) == concrete_self->size) {

            /*
             * Send to chief.
             */

            leader = core_vector_at_as_int(&concrete_self->initial_actors, 0);
            thorium_actor_send_vector(self, leader, ACTION_PUSH_DATA,
                            &concrete_self->children);

            printf("%d sends ACTION_PUSH_DATA (%d actors) to leader %d\n", name,
                            concrete_self->size, leader);
        } else {

            thorium_actor_send_to_self_int(self, ACTION_SPAWN,
                            SCRIPT_SOURCE);
        }

    } else if (action == ACTION_SPAWN_REPLY && concrete_self->mode == (int)SCRIPT_LATENCY_TARGET) {

        thorium_message_unpack_int(message, 0, &new_actor);

        core_vector_push_back_int(&concrete_self->target_children, new_actor);

        if (core_vector_size(&concrete_self->target_children) == worker_count) {

            leader = core_vector_at_as_int(&concrete_self->initial_actors, 0);
            thorium_actor_send_vector(self, leader, ACTION_PUSH_DATA,
                            &concrete_self->target_children);
        }

    } else if (action == ACTION_ASK_TO_STOP) {

        leader = core_vector_at_as_int(&concrete_self->initial_actors, 0);

        if (name == leader) {

            core_timer_stop(&concrete_self->timer);
            elapsed_time = core_timer_get_elapsed_nanoseconds(&concrete_self->timer);

            total = core_vector_size(&concrete_self->actors);
            total *= concrete_self->event_count;

            /*
             * Count ACTION_PING and ACTION_PING_REPLY
             */
            total *= 2;
            elapsed_seconds = ((elapsed_time + 0.0) / ( 1000 * 1000 * 1000));

            nodes = thorium_actor_get_node_count(self);
            workers_per_node = thorium_actor_node_worker_count(self);
            workers = nodes * workers_per_node;
            actors_per_worker = concrete_self->actors_per_worker;
            number_of_actors = workers * actors_per_worker;

            rate = (total + 0.0) / elapsed_seconds;
            worker_throughput = rate / workers;
            actor_throughput = rate / number_of_actors;

            printf("PERFORMANCE_COUNTER type = ping-pong\n");
            printf("PERFORMANCE_COUNTER ping-action = ACTION_PING\n");
            printf("PERFORMANCE_COUNTER pong-action = ACTION_PING_REPLY\n");
            printf("PERFORMANCE_COUNTER node-count = %d\n", nodes);
            printf("PERFORMANCE_COUNTER worker-count-per-node = %d\n", workers_per_node);
            printf("PERFORMANCE_COUNTER actor-count-per-worker = %d\n", actors_per_worker);
            printf("PERFORMANCE_COUNTER worker-count = %d\n", workers);
            printf("PERFORMANCE_COUNTER actor-count = %d\n", number_of_actors);
            printf("PERFORMANCE_COUNTER ping-message-count-per-actor = %d\n", concrete_self->event_count);
            printf("PERFORMANCE_COUNTER ping-message-count = %" PRIu64 "\n",
                            total / 2);
            printf("PERFORMANCE_COUNTER pong-message-count = %" PRIu64 "\n",
                            total / 2);
            printf("PERFORMANCE_COUNTER message-count = %" PRIu64 "\n",
                            total);
            printf("PERFORMANCE_COUNTER elapsed-time = %f s\n", elapsed_seconds);

            printf("PERFORMANCE_COUNTER computation-throughput = %f messages / s\n", rate);
            printf("PERFORMANCE_COUNTER node-throughput = %f messages / s\n", rate / nodes);
            printf("PERFORMANCE_COUNTER worker-throughput = %f messages / s\n", worker_throughput);
            printf("PERFORMANCE_COUNTER worker-latency = %d ns\n",
                            (int)((1000 * 1000 * 1000) / worker_throughput));
            printf("PERFORMANCE_COUNTER actor-throughput = %f messages / s\n", actor_throughput);
            printf("PERFORMANCE_COUNTER actor-latency = %d ns\n",
                            (int)((1000 * 1000 * 1000) / actor_throughput));
        }

        printf("%d receives ACTION_ASK_TO_STOP\n", thorium_actor_name(self));
        thorium_actor_send_range_empty(self, &concrete_self->children, ACTION_ASK_TO_STOP);
        thorium_actor_send_range_empty(self, &concrete_self->target_children, ACTION_ASK_TO_STOP);
        thorium_actor_send_to_self_empty(self, ACTION_STOP);

    } else if (action == ACTION_PUSH_DATA
                    && core_vector_size(&concrete_self->actors) !=
                                            core_vector_size(&concrete_self->initial_actors) * concrete_self->size) {

        core_vector_init(&actors, sizeof(int));
        core_vector_unpack(&actors, buffer);

        core_vector_push_back_vector(&concrete_self->actors, &actors);

        core_vector_destroy(&actors);

        if (core_vector_size(&concrete_self->actors) ==
                        core_vector_size(&concrete_self->initial_actors) * concrete_self->size) {

            thorium_actor_send_range_empty(self, &concrete_self->initial_actors, ACTION_SPAWN_TARGETS);
        }
    } else if (action == ACTION_SPAWN_TARGETS) {

        concrete_self->mode = SCRIPT_LATENCY_TARGET;

        for (i = 0; i < worker_count; ++i) {
            thorium_actor_send_to_self_int(self, ACTION_SPAWN, SCRIPT_LATENCY_TARGET);
        }

    } else if (action == ACTION_NOTIFY_REPLY) {

        ++concrete_self->completed;

        /*
         * This will show up also when the whole thing is finished.
         */
        if (concrete_self->completed % concrete_self->actors_per_worker == 0) {
            printf("%d received ACTION_NOTIFY_REPLY from %d, %d/%d\n",
                        name, source, concrete_self->completed,
                        (int)core_vector_size(&concrete_self->actors));
        }

        if (concrete_self->completed == (int)core_vector_size(&concrete_self->actors)) {

            thorium_actor_send_range_empty(self, &concrete_self->initial_actors,
                            ACTION_ASK_TO_STOP);
        }
    } else if (action == ACTION_PUSH_DATA) {

        core_vector_init(&actors, sizeof(int));
        core_vector_unpack(&actors, buffer);

        core_vector_push_back_vector(&concrete_self->targets, &actors);

        core_vector_destroy(&actors);
        expected = core_vector_size(&concrete_self->initial_actors) * worker_count;

        if (core_vector_size(&concrete_self->targets) == expected) {

            printf("%d has %d targets ready\n", name,
                            (int)core_vector_size(&concrete_self->targets));

            printf("%d sends ACTION_NOTIFY (%d targets) to %d actors\n",
                            name,
                            (int)core_vector_size(&concrete_self->targets),
                            (int)core_vector_size(&concrete_self->actors));

            thorium_actor_send_range_vector(self, &concrete_self->actors, ACTION_NOTIFY,
                            &concrete_self->targets);

            printf("Please wait, this can take a while...\n");

            core_timer_init(&concrete_self->timer);
            core_timer_start(&concrete_self->timer);
        }
    }
}


text:
Events types to receive pushes for:

When to receive pushes:

                <input type="checkbox" aria-label="{{title}}" ng-model="e.subscribed">

              <input type="text" class="form-control" aria-label="Message" ng-disabled="!e.subscribed" placeholder="{{title}}" ng-model="e.customMessage" />

        Check the box next to the event you would like to receive pushes for. Optionally customize the message in each of the text boxes.

              <input type="checkbox" ng-model="t.allDay" />{{ GetScheduleName(t) }}

            Receive push notifications every day at all times of day (uncheck for more granular control).

                {{DayName(d) | capitalize}}

          <form name="time" class="form-inline" role="form">

                   From:
                    <input type="text" class="form-control" size="8" ng-model="t.begin" name="begin" data-time-type="number" bs-timepicker>

                   To:
                    <input type="text" class="form-control" size="8" ng-model="t.end" name="end" data-time-type="number" bs-timepicker>

          </form>

    <button class="btn btn-default" ng-click="AddTimeframe()">Add Push Schedule</button>
    <button class="btn btn-info" ng-disabled="!online" ng-click="TestPush(model.device.id)">Send test push</button>

Device is disabled. You will not receive any pushes on this device.


text:
<?php
class Blog extends CI_Controller {

        public function index()
        {
		$data['todo_list'] = array('Clean House', 'Call Mom', 'Run Errands');

                $data['title'] = "My Real Title";
                $data['heading'] = "My Real Heading";

                $this->load->view('blogview', $data);
        }

	public function comments()
        {
                echo 'Look at this!';
        }

}


text:
require File.dirname(__FILE__) + '/document_import'

class LargeDocumentImport < DocumentImport
  # No difference in implementation.
end


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.06.23 at 11:23:18 ���� CST
//

package jef.tools.maven.jaxb;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;

/**
 *
 *          The <project> element is the root of the descriptor.
 *          The following table lists all of the possible child elements.
 *
 *
 *
Java class for Model complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="Model">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <all>
 *         <element name="parent" type="{http://maven.apache.org/POM/4.0.0}Parent" minOccurs="0"/>
 *         <element name="modelVersion" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="groupId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="artifactId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="packaging" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="url" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="prerequisites" type="{http://maven.apache.org/POM/4.0.0}Prerequisites" minOccurs="0"/>
 *         <element name="issueManagement" type="{http://maven.apache.org/POM/4.0.0}IssueManagement" minOccurs="0"/>
 *         <element name="ciManagement" type="{http://maven.apache.org/POM/4.0.0}CiManagement" minOccurs="0"/>
 *         <element name="inceptionYear" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="mailingLists" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="mailingList" type="{http://maven.apache.org/POM/4.0.0}MailingList" maxOccurs="unbounded" minOccurs="0"/>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="developers" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="developer" type="{http://maven.apache.org/POM/4.0.0}Developer" maxOccurs="unbounded" minOccurs="0"/>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="contributors" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="contributor" type="{http://maven.apache.org/POM/4.0.0}Contributor" maxOccurs="unbounded" minOccurs="0"/>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="licenses" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="license" type="{http://maven.apache.org/POM/4.0.0}License" maxOccurs="unbounded" minOccurs="0"/>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="scm" type="{http://maven.apache.org/POM/4.0.0}Scm" minOccurs="0"/>
 *         <element name="organization" type="{http://maven.apache.org/POM/4.0.0}Organization" minOccurs="0"/>
 *         <element name="build" type="{http://maven.apache.org/POM/4.0.0}Build" minOccurs="0"/>
 *         <element name="profiles" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="profile" type="{http://maven.apache.org/POM/4.0.0}Profile" maxOccurs="unbounded" minOccurs="0"/>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="modules" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="module" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="repositories" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="repository" type="{http://maven.apache.org/POM/4.0.0}Repository" maxOccurs="unbounded" minOccurs="0"/>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="pluginRepositories" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="pluginRepository" type="{http://maven.apache.org/POM/4.0.0}Repository" maxOccurs="unbounded" minOccurs="0"/>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="dependencies" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="dependency" type="{http://maven.apache.org/POM/4.0.0}Dependency" maxOccurs="unbounded" minOccurs="0"/>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="reports" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <any processContents='skip' maxOccurs="unbounded" minOccurs="0"/>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="reporting" type="{http://maven.apache.org/POM/4.0.0}Reporting" minOccurs="0"/>
 *         <element name="dependencyManagement" type="{http://maven.apache.org/POM/4.0.0}DependencyManagement" minOccurs="0"/>
 *         <element name="distributionManagement" type="{http://maven.apache.org/POM/4.0.0}DistributionManagement" minOccurs="0"/>
 *         <element name="properties" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <any processContents='skip' maxOccurs="unbounded" minOccurs="0"/>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *       </all>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Model", propOrder = {

})
public class Model {

    protected Parent parent;
    protected String modelVersion;
    protected String groupId;
    protected String artifactId;
    @XmlElement(defaultValue = "jar")
    protected String packaging;
    protected String name;
    protected String version;
    protected String description;
    protected String url;
    protected Prerequisites prerequisites;
    protected IssueManagement issueManagement;
    protected CiManagement ciManagement;
    protected String inceptionYear;
    protected Model.MailingLists mailingLists;
    protected Model.Developers developers;
    protected Model.Contributors contributors;
    protected Model.Licenses licenses;
    protected Scm scm;
    protected Organization organization;
    protected Build build;
    protected Model.Profiles profiles;
    protected Model.Modules modules;
    protected Model.Repositories repositories;
    protected Model.PluginRepositories pluginRepositories;
    protected Model.Dependencies dependencies;
    protected Model.Reports reports;
    protected Reporting reporting;
    protected DependencyManagement dependencyManagement;
    protected DistributionManagement distributionManagement;
    protected Model.Properties properties;

    /**
     * Gets the value of the parent property.
     *
     * @return
     *     possible object is
     *     {@link Parent }
     *
     */
    public Parent getParent() {
        return parent;
    }

    /**
     * Sets the value of the parent property.
     *
     * @param value
     *     allowed object is
     *     {@link Parent }
     *
     */
    public void setParent(Parent value) {
        this.parent = value;
    }

    /**
     * Gets the value of the modelVersion property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getModelVersion() {
        return modelVersion;
    }

    /**
     * Sets the value of the modelVersion property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setModelVersion(String value) {
        this.modelVersion = value;
    }

    /**
     * Gets the value of the groupId property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getGroupId() {
        return groupId;
    }

    /**
     * Sets the value of the groupId property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setGroupId(String value) {
        this.groupId = value;
    }

    /**
     * Gets the value of the artifactId property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getArtifactId() {
        return artifactId;
    }

    /**
     * Sets the value of the artifactId property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setArtifactId(String value) {
        this.artifactId = value;
    }

    /**
     * Gets the value of the packaging property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getPackaging() {
        return packaging;
    }

    /**
     * Sets the value of the packaging property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setPackaging(String value) {
        this.packaging = value;
    }

    /**
     * Gets the value of the name property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the value of the name property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setName(String value) {
        this.name = value;
    }

    /**
     * Gets the value of the version property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getVersion() {
        return version;
    }

    /**
     * Sets the value of the version property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setVersion(String value) {
        this.version = value;
    }

    /**
     * Gets the value of the description property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getDescription() {
        return description;
    }

    /**
     * Sets the value of the description property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setDescription(String value) {
        this.description = value;
    }

    /**
     * Gets the value of the url property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getUrl() {
        return url;
    }

    /**
     * Sets the value of the url property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setUrl(String value) {
        this.url = value;
    }

    /**
     * Gets the value of the prerequisites property.
     *
     * @return
     *     possible object is
     *     {@link Prerequisites }
     *
     */
    public Prerequisites getPrerequisites() {
        return prerequisites;
    }

    /**
     * Sets the value of the prerequisites property.
     *
     * @param value
     *     allowed object is
     *     {@link Prerequisites }
     *
     */
    public void setPrerequisites(Prerequisites value) {
        this.prerequisites = value;
    }

    /**
     * Gets the value of the issueManagement property.
     *
     * @return
     *     possible object is
     *     {@link IssueManagement }
     *
     */
    public IssueManagement getIssueManagement() {
        return issueManagement;
    }

    /**
     * Sets the value of the issueManagement property.
     *
     * @param value
     *     allowed object is
     *     {@link IssueManagement }
     *
     */
    public void setIssueManagement(IssueManagement value) {
        this.issueManagement = value;
    }

    /**
     * Gets the value of the ciManagement property.
     *
     * @return
     *     possible object is
     *     {@link CiManagement }
     *
     */
    public CiManagement getCiManagement() {
        return ciManagement;
    }

    /**
     * Sets the value of the ciManagement property.
     *
     * @param value
     *     allowed object is
     *     {@link CiManagement }
     *
     */
    public void setCiManagement(CiManagement value) {
        this.ciManagement = value;
    }

    /**
     * Gets the value of the inceptionYear property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getInceptionYear() {
        return inceptionYear;
    }

    /**
     * Sets the value of the inceptionYear property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setInceptionYear(String value) {
        this.inceptionYear = value;
    }

    /**
     * Gets the value of the mailingLists property.
     *
     * @return
     *     possible object is
     *     {@link Model.MailingLists }
     *
     */
    public Model.MailingLists getMailingLists() {
        return mailingLists;
    }

    /**
     * Sets the value of the mailingLists property.
     *
     * @param value
     *     allowed object is
     *     {@link Model.MailingLists }
     *
     */
    public void setMailingLists(Model.MailingLists value) {
        this.mailingLists = value;
    }

    /**
     * Gets the value of the developers property.
     *
     * @return
     *     possible object is
     *     {@link Model.Developers }
     *
     */
    public Model.Developers getDevelopers() {
        return developers;
    }

    /**
     * Sets the value of the developers property.
     *
     * @param value
     *     allowed object is
     *     {@link Model.Developers }
     *
     */
    public void setDevelopers(Model.Developers value) {
        this.developers = value;
    }

    /**
     * Gets the value of the contributors property.
     *
     * @return
     *     possible object is
     *     {@link Model.Contributors }
     *
     */
    public Model.Contributors getContributors() {
        return contributors;
    }

    /**
     * Sets the value of the contributors property.
     *
     * @param value
     *     allowed object is
     *     {@link Model.Contributors }
     *
     */
    public void setContributors(Model.Contributors value) {
        this.contributors = value;
    }

    /**
     * Gets the value of the licenses property.
     *
     * @return
     *     possible object is
     *     {@link Model.Licenses }
     *
     */
    public Model.Licenses getLicenses() {
        return licenses;
    }

    /**
     * Sets the value of the licenses property.
     *
     * @param value
     *     allowed object is
     *     {@link Model.Licenses }
     *
     */
    public void setLicenses(Model.Licenses value) {
        this.licenses = value;
    }

    /**
     * Gets the value of the scm property.
     *
     * @return
     *     possible object is
     *     {@link Scm }
     *
     */
    public Scm getScm() {
        return scm;
    }

    /**
     * Sets the value of the scm property.
     *
     * @param value
     *     allowed object is
     *     {@link Scm }
     *
     */
    public void setScm(Scm value) {
        this.scm = value;
    }

    /**
     * Gets the value of the organization property.
     *
     * @return
     *     possible object is
     *     {@link Organization }
     *
     */
    public Organization getOrganization() {
        return organization;
    }

    /**
     * Sets the value of the organization property.
     *
     * @param value
     *     allowed object is
     *     {@link Organization }
     *
     */
    public void setOrganization(Organization value) {
        this.organization = value;
    }

    /**
     * Gets the value of the build property.
     *
     * @return
     *     possible object is
     *     {@link Build }
     *
     */
    public Build getBuild() {
        return build;
    }

    /**
     * Sets the value of the build property.
     *
     * @param value
     *     allowed object is
     *     {@link Build }
     *
     */
    public void setBuild(Build value) {
        this.build = value;
    }

    /**
     * Gets the value of the profiles property.
     *
     * @return
     *     possible object is
     *     {@link Model.Profiles }
     *
     */
    public Model.Profiles getProfiles() {
        return profiles;
    }

    /**
     * Sets the value of the profiles property.
     *
     * @param value
     *     allowed object is
     *     {@link Model.Profiles }
     *
     */
    public void setProfiles(Model.Profiles value) {
        this.profiles = value;
    }

    /**
     * Gets the value of the modules property.
     *
     * @return
     *     possible object is
     *     {@link Model.Modules }
     *
     */
    public Model.Modules getModules() {
        return modules;
    }

    /**
     * Sets the value of the modules property.
     *
     * @param value
     *     allowed object is
     *     {@link Model.Modules }
     *
     */
    public void setModules(Model.Modules value) {
        this.modules = value;
    }

    /**
     * Gets the value of the repositories property.
     *
     * @return
     *     possible object is
     *     {@link Model.Repositories }
     *
     */
    public Model.Repositories getRepositories() {
        return repositories;
    }

    /**
     * Sets the value of the repositories property.
     *
     * @param value
     *     allowed object is
     *     {@link Model.Repositories }
     *
     */
    public void setRepositories(Model.Repositories value) {
        this.repositories = value;
    }

    /**
     * Gets the value of the pluginRepositories property.
     *
     * @return
     *     possible object is
     *     {@link Model.PluginRepositories }
     *
     */
    public Model.PluginRepositories getPluginRepositories() {
        return pluginRepositories;
    }

    /**
     * Sets the value of the pluginRepositories property.
     *
     * @param value
     *     allowed object is
     *     {@link Model.PluginRepositories }
     *
     */
    public void setPluginRepositories(Model.PluginRepositories value) {
        this.pluginRepositories = value;
    }

    /**
     * Gets the value of the dependencies property.
     *
     * @return
     *     possible object is
     *     {@link Model.Dependencies }
     *
     */
    public Model.Dependencies getDependencies() {
        return dependencies;
    }

    /**
     * Sets the value of the dependencies property.
     *
     * @param value
     *     allowed object is
     *     {@link Model.Dependencies }
     *
     */
    public void setDependencies(Model.Dependencies value) {
        this.dependencies = value;
    }

    /**
     * Gets the value of the reports property.
     *
     * @return
     *     possible object is
     *     {@link Model.Reports }
     *
     */
    public Model.Reports getReports() {
        return reports;
    }

    /**
     * Sets the value of the reports property.
     *
     * @param value
     *     allowed object is
     *     {@link Model.Reports }
     *
     */
    public void setReports(Model.Reports value) {
        this.reports = value;
    }

    /**
     * Gets the value of the reporting property.
     *
     * @return
     *     possible object is
     *     {@link Reporting }
     *
     */
    public Reporting getReporting() {
        return reporting;
    }

    /**
     * Sets the value of the reporting property.
     *
     * @param value
     *     allowed object is
     *     {@link Reporting }
     *
     */
    public void setReporting(Reporting value) {
        this.reporting = value;
    }

    /**
     * Gets the value of the dependencyManagement property.
     *
     * @return
     *     possible object is
     *     {@link DependencyManagement }
     *
     */
    public DependencyManagement getDependencyManagement() {
        return dependencyManagement;
    }

    /**
     * Sets the value of the dependencyManagement property.
     *
     * @param value
     *     allowed object is
     *     {@link DependencyManagement }
     *
     */
    public void setDependencyManagement(DependencyManagement value) {
        this.dependencyManagement = value;
    }

    /**
     * Gets the value of the distributionManagement property.
     *
     * @return
     *     possible object is
     *     {@link DistributionManagement }
     *
     */
    public DistributionManagement getDistributionManagement() {
        return distributionManagement;
    }

    /**
     * Sets the value of the distributionManagement property.
     *
     * @param value
     *     allowed object is
     *     {@link DistributionManagement }
     *
     */
    public void setDistributionManagement(DistributionManagement value) {
        this.distributionManagement = value;
    }

    /**
     * Gets the value of the properties property.
     *
     * @return
     *     possible object is
     *     {@link Model.Properties }
     *
     */
    public Model.Properties getProperties() {
        return properties;
    }

    /**
     * Sets the value of the properties property.
     *
     * @param value
     *     allowed object is
     *     {@link Model.Properties }
     *
     */
    public void setProperties(Model.Properties value) {
        this.properties = value;
    }

    /**
     *
Java class for anonymous complex type.
     *
     *
The following schema fragment specifies the expected content contained within this class.
     *
     *

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <element name="contributor" type="{http://maven.apache.org/POM/4.0.0}Contributor" maxOccurs="unbounded" minOccurs="0"/>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "contributor"
    })
    public static class Contributors {

        protected List<Contributor> contributor;

        /**
         * Gets the value of the contributor property.
         *
         *

         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a set method for the contributor property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getContributor().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link Contributor }
         *
         *
         */
        public List<Contributor> getContributor() {
            if (contributor == null) {
                contributor = new ArrayList<Contributor>();
            }
            return this.contributor;
        }

    }

    /**
     *
Java class for anonymous complex type.
     *
     *
The following schema fragment specifies the expected content contained within this class.
     *
     *

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <element name="dependency" type="{http://maven.apache.org/POM/4.0.0}Dependency" maxOccurs="unbounded" minOccurs="0"/>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "dependency"
    })
    public static class Dependencies {

        protected List<Dependency> dependency;

        /**
         * Gets the value of the dependency property.
         *
         *

         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a set method for the dependency property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getDependency().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link Dependency }
         *
         *
         */
        public List<Dependency> getDependency() {
            if (dependency == null) {
                dependency = new ArrayList<Dependency>();
            }
            return this.dependency;
        }

    }

    /**
     *
Java class for anonymous complex type.
     *
     *
The following schema fragment specifies the expected content contained within this class.
     *
     *

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <element name="developer" type="{http://maven.apache.org/POM/4.0.0}Developer" maxOccurs="unbounded" minOccurs="0"/>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "developer"
    })
    public static class Developers {

        protected List<Developer> developer;

        /**
         * Gets the value of the developer property.
         *
         *

         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a set method for the developer property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getDeveloper().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link Developer }
         *
         *
         */
        public List<Developer> getDeveloper() {
            if (developer == null) {
                developer = new ArrayList<Developer>();
            }
            return this.developer;
        }

    }

    /**
     *
Java class for anonymous complex type.
     *
     *
The following schema fragment specifies the expected content contained within this class.
     *
     *

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <element name="license" type="{http://maven.apache.org/POM/4.0.0}License" maxOccurs="unbounded" minOccurs="0"/>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "license"
    })
    public static class Licenses {

        protected List<License> license;

        /**
         * Gets the value of the license property.
         *
         *

         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a set method for the license property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getLicense().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link License }
         *
         *
         */
        public List<License> getLicense() {
            if (license == null) {
                license = new ArrayList<License>();
            }
            return this.license;
        }

    }

    /**
     *
Java class for anonymous complex type.
     *
     *
The following schema fragment specifies the expected content contained within this class.
     *
     *

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <element name="mailingList" type="{http://maven.apache.org/POM/4.0.0}MailingList" maxOccurs="unbounded" minOccurs="0"/>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "mailingList"
    })
    public static class MailingLists {

        protected List<MailingList> mailingList;

        /**
         * Gets the value of the mailingList property.
         *
         *

         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a set method for the mailingList property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getMailingList().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link MailingList }
         *
         *
         */
        public List<MailingList> getMailingList() {
            if (mailingList == null) {
                mailingList = new ArrayList<MailingList>();
            }
            return this.mailingList;
        }

    }

    /**
     *
Java class for anonymous complex type.
     *
     *
The following schema fragment specifies the expected content contained within this class.
     *
     *

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <element name="module" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "module"
    })
    public static class Modules {

        protected List<String> module;

        /**
         * Gets the value of the module property.
         *
         *

         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a set method for the module property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getModule().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link String }
         *
         *
         */
        public List<String> getModule() {
            if (module == null) {
                module = new ArrayList<String>();
            }
            return this.module;
        }

    }

    /**
     *
Java class for anonymous complex type.
     *
     *
The following schema fragment specifies the expected content contained within this class.
     *
     *

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <element name="pluginRepository" type="{http://maven.apache.org/POM/4.0.0}Repository" maxOccurs="unbounded" minOccurs="0"/>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "pluginRepository"
    })
    public static class PluginRepositories {

        protected List<Repository> pluginRepository;

        /**
         * Gets the value of the pluginRepository property.
         *
         *

         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a set method for the pluginRepository property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getPluginRepository().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link Repository }
         *
         *
         */
        public List<Repository> getPluginRepository() {
            if (pluginRepository == null) {
                pluginRepository = new ArrayList<Repository>();
            }
            return this.pluginRepository;
        }

    }

    /**
     *
Java class for anonymous complex type.
     *
     *
The following schema fragment specifies the expected content contained within this class.
     *
     *

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <element name="profile" type="{http://maven.apache.org/POM/4.0.0}Profile" maxOccurs="unbounded" minOccurs="0"/>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "profile"
    })
    public static class Profiles {

        protected List<Profile> profile;

        /**
         * Gets the value of the profile property.
         *
         *

         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a set method for the profile property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getProfile().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link Profile }
         *
         *
         */
        public List<Profile> getProfile() {
            if (profile == null) {
                profile = new ArrayList<Profile>();
            }
            return this.profile;
        }

    }

    /**
     *
Java class for anonymous complex type.
     *
     *
The following schema fragment specifies the expected content contained within this class.
     *
     *

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <any processContents='skip' maxOccurs="unbounded" minOccurs="0"/>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "any"
    })
    public static class Properties {

        @XmlAnyElement
        protected List<Element> any;

        /**
         * Gets the value of the any property.
         *
         *

         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a set method for the any property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getAny().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link Element }
         *
         *
         */
        public List<Element> getAny() {
            if (any == null) {
                any = new ArrayList<Element>();
            }
            return this.any;
        }

    }

    /**
     *
Java class for anonymous complex type.
     *
     *
The following schema fragment specifies the expected content contained within this class.
     *
     *

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <any processContents='skip' maxOccurs="unbounded" minOccurs="0"/>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "any"
    })
    public static class Reports {

        @XmlAnyElement
        protected List<Element> any;

        /**
         * Gets the value of the any property.
         *
         *

         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a set method for the any property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getAny().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link Element }
         *
         *
         */
        public List<Element> getAny() {
            if (any == null) {
                any = new ArrayList<Element>();
            }
            return this.any;
        }

    }

    /**
     *
Java class for anonymous complex type.
     *
     *
The following schema fragment specifies the expected content contained within this class.
     *
     *

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <element name="repository" type="{http://maven.apache.org/POM/4.0.0}Repository" maxOccurs="unbounded" minOccurs="0"/>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "repository"
    })
    public static class Repositories {

        protected List<Repository> repository;

        /**
         * Gets the value of the repository property.
         *
         *

         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a set method for the repository property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getRepository().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link Repository }
         *
         *
         */
        public List<Repository> getRepository() {
            if (repository == null) {
                repository = new ArrayList<Repository>();
            }
            return this.repository;
        }

    }

}


text:
package com.ibm.watson.assistant.v1.model;

import static org.testng.Assert.*;

import com.ibm.cloud.sdk.core.service.model.FileWithMetadata;
import com.ibm.watson.assistant.v1.utils.TestUtilities;
import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import org.testng.annotations.Test;

/** Unit test class for the LogPagination model. */
public class LogPaginationTest {
  final HashMap<String, InputStream> mockStreamMap = TestUtilities.createMockStreamMap();
  final List<FileWithMetadata> mockListFileWithMetadata =
      TestUtilities.creatMockListFileWithMetadata();

  @Test
  public void testLogPagination() throws Throwable {
    LogPagination logPaginationModel = new LogPagination();
    assertNull(logPaginationModel.getNextUrl());
    assertNull(logPaginationModel.getMatched());
    assertNull(logPaginationModel.getNextCursor());
  }
}


text:
const int RegSize = 12; // 12 bits = 4096
const int PageSize = 5; // 5 bits = 32
const int LineSize = 7; // 7 bits = 128

// Each PTE is handled by a ptr in page table
// One entry contains:
struct entry
{
	int pagenumber; // page number (5 bits by default)
	int offset; // page offset (7 bits by default)
	int word; // data (12 bits by default)
};

class pagetable
{
public:
	pagetable(int numberofpages, int capacityofpage); // constructor
	~pagetable(); // destructor
	int load(int address); // wrapper function interacting with "bits" module
	int store(int address, int value); // wrapper function interacting with "bits" module
	int probe(int address); // quick probe to see if an address exists
	int display(int address); // quick display of an entry
	int display_all(); // display all memory entries
	int clear(int address); // wrapper function for "clear" in private
private:
	int add(entry & to_add); // add new memory unit data into page table
	int clear(int pagenumber, int offset); // clear a certain memory unit
	int retrieve(int pagenumber, int offset, entry & retrieved); // retrieve memory unit from page table
	int breakdown(int address, int & result_pagenumber, int & result_offset);// break down addressing format
	int probe(int pagenumber, int offset); // Private probe function to see if an adress exists
	std::string intToOctal(int value); // conversion from int to octal
	int number_of_pages;
	int capacity_of_page;
	entry *** Table;
};