text:
> see https://aka.ms/autorest

This is the AutoRest configuration file for TrafficManager.

---
## Getting Started
To build the SDK for TrafficManager, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:

> `autorest`

To see additional help and options, run:

> `autorest --help`
---

## Configuration

### Basic Information
These are the global settings for the TrafficManager API.

``` yaml
openapi-type: arm
tag: package-2017-09-preview
```

### Tag: package-2017-09-preview

These settings apply only when `--tag=package-2017-09-preview` is specified on the command line.

``` yaml $(tag) == 'package-2017-09-preview'
input-file:
- Microsoft.Network/2017-05-01/trafficmanager.json
- Microsoft.Network/2017-09-01-preview/trafficmanageranalytics.json

# Needed when there is more than one input file
override-info:
  title: TrafficManagerManagementClient
```

### Tag: package-2017-05

These settings apply only when `--tag=package-2017-05` is specified on the command line.

``` yaml $(tag) == 'package-2017-05'
input-file:
- Microsoft.Network/2017-05-01/trafficmanager.json
```

### Tag: package-2017-03

These settings apply only when `--tag=package-2017-03` is specified on the command line.

``` yaml $(tag) == 'package-2017-03'
input-file:
- Microsoft.Network/2017-03-01/trafficmanager.json
```

### Tag: package-2015-11

These settings apply only when `--tag=package-2015-11` is specified on the command line.

``` yaml $(tag) == 'package-2015-11'
input-file:
- Microsoft.Network/2015-11-01/trafficmanager.json
```

---
# Code Generation

## C#

These settings apply only when `--csharp` is specified on the command line.
Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>`.

``` yaml $(csharp)
csharp:
  # last generated with commit 9e35e9c1e14dc46fcb1837ad108bba185ccaf9a9
  azure-arm: true
  license-header: MICROSOFT_MIT_NO_VERSION
  namespace: Microsoft.Azure.Management.TrafficManager
  payload-flattening-threshold: 2
  output-folder: $(csharp-sdks-folder)/TrafficManager/Management.TrafficManager/Generated
  clear-output-folder: true
```

## Go

These settings apply only when `--go` is specified on the command line.

``` yaml $(go)
go:
  license-header: MICROSOFT_APACHE_NO_VERSION
  namespace: trafficmanager
  clear-output-folder: true
```

### Tag: package-2017-09-preview and go

These settings apply only when `--tag=package-2017-09-preview --go` is specified on the command line.
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.

``` yaml $(tag) == 'package-2017-09-preview' && $(go)
output-folder: $(go-sdk-folder)/services/trafficmanager/mgmt/2017-09-01-preview/trafficmanager
```

### Tag: package-2017-05 and go

These settings apply only when `--tag=package-2017-05 --go` is specified on the command line.
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.

``` yaml $(tag) == 'package-2017-05' && $(go)
output-folder: $(go-sdk-folder)/services/trafficmanager/mgmt/2017-05-01/trafficmanager
```

### Tag: package-2017-03 and go

These settings apply only when `--tag=package-2017-03 --go` is specified on the command line.
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.

``` yaml $(tag) == 'package-2017-03' && $(go)
output-folder: $(go-sdk-folder)/services/trafficmanager/mgmt/2017-03-01/trafficmanager
```

### Tag: package-2015-11-01 and go

These settings apply only when `--tag=package-2015-11 --go` is specified on the command line.
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.

``` yaml $(tag) == 'package-2015-11' && $(go)
output-folder: $(go-sdk-folder)/services/trafficmanager/mgmt/2015-11-01/trafficmanager
```


text:
@charset "utf-8";
/*
 * lhgdialog discuz皮肤
 * (C) 2009-2011 【一丝冰凉】, http://t.qq.com/yisibl, QQ:50167214
 * This is licensed under the GNU LGPL, version 2.1 or later.
 * For details, see: http://creativecommons.org/licenses/LGPL/2.1/
 */
/*==================制作新皮肤从这里开始复制==================*/
/*基本重置*/
body{ _margin:0; }/*IE6 BUG*/
.ui_lock_scroll{ *overflow:hidden; }
.ui_lock_scroll body{ overflow:hidden; }

/*结构层*/
.ui_content,.ui_title,.ui_buttons input{ font:12px/1.333 tahoma,arial,\5b8b\4f53,sans-serif; }
table.ui_border,table.ui_dialog{ width:auto;border-spacing:0;*border-collapse:collapse; }
.ui_border td,.ui_dialog td{ padding:0; }
.ui_dialog{ background:#FFF; }

/*标题部分开始*/
.ui_title{ overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;cursor:move;background:#DDD;-moz-user-select:none;-webkit-user-select:none;padding:0 100px 0 0; }
.ui_title_buttons{ position:absolute;cursor:pointer;font-size:0;letter-spacing:-.5em; }

/*对齐自适应*/
.ui_main{ min-width:6em;min-width:0\9;text-align:center; }
.ui_content{ display:inline-block;*display:inline;zoom:1;text-align:left; }
.ui_content.ui_state_full{ display:block;width:100%;height:100%;margin:0;padding:0!important; }
.ui_content.ui_state_full iframe{ border-radius:0 0 5px 5px; }
.ui_loading{ width:96px;height:32px;text-align:left;text-indent:-9999em;overflow:hidden;background:url(icons/loading.gif) no-repeat center center; }
.ui_icon_bg{ margin:20px 0 20px 15px; }

/*标题纯CSS按钮开始 min 最小化,max最大化,res还原,rese恢复,close关闭*/
.ui_min,.ui_max,.ui_close,.ui_res{ position:relative;text-decoration:none;letter-spacing:normal;text-align:center;display:inline-block;*display:inline;zoom:1;vertical-align:top;font-family:tahoma,arial,\5b8b\4f53,sans-serif; }
.ui_min b,.ui_max b,.ui_res_t,.ui_res_b{ display:block;position:absolute;overflow:hidden;cursor:pointer; }
.ui_close{ font-weight:500;text-decoration:none;outline:0 none; }
.ui_close:hover{ text-decoration:none; }

/*Tips部分*/
.ui_state_tips .ui_main{ min-width:3em; }
.ui_state_tips .ui_content{ margin-top:-2px;padding:8px 10px!important; }
.ui_state_tips .ui_icon_bg{ margin:5px 0 6px 9px; }
.ui_state_tips .ui_title,.ui_state_tips .ui_title_buttons,.ui_res{ display:none; } /* 还原按钮也在这里隐藏,这样可节省代码,注间这段一定要写在上面那段代码的下面*/

#ldg_lockmask{ background:#DCE2F1;filter:alpha(opacity=60);opacity:.6; }
/*==================制作新皮肤到这里结束复制==================*/

/*样式层开始*/
.ui_inner{ border:1px solid #888; }
.ui_border{ border-radius:4px; }
.ui_lt,.ui_rt,.ui_lb,.ui_rb{ width:7px;height:7px;display:block; }/*防止改变浏览器大小挤压窗口边框*/
.ui_lt{ border-radius:4px 0 0 0; }.ui_rt{ border-radius:0 4px 0 0; }.ui_rb{ border-radius:0 0 4px 0; }.ui_lb{ border-radius:0 0 0 4px; }
.ui_lt,.ui_rt,.ui_l,.ui_r,.ui_lb,.ui_b,.ui_t,.ui_rb{ background:rgba(0,0,0,.2);background:#000\9;filter:alpha(opacity=20); }

/*标题栏样式*/
.ui_title_bar{ position:relative;height:100%; }
.ui_title{ height:30px;line-height:30px;font-size:14px;font-weight:bold;color:#888;border-bottom:1px solid #DDD\9;background:none;padding-left:7px; }
.ui_title:after{ content:"";display:block;height:8px;width:100%;position:absolute;top:26px;left:0;
background:-moz-radial-gradient(center,ellipse cover,#c8c8c8 10%,#FFFFFF 75%); /* FF3.6+ */
background:-webkit-radial-gradient(center,ellipse cover,#c8c8c8 10%,#FFFFFF 75%); /* Chrome10+,Safari5.1+ */
background:-o-radial-gradient(center,ellipse cover,#c8c8c8 10%,#FFFFFF 75%); /* Opera 12+ */
background:-ms-radial-gradient(center,ellipse cover,#c8c8c8 10%,#FFFFFF 75%); /* IE10+ */
background:radial-gradient(center,ellipse cover,#c8c8c8 10%,#FFFFFF 75%);/* W3C */display:none\9; }
.ui_title:before{ content:"";display:block;height:5px;width:100%;position:absolute;top:26px;left:0;background:#FFF;z-index:1;display:none\9; }
.ui_state_focus .ui_title { color:#336699; }
.ui_state_drag .ui_title { border-top-color:#4E84C0; }

/*标题纯CSS按钮定位部分*/
.ui_title_buttons{ top:5px;right:5px; }
.ui_min,.ui_max,.ui_close,.ui_res{ margin-left:2px;color:#888;font-size:20px;width:20px;height:20px;line-height:18px;border-radius:2px; }
.ui_min_b{ top:10px;left:4px;width:12px;height:2px;border-bottom:2px solid #888; }
.ui_max_b{ top:5px;left:4px;width:10px;height:7px; }
.ui_res_t,.ui_res_b{ top:8px;left:2px;width:10px;height:5px; }
.ui_res_b{ top:4px;left:6px; }
.ui_res_t,.ui_res_b,.ui_max_b{ border:1px solid #888;border-top-width:3px; }
.ui_res_t{ background:#FFF; }/*还原按钮底部框背景与标题背景融合*/
.ui_close{ vertical-align:baseline;_line-height:22px;margin-left:0; }
.ui_close:hover,.ui_close:focus { color:#FFF;outline:0 none;background:#c72327; }
.ui_min:hover b,.ui_max:hover b,.ui_res:hover b{ border-color:#FFF; }
.ui_res:hover b{ background:#039ed0;}
.ui_min:hover,.ui_max:hover,.ui_res:hover{ background:#039ed0; }
/*标题按钮结束*/

/*底部按钮样式*/
.ui_buttons{ white-space:nowrap;padding:4px 8px;text-align:right;background-color:#F6F6F6;border-top:solid 1px #DADEE5; }
.ui_buttons input::-moz-focus-inner{ border:0;padding:0;margin:0; }

.ui_buttons input{ padding:3px 10px 3px 12px;padding:5px 10px 2px 12px\0;*padding:4px 10px 2px 10px;margin-left:6px;cursor:pointer;display:inline-block;
text-align:center;line-height:1;height:23px;letter-spacing:3px;overflow:visible;color:#333;border:solid 1px #999;border-radius:3px;border-radius:0\9;background:#DDD;
background:linear-gradient(top,#FAFAFA,#E4E4E4);
background:-moz-linear-gradient(top,#FAFAFA,#E4E4E4);
background:-webkit-gradient(linear,0% 0%,0% 100%,from(#FAFAFA),to(#E4E4E4));
background:-o-linear-gradient(top,#FAFAFA,#E4E4E4);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FAFAFA',endColorstr='#E4E4E4');
text-shadow:0 1px 1px rgba(255,255,255,1);box-shadow:0 1px 0 rgba(255,255,255,.7),0 -1px 0 rgba(0,0,0,.09);
-moz-transition:-moz-box-shadow linear .2s;-webkit-transition:-webkit-box-shadow linear .2s;transition:box-shadow linear .2s; }
.ui_buttons input:focus{ outline:0 none;box-shadow:0 0 3px #0e78c9; }
.ui_buttons input:hover{ color:#000;border-color:#666;box-shadow:none; }
.ui_buttons input:active{ border-color:#666;
background:linear-gradient(top,#FAFAFA,#E4E4E4);
background:-moz-linear-gradient(top,#FAFAFA,#E4E4E4);
background:-webkit-gradient(linear,0% 0%,0% 100%,from(#FAFAFA),to(#E4E4E4));
background:-o-linear-gradient(top,#FAFAFA,#E4E4E4);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FAFAFA',endColorstr='#E4E4E4'); }
.ui_buttons input[disabled]{ cursor:default;color:#666;background:#DDD;border:solid 1px #999;filter:alpha(opacity=50);opacity:.5;box-shadow:none; }

input.ui_state_highlight{ color:#FFF;border:solid 1px #1c6a9e;text-shadow:0 -1px 1px #1c6a9e;background:#2288cc;
background:linear-gradient(top,#33bbee,#2288cc);
background:-moz-linear-gradient(top,#33bbee,#2288cc);
background:-webkit-gradient(linear,0% 0%,0% 100%,from(#33bbee),to(#2288cc));
background:-o-linear-gradient(top,#33bbee,#2288cc);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee',endColorstr='#2288cc'); }
input.ui_state_highlight:hover{ color:#FFF;border-color:#555; }
input.ui_state_highlight:active{ border-color:#1c6a9e;
background:linear-gradient(top,#33bbee,#2288cc);
background:-moz-linear-gradient(top,#33bbee,#2288cc);
background:-webkit-gradient(linear,0% 0%,0% 100%,from(#33bbee),to(#2288cc));
background:-o-linear-gradient(top,#33bbee,#2288cc);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bbee',endColorstr='#2288cc'); }

/*Tips 部分开始*/
.ui_state_tips,.ui_state_tips .ui_inner,.ui_state_tips .ui_title_bar{ border:0 none;box-shadow:none; }
.ui_state_tips .ui_lt,.ui_state_tips .ui_rt,.ui_state_tips .ui_lb,.ui_state_tips .ui_rb{ width:5px;height:5px; }

redpajama_set_name: RedPajamaGithub


text:
package jo.vecmath;

import jo.vecmath.Point2d;
import jo.vecmath.Tuple2d;
import jo.vecmath.Tuple2f;

/**
 * A 2 element point that is represented by single precision floating
 * point x,y coordinates.
 *
 */
 public class Point2f extends Tuple2f implements java.io.Serializable {

    // Compatible with 1.1
    static final long serialVersionUID = -4801347926528714435L;

    /**
     * Constructs and initializes a Point2f from the specified xy coordinates.
     * @param x the x coordinate
     * @param y the y coordinate
     */
     public Point2f(float x, float y)
    {
         super(x,y);
    }

    /**
     * Constructs and initializes a Point2f from the specified array.
     * @param p the array of length 2 containing xy in order
     */
     public Point2f(float[] p)
    {
         super(p);
    }

    /**
     * Constructs and initializes a Point2f from the specified Point2f.
     * @param p1 the Point2f containing the initialization x y data
     */
     public Point2f(Point2f p1)
    {
        super(p1);
    }

    /**
     * Constructs and initializes a Point2f from the specified Point2d.
     * @param p1 the Point2d containing the initialization x y z data
     */
     public Point2f(Point2d p1)
    {
       super(p1);
    }

    /**
     * Constructs and initializes a Point2f from the specified Tuple2d.
     * @param t1 the Tuple2d containing the initialization x y z data
     */
     public Point2f(Tuple2d t1)
    {
       super(t1);
    }

    /**
     * Constructs and initializes a Point2f from the specified Tuple2f.
     * @param t1 the Tuple2f containing the initialization x y data
     */
     public Point2f(Tuple2f t1)
    {
       super(t1);
    }

    /**
     * Constructs and initializes a Point2f to (0,0).
     */
     public Point2f()
    {
       super();
    }

  /**
   * Computes the square of the distance between this point and point p1.
   * @param p1 the other point
   */
   public final float distanceSquared(Point2f p1)
    {
      float dx, dy;

      dx = this.x-p1.x;
      dy = this.y-p1.y;
      return dx*dx+dy*dy;
    }

  /**
   * Computes the distance between this point and point p1.
   * @param p1 the other point
   */
   public final float distance(Point2f p1)
    {
      float  dx, dy;

      dx = this.x-p1.x;
      dy = this.y-p1.y;
      return (float) Math.sqrt(dx*dx+dy*dy);
    }

  /**
    * Computes the L-1 (Manhattan) distance between this point and
    * point p1.  The L-1 distance is equal to abs(x1-x2) + abs(y1-y2).
    * @param p1 the other point
    */
   public final float distanceL1(Point2f p1)
    {
      return( Math.abs(this.x-p1.x) + Math.abs(this.y-p1.y));
    }

  /**
    * Computes the L-infinite distance between this point and
    * point p1.  The L-infinite distance is equal to
    * MAX[abs(x1-x2), abs(y1-y2)].
    * @param p1 the other point
    */
   public final float distanceLinf(Point2f p1)
    {
      return(Math.max( Math.abs(this.x-p1.x), Math.abs(this.y-p1.y)));
    }

}


text:
<?php

defined('_LINDEX') or die('STOP in file ' . __FILE__);

class dom_xmlrpc_datetime_iso8601{
	var $year;
	var $month;
	var $day;
	var $hour;
	var $minute;
	var $second;

	function dom_xmlrpc_datetime_iso8601($datetime){
		if(is_int($datetime)){
			$this->fromDateTime_php($datetime);
		} else{
			$this->fromDateTime_iso($datetime);
		}
	}

	function phpToISO($phpDate){
		return (date('Y', $phpDate) . date('m', $phpDate) . date('d', $phpDate) . 'T' . date('H', $phpDate) .
			':' . date('i', $phpDate) . ':' . date('s', $phpDate));
	}

	function fromDateTime_php($phpdatetime){

		$this->year = date('Y', $phpdatetime);
		$this->month = date('m', $phpdatetime);
		$this->day = date('d', $phpdatetime);
		$this->hour = date('H', $phpdatetime);
		$this->minute = date('i', $phpdatetime);
		$this->second = date('s', $phpdatetime);
	}

	function fromDateTime_iso($isoFormattedString){

		$this->year = substr($isoFormattedString, 0, 4);
		$this->month = substr($isoFormattedString, 4, 2);
		$this->day = substr($isoFormattedString, 6, 2);
		$this->hour = substr($isoFormattedString, 9, 2);
		$this->minute = substr($isoFormattedString, 12, 2);
		$this->second = substr($isoFormattedString, 15, 2);
	}

	function getDateTime_iso(){

		return ($this->year . $this->month . $this->day . 'T' . $this->hour . ':' . $this->minute .
			':' . $this->second);
	}

	function getDateTime_php(){

		return mktime($this->hour, $this->minute, $this->second, $this->month, $this->day, $this->year);
	}

}

?>


text:
package mod.mindcraft.advancedmaterials.tileentity;

import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.IChatComponent;
import mod.mindcraft.advancedmaterials.integration.TileEntityMachine;
import mod.mindcraft.advancedmaterials.integration.recipes.CrystallizerRecipe;
import mod.mindcraft.advancedmaterials.integration.registry.CrystallizerRegistry;

public class TileEntityCrystallizer extends TileEntityMachine<CrystallizerRecipe, CrystallizerRegistry> {

	public TileEntityCrystallizer() {
		super(2);
	}

	@Override
	public int[] getInputSlots() {
		return new int[]{0};
	}

	@Override
	public int[] getOutputSlots() {
		return new int[]{1};
	}

	@Override
	public int getMaxProgress() {
		return 1200;
	}

	@Override
	public CrystallizerRegistry getRegistry() {
		return new CrystallizerRegistry();
	}

	@Override
	public int[] getSlotsForFace(EnumFacing side) {
		return new int[]{0, 1};
	}

	@Override
	public String getName() {
		return "Crystallizer";
	}

	@Override
	public boolean hasCustomName() {
		return false;
	}

	@Override
	public IChatComponent getDisplayName() {
		return new ChatComponentText(getName());
	}

}


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

namespace Bank
{
    interface IWithdraw
    {
        decimal WithdrawMoney(decimal amount);
    }
}


text:
#include <getopt.h>
#include <fcntl.h>
#include <paths.h>
#include <unistd.h>
#include <sys/stat.h>

#include <cassert>
#include <cerrno>
#include <csignal>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <string>

#include "daemon.hpp"
#include "daemon_mid.hpp"
#include "frontend_connector.hpp"
#include "logger.hpp"
#include "router.hpp"
#include "server_connector.hpp"
#include "util.hpp"
#include "worker_connector.hpp"

namespace processwarp {
/**
 * Constructor, set default parameters value.
 */
Daemon::Daemon() {
  run_mode = DaemonRunMode::CONSOLE;
}

/**
 * Actual entry process, passed by main.
 * Scan command line options and change run mode by option,
 * and pass the process to main loop.
 * @param argc Count of command line option.
 * @param argv Strings of command line options.
 * @return Exit status.
 */
int Daemon::entry(int argc, char* argv[]) {
  if (!read_options(argc, argv)) {
    show_help(true, argv[0]);
    return EXIT_FAILURE;
  }

  switch (run_mode) {
    case DaemonRunMode::CONSOLE: {
      if (!initialize_logger() ||
          !initialize_message()) {
        return EXIT_FAILURE;
      }
    } break;

    case DaemonRunMode::DAEMON: {
      if (!initialize_logger() ||
          !initialize_message()) {
        return EXIT_FAILURE;
      }
      if (daemonize() != 0) {
        return EXIT_FAILURE;
      }
    } break;

    case DaemonRunMode:: SUBPROCESS: {
      if (!subprocess_config() ||
          !initialize_logger() ||
          !initialize_message()) {
        return EXIT_FAILURE;
      }
    } break;

    case DaemonRunMode::HELP: {
      show_help(false, argv[0]);
      return EXIT_SUCCESS;
    } break;

    default: {
      assert(false);
    } break;
  }

  main_loop();

  return EXIT_SUCCESS;
}

/**
 * Daemonize the process.
 * Reference: http://draft.scyphus.co.jp/series/daemon.ja/01_daemonize.html

 * This function get process to daemon.
 * Existing process will be fork and parent process will be exit.
 * And daemon (child) process will be continue.
 * @return 0 if daemonize was success.
 */
int Daemon::daemonize() {
  /* Saved sigaction  */
  struct sigaction saved_sa;
  /* Sigaction for signal configuration */
  struct sigaction sa;
  /* File descriptor of /dev/null */
  int fd;
  /* Group ID */
  pid_t newgrp;
  /* Saved errno */
  int saved_errno;
  /* Value returned by sigaction */
  int saved_sa_flag;

  /* A SIGHUP may be thrown when the parent exits below according to the
     FreeBSD's daemon(3) implementation. */
  sigemptyset(&sa.sa_mask);
  sa.sa_handler = SIG_IGN;
  sa.sa_flags = 0;
  saved_sa_flag = sigaction(SIGHUP, &sa, &saved_sa);

  /* Fork and check the return value */
  switch (fork()) {
    case -1:
      /* Error */
      return -1;

    case 0:
      /* Continue if child */
      break;

    default:
      /* Exit if parent */
      exit(0);
  }

  /* Create new session and become the process leader.  N.B., To create new
     session, the process MUST NOT be a process leader. */
  newgrp = setsid();
  /* Save errno */
  saved_errno = errno;

  /* Check the returned value of setsid(); newgrp should same as getpid() */
  if (-1 == newgrp) {
    /* Setsid() failed. */
    errno = saved_errno;
    return -1;
  }

  /* Fork again to make sure that the process must not have tty, and then
     check the return value. */
  switch (fork()) {
    case -1:
      /* Error. */
      return -1;

    case 0:
      /* Continue if child. */
      break;

    default:
      /* Exit if parent. */
      exit(0);
  }

  /* Recover signal handlers. */
  if (-1 != saved_sa_flag) {
    /* Succeeded in sigaction, then recover the SIGHUP handling. */
    sigaction(SIGHUP, &saved_sa, NULL);
  }

  if (-1 != (fd = open(_PATH_DEVNULL, O_RDWR, 0))) {
    /* Close stdin, stdout and stderr if desired. */
    dup2(fd, STDIN_FILENO);
    dup2(fd, STDOUT_FILENO);
    dup2(fd, STDERR_FILENO);
    if (fd > 2) {
      /* If the /dev/null is not a special descriptor, then close it. */
      close(fd);
    }
  }
  return 0;
}

/**
 * Initialize logger.
 * @return True if initialize was succeed.
 */
bool Daemon::initialize_logger() {
  logger.initialize("native");
  Logger::set_logger_delegate(&logger);
  return true;
}

/**
 * Initialize message.
 * Load message file selected by configure.
 * @return True if initialize was succeed.
 */
bool Daemon::initialize_message() {
  // Load messages.
  return Message::load(config.at("message").get<std::string>());
}

/**
 * Main loop of daemon process.
 * Initialize libuv, Router, ServerConnector, FrontendConnector, WorkerConector
 * and start libuv's event loop.
 * @return Return code of uv_run.
 */
int Daemon::main_loop() {
  loop = uv_default_loop();
  FrontendConnector& frontend = FrontendConnector::get_instance();
  Router& router = Router::get_instance();
  ServerConnector& server = ServerConnector::get_instance();
  WorkerConnector& worker = WorkerConnector::get_instance();
  std::string run_mode_string;
  switch (run_mode) {
    case DaemonRunMode::DAEMON: run_mode_string = "daemon"; break;
    case DaemonRunMode::CONSOLE: run_mode_string = "console"; break;
    case DaemonRunMode::SUBPROCESS: run_mode_string = "subprocess"; break;
    default: assert(false); break;
  }
  Logger::info(DaemonMid::L3009, run_mode_string.c_str());

  server.initialize(loop, config.at("server").get<std::string>());
  router.initialize(loop, config);
  frontend.initialize(loop, config.at("frontend_pipe").get<std::string>());
  worker.initialize(loop,
                    config.at("worker_pipe").get<std::string>(),
                    config.at("libs").get<picojson::array>(),
                    config.at("lib_filter").get<picojson::array>());

  server.send_connect_node(config.at("account").get<std::string>(),
                           config.at("password").get<std::string>());

  // Start libuv loop.
  return uv_run(loop, UV_RUN_DEFAULT);
}

/**
 * Show help messages to console.
 * You can choice output device stdout or stderr.
 * @param is_error Output help message to stderr if set it true.
 * @param command Command string.
 */
void Daemon::show_help(bool is_error, const std::string& command) {
  std::ostream& out = (is_error ? std::cerr : std::cout);
  out << "usage: " << command << " [options]" << std::endl;
  out << "  -c --console      Run process warp node as console application (default)." << std::endl;
  out << "  -d --daemon       Run process warp node as daemon." << std::endl;
  out << "  -s --subprocess   Run process warp node as a sub-process of the frontend." << std::endl;
  out << "  -f <config>       Uses the configure in the file config on run." << std::endl;
  out << "  -h --help         Show available options." << std::endl;
}

/**
 * Read config from selected file as JSON.
 * @param file Config file name.
 * @return False if couldn't read the file or wrong format.
 */
bool Daemon::read_config(const std::string& file) {
  std::ifstream conf_file(file);
  if (!conf_file.is_open()) {
    std::cerr << "Can't open configure file." << std::endl;
    return false;
  }

  picojson::value v;
  std::string err = picojson::parse(v, conf_file);
  conf_file.close();
  if (!err.empty()) {
    std::cerr << err << std::endl;
    return false;
  }

  config = v.get<picojson::object>();
  return true;
}

/**
 * Read command line arguments and set option values.
 * c(console) option was set, change run mode to DaemonRunMode::CONSOLE.

 * d(daemon) option was set, change run mode to DaemonRunMode::DAEMON.

 * f option was set, read config file from file selected by argument.

 * h(help) option was set, change run mode to DaemonRunMode::HELP.

 * @param argc Argc passed by entry function.
 * @param argv Argv passed by entry function.
 * @return False if options was wrong.
 */
bool Daemon::read_options(int argc, char* argv[]) {
  int opt, option_index;
  option long_options[] = {
    {"console",     no_argument, nullptr, 'c'},
    {"daemon",      no_argument, nullptr, 'd'},
    {"help",        no_argument, nullptr, 'h'},
    {"subprocess",  no_argument, nullptr, 's'},
    {0, 0, 0, 0}
  };

  while ((opt = getopt_long(argc, argv, "cdf:hs", long_options, &option_index)) != -1) {
    switch (opt) {
      case 'c': {
        run_mode = DaemonRunMode::CONSOLE;
      } break;

      case 'd': {
        run_mode = DaemonRunMode::DAEMON;
      } break;

      case 'f': {
        if (!read_config(std::string(optarg))) return false;
      } break;

      case 'h': {
        run_mode = DaemonRunMode::HELP;
      } break;

      case 's': {
        run_mode = DaemonRunMode::SUBPROCESS;
      } break;

      case ':':
      case '?': {
        return false;
      } break;
    }
  }
  return true;
}

/**
 * Read JSON formated configuration from stdin for subprocess mode.
 * @return True if reading configuration has success.
 */
bool Daemon::subprocess_config() {
  picojson::value v;
  std::string err = picojson::parse(v, std::cin);
  if (!err.empty()) {
    std::cerr << err << std::endl;
    return false;
  }

  config = v.get<picojson::object>();

  // Override password to hashed one.
  std::string hash_password = config.at("password").get<std::string>();
  for (int i = 0; i < 10; i ++) {
    hash_password = Util::calc_sha256(hash_password);
  }
  config.at("password") = picojson::value("[10sha256]" + hash_password);

  return true;
}
}  // namespace processwarp

/**
 * Entry point, call actual entry process.
 * @param argc Count of command line option.
 * @param argv Strings of command line options.
 * @return Exit status.
 */
int main(int argc, char* argv[]) {
  processwarp::Daemon THIS;

  return THIS.entry(argc, argv);
}


text:
module Competition
  class Engine < ::Rails::Engine
    # TODO isolate_namespace Competition
  end
end


text:
namespace krdlab {
	namespace law {
		namespace exception {

			/// <summary>
			/// CLAPACK 'É"n'·ˆø"'ª•s³'Å' 'Á'½'±'Æ'ðŽ¦'·—áŠOD
			/// </summary>
            public ref class LapackArgumentException : public System::ArgumentException
			{
			private:
				const int info;

			public:
				LapackArgumentException(const int code)
					: info(code)
				{}
				LapackArgumentException(const int code, System::String^ message)
					: System::ArgumentException(message), info(code)
				{}
				LapackArgumentException(const int code, System::String^ message, System::Exception^ cause)
					: System::ArgumentException(message, cause), info(code)
				{}

				/// <summary>
				/// ƒGƒ‰[ó'Ô'ð•Ô'·DŠî–{"I'É'Í CLAPACK ŠÖ"'Ì–ß'è'l'ð•Ô'·D
				/// </summary>
				property const int Info
				{
					const int get()
					{
						return this->info;
					}
				}
			};

			/// <summary>
			/// Œ‹‰Ê'ð‹'ß'é‰ß'ö'ŃGƒ‰['ª"¶'µ'½'±'Æ'ðŽ¦'·—áŠOD
			/// </summary>
			public ref class LapackResultException : public System::Exception
			{
			private:
				const int info;

			public:
				LapackResultException(const int code)
					: info(code)
				{}
				LapackResultException(const int code, System::String^ message)
					: System::Exception(message), info(code)
				{}
				LapackResultException(const int code, System::String^ message, System::Exception^ cause)
					: System::Exception(message, cause), info(code)
				{}

				/// <summary>
				/// ƒGƒ‰[ó'Ô'ð•Ô'·DŠî–{"I'É'Í CLAPACK ŠÖ"'Ì–ß'è'l'ð•Ô'·D
				/// </summary>
				property const int Info
				{
					const int get()
					{
						return this->info;
					}
				}
			};

		}// end namespace exception
	}// end namespace claw
}// end namespace krdlab


text:
@interface HLMemoAddViewController () <UITextFieldDelegate, UITextViewDelegate>
@property (weak, nonatomic) IBOutlet UIBarButtonItem *cancelBtn;
@property (strong, nonatomic) HLMemo *memo;
@property (weak, nonatomic) IBOutlet UITextField *titleAdd; // 标题
@property (weak, nonatomic) IBOutlet UITextView *textAdd; // 正文
@property (weak, nonatomic) IBOutlet UIBarButtonItem *save;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *deleBtn;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *textViewBottomcons;
@property (assign, nonatomic) CGFloat margin; // 记录textAdd到底部的距离
@property (assign, nonatomic, getter = isChanging) BOOL changing; // textAdd的高度是否被提
- (IBAction)cancel:(UIBarButtonItem *)sender;
- (IBAction)delete:(UIBarButtonItem *)sender;
- (IBAction)save:(UIBarButtonItem *)sender;
@end

@implementation HLMemoAddViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShow:) name:UIKeyboardDidShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidHide:) name:UIKeyboardDidHideNotification object:nil];
    self.cancelBtn.imageInsets = UIEdgeInsetsMake(10, -5, 7, 10);
    [self.titleAdd becomeFirstResponder];
    self.titleAdd.delegate = self;
    self.textAdd.delegate = self;
    self.textAdd.layer.cornerRadius = 5;
    self.deleBtn.title = nil;
    self.deleBtn.enabled = NO;
    self.margin = self.textViewBottomcons.constant;
    if (self.memo) {
        self.titleAdd.text = self.memo.title;
        self.textAdd.text = self.memo.text;
        self.deleBtn.title = @"删除";
        self.save.title = @"编辑";
        self.deleBtn.enabled = YES;
        self.titleAdd.enabled = NO;
        self.textAdd.editable = NO;
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}

- (void)keyboardDidShow:(NSNotification *)notification {
    NSDictionary *dict = notification.userInfo;
    CGFloat duration = [dict[UIKeyboardAnimationDurationUserInfoKey] doubleValue];
    [UIView animateWithDuration:duration animations:^{
        CGRect frame = [dict[UIKeyboardFrameEndUserInfoKey] CGRectValue];
        CGFloat keyboardHeight = frame.size.height;

        if (self.textAdd.isFirstResponder && !self.isChanging) {
            self.textViewBottomcons.constant = keyboardHeight - HLTextAddInsetBottom;
            self.textAdd.scrollsToTop = NO;
            self.textAdd.contentInset = UIEdgeInsetsMake(0, 0, HLTextAddInsetBottom, 0);
            self.changing = YES;
        } else if (self.titleAdd.isFirstResponder && self.isChanging) {
            self.textViewBottomcons.constant = self.margin;
            self.textAdd.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
            self.changing = NO;
        }
    }];
}

- (void)keyboardDidHide:(NSNotification *)notification {
    if (!self.isChanging) return;
    NSDictionary *dict = notification.userInfo;
    CGFloat duration = [dict[UIKeyboardAnimationDurationUserInfoKey] doubleValue];

    [UIView animateWithDuration:duration animations:^{
        self.textViewBottomcons.constant = self.margin;
        self.textAdd.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
        self.changing = NO;
    }];
}

- (IBAction)cancel:(UIBarButtonItem *)sender {
    [self.textAdd resignFirstResponder];
    [self.titleAdd resignFirstResponder];
    [self.navigationController popToRootViewControllerAnimated:YES];
}

- (IBAction)delete:(UIBarButtonItem *)sender {
    [self.textAdd resignFirstResponder];
    [self.titleAdd resignFirstResponder];
    UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:@"确定要删除吗?" preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction *actionCancel = [UIAlertAction actionWithTitle:@"再想想" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
        [self.titleAdd becomeFirstResponder];
    }];
    UIAlertAction *actionDelete = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        [HLTool deleteWithObject:self.memo];
        [self.navigationController popViewControllerAnimated:YES];
    }];
    [alert addAction:actionCancel];
    [alert addAction:actionDelete];
    [self presentViewController:alert animated:YES completion:nil];
}

- (void)saveData {
    [self.textAdd resignFirstResponder];
    [self.titleAdd resignFirstResponder];
    NSString *titleAdd = self.titleAdd.text;
    NSString *textAdd = self.textAdd.text;
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF BEGINSWITH ' ' || SELF ENDSWITH ' '"];
    if (titleAdd && titleAdd.length > 0 && ![predicate evaluateWithObject:titleAdd]) {
        if (self.memo) {
            if (![self.memo.title isEqualToString:titleAdd] || ![self.memo.text isEqualToString:textAdd]) {
                self.memo.title = titleAdd;
                self.memo.text = textAdd;
                [HLTool modifyWithObject:self.memo];
            }
        } else {
            HLMemo *memo = [[HLMemo alloc] init];
            memo.title = self.titleAdd.text;
            memo.text = self.textAdd.text;
            [HLTool creatWithObject:memo];
        }
        [self.navigationController popViewControllerAnimated:YES];
    } else {
        UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"标题输入不正确!" preferredStyle:UIAlertControllerStyleAlert];
        UIAlertAction *actionAbandon = [UIAlertAction actionWithTitle:@"放弃" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
            [self.navigationController popViewControllerAnimated:YES];
        }];
        UIAlertAction *actionContinue = [UIAlertAction actionWithTitle:@"继续" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
            [self.titleAdd becomeFirstResponder];
        }];
        [alert addAction:actionAbandon];
        [alert addAction:actionContinue];
        [self presentViewController:alert animated:YES completion:nil];
    }
}

- (IBAction)save:(UIBarButtonItem *)sender {
    if ([self.save.title isEqualToString:@"保存"]) {
        if ([self verifyLogin]) {
            [self saveData];
        }
    } else if ([self.save.title isEqualToString:@"编辑"]) {
        self.save.title = @"保存";
        self.titleAdd.enabled = YES;
        self.textAdd.editable = YES;
        [self.textAdd becomeFirstResponder];
    }
}

- (BOOL)verifyLogin {
    if ([HLAccount sharedAccount].isLogin) {
        return YES;
    } else {
        UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:@"请先登录账号!" preferredStyle:UIAlertControllerStyleAlert];
        UIAlertAction *actionYES = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
            [self performSegueWithIdentifier:@"noteSegue" sender:nil];
        }];
        UIAlertAction *actionNO = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
        [alert addAction:actionYES];
        [alert addAction:actionNO];
        [self presentViewController:alert animated:YES completion:nil];
        return NO;
    }
}

- (void)textFieldDidEndEditing:(UITextField *)textField {
    [self.titleAdd resignFirstResponder];
}

- (BOOL)textFieldShouldReturn:(UITextField *)textField {
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self.textAdd becomeFirstResponder];
    });

    return YES;
}

- (void)textViewDidEndEditing:(UITextView *)textView {
    [self.textAdd resignFirstResponder];
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [self.textAdd resignFirstResponder];
    [self.titleAdd resignFirstResponder];
}

- (void)setDataWithMemo:(HLMemo *)memo {
    self.memo = memo;
}

@end


text:
package com.opengamma.analytics.financial.instrument.future;

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

import org.apache.commons.lang.ObjectUtils;
import org.threeten.bp.LocalDate;
import org.threeten.bp.ZonedDateTime;
import org.threeten.bp.format.DateTimeFormatter;

import com.opengamma.OpenGammaRuntimeException;
import com.opengamma.analytics.financial.instrument.InstrumentDefinitionVisitor;
import com.opengamma.analytics.financial.instrument.InstrumentDefinitionWithData;
import com.opengamma.analytics.financial.instrument.index.IndexON;
import com.opengamma.analytics.financial.interestrate.future.derivative.FederalFundsFutureSecurity;
import com.opengamma.analytics.util.time.TimeCalculator;
import com.opengamma.financial.convention.businessday.BusinessDayConvention;
import com.opengamma.financial.convention.businessday.BusinessDayConventions;
import com.opengamma.financial.convention.calendar.Calendar;
import com.opengamma.timeseries.DoubleTimeSeries;
import com.opengamma.timeseries.date.localdate.ImmutableLocalDateDoubleTimeSeries;
import com.opengamma.timeseries.date.localdate.LocalDateDoubleTimeSeries;
import com.opengamma.util.ArgumentChecker;
import com.opengamma.util.money.Currency;

/**
 * Description of an Federal Funds Futures security.
 */
public class FederalFundsFutureSecurityDefinition extends FuturesSecurityDefinition<FederalFundsFutureSecurity>
    implements InstrumentDefinitionWithData<FederalFundsFutureSecurity, DoubleTimeSeries<ZonedDateTime>> {

  /**
   * The OIS-like index on which the future fixes.
   */
  private final IndexON _index;
  /**
   * The dates of the fixing periods (start and end). There is one date more than period.
   */
  private final ZonedDateTime[] _fixingPeriodDates;
  /**
   * The accrual factors (or year fractions) associated to the fixing periods in the Index day count convention.
   */
  private final double[] _fixingPeriodAccrualFactor;
  /**
   * The total accrual factor for all fixing periods. Sum of the elements of _fixingPeriodAccrualFactor.
   */
  private double _fixingTotalAccrualFactor;
  /**
   * The future notional.
   */
  private final double _notional;
  /**
   * The future margining accrual factor. Usually a standardized number of 1/12 for a 30-day future.
   */
  private final double _marginAccrualFactor;
  /**
   * The future name.
   */
  private final String _name;

  /**
   * The preceding business day convention.
   */
  private static final BusinessDayConvention BUSINESS_DAY_PRECEDING = BusinessDayConventions.PRECEDING;
  /**
   * The following business day convention.
   */
  private static final BusinessDayConvention BUSINESS_DAY_FOLLOWING = BusinessDayConventions.FOLLOWING;

  /** Constructor from all details.
   * @param lastTradingDate The future last trading date. Usually the last business day of the month.
   * @param index The OIS-like index on which the future fixes.
   * @param fixingPeriodDate The dates of the fixing periods (start and end). There is one date more than period.
   * @param fixingPeriodAccrualFactor The accrual factors (or year fractions) associated to the fixing periods in the Index day count convention.
   * @param notional The future notional.
   * @param paymentAccrualFactor The future payment accrual factor. Usually a standardized number of 1/12 for a 30-day future.
   * @param name The future name.
   */
  public FederalFundsFutureSecurityDefinition(final ZonedDateTime lastTradingDate, final IndexON index, final ZonedDateTime[] fixingPeriodDate,
      final double[] fixingPeriodAccrualFactor, final double notional, final double paymentAccrualFactor, final String name) {
    super(lastTradingDate);
    ArgumentChecker.notNull(lastTradingDate, "Last trading date");
    ArgumentChecker.notNull(index, "Index overnight");
    ArgumentChecker.notNull(fixingPeriodDate, "Fixing period dates");
    ArgumentChecker.notNull(fixingPeriodAccrualFactor, "Fixing period accrual factors");
    ArgumentChecker.notNull(name, "Name");
    ArgumentChecker.isTrue(fixingPeriodDate.length == fixingPeriodAccrualFactor.length + 1, "Fixing dates length should be fixing accrual factors + 1.");
    _index = index;
    _fixingPeriodDates = fixingPeriodDate;
    _fixingPeriodAccrualFactor = fixingPeriodAccrualFactor;
    _notional = notional;
    _marginAccrualFactor = paymentAccrualFactor;
    _name = name;
    _fixingTotalAccrualFactor = 0.0;
    for (final double element : _fixingPeriodAccrualFactor) {
      _fixingTotalAccrualFactor += element;
    }
  }

  /**
   * Builder for a given month. The future start on the first business day of the month and ends on the first business day of the next month.
   * The last trading date is the last good business day of the month.
   * @param monthDate Any date in the future month.
   * @param index The overnight index.
   * @param notional The future notional.
   * @param paymentAccrualFactor The future payment accrual factor. Usually a standardized number of 1/12 for a 30-day future.
   * @param name The future name.
   * @param calendar The holiday calendar for the overnight rate.
   * @return The future.
   */
  public static FederalFundsFutureSecurityDefinition from(final ZonedDateTime monthDate, final IndexON index, final double notional, final double paymentAccrualFactor,
      final String name, final Calendar calendar) {
    ArgumentChecker.notNull(monthDate, "Reference date");
    ArgumentChecker.notNull(index, "Index overnight");
    final ZonedDateTime periodFirstDate = BUSINESS_DAY_FOLLOWING.adjustDate(calendar, monthDate.withDayOfMonth(1));
    final ZonedDateTime periodLastDate = BUSINESS_DAY_FOLLOWING.adjustDate(calendar, monthDate.withDayOfMonth(1).plusMonths(1));
    final ZonedDateTime last = BUSINESS_DAY_PRECEDING.adjustDate(calendar, periodLastDate.minusDays(1));
    final List<ZonedDateTime> fixingList = new ArrayList<>();
    ZonedDateTime date = periodFirstDate;
    while (!date.isAfter(periodLastDate)) {
      fixingList.add(date);
      date = BUSINESS_DAY_FOLLOWING.adjustDate(calendar, date.plusDays(1));
    }
    final ZonedDateTime[] fixingDate = fixingList.toArray(new ZonedDateTime[fixingList.size()]);
    final double[] fixingAccrualFactor = new double[fixingDate.length - 1];
    for (int loopfix = 0; loopfix < fixingDate.length - 1; loopfix++) {
      fixingAccrualFactor[loopfix] = index.getDayCount().getDayCountFraction(fixingDate[loopfix], fixingDate[loopfix + 1], calendar);
    }
    return new FederalFundsFutureSecurityDefinition(last, index, fixingDate, fixingAccrualFactor, notional, paymentAccrualFactor, name);
  }

  /**
   * Builder of the CBOT Federal Funds futures for a given month. The future start on the first business day of the month and ends on the first business day of the next month.
   * The last trading date is the last good business day of the month. The notional is 5m. The payment accrual fraction is 1/12. The name is "FF" + month in format "MMMYY".
   * @param monthDate Any date in the future month.
   * @param index The overnight index.
   * @param calendar The holiday calendar for the overnight rate.
   * @return The future.
   */
  public static FederalFundsFutureSecurityDefinition fromFedFund(final ZonedDateTime monthDate, final IndexON index, final Calendar calendar) {
    final double notionalFedFund = 5000000;
    final double accrualFedFund = 1.0 / 12.0;
    return from(monthDate, index, notionalFedFund, accrualFedFund, "FF" + monthDate.toString(DateTimeFormatter.ofPattern("MMMyy")), calendar);
  }

  /**
   * Gets the OIS-like index on which the future fixes.
   * @return The index.
   */
  public IndexON getIndex() {
    return _index;
  }

  /**
   * Gets the dates of the fixing periods (start and end). There is one date more than period.
   * @return The dates.
   */
  public ZonedDateTime[] getFixingPeriodDate() {
    return _fixingPeriodDates;
  }

  /**
   * Gets the accrual factors (or year fractions) associated to the fixing periods in the Index day count convention.
   * @return The accrual factors.
   */
  public double[] getFixingPeriodAccrualFactor() {
    return _fixingPeriodAccrualFactor;
  }

  /**
   * Gets the total accrual factor for all fixing periods.
   * @return The accrual factor.
   */
  public double getFixingTotalAccrualFactor() {
    return _fixingTotalAccrualFactor;
  }

  /**
   * Gets the future notional.
   * @return The notional.
   */
  public double getNotional() {
    return _notional;
  }

  /**
   * Gets the future payment accrual factor. Usually a standardized number of 1/12 for a 30-day future.
   * @return The payment accrual factor.
   */
  public double getMarginAccrualFactor() {
    return _marginAccrualFactor;
  }

  /**
   * Gets the future name.
   * @return The future name.
   */
  public String getName() {
    return _name;
  }

  /**
   * Gets the future currency.
   * @return The currency.
   */
  public Currency getCurrency() {
    return _index.getCurrency();
  }

  @Override
  public String toString() {
    return _name + " - index: " + _index.toString() + " - start date: " + _fixingPeriodDates[0].toString(DateTimeFormatter.ofPattern("ddMMMyy"));
  }

  @Override
  public FederalFundsFutureSecurity toDerivative(final ZonedDateTime date) {
    ArgumentChecker.notNull(date, "Date");
    ArgumentChecker.isTrue(!date.isAfter(_fixingPeriodDates[_index.getPublicationLag()]), "Date should not be after the fixing period start date");
    final double lastTradingTime = TimeCalculator.getTimeBetween(date, getLastTradingDate());
    final double[] fixingPeriodTime = TimeCalculator.getTimeBetween(date, _fixingPeriodDates);
    return new FederalFundsFutureSecurity(_index, 0.0, fixingPeriodTime, lastTradingTime, _fixingPeriodAccrualFactor, _fixingTotalAccrualFactor, _notional, _marginAccrualFactor, _name);
  }

  /**
   * {@inheritDoc}
   * @param indexFixingTimeSeries The time series of the ON index. It is used if the date is in the future month.
   * The date of the time series is the start fixing period date.
   */
  @Override
  public FederalFundsFutureSecurity toDerivative(final ZonedDateTime valZdt, final DoubleTimeSeries<ZonedDateTime> indexFixingTimeSeries) {
    ArgumentChecker.notNull(valZdt, "valZdt - valuation date as ZonedDateTime");
    final LocalDate valDate = valZdt.toLocalDate();
    ArgumentChecker.isTrue(!valDate.isAfter(_fixingPeriodDates[_fixingPeriodDates.length - 1].toLocalDate()), "valuation date is after last trading date");
    final LocalDate firstPublicationDate = _fixingPeriodDates[_index.getPublicationLag()].toLocalDate(); // This is often one business day following the first fixing date
    if (valDate.isBefore(firstPublicationDate)) {
      return toDerivative(valZdt);
    }

    // FIXME Historical time series do not have time information to begin with.
    final ZonedDateTime[] instants = indexFixingTimeSeries.timesArray();
    final LocalDate[] dates = new LocalDate[indexFixingTimeSeries.size()];
    for (int i = 0; i < instants.length; i++) {
      dates[i] = instants[i].toLocalDate();
    }
    final LocalDateDoubleTimeSeries indexFixingDateSeries = ImmutableLocalDateDoubleTimeSeries.of(dates, indexFixingTimeSeries.valuesArray());

    final double lastTradingTime = TimeCalculator.getTimeBetween(valZdt, getLastTradingDate());
    int fixedPeriod = 0;
    double accruedInterest = 0.0;
    while ((fixedPeriod < _fixingPeriodDates.length - 1) && valDate.isAfter(_fixingPeriodDates[fixedPeriod + _index.getPublicationLag()].toLocalDate())) {
      final LocalDate currentDate = _fixingPeriodDates[fixedPeriod].toLocalDate();
      // Fixing should have taken place already
      final Double fixedRate = indexFixingDateSeries.getValue(currentDate);
      if (fixedRate == null) {
        final LocalDate latestDate = indexFixingDateSeries.getLatestTime();
        throw new OpenGammaRuntimeException("Could not get fixing value of index " + _index.getName() + " for date " + currentDate + ". The last data is available on " + latestDate);
      }
      accruedInterest += _fixingPeriodAccrualFactor[fixedPeriod] * fixedRate;
      fixedPeriod++;
    }
    if (fixedPeriod < _fixingPeriodDates.length - 1) { // Some FF period left
      final Double fixedRate = indexFixingTimeSeries.getValue(_fixingPeriodDates[fixedPeriod]);
      if (fixedRate != null) { // Fixed already
        accruedInterest += _fixingPeriodAccrualFactor[fixedPeriod] * fixedRate;
        fixedPeriod++;
      }
      if (fixedPeriod < _fixingPeriodDates.length - 1) { // Some FF period left
        final double[] fixingPeriodTime = new double[_fixingPeriodDates.length - fixedPeriod];
        final double[] fixingPeriodAccrualFactor = new double[_fixingPeriodDates.length - 1 - fixedPeriod];
        for (int loopfix = 0; loopfix < _fixingPeriodDates.length - fixedPeriod; loopfix++) {
          fixingPeriodTime[loopfix] = TimeCalculator.getTimeBetween(valZdt, _fixingPeriodDates[loopfix + fixedPeriod]);
        }
        System.arraycopy(_fixingPeriodAccrualFactor, fixedPeriod, fixingPeriodAccrualFactor, 0, _fixingPeriodDates.length - 1 - fixedPeriod);
        return new FederalFundsFutureSecurity(_index, accruedInterest, fixingPeriodTime, lastTradingTime, fixingPeriodAccrualFactor, _fixingTotalAccrualFactor, _notional,
            _marginAccrualFactor, _name);
      }
      return new FederalFundsFutureSecurity(_index, accruedInterest, new double[] {TimeCalculator.getTimeBetween(valZdt, _fixingPeriodDates[_fixingPeriodDates.length - 1]) },
          lastTradingTime, new double[0], _fixingTotalAccrualFactor, _notional, _marginAccrualFactor, _name); // Only one period left
    }
    return new FederalFundsFutureSecurity(_index, accruedInterest, new double[] {TimeCalculator.getTimeBetween(valZdt, _fixingPeriodDates[_fixingPeriodDates.length - 1]) },
        lastTradingTime, new double[0], _fixingTotalAccrualFactor, _notional, _marginAccrualFactor, _name); // Only one period left
  }

  @Override
  public <U, V> V accept(final InstrumentDefinitionVisitor<U, V> visitor, final U data) {
    ArgumentChecker.notNull(visitor, "visitor");
    return visitor.visitFederalFundsFutureSecurityDefinition(this, data);
  }

  @Override
  public <V> V accept(final InstrumentDefinitionVisitor<?, V> visitor) {
    ArgumentChecker.notNull(visitor, "visitor");
    return visitor.visitFederalFundsFutureSecurityDefinition(this);
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    result = prime * result + Arrays.hashCode(_fixingPeriodAccrualFactor);
    result = prime * result + Arrays.hashCode(_fixingPeriodDates);
    long temp;
    temp = Double.doubleToLongBits(_fixingTotalAccrualFactor);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + _index.hashCode();
    temp = Double.doubleToLongBits(_marginAccrualFactor);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + _name.hashCode();
    temp = Double.doubleToLongBits(_notional);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }
    if (!super.equals(obj)) {
      return false;
    }
    if (getClass() != obj.getClass()) {
      return false;
    }
    FederalFundsFutureSecurityDefinition other = (FederalFundsFutureSecurityDefinition) obj;
    if (!Arrays.equals(_fixingPeriodAccrualFactor, other._fixingPeriodAccrualFactor)) {
      return false;
    }
    if (!Arrays.equals(_fixingPeriodDates, other._fixingPeriodDates)) {
      return false;
    }
    if (Double.doubleToLongBits(_fixingTotalAccrualFactor) != Double.doubleToLongBits(other._fixingTotalAccrualFactor)) {
      return false;
    }
    if (!ObjectUtils.equals(_index, other._index)) {
      return false;
    }
    if (Double.doubleToLongBits(_marginAccrualFactor) != Double.doubleToLongBits(other._marginAccrualFactor)) {
      return false;
    }
    if (!ObjectUtils.equals(_name, other._name)) {
      return false;
    }
    if (Double.doubleToLongBits(_notional) != Double.doubleToLongBits(other._notional)) {
      return false;
    }
    return true;
  }

}


text:
- Config file: <https://github.com/Senspark/ee-x/blob/master/doc/mkdocs/mkdocs.yml>
- Pages: <https://github.com/Senspark/ee-x/blob/master/doc/mkdocs/docs>

## How To Test
- `cd` to `doc/mkdocs` directory.
- Run `mkdocs serve`.
- Open <http://localhost:8000> to test.
- Modify and save pages to view changes.

## How To Build
- `cd` to `doc/mkdocs` directory.
- Run `mkdocs build -d ../../docs`.
- Push changes to `gh-pages` branch.


text:
/* First created by JCasGen Thu Aug 15 13:53:20 EDT 2013 */
package org.oaqa.dso.model;

import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.JCasRegistry;
import org.apache.uima.jcas.cas.TOP_Type;

import org.apache.uima.jcas.tcas.Annotation;

/** A Named Entity type that represents the type of the answer being sought.
 * Updated by JCasGen Tue Aug 27 18:06:53 EDT 2013
 * XML source: /home/ruil/workspace/git/helloqa/src/main/resources/edu/cmu/lti/oaqa/OAQATypes.xml
 * @generated */
public class AnswerType extends OAQAAnnotation {
  /** @generated
   * @ordered
   */
  @SuppressWarnings ("hiding")
  public final static int typeIndexID = JCasRegistry.register(AnswerType.class);
  /** @generated
   * @ordered
   */
  @SuppressWarnings ("hiding")
  public final static int type = typeIndexID;
  /** @generated  */
  @Override
  public              int getTypeIndexID() {return typeIndexID;}

  /** Never called.  Disable default constructor
   * @generated */
  protected AnswerType() {/* intentionally empty block */}

  /** Internal - constructor used by generator
   * @generated */
  public AnswerType(int addr, TOP_Type type) {
    super(addr, type);
    readObject();
  }

  /** @generated */
  public AnswerType(JCas jcas) {
    super(jcas);
    readObject();
  }

  /** @generated */
  public AnswerType(JCas jcas, int begin, int end) {
    super(jcas);
    setBegin(begin);
    setEnd(end);
    readObject();
  }

  /** <!-- begin-user-doc -->
    * Write your own initialization here
    * <!-- end-user-doc -->
  @generated modifiable */
  private void readObject() {/*default - does nothing empty block */}

  //*--------------*
  //* Feature: label

  /** getter for label - gets An answer type identified for the question.
   * @generated */
  public String getLabel() {
    if (AnswerType_Type.featOkTst && ((AnswerType_Type)jcasType).casFeat_label == null)
      jcasType.jcas.throwFeatMissing("label", "org.oaqa.dso.model.AnswerType");
    return jcasType.ll_cas.ll_getStringValue(addr, ((AnswerType_Type)jcasType).casFeatCode_label);}

  /** setter for label - sets An answer type identified for the question.
   * @generated */
  public void setLabel(String v) {
    if (AnswerType_Type.featOkTst && ((AnswerType_Type)jcasType).casFeat_label == null)
      jcasType.jcas.throwFeatMissing("label", "org.oaqa.dso.model.AnswerType");
    jcasType.ll_cas.ll_setStringValue(addr, ((AnswerType_Type)jcasType).casFeatCode_label, v);}

  //*--------------*
  //* Feature: targetType

  /** getter for targetType - gets The actual target type annotation.
   * @generated */
  public Annotation getTargetType() {
    if (AnswerType_Type.featOkTst && ((AnswerType_Type)jcasType).casFeat_targetType == null)
      jcasType.jcas.throwFeatMissing("targetType", "org.oaqa.dso.model.AnswerType");
    return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((AnswerType_Type)jcasType).casFeatCode_targetType)));}

  /** setter for targetType - sets The actual target type annotation.
   * @generated */
  public void setTargetType(Annotation v) {
    if (AnswerType_Type.featOkTst && ((AnswerType_Type)jcasType).casFeat_targetType == null)
      jcasType.jcas.throwFeatMissing("targetType", "org.oaqa.dso.model.AnswerType");
    jcasType.ll_cas.ll_setRefValue(addr, ((AnswerType_Type)jcasType).casFeatCode_targetType, jcasType.ll_cas.ll_getFSRef(v));}
  }


text:
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE127_Buffer_Underread__CWE839_negative_17.c
Label Definition File: CWE127_Buffer_Underread__CWE839.label.xml
Template File: sources-sinks-17.tmpl.c
*/
/*
 * @description
 * CWE: 127 Buffer Underread
 * BadSource: negative Negative index value
 * GoodSource: Non-negative but less than 10
 * Sinks:
 *    GoodSink: Ensure the array index is valid
 *    BadSink : Improperly check the array index by not checking to see if the value is negative
 * Flow Variant: 17 Control flow: for loops
 *
 * */

#include "std_testcase.h"

#ifndef OMITBAD

void CWE127_Buffer_Underread__CWE839_negative_17_bad()
{
    int i,j;
    int data;
    /* Initialize data */
    data = -1;
    for(i = 0; i < 1; i++)
    {
        /* POTENTIAL FLAW: Use an invalid index */
        data = -5;
    }
    for(j = 0; j < 1; j++)
    {
        {
            int buffer[10] = { 0 };
            /* POTENTIAL FLAW: Attempt to access a negative index of the array
             * This check does not check to see if the array index is negative */
            if (data < 10)
            {
                printIntLine(buffer[data]);
            }
            else
            {
                printLine("ERROR: Array index is too big.");
            }
        }
    }
}

#endif /* OMITBAD */

#ifndef OMITGOOD

/* goodB2G() - use badsource and goodsink in the for statements */
static void goodB2G()
{
    int i,k;
    int data;
    /* Initialize data */
    data = -1;
    for(i = 0; i < 1; i++)
    {
        /* POTENTIAL FLAW: Use an invalid index */
        data = -5;
    }
    for(k = 0; k < 1; k++)
    {
        {
            int buffer[10] = { 0 };
            /* FIX: Properly validate the array index and prevent a buffer underread */
            if (data >= 0 && data < (10))
            {
                printIntLine(buffer[data]);
            }
            else
            {
                printLine("ERROR: Array index is out-of-bounds");
            }
        }
    }
}

/* goodG2B() - use goodsource and badsink in the for statements */
static void goodG2B()
{
    int h,j;
    int data;
    /* Initialize data */
    data = -1;
    for(h = 0; h < 1; h++)
    {
        /* FIX: Use a value greater than 0, but less than 10 to avoid attempting to
         * access an index of the array in the sink that is out-of-bounds */
        data = 7;
    }
    for(j = 0; j < 1; j++)
    {
        {
            int buffer[10] = { 0 };
            /* POTENTIAL FLAW: Attempt to access a negative index of the array
             * This check does not check to see if the array index is negative */
            if (data < 10)
            {
                printIntLine(buffer[data]);
            }
            else
            {
                printLine("ERROR: Array index is too big.");
            }
        }
    }
}

void CWE127_Buffer_Underread__CWE839_negative_17_good()
{
    goodB2G();
    goodG2B();
}

#endif /* OMITGOOD */

/* Below is the main(). It is only used when building this testcase on
   its own for testing or for building a binary to use in testing binary
   analysis tools. It is not used when compiling all the testcases as one
   application, which is how source code analysis tools are tested. */

#ifdef INCLUDEMAIN

int main(int argc, char * argv[])
{
    /* seed randomness */
    srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
    printLine("Calling good()...");
    CWE127_Buffer_Underread__CWE839_negative_17_good();
    printLine("Finished good()");
#endif /* OMITGOOD */
#ifndef OMITBAD
    printLine("Calling bad()...");
    CWE127_Buffer_Underread__CWE839_negative_17_bad();
    printLine("Finished bad()");
#endif /* OMITBAD */
    return 0;
}

#endif


text:
This example demonstrates soft deleting and hard deleting streams.

The code contains comments describing the detail of how it works.

Once the GetEventStore server is up simply **go run** the examples.

```
    $ go run main.go
```


text:
package com.kidsgames.menu;

import org.json.JSONArray;
import org.json.JSONObject;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.View.OnClickListener;

import com.kidsgames.gamebase.DrawerActivity;
import com.kidsgames.utils.ResourceId;
import com.vikinc.coloring.R;

public class DrawerSliderActivity extends Activity implements OnClickListener {

    DetailOnPageChangeListener pageListener;
    FixedSpeedViewPager mPager;
    SlideAdapter mAdapter;
    private String packName;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.slider_layout);

        findViewById(R.id.left_arrow).setOnClickListener(this);
        findViewById(R.id.left_arrow).setVisibility(View.GONE);
        findViewById(R.id.right_arrow).setVisibility(View.VISIBLE);
        findViewById(R.id.right_arrow).setOnClickListener(this);
        findViewById(R.id.home_button).setOnClickListener(this);
        packName = getIntent().getStringExtra("pack");

        mPager = (FixedSpeedViewPager) findViewById(R.id.pager);

        String json = ResourceId.getJson(this, packName);

        mAdapter = new SlideAdapter(this, packName);

        pageListener = new DetailOnPageChangeListener(this, mAdapter);
        mPager.setOnPageChangeListener(pageListener);

        try {
            JSONObject jsonObject = new JSONObject(json);
            JSONArray array = jsonObject.getJSONArray("slider_images");
            int ids[] = new int[(int) (jsonObject.getInt("count"))];
            for (int i = 0; i < jsonObject.getInt("count"); i++) {
                ids[i] = ResourceId.getResId(array.getString(i), ResourceId.DRAWABLE, this);
            }
            mAdapter.setIds(ids);
        } catch (Exception e) {
            e.printStackTrace();
        }

        mPager.setAdapter(mAdapter);
    }

    @Override
    protected void onResume() {
        super.onResume();
        mAdapter.refresh();
        mAdapter.notifyDataSetChanged();
    }

    @Override
    public void onClick(View v) {
        int startIndex = pageListener.currentPage * 2;

        switch (v.getId()) {

            case R.id.image_first:
                Intent intent = new Intent(this, DrawerActivity.class);
                intent.putExtra("pack", packName);
                intent.putExtra("level", startIndex + 1);
                startActivity(intent);
                break;
            case R.id.image_second:
                intent = new Intent(this, DrawerActivity.class);
                intent.putExtra("level", startIndex + 2);
                intent.putExtra("pack", packName);
                startActivity(intent);
                break;
            case R.id.home_button:
                onBackPressed();
                break;
            case R.id.left_arrow:
                int page = pageListener.getCurrentPage();
                if (page - 1 >= 0)
                    mPager.setCurrentItem(page - 1, true);
                break;
            case R.id.right_arrow:
                page = pageListener.getCurrentPage();
                if (mAdapter.getCount() > page + 1)
                    mPager.setCurrentItem(page + 1, true);
                break;

        }
    }

    public class DetailOnPageChangeListener extends ViewPager.SimpleOnPageChangeListener {

        private int currentPage;
        private Activity activity;
        private SlideAdapter mPager;

        public DetailOnPageChangeListener(Activity activity, SlideAdapter mPager) {
            this.activity = activity;
            this.mPager = mPager;
        }

        @Override
        public void onPageSelected(int position) {
            currentPage = position;

            if (position == 0) {
                activity.findViewById(R.id.left_arrow).setVisibility(View.GONE);
            } else {
                activity.findViewById(R.id.left_arrow).setVisibility(View.VISIBLE);
            }

            if (mPager.getCount() - 1 == currentPage) {
                activity.findViewById(R.id.right_arrow).setVisibility(View.GONE);
            } else {
                activity.findViewById(R.id.right_arrow).setVisibility(View.VISIBLE);
            }
        }

        public final int getCurrentPage() {
            return currentPage;
        }
    }

}


text:
package iterator

import (
	"context"

	"github.com/cayleygraph/cayley/graph/refs"
)

// The And iterator. Consists of a number of subiterators, the primary of which will
// be Next()ed if next is called.
type And struct {
	sub       []Shape
	checkList []Shape // special order for Contains
	opt       []Shape
}

// NewAnd creates an And iterator. `qs` is only required when needing a handle
// for QuadStore-specific optimizations, otherwise nil is acceptable.
func NewAnd(sub ...Shape) *And {
	it := &And{
		sub: make([]Shape, 0, 20),
	}
	for _, s := range sub {
		it.AddSubIterator(s)
	}
	return it
}

func (it *And) Iterate() Scanner {
	if len(it.sub) == 0 {
		return NewNull().Iterate()
	}
	sub := make([]Index, 0, len(it.sub)-1)
	for _, s := range it.sub[1:] {
		sub = append(sub, s.Lookup())
	}
	opt := make([]Index, 0, len(it.opt))
	for _, s := range it.opt {
		opt = append(opt, s.Lookup())
	}
	return newAndNext(it.sub[0].Iterate(), newAndContains(sub, opt))
}

func (it *And) Lookup() Index {
	if len(it.sub) == 0 {
		return NewNull().Lookup()
	}
	sub := make([]Index, 0, len(it.sub))
	check := it.checkList
	if check == nil {
		check = it.sub
	}
	for _, s := range check {
		sub = append(sub, s.Lookup())
	}
	opt := make([]Index, 0, len(it.opt))
	for _, s := range it.opt {
		opt = append(opt, s.Lookup())
	}
	return newAndContains(sub, opt)
}

// Returns a slice of the subiterators, in order (primary iterator first).
func (it *And) SubIterators() []Shape {
	iters := make([]Shape, 0, len(it.sub)+len(it.opt))
	iters = append(iters, it.sub...)
	iters = append(iters, it.opt...)
	return iters
}

func (it *And) String() string {
	return "And"
}

// Add a subiterator to this And iterator.
//
// The first iterator that is added becomes the primary iterator. This is
// important. Calling Optimize() is the way to change the order based on
// subiterator statistics. Without Optimize(), the order added is the order
// used.
func (it *And) AddSubIterator(sub Shape) {
	if sub == nil {
		panic("nil iterator")
	}
	it.sub = append(it.sub, sub)
}

// AddOptionalIterator adds an iterator that will only be Contain'ed and will not affect iteration results.
// Only tags will be propagated from this iterator.
func (it *And) AddOptionalIterator(sub Shape) *And {
	it.opt = append(it.opt, sub)
	return it
}

// The And iterator. Consists of a number of subiterators, the primary of which will
// be Next()ed if next is called.
type andNext struct {
	primary   Scanner
	secondary Index
	result    refs.Ref
}

// NewAnd creates an And iterator. `qs` is only required when needing a handle
// for QuadStore-specific optimizations, otherwise nil is acceptable.
func newAndNext(pri Scanner, sec Index) Scanner {
	return &andNext{
		primary:   pri,
		secondary: sec,
	}
}

// An extended TagResults, as it needs to add it's own results and
// recurse down it's subiterators.
func (it *andNext) TagResults(dst map[string]refs.Ref) {
	it.primary.TagResults(dst)
	it.secondary.TagResults(dst)
}

func (it *andNext) String() string {
	return "AndNext"
}

// Returns advances the And iterator. Because the And is the intersection of its
// subiterators, it must choose one subiterator to produce a candidate, and check
// this value against the subiterators. A productive choice of primary iterator
// is therefore very important.
func (it *andNext) Next(ctx context.Context) bool {
	for it.primary.Next(ctx) {
		cur := it.primary.Result()
		if it.secondary.Contains(ctx, cur) {
			it.result = cur
			return true
		}
	}
	return false
}

func (it *andNext) Err() error {
	if err := it.primary.Err(); err != nil {
		return err
	}
	if err := it.secondary.Err(); err != nil {
		return err
	}
	return nil
}

func (it *andNext) Result() refs.Ref {
	return it.result
}

// An And has no NextPath of its own -- that is, there are no other values
// which satisfy our previous result that are not the result itself. Our
// subiterators might, however, so just pass the call recursively.
func (it *andNext) NextPath(ctx context.Context) bool {
	if it.primary.NextPath(ctx) {
		return true
	} else if err := it.primary.Err(); err != nil {
		return false
	}
	if it.secondary.NextPath(ctx) {
		return true
	} else if err := it.secondary.Err(); err != nil {
		return false
	}
	return false
}

// Close this iterator, and, by extension, close the subiterators.
// Close should be idempotent, and it follows that if it's subiterators
// follow this contract, the And follows the contract.  It closes all
// subiterators it can, but returns the first error it encounters.
func (it *andNext) Close() error {
	err := it.primary.Close()
	if err2 := it.secondary.Close(); err2 != nil && err == nil {
		err = err2
	}
	return err
}

// The And iterator. Consists of a number of subiterators, the primary of which will
// be Next()ed if next is called.
type andContains struct {
	base     Shape
	sub      []Index
	opt      []Index
	optCheck []bool

	result refs.Ref
	err    error
}

// NewAnd creates an And iterator. `qs` is only required when needing a handle
// for QuadStore-specific optimizations, otherwise nil is acceptable.
func newAndContains(sub, opt []Index) Index {
	return &andContains{
		sub: sub,
		opt: opt, optCheck: make([]bool, len(opt)),
	}
}

// An extended TagResults, as it needs to add it's own results and
// recurse down it's subiterators.
func (it *andContains) TagResults(dst map[string]refs.Ref) {
	for _, sub := range it.sub {
		sub.TagResults(dst)
	}
	for i, sub := range it.opt {
		if !it.optCheck[i] {
			continue
		}
		sub.TagResults(dst)
	}
}

func (it *andContains) String() string {
	return "AndContains"
}

func (it *andContains) Err() error {
	if err := it.err; err != nil {
		return err
	}
	for _, si := range it.sub {
		if err := si.Err(); err != nil {
			return err
		}
	}
	for _, si := range it.opt {
		if err := si.Err(); err != nil {
			return err
		}
	}
	return nil
}

func (it *andContains) Result() refs.Ref {
	return it.result
}

// Check a value against the entire iterator, in order.
func (it *andContains) Contains(ctx context.Context, val refs.Ref) bool {
	prev := it.result
	for i, sub := range it.sub {
		if !sub.Contains(ctx, val) {
			if err := sub.Err(); err != nil {
				it.err = err
				return false
			}
			// One of the iterators has determined that this value doesn't
			// match. However, the iterators that came before in the list
			// may have returned "ok" to Contains().  We need to set all
			// the tags back to what the previous result was -- effectively
			// seeking back exactly one -- so we check all the prior iterators
			// with the (already verified) result and throw away the result,
			// which will be 'true'
			if prev != nil {
				for j := 0; j < i; j++ {
					it.sub[j].Contains(ctx, prev)
					if err := it.sub[j].Err(); err != nil {
						it.err = err
						return false
					}
				}
			}
			return false
		}
	}
	it.result = val
	for i, sub := range it.opt {
		// remember if we will need to call TagResults on it, nothing more
		it.optCheck[i] = sub.Contains(ctx, val)
	}
	return true
}

// An And has no NextPath of its own -- that is, there are no other values
// which satisfy our previous result that are not the result itself. Our
// subiterators might, however, so just pass the call recursively.
func (it *andContains) NextPath(ctx context.Context) bool {
	for _, sub := range it.sub {
		if sub.NextPath(ctx) {
			return true
		} else if err := sub.Err(); err != nil {
			it.err = err
			return false
		}
	}
	for i, sub := range it.opt {
		if !it.optCheck[i] {
			continue
		}
		if sub.NextPath(ctx) {
			return true
		} else if err := sub.Err(); err != nil {
			it.err = err
			return false
		}
	}
	return false
}

// Close this iterator, and, by extension, close the subiterators.
// Close should be idempotent, and it follows that if it's subiterators
// follow this contract, the And follows the contract.  It closes all
// subiterators it can, but returns the first error it encounters.
func (it *andContains) Close() error {
	var err error
	for _, sub := range it.sub {
		if err2 := sub.Close(); err2 != nil && err == nil {
			err = err2
		}
	}
	for _, sub := range it.opt {
		if err2 := sub.Close(); err2 != nil && err == nil {
			err = err2
		}
	}
	return err
}


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

<amqp name="messaging" xmlns="http://www.amqp.org/schema/amqp.xsd">

    <type name="header" class="composite" source="list" provides="section">
      <descriptor name="amqp:header:list" code="0x00000000:0x00000070"/>
      <field name="durable" type="boolean"/>
      <field name="priority" type="ubyte"/>
      <field name="ttl" type="milliseconds"/>
      <field name="first-acquirer" type="boolean"/>
      <field name="delivery-count" type="uint"/>
    </type>
    <type name="delivery-annotations" class="restricted" source="annotations" provides="section">
      <descriptor name="amqp:delivery-annotations:map" code="0x00000000:0x00000071"/>
    </type>
    <type name="message-annotations" class="restricted" source="annotations" provides="section">
      <descriptor name="amqp:message-annotations:map" code="0x00000000:0x00000072"/>
    </type>
    <type name="properties" class="composite" source="list" provides="section">
      <descriptor name="amqp:properties:list" code="0x00000000:0x00000073"/>
      <field name="message-id" type="*" requires="message-id"/>
      <field name="user-id" type="binary"/>
      <field name="to" type="*" requires="address"/>
      <field name="subject" type="string"/>
      <field name="reply-to" type="*" requires="address"/>
      <field name="correlation-id" type="*" requires="message-id"/>
      <field name="content-type" type="symbol"/>
      <field name="content-encoding" type="symbol"/>
      <field name="absolute-expiry-time" type="timestamp"/>
      <field name="creation-time" type="timestamp"/>
      <field name="group-id" type="string"/>
      <field name="group-sequence" type="sequence-no"/>
      <field name="reply-to-group-id" type="string"/>
    </type>
    <type name="application-properties" class="restricted" source="map" provides="section">
      <descriptor name="amqp:application-properties:map" code="0x00000000:0x00000074"/>
    </type>
    <type name="data" class="restricted" source="binary" provides="section">
      <descriptor name="amqp:data:binary" code="0x00000000:0x00000075"/>
    </type>
    <type name="amqp-sequence" class="restricted" source="list" provides="section">
      <descriptor name="amqp:amqp-sequence:list" code="0x00000000:0x00000076"/>
    </type>
    <type name="amqp-value" class="restricted" source="*" provides="section">
      <descriptor name="amqp:amqp-value:*" code="0x00000000:0x00000077"/>
    </type>
    <type name="footer" class="restricted" source="annotations" provides="section">
      <descriptor name="amqp:footer:map" code="0x00000000:0x00000078"/>
    </type>
    <type name="annotations" class="restricted" source="map"/>
    <type name="message-id-ulong" class="restricted" source="ulong" provides="message-id"/>
    <type name="message-id-uuid" class="restricted" source="uuid" provides="message-id"/>
    <type name="message-id-binary" class="restricted" source="binary" provides="message-id"/>
    <type name="message-id-string" class="restricted" source="string" provides="message-id"/>
    <type name="address-string" class="restricted" source="string" provides="address"/>
    <definition name="MESSAGE-FORMAT" value="0"/>

    <type name="received" class="composite" source="list" provides="delivery-state">
      <descriptor name="amqp:received:list" code="0x00000000:0x00000023"/>
      <field name="section-number" type="uint" mandatory="true"/>
      <field name="section-offset" type="ulong" mandatory="true"/>
    </type>
    <type name="accepted" class="composite" source="list" provides="delivery-state, outcome">
      <descriptor name="amqp:accepted:list" code="0x00000000:0x00000024"/>
    </type>
    <type name="rejected" class="composite" source="list" provides="delivery-state, outcome">
      <descriptor name="amqp:rejected:list" code="0x00000000:0x00000025"/>
      <field name="error" type="error"/>
    </type>
    <type name="released" class="composite" source="list" provides="delivery-state, outcome">
      <descriptor name="amqp:released:list" code="0x00000000:0x00000026"/>
    </type>
    <type name="modified" class="composite" source="list" provides="delivery-state, outcome">
      <descriptor name="amqp:modified:list" code="0x00000000:0x00000027"/>
      <field name="delivery-failed" type="boolean"/>
      <field name="undeliverable-here" type="boolean"/>
      <field name="message-annotations" type="fields"/>
    </type>

    <type name="source" class="composite" source="list" provides="source">
      <descriptor name="amqp:source:list" code="0x00000000:0x00000028"/>
      <field name="address" type="*" requires="address"/>
      <field name="durable" type="terminus-durability" default="none"/>
      <field name="expiry-policy" type="terminus-expiry-policy" default="session-end"/>
      <field name="timeout" type="seconds" default="0"/>
      <field name="dynamic" type="boolean" default="false"/>
      <field name="dynamic-node-properties" type="node-properties"/>
      <field name="distribution-mode" type="symbol" requires="distribution-mode"/>
      <field name="filter" type="filter-set"/>
      <field name="default-outcome" type="*" requires="outcome"/>
      <field name="outcomes" type="symbol" multiple="true"/>
      <field name="capabilities" type="symbol" multiple="true"/>
    </type>
    <type name="target" class="composite" source="list" provides="target">
      <descriptor name="amqp:target:list" code="0x00000000:0x00000029"/>
      <field name="address" type="*" requires="address"/>
      <field name="durable" type="terminus-durability" default="none"/>
      <field name="expiry-policy" type="terminus-expiry-policy" default="session-end"/>
      <field name="timeout" type="seconds" default="0"/>
      <field name="dynamic" type="boolean" default="false"/>
      <field name="dynamic-node-properties" type="node-properties"/>
      <field name="capabilities" type="symbol" multiple="true"/>
    </type>
    <type name="terminus-durability" class="restricted" source="uint">
      <choice name="none" value="0"/>
      <choice name="configuration" value="1"/>
      <choice name="unsettled-state" value="2"/>
    </type>
    <type name="terminus-expiry-policy" class="restricted" source="symbol">
      <choice name="link-detach" value="link-detach"/>
      <choice name="session-end" value="session-end"/>
      <choice name="connection-close" value="connection-close"/>
      <choice name="never" value="never"/>
    </type>
    <type name="std-dist-mode" class="restricted" source="symbol" provides="distribution-mode">
      <choice name="move" value="move"/>
      <choice name="copy" value="copy"/>
    </type>
    <type name="filter-set" class="restricted" source="map"/>
    <type name="node-properties" class="restricted" source="fields"/>
    <type name="delete-on-close" class="composite" source="list" provides="lifetime-policy">
      <descriptor name="amqp:delete-on-close:list" code="0x00000000:0x0000002b"/>
    </type>
    <type name="delete-on-no-links" class="composite" source="list" provides="lifetime-policy">
      <descriptor name="amqp:delete-on-no-links:list" code="0x00000000:0x0000002c"/>
    </type>
    <type name="delete-on-no-messages" class="composite" source="list" provides="lifetime-policy">
      <descriptor name="amqp:delete-on-no-messages:list" code="0x00000000:0x0000002d"/>
    </type>
    <type name="delete-on-no-links-or-messages" class="composite" source="list" provides="lifetime-policy">
      <descriptor name="amqp:delete-on-no-links-or-messages:list" code="0x00000000:0x0000002e"/>
    </type>

</amqp>


text:
package phaser

import "github.com/gopherjs/gopherjs/js"

type statePreload interface {
	Preload()
}

type stateCreate interface {
	Create()
}

type stateUpdate interface {
	Update()
}

type stateRender interface {
	Render()
}

type CustomState struct {
	*js.Object
	State interface{}
}

func WrapState(state interface{}) *CustomState {
	customState := &CustomState{
		Object: js.MakeWrapper(state),
		State:  state,
	}

	if typedState, match := customState.State.(statePreload); match {
		customState.Get("__proto__").Set("preload", typedState.Preload)
	}

	if typedState, match := customState.State.(stateCreate); match {
		customState.Get("__proto__").Set("create", typedState.Create)
	}

	if typedState, match := customState.State.(stateUpdate); match {
		customState.Get("__proto__").Set("update", typedState.Update)
	}

	if typedState, match := customState.State.(stateRender); match {
		customState.Get("__proto__").Set("render", typedState.Render)
	}

	return customState
}


text:
package io.vertx.examples.webapiservice;

import io.vertx.core.AbstractVerticle;
import io.vertx.core.Future;
import io.vertx.core.Promise;
import io.vertx.core.Vertx;
import io.vertx.core.eventbus.MessageConsumer;
import io.vertx.core.http.HttpServer;
import io.vertx.core.http.HttpServerOptions;
import io.vertx.core.json.JsonObject;
import io.vertx.examples.webapiservice.persistence.TransactionPersistence;
import io.vertx.examples.webapiservice.services.TransactionsManagerService;
import io.vertx.ext.web.Router;
import io.vertx.ext.web.openapi.RouterBuilder;
import io.vertx.serviceproxy.ServiceBinder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class WebApiServiceExampleMainVerticle extends AbstractVerticle {

  HttpServer server;
  ServiceBinder serviceBinder;

  MessageConsumer<JsonObject> consumer;
  Logger LOG = LoggerFactory.getLogger(this.getClass());

  /**
   * Start transaction service
   */
  private void startTransactionService() {
    serviceBinder = new ServiceBinder(vertx);

    TransactionPersistence persistence = TransactionPersistence.create();

    // Create an instance of TransactionManagerService and mount to event bus
    TransactionsManagerService transactionsManagerService = TransactionsManagerService.create(persistence);
    consumer = serviceBinder
        .setAddress("transactions_manager.myapp")
        .register(TransactionsManagerService.class, transactionsManagerService);
  }

  /**
   * This method constructs the router factory, mounts services and handlers and starts the http server with built router
   * @return
   */
  private Future<Void> startHttpServer() {
    return RouterBuilder.create(this.vertx, "openapi.json")
      .onFailure(Throwable::printStackTrace) // In case the contract loading failed print the stacktrace
      .compose(routerBuilder -> {
        // Mount services on event bus based on extensions
        routerBuilder.mountServicesFromExtensions();

        // Generate the router
        Router router = routerBuilder.createRouter();
        router.errorHandler(400, ctx -> {
          LOG.debug("Bad Request", ctx.failure());
        });
        server = vertx.createHttpServer(new HttpServerOptions().setPort(8080).setHost("localhost")).requestHandler(router);
        return server.listen().mapEmpty();
      });
  }

  @Override
  public void start(Promise<Void> promise) {
    startTransactionService();
    startHttpServer().onComplete(promise);
  }

  /**
   * This method closes the http server and unregister all services loaded to Event Bus
   */
  @Override
  public void stop(){
    this.server.close();
    consumer.unregister();
  }

  public static void main(String[] args) {
    Vertx vertx = Vertx.vertx();
    vertx.deployVerticle(new WebApiServiceExampleMainVerticle());
  }

}


text:
package org.intellij.lang.regexp.psi;

/**
 * @author yole
 */
public interface RegExpPyCondRef extends RegExpAtom {
}


text:
All notable changes to this project will be documented in this file.

#### v1.0.0
> 9 December 2017
- Adding Change Log to Vue Project [`c6b4187`](https://github.com/glandre/prototypes/commit/c6b4187a4e9ab8ab527c28cebd942b98cdef3b38)
- Zoho Experiments [`924d9a7`](https://github.com/glandre/prototypes/commit/924d9a7518489afc0c9d404b7440919aa741ab29)
- Laravel Authentication (scaffolded) [`0672651`](https://github.com/glandre/prototypes/commit/0672651cfc4f73e1136bca7f23ec5617f0265b87)


text:
package org.spongepowered.despector.config;

/**
 * Static config designed to be set when despector is being used as a library.
 */
public class LibraryConfiguration {

    public static boolean quiet = false;
    public static boolean parallel = true;
    public static boolean print_times = false;
    public static boolean force_lang = false;

    // Viewer control fields
    public static boolean emit_block_debug = false;
    public static int failed_method_count = 0;
    public static int total_method_count = 0;

}


text:
<!doctype html>

	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>RangedSet | ip-num</title>
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">

						Search
						<input id="tsd-search-field" type="text" />

Preparing search index...

The search index is not available

					ip-num

						Options

								All

Public

Public/Protected

All

							<input type="checkbox" id="tsd-filter-inherited" checked />
							Inherited
							<input type="checkbox" id="tsd-filter-externals" checked />
							Externals
							<input type="checkbox" id="tsd-filter-only-exported" />
							Only exported

					Menu

					Globals

					"IPRange"

					RangedSet

Class RangedSet<T>

Represents a continuous segment of either IPv4 or IPv6 numbers
							without adhering to classless inter-domain routing scheme
						for allocating IP addresses.

Type parameters

T: AbstractIPNum

Hierarchy

						RangedSet

Implements

Iterable<AbstractIPNum>

Index

Constructors

constructor

Properties

bit<wbr>Value

current<wbr>Value

first

last

Methods

[<wbr>Symbol.iterator]

append

contains

difference

get<wbr>First

get<wbr>Last

get<wbr>Size

inside

is<wbr>Cidr<wbr>Able

is<wbr>Consecutive

is<wbr>Equals

is<wbr>Greater<wbr>Than

is<wbr>Less<wbr>Than

is<wbr>Overlapping

prepend

subtract

take

take<wbr>Sub<wbr>Range

to<wbr>Cidr<wbr>Range

toIPv4<wbr>Cidr<wbr>Range

toIPv6<wbr>Cidr<wbr>Range

to<wbr>Range<wbr>String

union

from<wbr>Cidr<wbr>Range

from<wbr>Range<wbr>String

from<wbr>SingleIP

Constructors

constructor

new <wbr>Ranged<wbr>Set(first: T, last: T): RangedSet

Defined in IPRange.ts:73

Constructor for an instance of RangedSet from an
									instance of either IPv4CidrRange or IPv6CidrRange

Throws an exception if first IP number is not less than given last IP number

Parameters

first: T

the first IP number of the range

last: T

the last IP number of the range

Returns RangedSet

Properties

bit<wbr>Value

bit<wbr>Value: BigInteger

Defined in IPRange.ts:18

Private current<wbr>Value

current<wbr>Value: T

Defined in IPRange.ts:19

Private first

first: T

Defined in IPRange.ts:20

Private last

last: T

Defined in IPRange.ts:21

Methods

[<wbr>Symbol.iterator]

[<wbr>Symbol.iterator](): IterableIterator<AbstractIPNum>

Defined in IPRange.ts:380

Returns IterableIterator<AbstractIPNum>

append

append(otherRange: RangedSet<T>): RangedSet<T>

Defined in IPRange.ts:306

Appends given range with this range.
									The last IP in this range should be adjacent to the first IP in range to append

Parameters

otherRange: RangedSet<T>

the other range to append

Returns RangedSet<T>

contains

contains(otherRange: RangedSet<AbstractIPNum>): boolean

Defined in IPRange.ts:142

Checks if this range contains the given other range.

Parameters

otherRange: RangedSet<AbstractIPNum>

the other range to check if this range contains

Returns boolean

difference

difference(range: RangedSet<AbstractIPNum>): Array<RangedSet<AbstractIPNum>>

Defined in IPRange.ts:349

Parameters

range: RangedSet<AbstractIPNum>

Returns Array<RangedSet<AbstractIPNum>>

get<wbr>First

get<wbr>First(): T

Defined in IPRange.ts:97

Returns the first IP number in the range

Returns T

get<wbr>Last

get<wbr>Last(): T

Defined in IPRange.ts:104

Returns the last IP number in the range

Returns T

get<wbr>Size

get<wbr>Size(): BigInteger

Defined in IPRange.ts:111

Returns the size, which is the number of IP numbers in the range.

Returns BigInteger

inside

inside(otherRange: RangedSet<T>): boolean

Defined in IPRange.ts:128

Checks if this range is inside another range.

Parameters

otherRange: RangedSet<T>

the other range to check if this range is inside of.

Returns boolean

is<wbr>Cidr<wbr>Able

is<wbr>Cidr<wbr>Able(): boolean

Defined in IPRange.ts:218

Check if this range can be converted to a CIDR range.

Returns boolean

is<wbr>Consecutive

is<wbr>Consecutive(otherRange: RangedSet<T>): boolean

Defined in IPRange.ts:246

Checks if this range is consecutive with another range.

This means if the two ranges can be placed side by side, without any gap. Hence Equal
								or ranges contained inside one another, or overlapping ranges are not considered as consecutive.

Parameters

otherRange: RangedSet<T>

the other range to check if this range is consecutive to.

Returns boolean

is<wbr>Equals

is<wbr>Equals(otherRange: RangedSet<T>): boolean

Defined in IPRange.ts:156

Check if this range is equal to the given other range.

Parameters

otherRange: RangedSet<T>

the other range to check if equal to this range.

Returns boolean

is<wbr>Greater<wbr>Than

is<wbr>Greater<wbr>Than(otherRange: RangedSet<T>): boolean

Defined in IPRange.ts:182

Check if this range is greater than the given range.

Parameters

otherRange: RangedSet<T>

the other range to check if greater than.

Returns boolean

is<wbr>Less<wbr>Than

is<wbr>Less<wbr>Than(otherRange: RangedSet<T>): boolean

Defined in IPRange.ts:166

Check if this range is less than the given range.

Parameters

otherRange: RangedSet<T>

the other range to check if less than.

Returns boolean

is<wbr>Overlapping

is<wbr>Overlapping(otherRange: RangedSet<T>): boolean

Defined in IPRange.ts:202

Checks of this range overlaps with a given other range.

This means it checks if part of a range is part of another range without
									being totally contained in the other range. Hence Equal or ranges contained inside one
								another are not considered as overlapping.

Parameters

otherRange: RangedSet<T>

the other range to check if it overlaps with this range.

Returns boolean

prepend

prepend(otherRange: RangedSet<T>): RangedSet<T>

Defined in IPRange.ts:292

Prepends given range with this range.
									The last IP in the given range should be adjacent to the first IP in this range

Parameters

otherRange: RangedSet<T>

the other range to prepend

Returns RangedSet<T>

subtract

subtract(otherRange: RangedSet<T>): RangedSet<T>

Defined in IPRange.ts:314

Parameters

otherRange: RangedSet<T>

Returns RangedSet<T>

take

take(count?: undefined | number): Iterable<AbstractIPNum>

Defined in IPRange.ts:370

Parameters

Optional count: undefined | number

Returns Iterable<AbstractIPNum>

take<wbr>Sub<wbr>Range

take<wbr>Sub<wbr>Range(offset: BigInteger, size: BigInteger): RangedSet<AbstractIPNum>

Defined in IPRange.ts:330

Returns a sub range of a given size from this range.

Parameters

offset: BigInteger

offset from this range where the subrange should begin

size: BigInteger

the size of the range

Returns RangedSet<AbstractIPNum>

to<wbr>Cidr<wbr>Range

to<wbr>Cidr<wbr>Range(): IPv4CidrRange | IPv6CidrRange

Defined in IPRange.ts:230

Converts an instance of range to an instance of CIDR range

Returns IPv4CidrRange
								 |
								IPv6CidrRange

Private toIPv4<wbr>Cidr<wbr>Range

toIPv4<wbr>Cidr<wbr>Range(): IPv4CidrRange

Defined in IPRange.ts:384

Returns IPv4CidrRange

Private toIPv6<wbr>Cidr<wbr>Range

toIPv6<wbr>Cidr<wbr>Range(): IPv6CidrRange

Defined in IPRange.ts:396

Returns IPv6CidrRange

to<wbr>Range<wbr>String

to<wbr>Range<wbr>String(): string

Defined in IPRange.ts:119

Converts to a string representation of the range in the form of:
									<first-ip>-<last-ip>

Returns string

union

union(otherRange: RangedSet<T>): RangedSet<T>

Defined in IPRange.ts:264

Creates a range that is a union of this range and the given other range.

Parameters

otherRange: RangedSet<T>

the other range to combine with this range

Returns RangedSet<T>

Static from<wbr>Cidr<wbr>Range

from<wbr>Cidr<wbr>Range<U>(cidrRange: U): RangedSet<InferIPTypeFromRangeType<U>>

Defined in IPRange.ts:38

Convenience method for constructing an instance of RangedSet from an
									instance of either IPv4CidrRange or IPv6CidrRange

Type parameters

U: IPv6CidrRange | IPv4CidrRange

Parameters

cidrRange: U

an instance of RangedSet

Returns RangedSet<InferIPTypeFromRangeType<U>>

Static from<wbr>Range<wbr>String

from<wbr>Range<wbr>String(rangeString: string): RangedSet<IPv4> | RangedSet<IPv6>

Defined in IPRange.ts:51

Convenience method for constructing an instance of RangedSet from
									a range string in the form of firstIp-lastIp

Parameters

rangeString: string

string in the form of firstIp-lastIp

Returns RangedSet<IPv4>
								 |
								RangedSet<IPv6>

Static from<wbr>SingleIP

from<wbr>SingleIP<T>(ip: T): RangedSet<T>

Defined in IPRange.ts:29

Convenience method for constructing an instance of RangedSet from a
									single IP number.

Type parameters

T: AbstractIPNum

Parameters

ip: T

The IP number, either IPv4 or IPv6 to construct the range from.

Returns RangedSet<T>

						Globals

						"<wbr>Binary<wbr>Utils"

						"<wbr>Hexadecatet"

						"<wbr>Hexadecimal<wbr>Utils"

						"IPNum<wbr>Type"

						"IPNumber"

						"IPPool"

						"IPRange"

						"IPv6<wbr>Utils"

						"<wbr>Octet"

						"<wbr>Prefix"

						"<wbr>Validator"

						"index"

						AbstractIPRange

						IPv4<wbr>Cidr<wbr>Range

						IPv6<wbr>Cidr<wbr>Range

						Ranged<wbr>Set

								constructor

								bit<wbr>Value

								current<wbr>Value

								first

								last

								[<wbr>Symbol.iterator]

								append

								contains

								difference

								get<wbr>First

								get<wbr>Last

								get<wbr>Size

								inside

								is<wbr>Cidr<wbr>Able

								is<wbr>Consecutive

								is<wbr>Equals

								is<wbr>Greater<wbr>Than

								is<wbr>Less<wbr>Than

								is<wbr>Overlapping

								prepend

								subtract

								take

								take<wbr>Sub<wbr>Range

								to<wbr>Cidr<wbr>Range

								toIPv4<wbr>Cidr<wbr>Range

								toIPv6<wbr>Cidr<wbr>Range

								to<wbr>Range<wbr>String

								union

								from<wbr>Cidr<wbr>Range

								from<wbr>Range<wbr>String

								from<wbr>SingleIP

						InferIPType<wbr>From<wbr>Range<wbr>Type

Legend

Module

Object literal

Variable

Function

Function with type parameter

Index signature

Type alias

Type alias with type parameter

Enumeration

Enumeration member

Property

Method

Interface

Interface with type parameter

Constructor

Property

Method

Index signature

Class

Class with type parameter

Constructor

Property

Method

Accessor

Index signature

Inherited constructor

Inherited property

Inherited method

Inherited accessor

Protected property

Protected method

Protected accessor

Private property

Private method

Private accessor

Static property

Static method

Generated using TypeDoc


text:
============
Installation
============

At the command line::

    $ easy_install {{ cookiecutter.repo_name }}

Or, if you have virtualenvwrapper installed::

    $ mkvirtualenv {{ cookiecutter.repo_name }}
    $ pip install {{ cookiecutter.repo_name }}


text:
define(
({
  viewer:{
    main:{
      scaleBarUnits: "english", //"english (for miles) or "metric" (for km) - don't translate.
      legendLabel: "Leyenda",
      descriptionLabel: "Descripción"
    },
    errors:{
      createMap: "No se puede crear el mapa",
      general: "Error"
    },
    footer:{
    	label: "Un mapa de:"
    }
  }
})
);


text:
require 'test_helper'

class PortfolioNetValueTest < ActiveSupport::TestCase
  # test "the truth" do
  #   assert true
  # end
end