text:
#pragma once

#include "lldb/API/SBPlatform.h"

#include "ManagedUniquePtr.h"

namespace YetiVSI {
namespace DebugEngine {

using namespace LldbApi;

private
ref class LLDBPlatformConnectOptions sealed : SbPlatformConnectOptions {
 public:
  LLDBPlatformConnectOptions(lldb::SBPlatformConnectOptions);
  virtual ~LLDBPlatformConnectOptions(){};
  virtual System::String ^ GetUrl();

  // Get the underlying lldb object.
  lldb::SBPlatformConnectOptions GetNativeObject();

 private:
  ManagedUniquePtr<lldb::SBPlatformConnectOptions> ^ platform_connect_options_;
};

}  // namespace DebugEngine
}  // namespace YetiVSI


text:
$known_keys = @{
	"remote_key.snk" = $true;
	"enyim.snk" = $true;
	"private_key.snk" = $true;
	"enyim_public.snk" = $false;
}

function Find-SigningKey {
	Param (
		[Parameter(Mandatory)]
		[string] $SolutionRoot
	)

	if ($env:REMOTE_KEY) {
		[System.IO.File]::WriteAllBytes("$SolutionRoot\remote_key.snk", [System.Convert]::FromBase64String($env:REMOTE_KEY))
	}

	foreach ($kvp in $known_keys.GetEnumerator())
	{
		$key = "$SolutionRoot\$($kvp.Key)"
		if (test-path $key) {
			return @{ Path = $key; Private = $kvp.Value }
		}
	}
}

function Remove-SigningKey {
	Param (
		[Parameter(Mandatory)]
		[string] $SolutionRoot
	)

	$p = "$SolutionRoot\remote_key.snk"

	if ($env:REMOTE_KEY -and (test-path $p)) {
		Remove-Item $p -Force
	}
}

function Get-MSBuildSigningParameters {
	Param (
		[Parameter(Mandatory)]
		[string] $SolutionRoot
	)

	$p = Find-SigningKey $SolutionRoot

	if ($p) {
		return @{
			AssemblyOriginatorKeyFile = $p.Path;
			DelaySign = !$p.Private;
			SignAssembly = $true;
		}
	}

	return @{ SignAssembly = $false; }
}

Export-ModuleMember -function Get-MSBuildSigningParameters, Find-SigningKey, Remove-SigningKey

<#

	Copyright (c) Attila Kiskó, enyim.com

	Licensed under the Apache License, Version 2.0 (the "License");
	you may not use this file except in compliance with the License.
	You may obtain a copy of the License at

		http://www.apache.org/licenses/LICENSE-2.0

	Unless required by applicable law or agreed to in writing, software
	distributed under the License is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the License for the specific language governing permissions and
	limitations under the License.

#>

redpajama_set_name: RedPajamaGithub


text:
  Mérindol-les-Oliviers est
       un village
       géographiquement positionné dans le département de Drôme en Rhône-Alpes. Elle comptait 188 habitants en 2008.

Le nombre d'habitations, à Mérindol-les-Oliviers, se décomposait en 2011 en 22 appartements et 135 maisons soit
 un marché plutôt équilibré.

La commune compte quelques  équipements, elle propose entre autres un terrain de tennis.

Si vous pensez emmenager à Mérindol-les-Oliviers, vous pourrez facilement trouver une maison à acheter.

À proximité de Mérindol-les-Oliviers sont localisées les villes de
Propiac localisée à 3 km, 105 habitants,
Mollans-sur-Ouvèze localisée à 4 km, 968 habitants,
Saint-Marcellin-lès-Vaison située à 6 km, 336 habitants,
Piégon à 3 km, 228 habitants,
Puyméras située à 2 km, 615 habitants,
Beauvoisin localisée à 5 km, 149 habitants,
 entre autres. De plus, Mérindol-les-Oliviers est située à seulement 26 km de Carpentras.


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Salix kansuensis K.S.Hao

### Remarks
null


text:
package pl.umk.mat.zawodyweb.checker.classes;

import java.util.Properties;
import pl.umk.mat.zawodyweb.judge.commons.CheckerInterface;
import pl.umk.mat.zawodyweb.judge.commons.TestInput;
import pl.umk.mat.zawodyweb.judge.commons.TestOutput;
import pl.umk.mat.zawodyweb.judge.commons.Program;
import pl.umk.mat.zawodyweb.database.ResultsStatusEnum;

/**
 *
 * @author lukash2k
 */
public class NormalDiff implements CheckerInterface {

    private int diff(String codeText, String rightText) {
        int i = 0;
        int j = 0;

        if (codeText == null || rightText == null) {
            if (codeText == null && rightText == null) {
                return 0;
            }
            return 1;
        }
        int rightTextLength = rightText.length();
        int codeTextLength = codeText.length();
        while (i < rightTextLength && j < codeTextLength) {
            if ((Character.isWhitespace(rightText.charAt(i))
                    && Character.isWhitespace(codeText.charAt(j)))
                    || (i == 0
                    && Character.isWhitespace(codeText.charAt(j)))
                    || (j == 0
                    && Character.isWhitespace(rightText.charAt(i)))) {
                while (i < rightTextLength
                        && Character.isWhitespace(rightText.charAt(i))) {
                    i++;
                }

                while (j < codeTextLength
                        && Character.isWhitespace(codeText.charAt(j))) {
                    j++;
                }

            } else if (rightText.charAt(i) == codeText.charAt(j)) {
                i++;
                j++;
            } else {
                return 1;
            }
        }
        if (i == rightTextLength && j == codeTextLength) {
            return 0;
        } else if (i == rightTextLength
                && Character.isWhitespace(codeText.charAt(j))) {
            while (j < codeTextLength
                    && Character.isWhitespace(codeText.charAt(j))) {
                j++;
            }
        } else if (j == codeTextLength
                && Character.isWhitespace(rightText.charAt(i))) {
            while (i < rightTextLength
                    && Character.isWhitespace(rightText.charAt(i))) {
                i++;
            }
        }
        if (i == rightTextLength && j == codeTextLength) {
            return 0;
        } else if (i == rightTextLength || j == codeTextLength) {
            return 1;
        }
        return -1;

    }

    @Override
    public TestOutput check(Program program, TestInput input, TestOutput output) {
        TestOutput codeOutput = program.runTest(input);
        if (codeOutput.getStatus() != ResultsStatusEnum.UNDEF.getCode()) {
            return codeOutput;
        }

        String codeText = codeOutput.getOutputText();
        String rightText = output.getOutputText();
        if (diff(codeText, rightText) == 0) {
            codeOutput.setStatus(ResultsStatusEnum.ACC.getCode());
            codeOutput.setPoints(input.getMaxPoints());
        } else {
            codeOutput.setStatus(ResultsStatusEnum.WA.getCode());
            codeOutput.setPoints(0);
        }
        codeOutput.setOutputText(null);
        return codeOutput;
    }

    @Override
    public void setProperties(Properties properties) {
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>

<!--L
  Copyright Oracle Inc

  Distributed under the OSI-approved BSD 3-Clause License.
  See http://ncip.github.com/cadsr-cgmdr-nci-uk/LICENSE.txt for details.
L-->

<cgMDR:Enumerated_Conceptual_Domain xmlns:cgMDR="http://www.cancergrid.org/schema/cgMDR" item_registration_authority_identifier="GB-CANCERGRID-MB" data_identifier="61832E736" version="0.1">
    <cgMDR:administered_item_administration_record>
        <cgMDR:administrative_note>please complete administrative-note...</cgMDR:administrative_note>
        <cgMDR:administrative_status>noPendingChanges</cgMDR:administrative_status>
        <cgMDR:creation_date>2007-08-29+01:00</cgMDR:creation_date>
        <cgMDR:effective_date>2007-08-29+01:00</cgMDR:effective_date>
        <cgMDR:last_change_date>2007-08-29+01:00</cgMDR:last_change_date>
        <cgMDR:registration_status>recorded</cgMDR:registration_status>
    </cgMDR:administered_item_administration_record>
    <cgMDR:administered_by>GB-CANCERGRID-300003-1</cgMDR:administered_by>
    <cgMDR:registered_by>GB-CANCERGRID-300004-1</cgMDR:registered_by>
    <cgMDR:submitted_by>GB-CANCERGRID-300003-1</cgMDR:submitted_by>
    <cgMDR:having>
        <cgMDR:context_identifier>GB-CANCERGRID-900001-1</cgMDR:context_identifier>
        <cgMDR:containing>
            <cgMDR:language_section_language_identifier>
                <cgMDR:country_identifier>GB</cgMDR:country_identifier>
                <cgMDR:language_identifier>eng</cgMDR:language_identifier>
            </cgMDR:language_section_language_identifier>
            <cgMDR:name>Breast Cancer Nottingham Histological type</cgMDR:name>
            <cgMDR:definition_text>The histological tumour type classification scheme used by the Nottingham Clinical Database</cgMDR:definition_text>
            <cgMDR:preferred_designation>true</cgMDR:preferred_designation>
            <cgMDR:definition_source_reference/>
        </cgMDR:containing>
    </cgMDR:having>
    <cgMDR:Value_Meaning>
        <cgMDR:value_meaning_begin_date >2007-08-29+01:00</cgMDR:value_meaning_begin_date>
        <cgMDR:value_meaning_description >Invasive ductal/No special type</cgMDR:value_meaning_description>
        <cgMDR:value_meaning_identifier >5E07254AC</cgMDR:value_meaning_identifier>
    </cgMDR:Value_Meaning>
    <cgMDR:Value_Meaning>
        <cgMDR:value_meaning_begin_date >2007-08-29+01:00</cgMDR:value_meaning_begin_date>
        <cgMDR:value_meaning_description >Tubular mixed</cgMDR:value_meaning_description>
        <cgMDR:value_meaning_identifier >4BAA71C76</cgMDR:value_meaning_identifier>
    </cgMDR:Value_Meaning>
    <cgMDR:Value_Meaning>
        <cgMDR:value_meaning_begin_date >2007-08-29+01:00</cgMDR:value_meaning_begin_date>
        <cgMDR:value_meaning_description >Typical medullary</cgMDR:value_meaning_description>
        <cgMDR:value_meaning_identifier >D906971CC</cgMDR:value_meaning_identifier>
    </cgMDR:Value_Meaning>
    <cgMDR:Value_Meaning>
        <cgMDR:value_meaning_begin_date >2007-08-29+01:00</cgMDR:value_meaning_begin_date>
        <cgMDR:value_meaning_description >Atypical medullary</cgMDR:value_meaning_description>
        <cgMDR:value_meaning_identifier >44E62AD7D</cgMDR:value_meaning_identifier>
    </cgMDR:Value_Meaning>
    <cgMDR:Value_Meaning>
        <cgMDR:value_meaning_begin_date >2007-08-29+01:00</cgMDR:value_meaning_begin_date>
        <cgMDR:value_meaning_description >Clasical lobular</cgMDR:value_meaning_description>
        <cgMDR:value_meaning_identifier >E282B12E3</cgMDR:value_meaning_identifier>
    </cgMDR:Value_Meaning>
    <cgMDR:Value_Meaning>
        <cgMDR:value_meaning_begin_date >2007-08-29+01:00</cgMDR:value_meaning_begin_date>
        <cgMDR:value_meaning_description >Alveolar lobular</cgMDR:value_meaning_description>
        <cgMDR:value_meaning_identifier >BE29B813E</cgMDR:value_meaning_identifier>
    </cgMDR:Value_Meaning>
    <cgMDR:Value_Meaning>
        <cgMDR:value_meaning_begin_date >2007-08-29+01:00</cgMDR:value_meaning_begin_date>
        <cgMDR:value_meaning_description >Solid lobular</cgMDR:value_meaning_description>
        <cgMDR:value_meaning_identifier >157CB75A8</cgMDR:value_meaning_identifier>
    </cgMDR:Value_Meaning>
    <cgMDR:Value_Meaning>
        <cgMDR:value_meaning_begin_date >2007-08-29+01:00</cgMDR:value_meaning_begin_date>
        <cgMDR:value_meaning_description >Tubulolobular</cgMDR:value_meaning_description>
        <cgMDR:value_meaning_identifier >156BA6B68</cgMDR:value_meaning_identifier>
    </cgMDR:Value_Meaning>
    <cgMDR:Value_Meaning>
        <cgMDR:value_meaning_begin_date >2007-08-29+01:00</cgMDR:value_meaning_begin_date>
        <cgMDR:value_meaning_description >Lobular mixed</cgMDR:value_meaning_description>
        <cgMDR:value_meaning_identifier >1356AC947</cgMDR:value_meaning_identifier>
    </cgMDR:Value_Meaning>
    <cgMDR:Value_Meaning>
        <cgMDR:value_meaning_begin_date >2007-08-29+01:00</cgMDR:value_meaning_begin_date>
        <cgMDR:value_meaning_description >Tubular</cgMDR:value_meaning_description>
        <cgMDR:value_meaning_identifier >49BCB7D1A</cgMDR:value_meaning_identifier>
    </cgMDR:Value_Meaning>
    <cgMDR:Value_Meaning>
        <cgMDR:value_meaning_begin_date >2007-08-29+01:00</cgMDR:value_meaning_begin_date>
        <cgMDR:value_meaning_description >Mucinous</cgMDR:value_meaning_description>
        <cgMDR:value_meaning_identifier >98A02E595</cgMDR:value_meaning_identifier>
    </cgMDR:Value_Meaning>
    <cgMDR:Value_Meaning>
        <cgMDR:value_meaning_begin_date >2007-08-29+01:00</cgMDR:value_meaning_begin_date>
        <cgMDR:value_meaning_description >Invasive cribriform</cgMDR:value_meaning_description>
        <cgMDR:value_meaning_identifier >729994E2D</cgMDR:value_meaning_identifier>
    </cgMDR:Value_Meaning>
    <cgMDR:Value_Meaning>
        <cgMDR:value_meaning_begin_date >2007-08-29+01:00</cgMDR:value_meaning_begin_date>
        <cgMDR:value_meaning_description >Invasive papillary</cgMDR:value_meaning_description>
        <cgMDR:value_meaning_identifier >244D2A0A7</cgMDR:value_meaning_identifier>
    </cgMDR:Value_Meaning>
    <cgMDR:Value_Meaning>
        <cgMDR:value_meaning_begin_date >2007-08-29+01:00</cgMDR:value_meaning_begin_date>
        <cgMDR:value_meaning_description >Mixed nst and lobular</cgMDR:value_meaning_description>
        <cgMDR:value_meaning_identifier >51595AB77</cgMDR:value_meaning_identifier>
    </cgMDR:Value_Meaning>
    <cgMDR:Value_Meaning>
        <cgMDR:value_meaning_begin_date >2007-08-29+01:00</cgMDR:value_meaning_begin_date>
        <cgMDR:value_meaning_description >Mixed nst and a special type</cgMDR:value_meaning_description>
        <cgMDR:value_meaning_identifier >B0A16BDB2</cgMDR:value_meaning_identifier>
    </cgMDR:Value_Meaning>
</cgMDR:Enumerated_Conceptual_Domain>


text:
namespace arrow {

class Command {
 public:
  Command() { }

  virtual ~Command() noexcept;

  Command(const Command& other) = delete;
  Command(Command&& other) = delete;
  Command& operator=(const Command& other) = delete;
  Command& operator=(Command&& other) = delete;

  /// Name of the command (for use in `help`).
  virtual const char* name() const noexcept = 0;

  /// Description of the command (for use in `help`).
  virtual const char* description() const noexcept = 0;

  /// Run the command and return its result.
  int operator()(int argc, char** argv, char** environ);

 private:
  virtual void add_options(
    boost::program_options::options_description&,
    boost::program_options::positional_options_description&
  ) { }

  virtual int run(const boost::program_options::variables_map& vm) = 0;
};

/// Specialization of Command that expects an input-file as a positional
/// option
class InputCommand : public Command {
 public:
  InputCommand() { }

  virtual ~InputCommand() noexcept;

  InputCommand(const InputCommand& other) = delete;
  InputCommand(InputCommand&& other) = delete;
  InputCommand& operator=(const InputCommand& other) = delete;
  InputCommand& operator=(InputCommand&& other) = delete;

  /// Name of the command (for use in `help`).
  virtual const char* name() const noexcept = 0;

  /// Description of the command (for use in `help`).
  virtual const char* description() const noexcept = 0;

 private:
  virtual void add_options(
    boost::program_options::options_description&,
    boost::program_options::positional_options_description&);

  virtual int run(const boost::program_options::variables_map& vm);

  virtual int run_with_input(
    ptr<std::istream> is,
    const boost::program_options::variables_map& vm) = 0;
};

}  // namespace arrow

#endif  // ARROW_COMMAND_H

#include "arrow/command/tokenize.hpp"
#include "arrow/command/parse.hpp"
#include "arrow/command/compile.hpp"


text:
#include <initializer_list>
#include <vector>

typedef struct {
    int slot1;
    int slot2;
    int slot3;
    int slot4;
    int slot5;
    int slot6;
    int slot7;
    int slot8;
    int slot9;
    int result;
} CraftingRecipe;

void make_recipe(std::initializer_list<int> line1_, std::initializer_list<int> line2_, std::initializer_list<int> line3_, int result, std::vector<CraftingRecipe>* recipes);
void make_recipe(std::initializer_list<int> line1_, std::initializer_list<int> line2_, int result, std::vector<CraftingRecipe>* recipes);
void make_recipe(std::initializer_list<int> line1_, int result, std::vector<CraftingRecipe>* recipes);

#endif // CRAFTING_RECIPE_H


text:
package org.bbreak.excella.core.test.util;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * チェック例外クラス
 *
 * @since 1.0
 */
@SuppressWarnings( "serial")
public class CheckException extends Exception {

    /** メッセージリスト */
    private List<CheckMessage> checkMessages = new ArrayList<CheckMessage>();

    /**
     * コンストラクタ
     * @param checkMessages メッセージリスト
     */
    public CheckException( List<CheckMessage> checkMessages) {
        this.checkMessages.addAll( checkMessages);
    }

    public boolean add( CheckMessage checkMessage) {
        return checkMessages.add( checkMessage);
    }

    public boolean addAll( Collection<? extends CheckMessage> collection) {
        return checkMessages.addAll( collection);
    }

    public void clear() {
        checkMessages.clear();
    }

    public List<CheckMessage> getCheckMessages() {
        return checkMessages;
    }

    public String getCheckMessagesToString() {
        StringBuffer buffer = new StringBuffer();
        if ( !checkMessages.isEmpty()) {
            buffer.append( "相違がありました。\n");
        }
        for ( CheckMessage checkMessage : checkMessages) {
            buffer.append( "[" + checkMessage.getMessage()).append( "]\n");
            buffer.append( "期待値:").append( checkMessage.getExpected()).append( "\n");
            buffer.append( "実測値:").append( checkMessage.getActual()).append( "\n");
        }
        return buffer.toString();
    }
}


text:
version: v1.7.9
permalink: /docs/tutorial/electron-versioning/
category: Tutorial
redirect_from:
  - /docs/v0.37.8/tutorial/electron-versioning/
  - /docs/v0.37.7/tutorial/electron-versioning/
  - /docs/v0.37.6/tutorial/electron-versioning/
  - /docs/v0.37.5/tutorial/electron-versioning/
  - /docs/v0.37.4/tutorial/electron-versioning/
  - /docs/v0.37.3/tutorial/electron-versioning/
  - /docs/v0.37.1/tutorial/electron-versioning/
  - /docs/v0.37.0/tutorial/electron-versioning/
  - /docs/v0.36.12/tutorial/electron-versioning/
  - /docs/v0.36.11/tutorial/electron-versioning/
  - /docs/v0.36.10/tutorial/electron-versioning/
  - /docs/v0.36.9/tutorial/electron-versioning/
  - /docs/v0.36.8/tutorial/electron-versioning/
  - /docs/v0.36.7/tutorial/electron-versioning/
  - /docs/v0.36.6/tutorial/electron-versioning/
  - /docs/v0.36.5/tutorial/electron-versioning/
  - /docs/v0.36.4/tutorial/electron-versioning/
  - /docs/v0.36.3/tutorial/electron-versioning/
  - /docs/v0.36.2/tutorial/electron-versioning/
  - /docs/v0.36.0/tutorial/electron-versioning/
  - /docs/v0.35.5/tutorial/electron-versioning/
  - /docs/v0.35.4/tutorial/electron-versioning/
  - /docs/v0.35.3/tutorial/electron-versioning/
  - /docs/v0.35.2/tutorial/electron-versioning/
  - /docs/v0.35.1/tutorial/electron-versioning/
  - /docs/v0.34.4/tutorial/electron-versioning/
  - /docs/v0.34.3/tutorial/electron-versioning/
  - /docs/v0.34.2/tutorial/electron-versioning/
  - /docs/v0.34.1/tutorial/electron-versioning/
  - /docs/v0.34.0/tutorial/electron-versioning/
  - /docs/v0.33.9/tutorial/electron-versioning/
  - /docs/v0.33.8/tutorial/electron-versioning/
  - /docs/v0.33.7/tutorial/electron-versioning/
  - /docs/v0.33.6/tutorial/electron-versioning/
  - /docs/v0.33.4/tutorial/electron-versioning/
  - /docs/v0.33.3/tutorial/electron-versioning/
  - /docs/v0.33.2/tutorial/electron-versioning/
  - /docs/v0.33.1/tutorial/electron-versioning/
  - /docs/v0.33.0/tutorial/electron-versioning/
  - /docs/v0.32.3/tutorial/electron-versioning/
  - /docs/v0.32.2/tutorial/electron-versioning/
  - /docs/v0.31.2/tutorial/electron-versioning/
  - /docs/v0.31.0/tutorial/electron-versioning/
  - /docs/v0.30.4/tutorial/electron-versioning/
  - /docs/v0.29.2/tutorial/electron-versioning/
  - /docs/v0.29.1/tutorial/electron-versioning/
  - /docs/v0.28.3/tutorial/electron-versioning/
  - /docs/v0.28.2/tutorial/electron-versioning/
  - /docs/v0.28.1/tutorial/electron-versioning/
  - /docs/v0.28.0/tutorial/electron-versioning/
  - /docs/v0.27.3/tutorial/electron-versioning/
  - /docs/v0.27.2/tutorial/electron-versioning/
  - /docs/v0.27.1/tutorial/electron-versioning/
  - /docs/v0.27.0/tutorial/electron-versioning/
  - /docs/v0.26.1/tutorial/electron-versioning/
  - /docs/v0.26.0/tutorial/electron-versioning/
  - /docs/v0.25.3/tutorial/electron-versioning/
  - /docs/v0.25.2/tutorial/electron-versioning/
  - /docs/v0.25.1/tutorial/electron-versioning/
  - /docs/v0.25.0/tutorial/electron-versioning/
  - /docs/v0.24.0/tutorial/electron-versioning/
  - /docs/v0.23.0/tutorial/electron-versioning/
  - /docs/v0.22.3/tutorial/electron-versioning/
  - /docs/v0.22.2/tutorial/electron-versioning/
  - /docs/v0.22.1/tutorial/electron-versioning/
  - /docs/v0.21.3/tutorial/electron-versioning/
  - /docs/v0.21.2/tutorial/electron-versioning/
  - /docs/v0.21.1/tutorial/electron-versioning/
  - /docs/v0.21.0/tutorial/electron-versioning/
  - /docs/v0.20.8/tutorial/electron-versioning/
  - /docs/v0.20.7/tutorial/electron-versioning/
  - /docs/v0.20.6/tutorial/electron-versioning/
  - /docs/v0.20.5/tutorial/electron-versioning/
  - /docs/v0.20.4/tutorial/electron-versioning/
  - /docs/v0.20.3/tutorial/electron-versioning/
  - /docs/v0.20.2/tutorial/electron-versioning/
  - /docs/v0.20.1/tutorial/electron-versioning/
  - /docs/v0.20.0/tutorial/electron-versioning/
  - /docs/latest/tutorial/electron-versioning/
source_url: >-
  https://github.com/electron/electron/blob/master/docs/tutorial/electron-versioning.md
title: Electron Versioning
excerpt: ''
sort_title: electron-versioning
---

<!--

                                      ::::
                                    :o+//+o:
                                    +o    oo-
                                    :o+//oo/+o/
                                      -::-   -oo:
                                               /s/
                      -::::::::-                :s/  :::--
                  :+oo+////////+:        -:/+oo/ :s:-///++oo+:
                /o+:                -/+oo+/:-     +o-      -:+o:
               /s:              -:+o+/:           -o+         :s/
              -s/            -/oo/:                /s-         +s-
              -s/         -/oo/-                   -s/         /s-
               oo       :+o/-                       oo         oo
               -s/    :oo/                          /s-       /s-
                :s/ :oo:              -::-          /s-      /s:
                  -+o/               /ssss/         :s:    -+o-
                 :o+--               /ssss/         :s:   :o+-
                :s/  +o:              -::-          /s-   --
               -s/    :+o/-                         /s-
               oo       -+o+-                       oo
              -s/         -/oo/-                   -s/
             -+soo+:         -/oo/:                /s-      /oooo+-
             o+   :s:           -:+o+/:-          -o+      /s:  -oo
             oo:--/s:       ::      -:+oo+/:-     -/-      /s/--:o+
              :+++/-        :s:          -:/+ooo++//////++oo//+o+:
                             /s:                --::::::--
                              /s/              /s-
                               :oo:          :oo:
                                 /oo/-    -/oo/
                                   -/+oooo+/-

                   _______  _______  _______  _______  __
                  |       ||       ||       ||       ||  |
                  |  _____||_     _||   _   ||    _  ||  |
                  | |_____   |   |  |  | |  ||   |_| ||  |
                  |_____  |  |   |  |  |_|  ||    ___||__|
                   _____| |  |   |  |       ||   |     __
                  |_______|  |___|  |_______||___|    |__|

    This file is generated automatically, so it should not be edited.

    To make changes, head over to the electron/electron repository:

    https://github.com/electron/electron/blob/master/docs/tutorial/electron-versioning.md

    Thanks!

-->
# Electron Versioning

If you've been using Node and npm for a while, you are probably aware of [Semantic Versioning](http://semver.org), or SemVer for short. It's a convention for specifying version numbers for software that helps communicate intentions to the users of your software.

## Overview of Semantic Versioning

Semantic versions are always made up of three numbers:

```
major.minor.patch

```

Semantic version numbers are bumped (incremented) using the following rules:

*   **Major** is for changes that break backwards compatibility.
*   **Minor** is for new features that don't break backwards compatibility.
*   **Patch** is for bug fixes and other minor changes.

A simple mnemonic for remembering this scheme is as follows:

```
breaking.feature.fix

```

## Electron Versioning

Due to its dependency on Node and Chromium, it is not possible for the Electron project to adhere to a SemVer policy. **You should therefore always reference a specific version of Electron.**

Electron version numbers are bumped using the following rules:

*   **Major** is for breaking changes in Electron's API. If you upgrade from `0.37.0` to `1.0.0`, you will have to make changes to your app.
*   **Minor** is for major Chrome and minor Node upgrades, or significant Electron changes. If you upgrade from `1.5.0` to `1.6.0`, your app is supposed to still work, but you might have to work around small changes.
*   **Patch** is for new features and bug fixes. If you upgrade from `1.6.2` to `1.6.3`, your app will continue to work as-is.

We recommend that you set a fixed version when installing Electron from npm:

```sh
npm install electron --save-exact --save-dev
```

The `--save-exact` flag will add `electron` to your `package.json` file without using a `^` or `~`, e.g. `1.6.2` instead of `^1.6.2`. This practice ensures that all upgrades of Electron are a manual operation made by you, the developer.

Alternatively, you can use the `~` prefix in your SemVer range, like `~1.6.2`. This will lock your major and minor version, but allow new patch versions to be installed.


text:
package hudson.plugins.git.extensions.impl;

import nl.jqno.equalsverifier.EqualsVerifier;
import org.junit.Test;

public class PruneStaleBranchTest {

    @Test
    public void equalsContract() {
        EqualsVerifier.forClass(PruneStaleBranch.class)
                .usingGetClass()
                .verify();
    }
}


text: Simple web app to help Fallout 4 players to hack terminals in game


text:
package com.amazonaws.services.ec2.model.transform;

import javax.annotation.Generated;

import com.amazonaws.SdkClientException;
import com.amazonaws.Request;
import com.amazonaws.DefaultRequest;
import com.amazonaws.http.HttpMethodName;
import com.amazonaws.services.ec2.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.StringUtils;

/**
 * DeregisterInstanceEventNotificationAttributesRequest Marshaller
 */

@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DeregisterInstanceEventNotificationAttributesRequestMarshaller implements
        Marshaller<Request<DeregisterInstanceEventNotificationAttributesRequest>, DeregisterInstanceEventNotificationAttributesRequest> {

    public Request<DeregisterInstanceEventNotificationAttributesRequest> marshall(
            DeregisterInstanceEventNotificationAttributesRequest deregisterInstanceEventNotificationAttributesRequest) {

        if (deregisterInstanceEventNotificationAttributesRequest == null) {
            throw new SdkClientException("Invalid argument passed to marshall(...)");
        }

        Request<DeregisterInstanceEventNotificationAttributesRequest> request = new DefaultRequest<DeregisterInstanceEventNotificationAttributesRequest>(
                deregisterInstanceEventNotificationAttributesRequest, "AmazonEC2");
        request.addParameter("Action", "DeregisterInstanceEventNotificationAttributes");
        request.addParameter("Version", "2016-11-15");
        request.setHttpMethod(HttpMethodName.POST);

        DeregisterInstanceTagAttributeRequest instanceTagAttribute = deregisterInstanceEventNotificationAttributesRequest.getInstanceTagAttribute();
        if (instanceTagAttribute != null) {

            if (instanceTagAttribute.getIncludeAllTagsOfInstance() != null) {
                request.addParameter("InstanceTagAttribute.IncludeAllTagsOfInstance",
                        StringUtils.fromBoolean(instanceTagAttribute.getIncludeAllTagsOfInstance()));
            }

            com.amazonaws.internal.SdkInternalList<String> deregisterInstanceTagAttributeRequestInstanceTagKeysList = (com.amazonaws.internal.SdkInternalList<String>) instanceTagAttribute
                    .getInstanceTagKeys();
            if (!deregisterInstanceTagAttributeRequestInstanceTagKeysList.isEmpty()
                    || !deregisterInstanceTagAttributeRequestInstanceTagKeysList.isAutoConstruct()) {
                int instanceTagKeysListIndex = 1;

                for (String deregisterInstanceTagAttributeRequestInstanceTagKeysListValue : deregisterInstanceTagAttributeRequestInstanceTagKeysList) {
                    if (deregisterInstanceTagAttributeRequestInstanceTagKeysListValue != null) {
                        request.addParameter("InstanceTagAttribute.InstanceTagKey." + instanceTagKeysListIndex,
                                StringUtils.fromString(deregisterInstanceTagAttributeRequestInstanceTagKeysListValue));
                    }
                    instanceTagKeysListIndex++;
                }
            }
        }

        return request;
    }

}


text:
END DATE: 11/21
Well. Tasks to do:

Implement RRT

More PRM / RRT -> what I want to do: write up mini report, investigate
* clutter
* maze
* more dimensions woo
* error bars
bidirectional RRT? and other fun things Implement `RRT*` and `FMT*`

Read `RRT*`-> more proof magic?  Read `FMT*`

* May be useful to write down things I learned each week, at this point. (from
  the technical perspective)

## Timeline
Plan for final 5 weeks:
```
11/14 - (actually we'll meet 11/15) have read RRT*/FMT* papers, maybe not 100% as this task will bleed into next week
11/21 - have actually finished reading RRT*/FMT* papers and implemented RRT*/PRM*/FMT* in simulation
11/28 - have a few genuine experiments run and have tried some alterations to the algorithms (which we will have discussed last time)
12/5 - finish up any final things from the past few weeks and have outline and/or early draft of final report
12/12 - close-to-final draft of final report
```

# Todo
* Error bars
* Calculate area *within* the room, as opposed to removing rectangles that fall
outside the room at all. I do the latter currently which results in a lot of
paths going through the narrow extra spaces near the walls.

# Todo
plot one of each pClutter, together on a subplot,  directly within the clutterExp() code

doublecheck yerr takes in 1 stddev or 1/2 stddev to center around the mean

!!!! Plot start and end goals, even if fail to find path...
This should DEFINITELY be done.

Check if obstacle covers start or end goals...(can a path be found at all?)

Allow obstacles to be generated outside of room (just calculate contained area)

# To run
use
`clutter_with_errorbars.jl`
and
`walls_experiment.jl`


text:
#Requires -Version 4.0

if (Test-Path "$PSScriptRoot\DockerClient") {
    Remove-Item -Recurse "$PSScriptRoot\DockerClient"
}

function getInstallationBlock {

$installationBlock = @'
nxScript DockerInstallation
{
    GetScript = "$getDockerClient"
    SetScript = "$setDockerClient"
    TestScript = "$testDockerClient"
}

'@

    return $installationBlock
}

function getServiceBlock {

$serviceBlock = @'
nxService DockerService
{
    Name = "docker"
    Controller = "init"
    Enabled = $true
    State = "Running"
    DependsOn = "[nxScript]DockerInstallation"
}

'@

    return $serviceBlock
}

function getImageBlock {
    param (
        $dockerImage,
        $isRemovable
    )

    $imageVarName = $dockerImage.Replace('-', "").Replace(':', "").Replace('/', "")

    if ($isRemovable -and $dockerImage.Contains(':')) {
        Set-Variable -Scope Script -Name "get$imageVarName" -Value ($bashString + '[[ $(docker images | grep "' + $dockerImage.Split(':')[0] + '" | awk ''{ print $2 }'') == "' + $dockerImage.Split(':')[1] + '" ]] && exit 1 || exit 0')
        Set-Variable -Scope Script -Name "test$imageVarName" -Value ($bashString + '[[ $(docker images | grep "' + $dockerImage.Split(':')[0] + '" | awk ''{ print $2 }'') == "' + $dockerImage.Split(':')[1] + '" ]] && exit 1 || exit 0')
        Set-Variable -Scope Script -Name "set$imageVarName" -Value ($bashString + 'docker rmi -f ' + $dockerImage)
    } elseif ($isRemovable) {
        Set-Variable -Scope Script -Name "get$imageVarName" -Value ($bashString + '[[ $(docker images | grep -c "' + $dockerImage + '") -gt 0 ]] && exit 1 || exit 0')
        Set-Variable -Scope Script -Name "test$imageVarName" -Value ($bashString + '[[ $(docker images | grep -c "' + $dockerImage + '") -gt 0 ]] && exit 1 || exit 0')
        Set-Variable -Scope Script -Name "set$imageVarName" -Value ($bashString + 'docker rmi -f ' + $dockerImage)
    } elseif ($dockerImage.Contains(':')) {
        Set-Variable -Scope Script  -Name "get$imageVarName" -Value ($bashString + '[[ $(docker images | grep "' + $dockerImage.Split(':')[0] + '" | awk ''{ print $2 }'') == "' + $dockerImage.Split(':')[1] + '" ]] && exit 0 || exit 1')
        Set-Variable -Scope Script -Name "test$imageVarName" -Value ($bashString + '[[ $(docker images | grep "' + $dockerImage.Split(':')[0] + '" | awk ''{ print $2 }'') == "' + $dockerImage.Split(':')[1] + '" ]] && exit 0 || exit 1')
        Set-Variable -Scope Script -Name "set$imageVarName" -Value ($bashString + 'docker pull ' + $dockerImage + '; exit 0')
    } else {
        Set-Variable -Scope Script -Name "get$imageVarName" -Value ($bashString + '[[ $(docker images | grep -c "' + $dockerImage + '") -gt 0 ]] && exit 0 || exit 1')
        Set-Variable -Scope Script -Name "test$imageVarName" -Value ($bashString + '[[ $(docker images | grep -c "' + $dockerImage + '") -gt 0 ]] && exit 0 || exit 1')
        Set-Variable -Scope Script -Name "set$imageVarName" -Value ($bashString + 'docker pull ' + $dockerImage + '; exit 0')
    }

$imageBlock = @"
nxScript $imageVarName
{
    GetScript = `$get$imageVarName
    SetScript = `$set$imageVarName
    TestScript = `$test$imageVarName
    DependsOn = "[nxService]DockerService"
}

"@

    return $imageBlock
}

function getContainerBlock {
    param
    (
        $containerName,
        $containerImage,
        $containerPort,
        $containerEnv,
        $containerLink,
        $containerCommand,
        $isRemovable
    )

    if ($isRemovable) {
        Set-Variable -Scope Script -Name "get$containerName" -Value ($bashString + '[[ $(docker ps -a | grep -c "' + $containerName + '") -ge 1 ]] && exit 1 || exit 0')
        Set-Variable -Scope Script -Name "test$containerName" -Value ($bashString + '[[ $(docker ps -a | grep -c "' + $containerName + '") -ge 1 ]] && exit 1 || exit 0')
        Set-Variable -Scope Script -Name "set$containerName" -Value ($bashString + 'docker rm -v -f ' + $containerName)
    } else {
        Set-Variable -Scope Script -Name "get$containerName" -Value ($bashString + '[[ $(docker ps -a | grep -c "' + $containerName + '") -ge 1 ]] && exit 0 || exit 1')
        Set-Variable -Scope Script -Name "test$containerName" -Value ($bashString + '[[ $(docker ps -a | grep -c "' + $containerName + '") -ge 1 ]] && exit 0 || exit 1')
        Set-Variable -Scope Script -Name "set$containerName" -Value ($bashString + '[[ $(docker run -d --name="' + $containerName + '"')

        if ($containerPort) {
            $existing = (Get-Variable -Name "set$containerName").Value
            $existing += ' -p ' + $containerPort
            Set-Variable -Scope Script -Name "set$containerName" -Value $existing
        }

        if ($containerEnv) {
            foreach ($env in $containerEnv) {
                $existing = (Get-Variable -Name "set$containerName").Value
                $existing += " -e `"$env`""
                Set-Variable -Scope Script -Name "set$containerName" -Value $existing
            }
        }

        if ($containerLink) {
            $existing = (Get-Variable -Name "set$containerName").Value
            $existing += ' --link ' + $containerLink
            Set-Variable -Scope Script -Name "set$containerName" -Value $existing
        }

        $existing = (Get-Variable -Name "set$containerName").Value
        $existing += ' ' + $containerImage
        Set-Variable -Scope Script -Name "set$containerName" -Value $existing

        if ($containerCommand) {
            $existing = (Get-Variable -Name "set$container").Value
            $existing += ' ' + $containerCommand
            Set-Variable -Scope Script -Name "set$containerName" -Value $existing
        }

        $existing = (Get-Variable -Name "set$containerName").Value
        $existing += ' ) ]] && exit 0 || exit 1'
        Set-Variable -Scope Script -Name "set$containerName" -Value $existing

        $imageVarName = $containerImage.Replace('-', "").Replace(':', "").Replace('/', "")

    }

$containerBlock = @"
nxScript $containerName
{
    GetScript = `$get$containerName
    SetScript = `$set$containerName
    TestScript = `$test$containerName
    DependsOn = `"[nxScript]$imageVarName`"
}

"@

    return $containerBlock
}

Configuration DockerClient
{

<#
.Synopsis
   Generate a configuration for Docker installation on Ubuntu
.DESCRIPTION
   This configuration ensures that the required components for Docker
   are installed on a specified node. A specified image can also be installed.
.PARAMETER Hostname
   The node on which the Docker configuration should be enacted. Use the built-in
   ConfigurationData parameter rather than the Hostname parameter if this configuration
   should be enacted upon more than one node.
.PARAMETER Image
   Docker image(s) to pull or remove. Pass a string or string array to this parameter
   to pull or or more images. Pass a hashtable or hashtable array to this parameter with
   the following properties to remove one or more images:

      - Name -> Name of image to remove
      - Remove -> Use $true to set image for removal

   This parameter also accepts an array of strings and hashtables to stage images for both add and removal
   as follows:

   DockerClient -Hostname $hostname -Image @("node:latest", @{Name="node:0.10";Remove=$true})

   The example above will pull the latest "node" image but remove the "node" image of version 0.10
   if it resides on the Docker host.
.PARAMETER Container
   Docker container(s) to run. This parameter requires one or more hashtables with the
   desired options for the container. Valid properties for the hashtable are:

      - Name -> Name to assign container
      - Image -> Image container will use
      - Port -> Port mapping
      - Env -> Environment variables to inject in to the container
      - Link -> Name of container to link to
      - Command -> Command to execute in container
      - Remove -> Boolean to indicate whether or not container should be removed

   When using this paramter, your hashtable must define at least the Name and Image properties, unless
   the Remove property is chosen in which case on the Name property needs to be defined. Use of this
   parameter does not require the use of the Image parameter unless you wish to configure a combination
   of containers and images.  The syntax for the properties listed above matches that of the corresponding
   options provided to the Docker command line client.

   All containers are run in daemon mode with the '-d' flag.
.EXAMPLE
   . .\DockerClient.ps1
   DockerClient -Hostname mgmt01.contoso.com

   Generates a .mof for configuring Docker components on mgmt01.contoso.com.
.EXAMPLE
   . .\DockerClient.ps1
   DockerClient -Hostname mgmt01.contoso.com -Image node

   Generates a .mof for configuring Docker components on mgmt01.contoso.com. The
   "node" image will also pulled from the Docker Hub repository.
.EXAMPLE
   . .\DockerClient.ps1
   DockerClient -Hostname mgmt01.contoso.com -Image node -Container @{Name="Hello World";Port="8080:8080";Command='echo "Hello world"'}

   Generates a .mof for configuring Docker components on mgmt01.contoso.com. The
   "node" image will be pulled from the Docker Hub repository if it doesn't already exist.
   A container by the name "Hello World" with the command 'echo "Hello World"' will also be created.
.NOTES
   Ensure that both the OMI and DSC Linux Resource Provider source have been compiled
   and installed on the specified node. Instructions for doing so can be found here:
   https://github.com/MSFTOSSMgmt/WPSDSCLinux.

   Author: Andrew Weiss | Microsoft
           andrew.weiss@microsoft.com
#>

    param
    (
        [Parameter(Position=1)]
        [string]$Hostname,

        [Parameter(Position=2)]
        [Object[]]$Image,

        [Parameter(Position=3)]
        [hashtable[]]$Container
    )

    if (!$PSBoundParameters['Hostname']) {
        if (!$PSBoundParameters['ConfigurationData']) {
            throw "Hostname and/or ConfigurationData must be specified"
        }
    }

    # Force user to define name for container so it can be referenced later
    if ($Container) {
        $Container | % {
            if (!$_['Name']) {
                throw "Name property must be defined in the Container hashtable parameter"
            }

            if (!$_['Image']) {
                if (!$_['Remove']) {
                    throw "Image property must be defined in the Container hashtable parameter"
                }
            }
        }
    }

    # Set output field field separator to Newline
    $OFS = [Environment]::Newline

    $installationScripts = Get-ChildItem -Recurse -File -Path "scripts\installation" | % { $_.FullName }
    $installationScripts | % {
        $fileName = [System.IO.Path]::GetFileNameWithoutExtension($_)
        Set-Variable -Name $fileName -Value (Get-Content $_)
    }

    $bashString = "#!/bin/bash`r`n"

    Import-DscResource -Module nx

    [string[]]$imageBlocks = @()
    [string[]]$containerBlocks = @()

    # Dynamically create nxScript resource blocks for Docker images
    $requiredImage = @()
    if ($Image) {
        foreach ($dockerImage in $Image) {
            if ($dockerImage.GetType().Name -eq "Hashtable") {
                $imageName = $dockerImage['Name']
                $isRemovable = $dockerImage['Remove']
                $imageBlocks += getImageBlock -dockerImage $imageName -isRemovable $isRemovable
                $requiredImage += $imageName
            } elseif ($dockerImage.GetType().Name -eq "String") {
                $imageBlocks += getImageBlock -dockerImage $dockerImage
                $requiredImage += $dockerImage
            }
        }
    }

    # Dynamically create nxScript resource blocks for Docker containers
    if ($Container) {
        foreach ($dockerContainer in $Container) {
            $containerName = $dockerContainer['Name']
            $containerImage = $dockerContainer['Image']
            $containerPort = $dockerContainer['Port']
            $containerEnv = $dockerContainer['Env']
            $containerLink = $dockerContainer['Link']
            $containerCommand = $dockerContainer['Command']
            $isRemovable = $dockerContainer['Remove']

            if ($requiredImage -notcontains $containerImage) {
                $imageBlocks += getImageBlock -dockerImage $containerImage
                $requiredImage += $containerImage
            }

            $containerBlocks += getContainerBlock -containerName $containerName -containerImage $containerImage -containerPort $containerPort -containerEnv $containerEnv -containerLink $containerLink -isRemovable $isRemovable
        }
    }

    # Combine all resource blocks
    $dockerConfig = getInstallationBlock
    $dockerConfig += getServiceBlock
    $imageBlocks | % { $dockerConfig += $_ }
    $containerBlocks | % { $dockerConfig += $_ }
    $dockerConfig = [scriptblock]::Create($dockerConfig)

    Node $AllNodes.Where{$_.Role -eq "Docker Host"}.Nodename {
        if ($AllNodes.Where{$_.Role -eq "Docker Host"}.Nodename -eq "$Hostname") {
            throw "Duplicate node detected in configuration data and Hostname parameter"
        }

        $dockerConfig.Invoke()
    }

    Node $Hostname {
        $dockerConfig.Invoke()
    }
}


text:
using System;
using System.ComponentModel;
using System.Collections.Generic;
using Newtonsoft.Json;
using System.Linq;
using STEP;

namespace IFC
{
	/// <summary>
	/// <see href="http://www.buildingsmart-tech.org/ifc/IFC4/final/html/link/ifcpresentationstyleassignment.htm"/>
	/// </summary>
	public  partial class IfcPresentationStyleAssignment : BaseIfc
	{
		public List<IfcPresentationStyleSelect> Styles{get;set;}

		/// <summary>
		/// Construct a IfcPresentationStyleAssignment with all required attributes.
		/// </summary>
		[JsonConstructor]
		public IfcPresentationStyleAssignment(List<IfcPresentationStyleSelect> styles):base()
		{

			Styles = styles;

		}
		public static  IfcPresentationStyleAssignment FromJSON(string json){ return JsonConvert.DeserializeObject<IfcPresentationStyleAssignment>(json); }

        public override string GetStepParameters()
        {
            var parameters = new List<string>();
			parameters.Add(Styles != null ? Styles.ToStepValue() : "$");

            return string.Join(", ", parameters.ToArray());
        }
	}
}


text:
JSIL.ParseCustomNumberFormat = function (customFormat) {
  var inQuotedString = false, quoteCharacter = null, stringStartOffset = -1;
  var containsDecimal = false;

  var commands = [];

  var digit = function (state) {
    var digits = state.digits;
    var result = digits.shift();

    if (state.leadingMinus) {
      state.leadingMinus = false;

      if (result !== null)
        result = "-" + result;
      else
        result = "-";
    }

    return result;
  };

  var zeroOrDigit = function (state) {
    var digits = state.digits;
    var digit = digits.shift();

    var result;
    if (digit === null)
      result = "0";
    else
      result = digit;

    if (state.leadingMinus) {
      state.leadingMinus = false;
      result = "-" + result;
    }

    return result;
  };

  var decimal = function (state) {
    state.afterDecimal = true;

    if (state.omitDecimal)
      return null;
    else
      return ".";
  };

  var rawCharacter = function (state) {
    var character = this;

    return character;
  };

  var quotedString = function (state) {
    var text = this;

    return text;
  };

  var includePlaceSeparators = false;
  var digitCount = 0, digitsBeforeDecimal = 0, digitsAfterDecimal = 0, zeroesAfterDecimal = 0;

  for (var i = 0, l = customFormat.length; i < l; i++) {
    var ch = customFormat[i];

    if (inQuotedString) {
      if (ch === quoteCharacter) {
        inQuotedString = false;

        var quotedText = customFormat.substr(stringStartOffset, i - stringStartOffset);
        commands.push(quotedString.bind(quotedText));
      }

      continue;
    }

    switch (ch) {
      case "\t":
      case " ":
        commands.push(rawCharacter.bind(ch));
        break;

      case ",":
        includePlaceSeparators = true;
        break;

      case "'":
      case '"':
        quoteCharacter = ch;
        inQuotedString = true;
        stringStartOffset = i + 1;
        break;

      case '#':
        digitCount++;

        commands.push(digit);
        continue;

      case '0':
        digitCount++;
        if (containsDecimal)
          zeroesAfterDecimal++;

        commands.push(zeroOrDigit);
        continue;

      case '.':
        if (containsDecimal)
          JSIL.RuntimeError("Multiple decimal places in format string");
        else
          containsDecimal = true;

        digitsBeforeDecimal = digitCount;
        digitCount = 0;
        commands.push(decimal);

        continue;

      default:
        return null;
    }
  }

  if (containsDecimal)
    digitsAfterDecimal = digitCount;
  else
    digitsBeforeDecimal = digitCount;

  var formatter = function (value) {
    var formatted = value.toString(10);
    var pieces = formatted.split(".");

    var preDecimal = Array.prototype.slice.call(pieces[0]), postDecimal;
    var actualDigitsAfterDecimal = 0;

    var leadingMinus = preDecimal[0] === "-";
    if (leadingMinus)
      preDecimal.shift();

    if (pieces.length > 1) {
      // If we have too few places after the decimal for all the digits,
      //  we need to recreate the string using toFixed so that it gets rounded.
      if (pieces[1].length > digitsAfterDecimal) {
        pieces = value.toFixed(digitsAfterDecimal).split(".");
      }

      if (digitsAfterDecimal) {
        postDecimal = Array.prototype.slice.call(pieces[1]);
        actualDigitsAfterDecimal = postDecimal.length;
      } else {
        postDecimal = [];
        actualDigitsAfterDecimal = 0;
      }

    } else
      postDecimal = [];

    while (preDecimal.length < digitsBeforeDecimal)
      preDecimal.unshift(null);

    while (postDecimal.length < digitsAfterDecimal)
      postDecimal.push(null);

    // To properly emulate place separators in integer formatting,
    //  we need to insert the commas into the digits array.
    if (includePlaceSeparators) {
      for (var l = preDecimal.length, i = l - 4; i >= 0; i -= 3) {
        var digit = preDecimal[i];

        if (digit !== null)
          preDecimal[i] = digit + ",";
      }
    }

    // If we don't have enough place markers for all our digits,
    //  we turn the extra digits into a single 'digit' entry so
    //  that they are still outputted.

    if (preDecimal.length > digitsBeforeDecimal) {
      var toRemove = preDecimal.length - digitsBeforeDecimal;
      var removed = preDecimal.splice(digitsBeforeDecimal, toRemove).join("");

      var preDecimalDigit = preDecimal[preDecimal.length - 1];

      if (preDecimalDigit !== null)
        preDecimal[preDecimal.length - 1] = preDecimalDigit + removed;
      else
        preDecimal[preDecimal.length - 1] = removed;
    }

    var state = {
      afterDecimal: false,
      omitDecimal: (actualDigitsAfterDecimal <= 0) && (zeroesAfterDecimal <= 0),
      leadingMinus: leadingMinus
    };

    Object.defineProperty(
      state, "digits", {
        configurable: false,
        enumerable: true,

        get: function () {
          if (state.afterDecimal)
            return postDecimal;
          else
            return preDecimal;
        }
      }
    );

    var result = "";

    for (var i = 0, l = commands.length; i < l; i++) {
      var command = commands[i];

      var item = command(state);
      if (item)
        result += item;
    }

    return result;
  };

  return formatter;
};

JSIL.NumberToFormattedString = function (value, alignment, valueFormat, formatProvider) {
  // FIXME: formatProvider

  if (
    (arguments.length === 1) ||
    ((typeof (alignment) === "undefined") && (typeof (valueFormat) === "undefined"))
  )
    return value.toString();

  var formatInteger = function (value, radix, digits) {
    digits = parseInt(digits);
    if (isNaN(digits))
      digits = 0;

    var result = parseInt(value).toString(radix);

    while (result.length < digits)
      result = "0" + result;

    return result;
  };

  var formatFloat = function (value, digits) {
    digits = parseInt(digits);
    if (isNaN(digits))
      digits = 2;

    return parseFloat(value).toFixed(digits);
  };

  var insertPlaceSeparators = function (valueString) {
    var pieces = valueString.split(".");

    var newIntegralPart = "";

    for (var i = 0, l = pieces[0].length; i < l; i++) {
      var ch = pieces[0][i];
      var p = (l - i) % 3;

      if ((i > 0) && (p === 0))
        newIntegralPart += ",";

      newIntegralPart += ch;
    }

    pieces[0] = newIntegralPart;

    return pieces.join(".");
  };

  var parsedCustomFormat = null;
  var result;

  if (valueFormat)
    parsedCustomFormat = JSIL.ParseCustomNumberFormat(valueFormat);

  if (parsedCustomFormat) {
    result = parsedCustomFormat(value);

  } else if (valueFormat) {
    switch (valueFormat[0]) {
      case 'd':
      case 'D':
        result = formatInteger(value, 10, valueFormat.substr(1));
        break;

      case 'x':
        result = formatInteger(value >>> 0, 16, valueFormat.substr(1)).toLowerCase();
        break;

      case 'X':
        result = formatInteger(value >>> 0, 16, valueFormat.substr(1)).toUpperCase();
        break;

      case 'f':
      case 'F':
        result = formatFloat(value, valueFormat.substr(1));
        break;

      case 'n':
      case 'N':
        result = formatFloat(value, valueFormat.substr(1));
        result = insertPlaceSeparators(result);
        break;

      default:
        JSIL.RuntimeError("Unsupported format string: " + valueFormat);

    }

  } else {
    result = String(value);
  }

  if (typeof (alignment) === "string")
    alignment = parseInt(alignment);

  if (typeof (alignment) === "number") {
    var absAlignment = Math.abs(alignment);
    if (result.length >= absAlignment)
      return result;

    var paddingSize = absAlignment - result.length;
    var padding = "";
    for (var i = 0; i < paddingSize; i++)
      padding += " ";

    if (alignment > 0)
      return padding + result;
    else
      return result + padding;
  }

  return result;
};


text:
<?php namespace Fungku\NetSuite\Classes;

class SearchColumnLongField extends SearchColumnField {
	public $searchValue;
	static $paramtypesmap = array(
		"searchValue" => "integer",
	);
}


text:
export interface IGetEventsResponse {
  _embedded: {
    events: ICalendarEvent[]
  }
}

export interface ICalendarEvent {
  id: string;
  type: string;
  title: string;
  date: Date;
  dateUntil?: Date;
  location: string;
  description: string;
  status: string;
  owner: string;
  createdBy: string;
  attendees: string[];
}

export interface ICalendarEventSpecification {
  type: string;
  title: string;
  date: Date;
  dateUntil?: Date;
  location: string;
  description: string;
  status: string;
}


text:
'use strict';

/**
 * @ngdoc service
 * @name mgmApp.mgm
 * @description
 * # mgm
 * Service in the mgmApp.
 */
angular.module('mgmApp').service('mgm', function ($location, $rootScope, $q, $http) {
  console.log('mgm service instantiated');

  var remoteURL = 'ws://' + $location.host() + ':' + $location.port() + '/ws';

  var self = this;

  self.regions = {};
  self.estates = {};
  self.activeUsers = {};
  self.suspendedUsers = {};
  self.pendingUsers = {};
  self.groups = {};
  self.hosts = {};
  self.jobs = {};
  self.serverConnected = false;

  $rootScope.$on('AuthChange', function (event, value) {
    if (value === false) {
      //we logged out
      self.regions = {};
      self.estates = {};
      self.activeUsers = {};
      self.suspendedUsers = {};
      self.pendingUsers = {};
      self.groups = {};
      self.hosts = {};
      self.serverConnected = false;
    }
  });

  self.connect = function () {
    $rootScope.$broadcast('SyncBegin');
    console.log('Connecting to: ' + remoteURL);

    self.ws = io({
      path: '/ws',
      'force new connection': true
    });

    self.ws.on('Auth Challenge', function () {
      console.log('Auth challenge received, sending token');
      self.ws.emit('Auth Response', self.token, function () {
        console.log('token accepted');

        $rootScope.$broadcast('ServerConnected');
        self.serverConnected = true;
        self.ws.emit('GetState', '', function (data) {
          data = angular.fromJson(data);
          //consume state data
          for(var i = 0; i < data.Users.length; i++){
            onUser(data.Users[i]);
          }
          for(var i = 0; i < data.PendingUsers.length; i++){
            onPendingUser(data.PendingUsers[i]);
          }
          for(var i = 0; i < data.Estates.length; i++){
            onEstate(data.Estates[i]);
          }
          for(var i = 0; i < data.Groups.length; i++){
            onGroup(data.Groups[i]);
          }
          for(var i = 0; i < data.Jobs.length; i++){
            onJob(data.Jobs[i]);
          }
          for(var i = 0; i < data.Hosts.length; i++){
            onHost(data.Hosts[i]);
          }
          for(var i = 0; i < data.HostStats.length; i++){
            onHostStat(data.HostStats[i]);
          }
          for(var i = 0; i < data.Regions.length; i++){
            onRegion(data.Regions[i]);
          }
          for(var i = 0; i < data.RegionStats.length; i++){
            onRegionStat(data.RegionStats[i]);
          }

          $rootScope.$broadcast('SyncComplete');
        });
      });
    });

    self.ws.on('error', function(err){
      console.log(err);
    })

    self.ws.on('connect', function () {
      console.log('Socket has been opened!');
    });

    self.ws.on('disconnect', function () {
      console.log('socket has been closed');
    })

    self.ws.on('User', onUser);
    self.ws.on('PendingUser', onPendingUser);
    self.ws.on('Estate', onEstate);
    self.ws.on('Group', onGroup);
    self.ws.on('Job', onJob);
    self.ws.on('Host', onHost);
    self.ws.on('HostRemoved', onHostRemoved);
    self.ws.on('HostStat', onHostStat);
    self.ws.on('Region', onRegion);

    function onUser(data){
      var user = angular.fromJson(data);
      if (user.Suspended) {
        self.suspendedUsers[user.UserID] = user;
        if (user.UserID in self.activeUsers) {
          delete self.activeUsers[user.UserID];
        }
      } else {
        self.activeUsers[user.UserID] = user;
        if (user.UserID in self.suspendedUsers) {
          delete self.suspendedUsers[user.UserID];
        }
      }
      $rootScope.$broadcast('UserUpdate', user);
    }

    function onPendingUser(data){
      var user = angular.fromJson(data);
      self.pendingUsers[user.UserID] = user;
      $rootScope.$broadcast('PendingUserUpdate', message.Message);
    }

    function onRegion(data){
      var region = angular.fromJson(data);
      self.regions[region.UUID] = region;
      $rootScope.$broadcast('RegionUpdate', region);
    }

    function onRegionStat(data){
      var rStat = angular.fromJson(data);
      if (rStat.UUID in self.regions) {
        self.regions[rStat.UUID].Status = rStat;
        $rootScope.$broadcast('RegionStatusUpdate', rStat);
      }
    }

    function onEstate(data){
      var estate = angular.fromJson(data);
      self.estates[estate.ID] = estate;
      $rootScope.$broadcast('EstateUpdate', estate);
    }

    function onGroup(data){
      var group = angular.fromJson(data);
      self.groups[group.ID] = group;
      $rootScope.$broadcast('GroupUpdate', group);
    }

    function onJob(data){
      var job = angular.fromJson(data);
      job.Data = angular.fromJson(job.Data);
      self.jobs[job.ID] = job;
      $rootScope.$broadcast('JobUpdate', job);
    }

    function onHost(data){
      var host = angular.fromJson(data);
      self.hosts[host.ID] = host;
      $rootScope.$broadcast('HostUpdate', host);
    }

    function onHostRemoved(data){
      delete self.hosts[data];
      $rootScope.$broadcast('HostRemoved', data);
    }

    function onHostStat(data){
      var hStat = angular.fromJson(data);
      if (hStat.ID in self.hosts) {
        self.hosts[hStat.ID].Status = hStat;
        $rootScope.$broadcast('HostStatusUpdate', hStat);
      }
    }
    /*self.ws.onmessage = function (evt) {
      var message = angular.fromJson(evt.data);
      switch (message.MessageType) {
      case 'RegionDeleted':
        delete self.regions[message.Message.UUID];
        $rootScope.$broadcast('RegionDeleted', message.Message);
        break;
      case 'JobDeleted':
        delete self.jobs[message.Message.ID]
        $rootScope.$broadcast('JobDeleted', message.Message)
        break;
      case 'RegionConsole':
        if (message.Message.UUID in self.regions) {
          $rootScope.$broadcast('ConsoleUpdate', message.Message);
        }
      default:
        console.log('Error parsing message:');
        console.log(message);
      }

    };*/
  };

  self.disconnect = function () {
    self.ws.io.disconnect();
    //self.ws.close();
  };

  /* location tracking */
  var locationStack = [];
  self.pushLocation = function (url) {
    locationStack.push(url);
  };
  self.popLocation = function () {
    return locationStack.pop();
  };

  /* utility functions */
  self.deleteJob = function (job) {
    return $q(function (resolve, reject) {
      self.request('DeleteJob', {
        ID: job.ID
      }, function (success, message) {
        if (success) {
          delete self.jobs[job.ID];
          resolve();
        } else {
          reject(message);
        }
      });

    });
  };
});


text:
/**\file filter.c
 * \brief OML's client side filter engine
 *
 * \publicsection \page filters In-line filtering
 *
 * The C OML client library allows to process the content of Measurement
 * Streams as they are generated and sent to the Collection Point.
 *
 * This is done by selecting the relevant fields of an MP, and applying the
 * desired filter on them. The easiest way to do so is through the use of a
 * configuration file, as documented in liboml2.conf(5).
 *
 * A few standard filters are available; fewer are documented:
 * \li \subpage stddev_filter
 */

#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#include <errno.h>
#include <sys/time.h>
#include <time.h>
#include <pthread.h>
#define _XOPEN_SOURCE 500     /* Or: #define _BSD_SOURCE; for useconds_t to be defined */
#include <unistd.h>

#include "oml2/omlc.h"
#include "oml2/oml_filter.h"
#include "oml2/oml_writer.h"
#include "ocomm/o_log.h"
#include "client.h"

static void* thread_start(void* handle);

extern OmlClient* omlc_instance;

/** Start the filtering engine on the given MS
 * \param ms pointer to OmlMStream to start filtering on
 */
void
filter_engine_start(OmlMStream* ms)
{
  logdebug ("Starting filtering thread for MS '%s'\n", ms->table_name);
  pthread_create(&ms->filter_thread, NULL, thread_start, (void*)ms);
}

/** Filtering thread
 *
 * Loops until the stream is not active anymore, or an error occurs
 *
 * \param handle pointer to OmlMStream to use the filters on (cast as void*)
 *
 * \return NULL, inconditionally; shouldn't return in normal operation
 */
static void*
thread_start(void* handle)
{
  OmlMStream* ms = (OmlMStream*)handle;
  OmlMP* mp = ms->mp;
  useconds_t usec = (useconds_t)(1000000 * ms->sample_interval);
  int status = 0;

  while (1) {
    usleep(usec);
    if (!mp_lock(mp)) {
      if (!mp->active) {
        mp_unlock(mp);
        return NULL;  // we are done
      }

      status = filter_process(ms);
      mp_unlock(mp);
    }

    if (status == -1) {
      return NULL; // Fatal error --> exit thread
    }

  }
}

/** Run filters associated to an MS.
 *
 * Get the writer associated to the MS, and generate and write initial metadata
 * (seqno and time). Then, instruct all the filters, in sequence, to write
 * their filtered sample to this writer before finalising the write.
 *
 * \param ms MS to generate output for
 * \return 0 if success, -1 otherwise
 *
 * \see OmlWriter, oml_writer_row_start, oml_writer_out, oml_writer_row_end
 */
int
filter_process(OmlMStream* ms)
{
  struct timeval tv;
  double now;
  int i;
  OmlFilter *f;
  OmlWriter *writer;

  /* Get the time as soon as possible */
  gettimeofday(&tv, NULL);

  if (ms == NULL || omlc_instance == NULL || ms->writers == NULL) {
    logerror("Could not process filters because of null measurement stream, instance or writers array\n");
    return -1;
  }

  now = tv.tv_sec - omlc_instance->start_time + 0.000001 * tv.tv_usec;
  ms->seq_no++;

  for (i=0; i<ms->nwriters; i++) {
    writer = ms->writers[i];

    if (writer == NULL) {
      logwarn("%s: Sending data NULL writer (at %d)\n", ms->table_name, i);

    } else {
      /* Be aware that row_start is obtaining a lock on the writer
       * which is released in row_end. Always ensure that row_end is
       * called, even if there is a problem somewhere along the way.
       * \see oml_writer_row_start, oml_writer_out, oml_writer_row_end
       */
      if(writer->row_start(writer, ms, now) == 1)
        ms->written++;
      else
        ms->dropped++;

      f = ms->firstFilter;
      for (; f != NULL; f = f->next) {
        f->output(f, writer);
      }
      writer->row_end(writer, ms);
    }
  }

  f = ms->firstFilter;
  for (; f != NULL; f = f->next) {
    f->newwindow(f);
  }
  ms->sample_size = 0;

  return 0;
}

/*
 Local Variables:
 mode: C
 tab-width: 2
 indent-tabs-mode: nil
 End:
 vim: sw=2:sts=2:expandtab
*/


text: A http(s) load test tools


text:
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>

  <copyright>
    <year>2020</year><year>2021</year>
    <holder>wxWidgets team.</holder></copyright>
  <legalnotice>Licensed under the wxWindows Free Documentation Licence, Version 3
  </legalnotice>
  <title>wxToggleButton</title>

<module>wxToggleButton</module>
<modulesummary>Functions for wxToggleButton class</modulesummary>
<description>
<seeerl marker="wxToggleButton"><c>wxToggleButton</c></seeerl> is a button that stays pressed when clicked by the user. In other words, it is similar to <seeerl marker="wxCheckBox"><c>wxCheckBox</c></seeerl> in functionality but looks like a <seeerl marker="wxButton"><c>wxButton</c></seeerl>.

Since wxWidgets version 2.9.0 this control emits an update UI event.

You can see <seeerl marker="wxToggleButton"><c>wxToggleButton</c></seeerl> in action in page_samples_widgets.

See: <seeerl marker="wxCheckBox"><c>wxCheckBox</c></seeerl>, <seeerl marker="wxButton"><c>wxButton</c></seeerl>, <c>wxBitmapToggleButton</c> (not implemented in wx)

This class is derived (and can use functions) from:
    <seeerl marker="wxControl"><c>wxControl</c></seeerl> <seeerl marker="wxWindow"><c>wxWindow</c></seeerl> <seeerl marker="wxEvtHandler"><c>wxEvtHandler</c></seeerl>

wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_toggle_button.html">wxToggleButton</url>

  </description>
<title>Events</title>
Event types emitted from this class: <seeerl marker="wxCommandEvent"><c>command_togglebutton_clicked</c></seeerl>

<datatypes><datatype><name name="wxToggleButton"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Default constructor. </fsummary>
    <desc>
Default constructor.

</desc>
  </func>

  <func>
    <name name="new" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>new/4</c></fsummary>
  </func>

  <func>
    <name name="new" arity="4" clause_i="1" since=""/>
    <fsummary>Constructor, creating and showing a toggle button. </fsummary>
    <desc>
Constructor, creating and showing a toggle button.

See: <seemfa marker="#create/5"><c>create/5</c></seemfa>, <c>wxValidator</c> (not implemented in wx)

</desc>
  </func>

  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor, destroying the toggle button. </fsummary>
    <desc>
Destructor, destroying the toggle button.

</desc>
  </func>

  <func>
    <name name="create" arity="4" clause_i="1" since=""/>
    <fsummary>See: <c>create/5</c></fsummary>
  </func>

  <func>
    <name name="create" arity="5" clause_i="1" since=""/>
    <fsummary>Creates the toggle button for two-step construction. </fsummary>
    <desc>
Creates the toggle button for two-step construction.

See <seemfa marker="#new/4"><c>new/4</c></seemfa> for details.

</desc>
  </func>

  <func>
    <name name="getValue" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the state of the toggle button. </fsummary>
    <desc>
Gets the state of the toggle button.

Return: Returns true if it is pressed, false otherwise.

</desc>
  </func>

  <func>
    <name name="setValue" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the toggle button to the given state. </fsummary>
    <desc>
Sets the toggle button to the given state.

This does not cause a <c>EVT_TOGGLEBUTTON</c> event to be emitted.

</desc>
  </func>
  </funcs>
</erlref>


text:
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Bandmember extends Model
{
  protected $table = 'bandmember';
    //
  public function user()
  {
    return $this->belongsTo('App\User');
  }

  public function band()
  {
    return $this->belongsTo('App\Band');
  }
}


text:
<?php

# app/Models/Author.php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

final class Modversion extends Model {
	protected $table = 'modversions';
	public $timestamps = true;

	public function mod()
	{
		return $this->belongsTo('App\Models\Mod');
	}

	public function builds()
	{
		return $this->belongsToMany('App\Models\Build')->withTimestamps();
	}
}

?>


text:
package org.cloudata.core.tablet;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.io.Writer;
import java.text.DecimalFormat;

import org.cloudata.core.common.io.CWritable;
import org.cloudata.core.common.io.CWritableUtils;

/**
 * Stores Tablet detail information
 *
 */
public class TabletReport implements CWritable {
  private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("###,###,###,###");
  private TabletInfo tabletInfo;
  String[] mapFilePaths;
  String[] runningActions;
  String[] waitingActions;
  int[] columnMapFileCount;
  long[] columnMapFileSize;
  long[] columnIndexSize;

  int memoryTabletSize;
  int[] memoryTabletDataCount;

  long serverMaxMemory;
  long serverFreeMemory;
  long serverTotalMemory;

  String[] commitLogServers;

  public String[] getCommitLogServers() {
    return commitLogServers;
  }

  public void setCommitLogServers(String[] commitLogServers) {
    this.commitLogServers = commitLogServers;
  }

  /**
   * @return the serverFreeMemory
   */
  public long getServerFreeMemory() {
    return serverFreeMemory;
  }

  public long[] getColumnIndexSize() {
    return columnIndexSize;
  }

  public void setColumnIndexSize(long[] columnIndexSize) {
    this.columnIndexSize = columnIndexSize;
  }

  /**
   * @param serverFreeMemory the serverFreeMemory to set
   */
  public void setServerFreeMemory(long serverFreeMemory) {
    this.serverFreeMemory = serverFreeMemory;
  }

  /**
   * @return the serverMaxMemory
   */
  public long getServerMaxMemory() {
    return serverMaxMemory;
  }

  /**
   * @param serverMaxMemory the serverMaxMemory to set
   */
  public void setServerMaxMemory(long serverMaxMemory) {
    this.serverMaxMemory = serverMaxMemory;
  }

  /**
   * @return the memoryTabletDataCount
   */
  public int[] getMemoryTabletDataCount() {
    return memoryTabletDataCount;
  }

  /**
   * @param memoryTabletDataCount the memoryTabletDataCount to set
   */
  public void setMemoryTabletDataCount(int[] memoryTabletDataCount) {
    this.memoryTabletDataCount = memoryTabletDataCount;
  }

  /**
   * @return the memoryTabletSize
   */
  public int getMemoryTabletSize() {
    return memoryTabletSize;
  }

  /**
   * @return the columnMapFileCount
   */
  public int[] getColumnMapFileCount() {
    return columnMapFileCount;
  }

  /**
   * @param columnMapFileCount the columnMapFileCount to set
   */
  public void setColumnMapFileCount(int[] columnMapFileCount) {
    this.columnMapFileCount = columnMapFileCount;
  }

  /**
   * @return the columnMapFileSize
   */
  public long[] getColumnMapFileSize() {
    return columnMapFileSize;
  }

  /**
   * @param columnMapFileSize the columnMapFileSize to set
   */
  public void setColumnMapFileSize(long[] columnMapFileSize) {
    this.columnMapFileSize = columnMapFileSize;
  }

  /**
   * @return the runningActions
   */
  public String[] getRunningActions() {
    return runningActions;
  }

  /**
   * @param runningActions the runningActions to set
   */
  public void setRunningActions(String[] runningActions) {
    this.runningActions = runningActions;
  }

  /**
   * @return the tabletInfo
   */
  public TabletInfo getTabletInfo() {
    return tabletInfo;
  }

  /**
   * @param tabletInfo the tabletInfo to set
   */
  public void setTabletInfo(TabletInfo tabletInfo) {
    this.tabletInfo = tabletInfo;
  }

  /**
   * @return the waitingActions
   */
  public String[] getWaitingActions() {
    return waitingActions;
  }

  /**
   * @param waitingActions the waitingActions to set
   */
  public void setWaitingActions(String[] waitingActions) {
    this.waitingActions = waitingActions;
  }

  public void readFields(DataInput in) throws IOException {
    tabletInfo = new TabletInfo();
    tabletInfo.readFields(in);
    runningActions = CWritableUtils.readStringArray(in);
    waitingActions = CWritableUtils.readStringArray(in);
    int lenth = in.readInt();
    columnMapFileCount = new int[lenth];
    for(int i = 0; i < columnMapFileCount.length; i++) {
      columnMapFileCount[i] = in.readInt();
    }

    lenth = in.readInt();
    columnMapFileSize = new long[lenth];
    for(int i = 0; i < columnMapFileSize.length; i++) {
      columnMapFileSize[i] = in.readLong();
    }

    memoryTabletSize = in.readInt();

    lenth = in.readInt();
    memoryTabletDataCount = new int[lenth];
    for(int i = 0; i < memoryTabletDataCount.length; i++) {
      memoryTabletDataCount[i] = in.readInt();
    }

    lenth = in.readInt();
    columnIndexSize = new long[lenth];
    for(int i = 0; i < columnIndexSize.length; i++) {
      columnIndexSize[i] = in.readLong();
    }

    serverMaxMemory = in.readLong();
    serverTotalMemory = in.readLong();
    serverFreeMemory = in.readLong();

    mapFilePaths = CWritableUtils.readStringArray(in);
    commitLogServers = CWritableUtils.readStringArray(in);
  }

  public void write(DataOutput out) throws IOException {
    tabletInfo.write(out);
    CWritableUtils.writeStringArray(out, runningActions);
    CWritableUtils.writeStringArray(out, waitingActions);

    out.writeInt(columnMapFileCount.length);
    for(int i = 0; i < columnMapFileCount.length; i++) {
      out.writeInt(columnMapFileCount[i]);
    }
    out.writeInt(columnMapFileSize.length);
    for(int i = 0; i < columnMapFileSize.length; i++) {
      out.writeLong(columnMapFileSize[i]);
    }

    out.writeInt(memoryTabletSize);

    out.writeInt(memoryTabletDataCount.length);
    for(int i = 0; i < memoryTabletDataCount.length; i++) {
      out.writeInt(memoryTabletDataCount[i]);
    }

    out.writeInt(columnIndexSize.length);
    for(int i = 0; i < columnIndexSize.length; i++) {
      out.writeLong(columnIndexSize[i]);
    }

    out.writeLong(serverMaxMemory);
    out.writeLong(serverTotalMemory);
    out.writeLong(serverFreeMemory);

    CWritableUtils.writeStringArray(out, mapFilePaths);
    CWritableUtils.writeStringArray(out, commitLogServers);
  }

  public String[] getMapFilePaths() {
    return mapFilePaths;
  }

  public void setMapFilePaths(String[] mapFilePaths) {
    this.mapFilePaths = mapFilePaths;
  }

  /**
   * @param memoryTabletSize the memoryTabletSize to set
   */
  public void setMemoryTabletSize(int memoryTabletSize) {
    this.memoryTabletSize = memoryTabletSize;
  }

  public void print() {
    System.out.println("-----------------------------------------------------------------------------");
    System.out.println("TabletInfo  : " + tabletInfo);
    System.out.println("TabletServer: MaxMemory = " + serverMaxMemory/1024 + " KB, TotalMemory = " + serverTotalMemory/1024 + " KB, FreeMemory = " + serverFreeMemory/1024 + " KB");

    int maxCount = 0;
    for(int i = 0; i < memoryTabletDataCount.length; i++) {
      if(memoryTabletDataCount[i] > maxCount) {
        maxCount = memoryTabletDataCount[i];
      }
    }

    String commitLogServerList = "";
    for(int i = 0; i < commitLogServers.length; i++) {
      commitLogServerList += commitLogServers[i];
      if(i < commitLogServers.length - 1) {
        commitLogServerList += ",";
      }
    }
    System.out.println("Memory      : " + memoryTabletSize + " bytes, " + maxCount + " rows, commitlog: " + commitLogServerList);

    maxCount = 0;
    int mapFileCount = 0;
    for(int i = 0; i < columnMapFileCount.length; i++) {
      if(columnMapFileCount[i] > maxCount) {
        maxCount = columnMapFileCount[i];
      }
      mapFileCount += columnMapFileCount[i];
    }

    System.out.println("Disk        : mapFileLength = " + sumMapFileSize() + " bytes, mapFileIndex = " + sumMapFileIndexSize() + " bytes, mapFileCount = " + mapFileCount + ", max column map count = " + maxCount);

    if(runningActions.length > 0)  {
      System.out.println("RunningActions");
      for(int i = 0; i < runningActions.length; i++) {
        System.out.println("\t" + runningActions[i]);
//        if(i >= 2) {
//          System.exit(0);
//        }
      }
    }

    if(waitingActions.length > 0)  {
      System.out.println("WaitingActions");
      for(int i = 0; i < waitingActions.length; i++) {
        System.out.println("\t" + waitingActions[i]);
//        if(i >= 2) {
//          System.exit(0);
//        }
      }
    }
    System.out.println("-----------------------------------------------------------------------------");
  }

  public void print(Writer writer) throws IOException {
    int maxCount = 0;
    for(int i = 0; i < memoryTabletDataCount.length; i++) {
      if(memoryTabletDataCount[i] > maxCount) {
        maxCount = memoryTabletDataCount[i];
      }
    }

    String commitLogServerList = "";
    if(commitLogServers.length == 0) {
      commitLogServerList = "empty";
    } else {
      for(int i = 0; i < commitLogServers.length; i++) {
        commitLogServerList += commitLogServers[i];
        if(i < commitLogServers.length - 1) {
          commitLogServerList += ",";
        }
      }
    }

    writer.write("Memory: " + DECIMAL_FORMAT.format(memoryTabletSize) + " bytes," + DECIMAL_FORMAT.format(maxCount) + " rows, commitlog[" + commitLogServerList + "]
");

    maxCount = 0;
    int mapFileCount = 0;
    for(int i = 0; i < columnMapFileCount.length; i++) {
      if(columnMapFileCount[i] > maxCount) {
        maxCount = columnMapFileCount[i];
      }
      mapFileCount += columnMapFileCount[i];
    }

    writer.write("Disk: Data file = " + DECIMAL_FORMAT.format(sumMapFileSize()) + " bytes, index file = " + DECIMAL_FORMAT.format(sumMapFileIndexSize()) +
        " bytes, data file count = " + mapFileCount + ", max column map count = " + maxCount + "
");

    if(runningActions.length > 0)  {
      writer.write("RunningActions:
");
      for(int i = 0; i < runningActions.length; i++) {
        writer.write("    " + runningActions[i] + "
");
      }
    }

    if(waitingActions.length > 0)  {
      writer.write("WaitingActions:
");
      for(int i = 0; i < waitingActions.length; i++) {
        writer.write("    " + waitingActions[i] + "
");
      }
    }
  }

  /**
   * @return the serverTotalMemory
   */
  public long getServerTotalMemory() {
    return serverTotalMemory;
  }

  /**
   * @param serverTotalMemory the serverTotalMemory to set
   */
  public void setServerTotalMemory(long serverTotalMemory) {
    this.serverTotalMemory = serverTotalMemory;
  }

  public long sumMapFileSize() {
    long mapFileSize = 0;
    for(int i = 0; i < columnMapFileSize.length; i++) {
      mapFileSize += columnMapFileSize[i];
    }
    return mapFileSize;
  }

  public long sumMapFileIndexSize() {
    long mapFileIndexSize = 0;
    for(int i = 0; i < columnIndexSize.length; i++) {
      mapFileIndexSize += columnIndexSize[i];
    }
    return mapFileIndexSize;
  }
}