text:
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Catalog uuid="6e071ef7-3fe3-486f-83fa-0a22e295cb5f">
		<InnerInfo>
			<xr:producedType name="CatalogObject.ПереченьДополнительныхНачислений" category="Object">
				<xr:typeId>14ea8d5b-f184-4158-98d6-8e69d2fb1db5</xr:typeId>
				<xr:valTypeId>c72463e1-a788-4116-8e43-081623a352c1</xr:valTypeId>
			</xr:producedType>
			<xr:producedType name="CatalogRef.ПереченьДополнительныхНачислений" category="Ref">
				<xr:typeId>b5d53042-0ff4-4b43-b68a-7813ed05019f</xr:typeId>
				<xr:valTypeId>0f4481d0-5e01-4592-9ca4-c4c7a2171dcf</xr:valTypeId>
			</xr:producedType>
			<xr:producedType name="CatalogSelection.ПереченьДополнительныхНачислений" category="Selection">
				<xr:typeId>ea3dca21-05fb-48f3-9e94-ae495e9c8a71</xr:typeId>
				<xr:valTypeId>6c38b80e-d613-4f3b-85ff-b4163ca2e88b</xr:valTypeId>
			</xr:producedType>
			<xr:producedType name="CatalogList.ПереченьДополнительныхНачислений" category="List">
				<xr:typeId>1811bec1-bb83-41ef-8cec-042ba5b98afe</xr:typeId>
				<xr:valTypeId>29621548-2352-4adf-85e4-f230f5801c64</xr:valTypeId>
			</xr:producedType>
			<xr:producedType name="CatalogManager.ПереченьДополнительныхНачислений" category="Manager">
				<xr:typeId>a67dd8f2-3fe4-453f-8b8b-31c9415c96b3</xr:typeId>
				<xr:valTypeId>53410fae-107a-4abb-af8b-f5087cc595e7</xr:valTypeId>
			</xr:producedType>
		</InnerInfo>
		<Properties>
			<Name>ПереченьДополнительныхНачислений</Name>
			<Synonym>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Перечень дополнительных начислений</v8:content>
				</v8:item>
			</Synonym>
			<Comment/>
			<Hierarchical>false</Hierarchical>
			<HierarchyType>HierarchyFoldersAndItems</HierarchyType>
			<LimitLevelCount>false</LimitLevelCount>
			<LevelCount>2</LevelCount>
			<FoldersOnTop>true</FoldersOnTop>
			<UseStandardCommands>true</UseStandardCommands>
			<Owners/>
			<SubordinationUse>ToItems</SubordinationUse>
			<CodeLength>9</CodeLength>
			<DescriptionLength>70</DescriptionLength>
			<CodeType>String</CodeType>
			<CodeAllowedLength>Variable</CodeAllowedLength>
			<CodeSeries>WholeCatalog</CodeSeries>
			<CheckUnique>true</CheckUnique>
			<Autonumbering>true</Autonumbering>
			<DefaultPresentation>AsDescription</DefaultPresentation>
			<StandardAttributes>
				<xr:Attribute name="Predefined">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:Attribute>
				<xr:Attribute name="Ref">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:Attribute>
				<xr:Attribute name="DeletionMark">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:Attribute>
				<xr:Attribute name="IsFolder">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:Attribute>
				<xr:Attribute name="Owner">
					<xr:LinkByType/>
					<xr:FillChecking>ShowError</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>true</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:Attribute>
				<xr:Attribute name="Parent">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>true</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks>
						<xr:link>
							<xr:name>Отбор.Владелец</xr:name>
							<xr:dataPath>Catalog.ПереченьДополнительныхНачислений.StandardAttribute.Owner</xr:dataPath>
							<xr:valueChange>Clear</xr:valueChange>
						</xr:link>
					</xr:ChoiceParameterLinks>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:Attribute>
				<xr:Attribute name="Description">
					<xr:LinkByType/>
					<xr:FillChecking>ShowError</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:Attribute>
				<xr:Attribute name="Code">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:Attribute>
			</StandardAttributes>
			<Characteristics/>
			<PredefinedDataUpdate>Auto</PredefinedDataUpdate>
			<EditType>InDialog</EditType>
			<QuickChoice>false</QuickChoice>
			<ChoiceMode>BothWays</ChoiceMode>
			<InputByString>
				<xr:field>Catalog.ПереченьДополнительныхНачислений.StandardAttribute.Description</xr:field>
				<xr:field>Catalog.ПереченьДополнительныхНачислений.StandardAttribute.Code</xr:field>
			</InputByString>
			<SearchStringModeOnInputByString>Begin</SearchStringModeOnInputByString>
			<FullTextSearchOnInputByString>DontUse</FullTextSearchOnInputByString>
			<ChoiceDataGetModeOnInputByString>Directly</ChoiceDataGetModeOnInputByString>
			<DefaultObjectForm/>
			<DefaultFolderForm/>
			<DefaultListForm/>
			<DefaultChoiceForm/>
			<DefaultFolderChoiceForm/>
			<AuxiliaryObjectForm/>
			<AuxiliaryFolderForm/>
			<AuxiliaryListForm/>
			<AuxiliaryChoiceForm/>
			<AuxiliaryFolderChoiceForm/>
			<IncludeHelpInContents>true</IncludeHelpInContents>
			<BasedOn/>
			<DataLockFields/>
			<DataLockControlMode>Managed</DataLockControlMode>
			<FullTextSearch>Use</FullTextSearch>
			<ObjectPresentation>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Вид начисления</v8:content>
				</v8:item>
			</ObjectPresentation>
			<ExtendedObjectPresentation>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Вид начисления</v8:content>
				</v8:item>
			</ExtendedObjectPresentation>
			<ListPresentation/>
			<ExtendedListPresentation/>
			<Explanation/>
			<CreateOnInput>Use</CreateOnInput>
		</Properties>
		<ChildObjects/>
	</Catalog>
</MetaDataObject>


text:
#pragma once

#include "il2cpp-config.h"

#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif

#include <stdint.h>

#include "mscorlib_System_ValueType4014882752.h"
#include "mscorlib_System_IntPtr676692020.h"
#include "UnityEngine_UnityEngine_Rect1525428817.h"
#include "UnityEngine_UnityEngine_Color1588175760.h"

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif

// UnityEngine.Internal_DrawWithTextSelectionArguments
struct  Internal_DrawWithTextSelectionArguments_t43446288
{
public:
	// System.IntPtr UnityEngine.Internal_DrawWithTextSelectionArguments::target
	IntPtr_t ___target_0;
	// UnityEngine.Rect UnityEngine.Internal_DrawWithTextSelectionArguments::position
	Rect_t1525428817  ___position_1;
	// System.Int32 UnityEngine.Internal_DrawWithTextSelectionArguments::firstPos
	int32_t ___firstPos_2;
	// System.Int32 UnityEngine.Internal_DrawWithTextSelectionArguments::lastPos
	int32_t ___lastPos_3;
	// UnityEngine.Color UnityEngine.Internal_DrawWithTextSelectionArguments::cursorColor
	Color_t1588175760  ___cursorColor_4;
	// UnityEngine.Color UnityEngine.Internal_DrawWithTextSelectionArguments::selectionColor
	Color_t1588175760  ___selectionColor_5;
	// System.Int32 UnityEngine.Internal_DrawWithTextSelectionArguments::isHover
	int32_t ___isHover_6;
	// System.Int32 UnityEngine.Internal_DrawWithTextSelectionArguments::isActive
	int32_t ___isActive_7;
	// System.Int32 UnityEngine.Internal_DrawWithTextSelectionArguments::on
	int32_t ___on_8;
	// System.Int32 UnityEngine.Internal_DrawWithTextSelectionArguments::hasKeyboardFocus
	int32_t ___hasKeyboardFocus_9;
	// System.Int32 UnityEngine.Internal_DrawWithTextSelectionArguments::drawSelectionAsComposition
	int32_t ___drawSelectionAsComposition_10;

public:
	inline static int32_t get_offset_of_target_0() { return static_cast<int32_t>(offsetof(Internal_DrawWithTextSelectionArguments_t43446288, ___target_0)); }
	inline IntPtr_t get_target_0() const { return ___target_0; }
	inline IntPtr_t* get_address_of_target_0() { return &___target_0; }
	inline void set_target_0(IntPtr_t value)
	{
		___target_0 = value;
	}

	inline static int32_t get_offset_of_position_1() { return static_cast<int32_t>(offsetof(Internal_DrawWithTextSelectionArguments_t43446288, ___position_1)); }
	inline Rect_t1525428817  get_position_1() const { return ___position_1; }
	inline Rect_t1525428817 * get_address_of_position_1() { return &___position_1; }
	inline void set_position_1(Rect_t1525428817  value)
	{
		___position_1 = value;
	}

	inline static int32_t get_offset_of_firstPos_2() { return static_cast<int32_t>(offsetof(Internal_DrawWithTextSelectionArguments_t43446288, ___firstPos_2)); }
	inline int32_t get_firstPos_2() const { return ___firstPos_2; }
	inline int32_t* get_address_of_firstPos_2() { return &___firstPos_2; }
	inline void set_firstPos_2(int32_t value)
	{
		___firstPos_2 = value;
	}

	inline static int32_t get_offset_of_lastPos_3() { return static_cast<int32_t>(offsetof(Internal_DrawWithTextSelectionArguments_t43446288, ___lastPos_3)); }
	inline int32_t get_lastPos_3() const { return ___lastPos_3; }
	inline int32_t* get_address_of_lastPos_3() { return &___lastPos_3; }
	inline void set_lastPos_3(int32_t value)
	{
		___lastPos_3 = value;
	}

	inline static int32_t get_offset_of_cursorColor_4() { return static_cast<int32_t>(offsetof(Internal_DrawWithTextSelectionArguments_t43446288, ___cursorColor_4)); }
	inline Color_t1588175760  get_cursorColor_4() const { return ___cursorColor_4; }
	inline Color_t1588175760 * get_address_of_cursorColor_4() { return &___cursorColor_4; }
	inline void set_cursorColor_4(Color_t1588175760  value)
	{
		___cursorColor_4 = value;
	}

	inline static int32_t get_offset_of_selectionColor_5() { return static_cast<int32_t>(offsetof(Internal_DrawWithTextSelectionArguments_t43446288, ___selectionColor_5)); }
	inline Color_t1588175760  get_selectionColor_5() const { return ___selectionColor_5; }
	inline Color_t1588175760 * get_address_of_selectionColor_5() { return &___selectionColor_5; }
	inline void set_selectionColor_5(Color_t1588175760  value)
	{
		___selectionColor_5 = value;
	}

	inline static int32_t get_offset_of_isHover_6() { return static_cast<int32_t>(offsetof(Internal_DrawWithTextSelectionArguments_t43446288, ___isHover_6)); }
	inline int32_t get_isHover_6() const { return ___isHover_6; }
	inline int32_t* get_address_of_isHover_6() { return &___isHover_6; }
	inline void set_isHover_6(int32_t value)
	{
		___isHover_6 = value;
	}

	inline static int32_t get_offset_of_isActive_7() { return static_cast<int32_t>(offsetof(Internal_DrawWithTextSelectionArguments_t43446288, ___isActive_7)); }
	inline int32_t get_isActive_7() const { return ___isActive_7; }
	inline int32_t* get_address_of_isActive_7() { return &___isActive_7; }
	inline void set_isActive_7(int32_t value)
	{
		___isActive_7 = value;
	}

	inline static int32_t get_offset_of_on_8() { return static_cast<int32_t>(offsetof(Internal_DrawWithTextSelectionArguments_t43446288, ___on_8)); }
	inline int32_t get_on_8() const { return ___on_8; }
	inline int32_t* get_address_of_on_8() { return &___on_8; }
	inline void set_on_8(int32_t value)
	{
		___on_8 = value;
	}

	inline static int32_t get_offset_of_hasKeyboardFocus_9() { return static_cast<int32_t>(offsetof(Internal_DrawWithTextSelectionArguments_t43446288, ___hasKeyboardFocus_9)); }
	inline int32_t get_hasKeyboardFocus_9() const { return ___hasKeyboardFocus_9; }
	inline int32_t* get_address_of_hasKeyboardFocus_9() { return &___hasKeyboardFocus_9; }
	inline void set_hasKeyboardFocus_9(int32_t value)
	{
		___hasKeyboardFocus_9 = value;
	}

	inline static int32_t get_offset_of_drawSelectionAsComposition_10() { return static_cast<int32_t>(offsetof(Internal_DrawWithTextSelectionArguments_t43446288, ___drawSelectionAsComposition_10)); }
	inline int32_t get_drawSelectionAsComposition_10() const { return ___drawSelectionAsComposition_10; }
	inline int32_t* get_address_of_drawSelectionAsComposition_10() { return &___drawSelectionAsComposition_10; }
	inline void set_drawSelectionAsComposition_10(int32_t value)
	{
		___drawSelectionAsComposition_10 = value;
	}
};

#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for marshalling of: UnityEngine.Internal_DrawWithTextSelectionArguments
struct Internal_DrawWithTextSelectionArguments_t43446288_marshaled_pinvoke
{
	intptr_t ___target_0;
	Rect_t1525428817_marshaled_pinvoke ___position_1;
	int32_t ___firstPos_2;
	int32_t ___lastPos_3;
	Color_t1588175760_marshaled_pinvoke ___cursorColor_4;
	Color_t1588175760_marshaled_pinvoke ___selectionColor_5;
	int32_t ___isHover_6;
	int32_t ___isActive_7;
	int32_t ___on_8;
	int32_t ___hasKeyboardFocus_9;
	int32_t ___drawSelectionAsComposition_10;
};
// Native definition for marshalling of: UnityEngine.Internal_DrawWithTextSelectionArguments
struct Internal_DrawWithTextSelectionArguments_t43446288_marshaled_com
{
	intptr_t ___target_0;
	Rect_t1525428817_marshaled_com ___position_1;
	int32_t ___firstPos_2;
	int32_t ___lastPos_3;
	Color_t1588175760_marshaled_com ___cursorColor_4;
	Color_t1588175760_marshaled_com ___selectionColor_5;
	int32_t ___isHover_6;
	int32_t ___isActive_7;
	int32_t ___on_8;
	int32_t ___hasKeyboardFocus_9;
	int32_t ___drawSelectionAsComposition_10;
};

redpajama_set_name: RedPajamaGithub


text: <!DOCTYPE html>


text:
'use strict';

var grunt = require('grunt');

module.exports = {

    stylesheetImport: function(test) {
        test.expect(6);

        var stylesheet = grunt.file.read('tmp/stylesheets/stylesheetImport.html');

        test.ok(stylesheet.match(/stylesheet1\.[a-z0-9]{16}\.css/), 'testing stylesheet1');
        test.ok(stylesheet.match(/stylesheet2\.[a-z0-9]{16}\.css/), 'testing stylesheet2');
        test.ok(stylesheet.match(/stylesheet4\.[a-z0-9]{16}\.css/), 'testing stylesheet4');

        test.ok(stylesheet.match(/href="\/\/netdna.bootstrapcdn.com\/twitter-bootstrap\/2.3.2\/css\/bootstrap-combined.min.css"/), 'remotely hosted // syntax should remain untouched');
        test.ok(stylesheet.match(/href="https:\/\/twitter.github.com\/bootstrap\/assets\/css\/bootstrap.css"/), 'remotely hosted https:// syntax should remain untouched');
        test.ok(stylesheet.match(/href="http:\/\/twitter.github.com\/bootstrap\/assets\/css\/bootstrap.css"/), 'remotely hosted http:// syntax should remain untouched');

        test.done();
    },

    stylesheet: function(test) {
        test.expect(5);

        var markup = grunt.file.read('tmp/stylesheets/stylesheet.css');

        test.ok(markup.match(/css-image\.[a-z0-9]{16}\.jpg/), 'testing an image in a CSS file');
        test.ok(markup.match(/css-image-quotes.[a-z0-9]{16}\.jpg/), 'testing an image in a CSS file');
        test.ok(markup.match(/css-image-large\.[a-z0-9]{16}\.jpg/), 'testing an image in a CSS file');
        test.ok(markup.match(/image1\.[a-z0-9]{16}\.jpg/), 'testing an image in a CSS file within a media query');
        test.ok(markup.match(/image2\.[a-z0-9]{16}\.jpg/), 'testing an image in a CSS file within a media query');

        test.done();
    },

    replaceCssInSubdir: function(test) {
        test.expect(4);

        var markup = grunt.file.read('tmp/stylesheets/css/replaceCssInSubdir.css');

        test.ok(markup.match(/assets\/relative-css-image.[a-z0-9]{16}\.jpg/), 'testing the replacement of an image when css in a different subdir than asset');
        test.ok(markup.match(/assets\/relative-css-image-quotes.[a-z0-9]{16}\.jpg/), 'testing the replacement of an image when css in a different subdir than asset');
        test.ok(markup.match(/assets\/relative-css-image-large.[a-z0-9]{16}\.jpg/), 'testing the replacement of an image when css in a different subdir than asset');
        test.ok(markup.match(/assets\/relative-image1.[a-z0-9]{16}\.jpg/), 'testing the replacement of an image when css in a different subdir than asset');

        test.done();
    }

};


text:
<?php

namespace Allboo\PropelLaravel;

use Illuminate\Support\ServiceProvider;
use Propel\Runtime\Propel;

class RuntimeServiceProvider extends ServiceProvider
{

    /**
     * Bootstrap the application events.
     *
     * @return void
     */
    public function boot()
    {
        if (!$this->app->config['propel.propel.runtime.connections']) {
            throw new \InvalidArgumentException('Unable to guess Propel runtime config file. Please, initialize the "propel.runtime" parameter.');
        }

        // load pregenerated config
        if (file_exists(app_path() . '/propel/config.php')) {
            Propel::init(app_path() . '/propel/config.php');
            return;
        }

        // runtime configuration
        /** @var \Propel\Runtime\ServiceContainer\StandardServiceContainer */
        $serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
        $serviceContainer->closeConnections();
        $serviceContainer->checkVersion('2.0.0-dev');

        $propel_conf = $this->app->config['propel.propel'];
        $runtime_conf = $propel_conf['runtime'];

        // set connections
        foreach ($runtime_conf['connections'] as $connection_name) {
            $config = $propel_conf['database']['connections'][$connection_name];
            if (!isset($config['classname'])) {
                if ($this->app->config['app.debug']) {
                    $config['classname'] = '\\Propel\\Runtime\\Connection\\DebugPDO';
                }
                else {
                    $config['classname'] = '\\Propel\\Runtime\\Connection\\ConnectionWrapper';
                }
            }

            $serviceContainer->setAdapterClass($connection_name, $config['adapter']);
            $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
            $manager->setConfiguration($config);
            $manager->setName($connection_name);
            $serviceContainer->setConnectionManager($connection_name, $manager);
        }
        $serviceContainer->setDefaultDatasource($runtime_conf['defaultConnection']);

        // set loggers
        $has_default_logger = false;
        if (isset($runtime_conf['log'])) {
            foreach ($runtime_conf['log'] as $logger_name => $logger_conf) {
                $serviceContainer->setLoggerConfiguration($logger_name, $logger_conf);
                $has_default_logger |= $logger_name === 'defaultLogger';
            }
        }
        if (!$has_default_logger) {
            $serviceContainer->setLogger('defaultLogger', \Log::getMonolog());
        }

        Propel::setServiceContainer($serviceContainer);
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        if (!class_exists('Propel\\Runtime\\Propel', true)) {
            throw new \InvalidArgumentException('Unable to find Propel, did you install it?');
        }
    }
}


text:
package bluebrick4j.model;

import java.io.Serializable;
import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement ( name = "Layers" )
public class Layers implements Serializable {

	private List<Layer> layers;

	public List<Layer> getLayers() {
		return layers;
	}

	@XmlElement ( name = "Layer" )
	public void setLayers(List<Layer> layers) {
		this.layers = layers;
	}

	@Override
	public String toString() {
		String s = "";
		for (Layer layer : layers) {
			if (layer != null) { s += layer; }
		}
		return s;
	}

}


text:
Are there any images that look unusual? List the file name of any unusual images for this night here, with description:

+ `Calibration-006D30.fit` -- in the lower left hand side there is some white smudge that must be an object or abnormalty.
+ `Calibration-002Bias.fit` -- there is a bright spot.
+ `Calibration-001D30.fit` -- another bright spot.
+ `Calibration-001D90.fit` -- a few bright spots in image.
+ `Calibration-003D30.fit` -- more bright spots.
+ `Calibration-006D90.fit` -- more bright spots.
+ `Calibration-007D90.fit` -- small bright spots.
+ `Calibration-008D30.fit` -- small bright spots.
+ `ey-uma-021V.fit` -- satellite or plane track in picture.
+ `m95-005V.fit` -- some sort of video or camera error.
+ `SA104-001V.fit` -- another video/camera error.
+ a few more images have the same video/camera errors.
+ `TrES-3-003R.fit ` -- satellite or plane track in image.
+ Some of the dark images have the wavy pattern.
+ Some of the FLAT images are darker around the edges and have higher contrast.

## Missing information?

Check these off if they are true:

- [x] No images are missing filter information (except BIAS and DARK, which need no filter).
- [x] No images are missing pointing information (RA/Dec and WCS)
- [x] No images are missing object names (only applies to science images)

## What, if anything, did you have to do to fix images on this night?

Nothing


text:
**Setup** [Let's Encrypt](https://letsencrypt.org/) ACME client [dehydrated](https://github.com/lukas2511/dehydrated) with a bunch of [dns-01 hooks](https://github.com/lukas2511/dehydrated/wiki/Examples-for-DNS-01-hooks) on Debian/Ubuntu Linux servers, **automatically** sign/renew **certificate**s and **deploy** them to other Linux or Windows proxy-/webservers.

* [Supported dns providers](#dns-providers)
* [Supported proxy-/webservers](#proxy--or-webservers)
* [Usage](#usage)

## Requirements
* `git` for setup Let's Encrypt ACME client on Debian/Ubuntu Linux servers
* optionally, `cron` for automatic certification and deployment on the Ansible Control Machine (Linux server)
* optionally, `logrotate` for rotating the playbook logs on the Ansible Control Machine (Linux server)

## Role Variables
Important variables are listed below, along with default values (see `vars/main.yml`). For all other default variables see `default/main.yml`.
Recommended, **declare this variables** in `host_vars` and `group_vars` inventory files!

* [Setup](#setup)
* [Certification](#certification)
* [Deployment](#deployment)
* [Automation](#automation)

### Setup
Following variables are associated with the setup process of the Let's Encrypt ACME client on Debian/Ubuntu Linux servers.

#### dehydrated
```
le_dehydrated_ca: "https://acme-staging-v02.api.letsencrypt.org/directory"
```
***Overwrite!*** Switch certificate authority variables for production inventory from default
*acme-staging-v02* servers to *acme-v02* servers.

```
le_dehydrated_hook: "{{ le_dehydrated_hooks_dir }}/lexicon/{{ le_dns_lexicon_hook_file }}"
```
The default hook script for your dns-01 challenge.

```
le_dehydrated_contact_email:
```
***Overwrite!*** default contact email.

```
le_dehydrated_pkcs12_password: ''
```
Declare a secure password for generating and decrypting PKCS12 (.pfx) certificate files.

#### DNS Providers
```
le_dns_providers:
  - "lexicon"
  - "hetzner"
le_dns_lexicon_providers:
  - "aurora"
  - "cloudflare"
  - "cloudxns"
  - "digitalocean"
  - "dnsimple"
  - "dnsmadeeasy"
  - "dnspark"
  - "dnspod"
  - "easydns"
  - "hetzner"
  - "luadns"
  - "namesilo"
  - "nsone"
  - "pointhq"
  - "rage4"
  - "route53"
  - "vultr"
  - "yandex"
  - "zonomi"
  ...
```
Supported dns providers are those provided by Lexicon (see [list]( https://github.com/AnalogJ/lexicon#providers)) and [Hetzner Robot](https://www.hetzner.de/us/hosting/domain/registrationrobot).

```
le_dns_provider: "cloudflare"
```
Choose default dns provider for dns-01 challenges. *Note:* use same name as listed in `le_dns_providers`, *lexicon* excluded.
Instead of *lexicon* use same name as in `le_dns_lexicon_providers`.

```
# Hetzner
le_dns_hetzner_auth_username:
le_dns_hetzner_auth_password:
le_dns_hetzner_option_envs:
  - "HETZNER_AUTH_ACCOUNT=robot"

# Lexicon
le_dns_lexicon_auth_username:
le_dns_lexicon_auth_password:
le_dns_lexicon_auth_token:
le_dns_lexicon_option_envs:
  - "PROVIDER_ENV=''"
```
***Overwrite!*** Default credentials for chosen default dns provider (see [lexicon](https://github.com/AnalogJ/lexicon#authentication) and [dehydrated-hetzner-hook](https://github.com/rembik/dehydrated-hetzner-hook#configuration) docs).

### Certification
Following dictionaries are required for the certification process and should be declared in the `host_vars` inventory file of Debian/Ubuntu Linux servers which will run the Let's Encrypt ACME client.
```
le_certificate:
    example_com:
        domain: "example.com"                   # required
        altnames: "www.test.com dev.test.com"   # optional
        challenge:                              # optional, overwrites default for specific domain
        webserver:                              # optional, currently not supported!
        dns_provider:                           # optional, overwrites default for specific domain
        auth_username:                          # optional, overwrites default for specific domain
        auth_password:                          # optional, overwrites default for specific domain
        auth_token:                             # optional, overwrites default for specific domain
        option_envs:                            # optional, overwrites default for specific domain
le_certificates:                                # required dictionary list for certification process in role
    - "{{ le_certificate.example_com }}"
```

### Deployment
```
le_deploy: false
```
Use the deployment flag [`false`,`true`,`'force'`] in playbooks to switch between setup/certificate `false` and deploy `true` tasks in this role
Note: When you optionally wish to force all certificates to be deployed to all webservers use `'force'`. Otherwise, when `true` only signed/renewed certificates will be deployed.

```
le_deploy2_webserver: "nginx"
```
Declare to which webserver signed/renewed certificates should be deployed to by default.
*Note:* use same name as listed in `le_deploy2_webservers`

```
le_deploy_certificate:
    example_com:
        domain: "example.com"                   # required
        webserver:                              # optional, overwrites default for specific domain
        force:                                  # optional, set true to always deploy certificate
le_deploy_certificates:                         # required dictionary list for deployment process in role
    - "{{ le_deploy_certificate.example_com }}"
```
These dictionaries are required for the deployment process and should be declared in the `host_vars` inventory file of proxy-/webservers where the certificates will be deployed to.
Proxy-/webserver specific variables for these deployment dictionaries are shown under the specific proxy-/webserver in this section.

#### Proxy- or Webservers
```
le_deploy2_webservers:
  - "nginx"
  - "ms_iis"
  - "ms_exchange"
  - "sophos_utm"
  - "spiceworks_monitor"
```
Supported Proxy-/Webserver the certificates may be deployed to, are currently:
* [nginx (Linux)](https://nginx.org/en/)
* [Microsoft IIS](https://www.iis.net/)
* [Microsoft Exchange](https://products.office.com/de-de/exchange/microsoft-exchange-server-2016)
* [Sophos UTM](https://www.sophos.com/de-de/products/unified-threat-management.aspx)
* [Spiceworks Network Monitor](https://www.spiceworks.com/free-network-monitoring-management-software/)

##### nginx
```
le_deploy2_nginx_certs_dir: "/etc/nginx/certs"
le_deploy2_nginx_reload_cmds:
    - "/etc/init.d/nginx reload"
```
```
le_deploy_certificate:
    example_com:
        domain: "example.com"                   # required
        certs_dir:                              # optional, overwrites default for specific domain
```

##### Microsoft IIS
```
le_deploy2_ms_iis_site_name: "Default Web Site"
le_deploy2_ms_iis_ip: "*"
le_deploy2_ms_iis_port: 443
le_deploy2_ms_iis_host_header: ""
le_deploy2_ms_iis_sni: false
```
```
le_deploy_certificate:
    example_com:
        domain: "example.com"                   # required
        site_name:                              # optional, overwrites default for specific domain
        ip:                                     # optional, overwrites default for specific domain
        host_header:                            # optional, overwrites default for specific domain
        port:                                   # optional, overwrites default for specific domain
        sni:                                    # optional, overwrites default for specific domain
```
For more information about what happen during deployment and what this variables mean see [update-iis-certificate](https://github.com/rembik/update-iis-certificate#update-ms-iis-certificate).

##### Microsoft Exchange
None specific variables. For more information about what happen during deployment see [update-exchange-certificate](https://github.com/rembik/update-exchange-certificate#update-ms-exchange-certificate).

##### Sophos UTM
```
[ssh_connection]
transfer_method = scp
```
Sophos UTM doesn't support the default Ansible transfer method `sftp`, so change the transfer method in the Ansible Config `ansible.cfg` to `scp` instead.
```
le_deploy_certificate:
    example_com:
        domain: "example.com"                   # required
        ref:                                    # required
        ref_ca:                                 # required
```
For more information about what happen during deployment see [utm-update-certificate](https://github.com/mbunkus/utm-update-certificate). For detail instructions about how to get required certificate references `ref` and `ref_ca` see [ansible-letsencrypt-example Wiki](https://github.com/rembik/ansible-letsencrypt-example/wiki/Configure-Sophos-UTM#4-get-certificate-references).

##### Spiceworks Network Monitor
```
le_deploy2_spiceworks_monitor_install_dir: "C:\\Program Files\\Spiceworks\\Network Monitor"
```
```
le_deploy_certificate:
    example_com:
        domain: "example.com"                   # required
        keystore_password:                      # required
```
For detail instructions about how to get required certificate keystore password `keystore_password` see [ansible-letsencrypt-example Wiki](https://github.com/rembik/ansible-letsencrypt-example/wiki/Configure-Spiceworks-Monitor#2-optain-keystore-password).

### Automation
This role provided one optionally automation solution. For scheduled plays it creates cronjobs with `cron` and for rotating log files of the plays it uses `logrotate`.

```
le_cron_playbook_filename: "letsencrypt.yml"
le_cron_vault_password_file: "{{ playbook_dir }}/.vault"
le_cron_inventory_groups:
  - "all"
```
Therefore cron need the location of your [vault password file](http://docs.ansible.com/ansible/playbooks_vault.html#running-a-playbook-with-vault), the filename of the letsencrypt playbook which should be automated and a list of inventory groups the cronjobs should be differentiated by.
The cronjobs should be created during the setup process of the role (see [example playbook](#example-playbook-letsencryptyml)).

#### Ansible Callbacks
This role comes with customized `mail_error` and `log_plays_rotatable` callback plugins. The `log_plays_rotatable` callback logs all playbooks per host and enable rotating the log files with `logrotate`.
`mail_error` mails to interested parties when the automated playbook fails. These parties can be differentiated per inventory group.
Edit the Ansible Config `ansible.cfg` to enable the callbacks and config `mail_error` in `group_vars` inventory files as followed.
```
[default]
callback_whitelist = log_plays_rotatable, mail_error
```
```
err_mail_host: ''           #default: localhost
err_mail_port: ''           #default: '25'
err_mail_username: ''       #optional
err_mail_password: ''       #optional
err_mail_from: ''           #optional
err_mail_to: ''             #required
err_mail_cc: ''             #optional
err_mail_bcc: ''            #optional
```

## Dependencies
None.

## Usage
This role provides `setup`,`certificate` and `deploy` Ansible Tags to split the roll in three processes: **Setup**, **Certification** and **Deployment**.

#### Example Playbook `letsencrypt.yml`
```
- hosts: letsencrypt
  vars:
    le_cron_inventory_groups:
      - "your_inventory_group"
  roles:
    - letsencrypt
  post_tasks:
    - block:
        - name: "letsencrypt : SETUP : config letsencrypt cronjobs (incl. mail_error) for inventory groups"
          include_tasks: "roles/letsencrypt/tasks/setup_cron.yml"
          with_items:
            - "{{ le_cron_inventory_groups }}"
          loop_control:
            loop_var: le_setup_cron_loop
        - name: "Ansible Playbook : SETUP : logrotate - config rotation"
          copy:
            src: roles/letsencrypt/files/setup/localhost/logrotate
            dest: /etc/logrotate.d/ansible_log_plays
            owner: root
            group: root
            mode: 0644
          delegate_to: 127.0.0.1
          run_once: true
      tags:
        - setup

- hosts: all
  roles:
    - { role: letsencrypt, le_deploy: true }
```
For a deeper understanding how to setup this role in an specific inventory environment and what configuration possibilities this role has, see [ansible-letsencrypt-example](https://github.com/rembik/ansible-letsencrypt-example).

```
$ sudo su
$ cd /path/to/playbook
$ ansible-playbook letsencrypt.yml --vault-password-file .vault
```
After an initial manuel play the automated certificate cycle for your private network is finished. Note: When deploying to **[Sophos UTM](#sophos-utm)** better split the initial play with `-t setup,certificate` and `-t deploy` (see [Wiki](https://github.com/rembik/ansible-letsencrypt-example/wiki/Configure-Sophos-UTM)).

## License
MIT / BSD

## Author Information
This role was created in 2017 by Brian Rimek.


text:
package com.github.mtakaki.credentialstorage.hibernate;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import io.dropwizard.client.JerseyClientConfiguration;
import io.dropwizard.db.DataSourceFactory;
import io.dropwizard.validation.ValidationMethod;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class RemoteCredentialDataSourceFactory extends DataSourceFactory {
    @JsonProperty
    @Min(1)
    @Max(365)
    private int refreshFrequency;
    @NotNull
    @JsonProperty
    private String credentialServiceURL;
    @JsonProperty
    private JerseyClientConfiguration credentialClientConfiguration = new JerseyClientConfiguration();
    @NotNull
    @JsonProperty
    private String privateKeyFile;
    @NotNull
    @JsonProperty
    private String publicKeyFile;
    @JsonProperty
    private boolean retrieveCredentials = true;

    @JsonIgnore
    @ValidationMethod(
        message = ".refreshFrequency must be less greater than zero when credential retrieval is enabled")
    public boolean isRefreshFrequencySetWhenFeatureIsEnabled() {
        return this.retrieveCredentials ? this.refreshFrequency > 1 : true;
    }
}


text:
@interface JournalHeaderView : UICollectionReusableView

@end


text:
package com.bullhornsdk.data.model.entity.file;

import com.bullhornsdk.data.model.entity.core.standard.ClientContact;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonRootName;

/**
 * @author Murray
 * @since 11/08/2017
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonRootName(value = "data")
@JsonPropertyOrder({
    "id",
    "clientContact",
    "contentSubType",
    "contentType",
    "dateAdded",
    "departmentsSharedWith",
    "description",
    "directory",
    "distribution",
    "externalID",
    "fileExtension",
    "fileOwner",
    "fileSize",
    "fileType",
    "isCopied",
    "isDeleted",
    "isExternal",
    "isOpen",
    "isPrivate",
    "isSendOut",
    "name",
    "type",
    "usersSharedWith",
    "uuid"
})
public class ClientContactFileAttachment extends EntityFileAttachment {

    private ClientContact clientContact;

    @JsonProperty("clientContact")
    public ClientContact getClientContact() {
        return clientContact;
    }

    @JsonProperty("clientContact")
    public void setClientContact(ClientContact clientContact) {
        this.clientContact = clientContact;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;

        ClientContactFileAttachment that = (ClientContactFileAttachment) o;

        return clientContact != null ? clientContact.equals(that.clientContact) : that.clientContact == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (clientContact != null ? clientContact.hashCode() : 0);
        return result;
    }
}


text:
package cn.felord.wepay.ali.sdk.api.internal.util.json;

import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.text.CharacterIterator;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.text.StringCharacterIterator;
import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import java.util.Map;
import java.util.Stack;
import java.util.TimeZone;

import cn.felord.wepay.ali.sdk.api.AlipayConstants;
import cn.felord.wepay.ali.sdk.api.internal.mapping.ApiField;
import cn.felord.wepay.ali.sdk.api.internal.mapping.ApiListField;
import cn.felord.wepay.ali.sdk.api.internal.util.AlipayLogger;

/**
 *
JSONWriter class.

 *
 * @author lenovo
 * @version $Id: $Id
 */
public class JSONWriter {

    private StringBuffer  buf           = new StringBuffer();
    private Stack<Object> calls         = new Stack<Object>();
    private boolean       emitClassName = true;
    private DateFormat    format;

    /**
     *
Constructor for JSONWriter.

     *
     * @param emitClassName a boolean.
     */
    public JSONWriter(boolean emitClassName) {
        this.emitClassName = emitClassName;
    }

    /**
     *
Constructor for JSONWriter.

     */
    public JSONWriter() {
        this(false);
    }

    /**
     *
Constructor for JSONWriter.

     *
     * @param format a {@link java.text.DateFormat} object.
     */
    public JSONWriter(DateFormat format) {
        this(false);
        this.format = format;
    }

    /**
     *
write.

     *
     * @param object a {@link java.lang.Object} object.
     * @return a {@link java.lang.String} object.
     */
    public String write(Object object) {
        return write(object, false);
    }

    /**
     *
write.

     *
     * @param object a {@link java.lang.Object} object.
     * @param isApiModel a boolean.
     * @return a {@link java.lang.String} object.
     */
    public String write(Object object, boolean isApiModel) {
        buf.setLength(0);
        value(object, isApiModel);
        return buf.toString();
    }

    /**
     *
write.

     *
     * @param n a long.
     * @return a {@link java.lang.String} object.
     */
    public String write(long n) {
        return String.valueOf(n);
    }

    /**
     *
write.

     *
     * @param d a double.
     * @return a {@link java.lang.String} object.
     */
    public String write(double d) {
        return String.valueOf(d);
    }

    /**
     *
write.

     *
     * @param c a char.
     * @return a {@link java.lang.String} object.
     */
    public String write(char c) {
        return "\"" + c + "\"";
    }

    /**
     *
write.

     *
     * @param b a boolean.
     * @return a {@link java.lang.String} object.
     */
    public String write(boolean b) {
        return String.valueOf(b);
    }

    private void value(Object object) {
        value(object, false);
    }

    private void value(Object object, boolean isApiModel) {
        if (object == null || cyclic(object)) {
            add(null);
        } else {
            calls.push(object);
            if (object instanceof Class<?>)
                string(object);
            else if (object instanceof Boolean)
                bool(((Boolean) object).booleanValue());
            else if (object instanceof Number)
                add(object);
            else if (object instanceof String)
                string(object);
            else if (object instanceof Character)
                string(object);
            else if (object instanceof Map<?, ?>)
                map((Map<?, ?>) object);
            else if (object.getClass().isArray())
                array(object, isApiModel);
            else if (object instanceof Iterator<?>)
                array((Iterator<?>) object, isApiModel);
            else if (object instanceof Collection<?>)
                array(((Collection<?>) object).iterator(), isApiModel);
            else if (object instanceof Date)
                date((Date) object);
            else {
                if (isApiModel)
                    model(object);
                else
                    bean(object);
            }
            calls.pop();
        }
    }

    private boolean cyclic(Object object) {
        Iterator<Object> it = calls.iterator();
        while (it.hasNext()) {
            Object called = it.next();
            if (object == called)
                return true;
        }
        return false;
    }

    private void bean(Object object) {
        add("{");
        BeanInfo info;
        boolean addedSomething = false;
        try {
            info = Introspector.getBeanInfo(object.getClass());
            PropertyDescriptor[] props = info.getPropertyDescriptors();
            for (int i = 0; i < props.length; ++i) {
                PropertyDescriptor prop = props[i];
                String name = prop.getName();
                Method accessor = prop.getReadMethod();
                if ((emitClassName || !"class".equals(name)) && accessor != null) {
                    if (!accessor.isAccessible())
                        accessor.setAccessible(true);
                    Object value = accessor.invoke(object, (Object[]) null);
                    if (value == null)
                        continue;
                    if (addedSomething)
                        add(',');
                    add(name, value);
                    addedSomething = true;
                }
            }
            Field[] ff = object.getClass().getFields();
            for (int i = 0; i < ff.length; ++i) {
                Field field = ff[i];
                Object value = field.get(object);
                if (value == null)
                    continue;
                if (addedSomething)
                    add(',');
                add(field.getName(), value);
                addedSomething = true;
            }
        } catch (IllegalAccessException iae) {
            iae.printStackTrace();
        } catch (InvocationTargetException ite) {
            ite.getCause().printStackTrace();
            ite.printStackTrace();
        } catch (IntrospectionException ie) {
            ie.printStackTrace();
        }
        add("}");
    }

    private void model(Object object) {
        add("{");
        boolean addedSomething = false;
        Field[] ff = object.getClass().getDeclaredFields();
        try {
            for (int i = 0; i < ff.length; ++i) {
                Field field = ff[i];
                // 获取注解
                ApiField jsonField = field.getAnnotation(ApiField.class);
                ApiListField listField = field.getAnnotation(ApiListField.class);
                // 优先处理列表类型注解,非列表类型才处理字段注解
                if (listField != null) {
                    PropertyDescriptor pd = new PropertyDescriptor(field.getName(),
                        object.getClass());
                    Method accessor = pd.getReadMethod();
                    if (!accessor.isAccessible())
                        accessor.setAccessible(true);
                    Object value = accessor.invoke(object, (Object[]) null);
                    if (value == null)
                        continue;
                    if (addedSomething)
                        add(',');
                    add(listField.value(), value, true);
                    addedSomething = true;
                } else if (jsonField != null) {
                    PropertyDescriptor pd = new PropertyDescriptor(field.getName(),
                        object.getClass());
                    Method accessor = pd.getReadMethod();
                    if (!accessor.isAccessible())
                        accessor.setAccessible(true);
                    Object value = accessor.invoke(object, (Object[]) null);
                    if (value == null)
                        continue;
                    if (addedSomething)
                        add(',');
                    add(jsonField.value(), value, true);
                    addedSomething = true;
                }
            }
        } catch (IntrospectionException e1) {
            AlipayLogger.logBizError(e1);
        } catch (IllegalAccessException e2) {
            AlipayLogger.logBizError(e2);
        } catch (IllegalArgumentException e3) {
            AlipayLogger.logBizError(e3);
        } catch (InvocationTargetException e4) {
            AlipayLogger.logBizError(e4);
        }
        add("}");
    }

    private void add(String name, Object value) {
        add(name, value, false);
    }

    private void add(String name, Object value, boolean isApiModel) {
        add('"');
        add(name);
        add("\":");
        value(value, isApiModel);
    }

    private void map(Map<?, ?> map) {
        add("{");
        Iterator<?> it = map.entrySet().iterator();
        while (it.hasNext()) {
            Map.Entry<?, ?> e = (Map.Entry<?, ?>) it.next();
            value(e.getKey());
            add(":");
            value(e.getValue());
            if (it.hasNext())
                add(',');
        }
        add("}");
    }

    private void array(Iterator<?> it) {
        array(it, false);
    }

    private void array(Iterator<?> it, boolean isApiModel) {
        add("[");
        while (it.hasNext()) {
            value(it.next(), isApiModel);
            if (it.hasNext())
                add(",");
        }
        add("]");
    }

    private void array(Object object) {
        array(object, false);
    }

    private void array(Object object, boolean isApiModel) {
        add("[");
        int length = Array.getLength(object);
        for (int i = 0; i < length; ++i) {
            value(Array.get(object, i), isApiModel);
            if (i < length - 1)
                add(',');
        }
        add("]");
    }

    private void bool(boolean b) {
        add(b ? "true" : "false");
    }

    private void date(Date date) {
        if (this.format == null) {
            this.format = new SimpleDateFormat(AlipayConstants.DATE_TIME_FORMAT);
            this.format.setTimeZone(TimeZone.getTimeZone(AlipayConstants.DATE_TIMEZONE));
        }
        add("\"");
        add(format.format(date));
        add("\"");
    }

    private void string(Object obj) {
        add('"');
        CharacterIterator it = new StringCharacterIterator(obj.toString());
        for (char c = it.first(); c != CharacterIterator.DONE; c = it.next()) {
            if (c == '"')
                add("\\\"");
            else if (c == '\\')
                add("\\\\");
            else if (c == '/')
                add("\\/");
            else if (c == '\b')
                add("\\b");
            else if (c == '\f')
                add("\\f");
            else if (c == '\n')
                add("\\n");
            else if (c == '\r')
                add("\\r");
            else if (c == '\t')
                add("\\t");
            else if (Character.isISOControl(c)) {
                unicode(c);
            } else {
                add(c);
            }
        }
        add('"');
    }

    private void add(Object obj) {
        buf.append(obj);
    }

    private void add(char c) {
        buf.append(c);
    }

    static char[] hex = "0123456789ABCDEF".toCharArray();

    private void unicode(char c) {
        add("\\u");
        int n = c;
        for (int i = 0; i < 4; ++i) {
            int digit = (n & 0xf000) >> 12;
            add(hex[digit]);
            n <<= 4;
        }
    }
}


text:
require "spec_helper"

describe "Geo Pattern Tag" do
  def setup(file, layout)
    @post = setup_post(file)
    do_render(@post, layout)
  end

  it "understands all numeral hex colors geopattern" do
    setup("1984-03-06-basic-geopattern-all-nums.md", "basic_geopattern_all_nums.html")
    expect(@post.output).to match /L3d3dy53My5vcmcv/
  end

  it "ignores null properties" do
    setup("1984-03-06-ignore-null-generator.md", "ignore_null_generator.html")
    expect(@post.output).to match /cmcvMjAwMC9zdmciIHdpZHRoPSIyMDMiIGhlaWdodD0iMjAzIj48/
  end

  context "base64_string" do
    it "understands basic geopattern" do
      setup("1984-03-06-basic-geopattern-base64.md", "basic_geopattern_base64.html")
      expect(@post.output).to match /PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmc/
    end

    it "fails for geopattern missing text" do
      expect { setup("1984-03-06-geopattern-missing-text-base64.md", "geopattern_missing_text_base64.html") }.to raise_error
    end

    it "understands base color" do
      setup("1984-03-06-geopattern-base-color-base64.md", "geopattern_base_color_base64.html")
      expect(@post.output).to match /I0LjAiICAvPjwvZz48ZyBmaWxsPSIjZG/
    end

    it "understands generation" do
      setup("1984-03-06-geopattern-generator-base64.md", "geopattern_generator_base64.html")
      expect(@post.output).to match /sZT0ib3BhY2l0eTowLjA2MzMzMzMzMzMzMzMzMzM0O3N0/
    end
  end

  context "svg" do
    it "understands basic geopattern" do
      setup("1984-03-06-basic-geopattern-svg.md", "basic_geopattern_svg.html")
      expect(@post.output).to match /g fill="#ddd" style="opacity:0.14133333333333334;" transform="translate\(-33.948,-33.948\)/
    end

    it "fails for geopattern missing text" do
      expect { setup("1984-03-06-geopattern-missing-text-svg.md", "geopattern_missing_text_svg.html") }.to raise_error
    end

    it "understands base color" do
      setup("1984-03-06-geopattern-base-color-svg.md", "geopattern_base_color_svg.html")
      expect(@post.output).to match /fill=\"#222\" style=\"opacity:0.13266666666666665;\" transform=\"translate\(33.948,169.74\) rotate\(45,/
    end

    it "understands generation" do
      setup("1984-03-06-geopattern-generator-svg.md", "geopattern_generator_svg.html")
      expect(@post.output).to match /opacity:0.08066666666666666;stroke-width:26px;\" transform=\"translate\(-95, 1017.5\)\"/
    end
  end

  context "uri_image" do
    it "understands basic geopattern" do
      setup("1984-03-06-basic-geopattern-uri.md", "basic_geopattern_uri.html")
      expect(@post.output).to match /url\(data:image\/svg\+xml;base64,PHN2ZyB4bWxu/
    end

    it "fails for geopattern missing text" do
      expect { setup("1984-03-06-geopattern-missing-text-uri.md", "geopattern_missing_text_uri.html") }.to raise_error
    end

    it "understands base color" do
      setup("1984-03-06-geopattern-base-color-uri.md", "geopattern_base_color_uri.html")
      expect(@post.output).to match /url\(data:image\/svg\+xml;base64,PHN2ZyB4bWxucz0i/
    end

    it "understands generation" do
      setup("1984-03-06-geopattern-generator-uri.md", "geopattern_generator_uri.html")
      expect(@post.output).to match /url\(data:image\/svg\+xml;base64,PHN2ZyB4bWxucz0ia/
    end
  end
end


text:
'use strict';

/* Controllers */
angular.module('whichOnesControllers', ['whichOnesServices', 'ngRoute'])
	.controller('WhichOnesSheetController', ['$scope', '$rootScope', '$location', 'WhichOnesSheetService',
        function($scope, $rootScope, $location, WhichOnesSheetService){
			var sheetToken = angular.isUndefined($location.search().sheet) ? null : $location.search().sheet;
			$scope.role = { "editor" : true };
			$scope.totals = {};
			//Load that sheet
			$scope.sheet = WhichOnesSheetService.getSheet(sheetToken);
			WhichOnesSheetService.prepareSheet();
			$scope.$on( 'sheet.created', function( event ) {
				console.log("created",$scope);
				$location.search("sheet",$scope.sheet.token);
			});
			$scope.$on( 'sheet.available', function( event ) {
				$scope.sections = WhichOnesSheetService.mapSections();
				$scope.sheet = WhichOnesSheetService.sheet;
				$scope.orderedLines = WhichOnesSheetService.getOrderedLine();
				updateScopeSheet($scope.sheet, $scope);
				$rootScope.$broadcast('sheet.ready');
			});
			$scope.$on( 'sheet.update', function( event ) {
				$scope.orderedLines = WhichOnesSheetService.getOrderedLine();
				updateScopeSheet($scope.sheet, $scope);
			});
			$scope.saveSheet = function(){
				WhichOnesSheetService.saveSheet();
				console.log($scope.sheet);
			};
			$scope.create = function(){
				$scope.sheet = WhichOnesSheetService.createSheet($scope.sheet);
				WhichOnesSheetService.controleNewSheet();
				console.log($scope.sheet);
			};
			$scope.$on('code.available', function(e){
				var sample = angular.isUndefined($location.search().sheet) ? null : $location.search().sheet;
				$scope.sheet = WhichOnesSheetService.getSheet(sample);
				WhichOnesSheetService.prepareSheet();
			});
		}
	])
	.factory("TutoCode", ['$resource',function( $resource){
		return $resource('steps/step:step.html', { "step" : "@step" });
	}])
	.controller("tutoSteps", ['$scope', '$location','$route','$http','$rootScope','$templateCache',
	    function($scope, $location, $route, $http, $rootScope, $templateCache){
			$scope.step = $location.search().step;
			$scope.sample = $location.search().sheet;
			$http.get('steps/step'+$scope.step+'.html').then(function(response){
				$scope.code = response.data;
				$rootScope.$broadcast( 'code.available' );
			});
			$scope.refresh = function(){
				$location.search({step : $scope.step, sheet : $scope.sample});
				$http.get('steps/step'+$scope.step+'.html').then(function(response){
					$scope.code = response.data;
					$rootScope.$broadcast( 'code.available' );
				});
			};
			$scope.reload = function(){
				window.location.reload(true);
			};
		}
	])
	.directive('syntaxHighlight',function($timeout){
		return {
			restrict: 'A',
			link: function($scope,$element, attrs){
				$timeout(function(){
					$scope.$watch('code', function(code){
						$element
							.empty()
							.append(
							$("<pre />")
								.addClass("brush: html")
								.text(code));
						SyntaxHighlighter.highlight();
					});
				});
			}
		};
	});


text:
module Jekyll
  class Configuration < Hash
    # Default options. Overridden by values in _config.yml.
    # Strings rather than symbols are used for compatibility with YAML.
    DEFAULTS = {
      # Where things are
      "source"              => Dir.pwd,
      "destination"         => File.join(Dir.pwd, "_site"),
      "collections_dir"     => "",
      "cache_dir"           => ".jekyll-cache",
      "plugins_dir"         => "_plugins",
      "layouts_dir"         => "_layouts",
      "data_dir"            => "_data",
      "includes_dir"        => "_includes",
      "collections"         => {},

      # Handling Reading
      "safe"                => false,
      "include"             => [".htaccess"],
      "exclude"             => [],
      "keep_files"          => [".git", ".svn"],
      "encoding"            => "utf-8",
      "markdown_ext"        => "markdown,mkdown,mkdn,mkd,md",
      "strict_front_matter" => false,

      # Filtering Content
      "show_drafts"         => nil,
      "limit_posts"         => 0,
      "future"              => false,
      "unpublished"         => false,

      # Plugins
      "whitelist"           => [],
      "plugins"             => [],

      # Conversion
      "markdown"            => "kramdown",
      "highlighter"         => "rouge",
      "lsi"                 => false,
      "excerpt_separator"   => "\n\n",
      "incremental"         => false,

      # Serving
      "detach"              => false, # default to not detaching the server
      "port"                => "4000",
      "host"                => "127.0.0.1",
      "baseurl"             => nil, # this mounts at /, i.e. no subdirectory
      "show_dir_listing"    => false,

      # Output Configuration
      "permalink"           => "date",
      "paginate_path"       => "/page:num",
      "timezone"            => nil, # use the local timezone

      "quiet"               => false,
      "verbose"             => false,
      "defaults"            => [],

      "liquid"              => {
        "error_mode"       => "warn",
        "strict_filters"   => false,
        "strict_variables" => false,
      },

      "kramdown"            => {
        "auto_ids"      => true,
        "toc_levels"    => (1..6).to_a,
        "entity_output" => "as_char",
        "smart_quotes"  => "lsquo,rsquo,ldquo,rdquo",
        "input"         => "GFM",
        "hard_wrap"     => false,
        "guess_lang"    => true,
        "footnote_nr"   => 1,
        "show_warnings" => false,
      },
    }.each_with_object(Configuration.new) { |(k, v), hsh| hsh[k] = v.freeze }.freeze

    class << self
      # Static: Produce a Configuration ready for use in a Site.
      # It takes the input, fills in the defaults where values do not exist.
      #
      # user_config - a Hash or Configuration of overrides.
      #
      # Returns a Configuration filled with defaults.
      def from(user_config)
        Utils.deep_merge_hashes(DEFAULTS, Configuration[user_config].stringify_keys)
          .add_default_collections.add_default_excludes
      end
    end

    # Public: Turn all keys into string
    #
    # Return a copy of the hash where all its keys are strings
    def stringify_keys
      each_with_object({}) { |(k, v), hsh| hsh[k.to_s] = v }
    end

    def get_config_value_with_override(config_key, override)
      override[config_key] || self[config_key] || DEFAULTS[config_key]
    end

    # Public: Directory of the Jekyll source folder
    #
    # override - the command-line options hash
    #
    # Returns the path to the Jekyll source directory
    def source(override)
      get_config_value_with_override("source", override)
    end

    def quiet(override = {})
      get_config_value_with_override("quiet", override)
    end
    alias_method :quiet?, :quiet

    def verbose(override = {})
      get_config_value_with_override("verbose", override)
    end
    alias_method :verbose?, :verbose

    def safe_load_file(filename)
      case File.extname(filename)
      when %r!\.toml!i
        Jekyll::External.require_with_graceful_fail("tomlrb") unless defined?(Tomlrb)
        Tomlrb.load_file(filename)
      when %r!\.ya?ml!i
        SafeYAML.load_file(filename) || {}
      else
        raise ArgumentError,
              "No parser for '#{filename}' is available. Use a .y(a)ml or .toml file instead."
      end
    end

    # Public: Generate list of configuration files from the override
    #
    # override - the command-line options hash
    #
    # Returns an Array of config files
    def config_files(override)
      # Adjust verbosity quickly
      Jekyll.logger.adjust_verbosity(
        :quiet   => quiet?(override),
        :verbose => verbose?(override)
      )

      # Get configuration from <source>/_config.yml or <source>/<config_file>
      config_files = override["config"]
      if config_files.to_s.empty?
        default = %w(yml yaml toml).find(-> { "yml" }) do |ext|
          File.exist?(Jekyll.sanitized_path(source(override), "_config.#{ext}"))
        end
        config_files = Jekyll.sanitized_path(source(override), "_config.#{default}")
        @default_config_file = true
      end
      Array(config_files)
    end

    # Public: Read configuration and return merged Hash
    #
    # file - the path to the YAML file to be read in
    #
    # Returns this configuration, overridden by the values in the file
    def read_config_file(file)
      file = File.expand_path(file)
      next_config = safe_load_file(file)

      unless next_config.is_a?(Hash)
        raise ArgumentError, "Configuration file: (INVALID) #{file}".yellow
      end

      Jekyll.logger.info "Configuration file:", file
      next_config
    rescue SystemCallError
      if @default_config_file ||= nil
        Jekyll.logger.warn "Configuration file:", "none"
        {}
      else
        Jekyll.logger.error "Fatal:", "The configuration file '#{file}' could not be found."
        raise LoadError, "The Configuration file '#{file}' could not be found."
      end
    end

    # Public: Read in a list of configuration files and merge with this hash
    #
    # files - the list of configuration file paths
    #
    # Returns the full configuration, with the defaults overridden by the values in the
    # configuration files
    def read_config_files(files)
      configuration = clone

      begin
        files.each do |config_file|
          next if config_file.nil? || config_file.empty?

          new_config = read_config_file(config_file)
          configuration = Utils.deep_merge_hashes(configuration, new_config)
        end
      rescue ArgumentError => e
        Jekyll.logger.warn "WARNING:", "Error reading configuration. Using defaults (and options)."
        warn e
      end

      configuration.validate.add_default_collections
    end

    # Public: Split a CSV string into an array containing its values
    #
    # csv - the string of comma-separated values
    #
    # Returns an array of the values contained in the CSV
    def csv_to_array(csv)
      csv.split(",").map(&:strip)
    end

    # Public: Ensure the proper options are set in the configuration
    #
    # Returns the configuration Hash
    def validate
      config = clone

      check_plugins(config)
      check_include_exclude(config)

      config
    end

    def add_default_collections
      config = clone

      # It defaults to `{}`, so this is only if someone sets it to null manually.
      return config if config["collections"].nil?

      # Ensure we have a hash.
      if config["collections"].is_a?(Array)
        config["collections"] = config["collections"].each_with_object({}) do |collection, hash|
          hash[collection] = {}
        end
      end

      config["collections"] = Utils.deep_merge_hashes(
        { "posts" => {} }, config["collections"]
      ).tap do |collections|
        collections["posts"]["output"] = true
        if config["permalink"]
          collections["posts"]["permalink"] ||= style_to_permalink(config["permalink"])
        end
      end

      config
    end

    DEFAULT_EXCLUDES = %w(
      .sass-cache .jekyll-cache
      gemfiles Gemfile Gemfile.lock
      node_modules
      vendor/bundle/ vendor/cache/ vendor/gems/ vendor/ruby/
    ).freeze

    def add_default_excludes
      config = clone
      return config if config["exclude"].nil?

      config["exclude"].concat(DEFAULT_EXCLUDES).uniq!
      config
    end

    private

    STYLE_TO_PERMALINK = {
      :none     => "/:categories/:title:output_ext",
      :date     => "/:categories/:year/:month/:day/:title:output_ext",
      :ordinal  => "/:categories/:year/:y_day/:title:output_ext",
      :pretty   => "/:categories/:year/:month/:day/:title/",
      :weekdate => "/:categories/:year/W:week/:short_day/:title:output_ext",
    }.freeze

    private_constant :STYLE_TO_PERMALINK

    def style_to_permalink(permalink_style)
      STYLE_TO_PERMALINK[permalink_style.to_sym] || permalink_style.to_s
    end

    def check_include_exclude(config)
      %w(include exclude).each do |option|
        next unless config.key?(option)
        next if config[option].is_a?(Array)

        raise Jekyll::Errors::InvalidConfigurationError,
              "'#{option}' should be set as an array, but was: #{config[option].inspect}."
      end
    end

    # Private: Checks if the `plugins` config is a String
    #
    # config - the config hash
    #
    # Raises a Jekyll::Errors::InvalidConfigurationError if the config `plugins`
    # is not an Array.
    def check_plugins(config)
      return unless config.key?("plugins")
      return if config["plugins"].is_a?(Array)

      Jekyll.logger.error "'plugins' should be set as an array of gem-names, but was: " \
                          "#{config["plugins"].inspect}. Use 'plugins_dir' instead to set " \
                          "the directory for your non-gemified Ruby plugins."
      raise Jekyll::Errors::InvalidConfigurationError,
            "'plugins' should be set as an array, but was: #{config["plugins"].inspect}."
    end
  end
end


text:
        <form name="createTripForm" class="form-horizontal">
            <fieldset>
                <legend>Create Trip</legend>

                    From

                        <select id="from" type="text" placeholder="From" ng-model="trip.from" required="required" class="form-control">
                            <option ng-repeat="city in vm.cities">{{city}}</option>
                        </select>

                    To

                        <select id="to" type="text" placeholder="To" ng-model="trip.to" required="required" class="form-control">
                            <option ng-repeat="city in vm.cities">{{city}}</option>
                        </select>

                    Available Seats

                        <input id="availableSeats" type="number" placeholder="Available seats" ng-model="trip.availableSeats" required="required" class="form-control" />

                    Departure Time

                        <input id="departureTime" kendo-datetimepicker k-format="'yyyy-MM-dd HH:mm:ss'" placeholder="Departure Time" ng-model="trip.departureTime" required="required" class="form-control" />

                    <button ng-click="vm.createTrip(trip)" ng-disabled="signUpForm.$invalid" class="btn btn-primary">
                        Create
                    </button>

            </fieldset>
        </form>


text:
'use strict';

// MODULES //

var tape = require( 'tape' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
var Float64Array = require( '@stdlib/array/float64' );
var umuldw = require( './../lib/assign.js' );

// FIXTURES //

var data = require( './fixtures/c/data.json' );

// TESTS //

tape( 'main export is a function', function test( t ) {
	t.ok( true, __filename );
	t.strictEqual( typeof umuldw, 'function', 'main export is a function' );
	t.end();
});

tape( 'the function returns `NaN` if provided `NaN`', function test( t ) {
	var out;
	var v;

	out = [ 0, 0 ];
	v = umuldw( NaN, 1, out, 1, 0 );
	t.equal( v, out, 'returns output array' );
	t.strictEqual( isnan( v[0] ), true, 'returns expected value' );
	t.strictEqual( isnan( v[1] ), true, 'returns expected value' );

	out = [ 0, 0 ];
	v = umuldw( 1, NaN, out, 1, 0 );
	t.equal( v, out, 'returns output array' );
	t.strictEqual( isnan( v[0] ), true, 'returns expected value' );
	t.strictEqual( isnan( v[1] ), true, 'returns expected value' );

	out = [ 0, 0 ];
	v = umuldw( NaN, NaN, out, 1, 0 );
	t.equal( v, out, 'returns output array' );
	t.strictEqual( isnan( v[0] ), true, 'returns expected value' );
	t.strictEqual( isnan( v[1] ), true, 'returns expected value' );

	t.end();
});

tape( 'the function computes the double word product of two (unsigned) words', function test( t ) {
	var expected;
	var actual;
	var out;
	var a;
	var b;
	var i;

	a = data.a;
	b = data.b;
	expected = data.expected;
	for ( i = 0; i < expected.length; i++ ) {
		out = [ 0, 0 ];
		actual = umuldw( a[ i ], b[ i ], out, 1, 0 );
		t.equal( actual, out, 'returns output array' );
		t.deepEqual( actual, expected[ i ], 'returns expected value. a: '+a[i]+'. b: '+b[i]+'. expected: ['+expected[i].join(',')+']');
	}
	t.end();
});

tape( 'the function supports providing an output array', function test( t ) {
	var parts;
	var out;

	out = [ 0, 0 ];
	parts = umuldw( 3, 5, out, 1, 0 );

	t.strictEqual( parts, out, 'returns output array' );
	t.strictEqual( parts[ 0 ], 0, 'has expected first element' );
	t.strictEqual( parts[ 1 ], 15, 'has expected second element' );

	t.end();
});

tape( 'the function supports providing an output typed array', function test( t ) {
	var parts;
	var out;

	out = new Float64Array( 2 );
	parts = umuldw( 3, 5, out, 1, 0 );

	t.strictEqual( parts, out, 'returns output typed array' );
	t.strictEqual( parts[ 0 ], 0, 'has expected first element' );
	t.strictEqual( parts[ 1 ], 15, 'has expected second element' );

	t.end();
});

tape( 'the function supports specifying a stride', function test( t ) {
	var out;
	var val;

	out = new Float64Array( 4 );
	val = umuldw( 3, 5, out, 2, 0 );

	t.strictEqual( val, out, 'returns output array' );
	t.strictEqual( val[ 0 ], 0, 'returns expected value' );
	t.strictEqual( val[ 1 ], 0, 'returns expected value' );
	t.strictEqual( val[ 2 ], 15, 'returns expected value' );
	t.strictEqual( val[ 3 ], 0, 'returns expected value' );

	t.end();
});

tape( 'the function supports specifying an offset', function test( t ) {
	var out;
	var val;

	out = new Float64Array( 4 );
	val = umuldw( 3, 5, out, 2, 1 );

	t.strictEqual( val, out, 'returns output array' );
	t.strictEqual( val[ 0 ], 0, 'returns expected value' );
	t.strictEqual( val[ 1 ], 0, 'returns expected value' );
	t.strictEqual( val[ 2 ], 0, 'returns expected value' );
	t.strictEqual( val[ 3 ], 15, 'returns expected value' );

	t.end();
});


text:
<?php

use Ouzo\Helper\HtmlElementRenderer;
use PHPUnit\Framework\TestCase;

class HtmlElementRendererTest extends TestCase
{
    /**
     * @test
     */
    public function shouldRenderAnchorElement()
    {
        //given
        $renderer = HtmlElementRenderer::anchor()
            ->setText("some link")
            ->setAttributes(["data-a" => "'dta'\" txt", "id" => "element-id"])
            ->setAttribute("href", "https://link.to");

        //when
        $html = $renderer->render();

        //then
        $this->assertEquals('some link', $html);
    }

    /**
     * @test
     */
    public function shouldRenderInputElementWithScript()
    {
        //given
        $renderer = HtmlElementRenderer::input("text")
            ->setAttribute("onclick", "window.location.href = 'https://link.to/?param=val'");

        //when
        $html = $renderer->render();

        //then
        $this->assertEquals('<input type="text" onclick="window.location.href = \'https://link.to/?param=val\'"/>', $html);
    }

    /**
     * @test
     */
    public function shouldRenderConditionalFlag()
    {
        //given
        $renderer = HtmlElementRenderer::input("checkbox")
            ->setValue("1")
            ->setFlag("checked", true)
            ->setFlag("some_flag", false);

        //when
        $html = $renderer->render();

        //then
        $this->assertEquals('<input type="checkbox" value="1" checked/>', $html);
    }
}


text:
var express = require('express');
var router = express.Router();
var bracket = require('../modules/bracket')

router.get('/:hash?', function (req, res, next) {
    console.log()
    let chave = {
        "teams": [
            [{ name: "Team 1", flag: 'clone' }, { name: "Team 2", flag: 'giant' }],
            [{ name: "Team 3", flag: 'knight' }, { name: "Team 4", flag: 'guards' }]
        ],
        "results": [[[[null, null], [null, null]], [[null, null], [null, null]]]]
    },
        renderizar = req.params.hash === 'banzai2004' ? `
            function saveFn(data, userData) {
                console.log('save ', typeof (data), JSON.stringify(data));
            }
                containerObj.userData = "http://localhost:3000/";
                containerObj.save = saveFn;
        `: ''
    renderizar += `
        containerObj.init = ${JSON.stringify(chave)}
        container.bracket(containerObj);
        $("#what").html('');
    `
    res.render('camp', {
        title: "CRCVC v1",
        admin: renderizar
    })
});

router.post('/save', function (req, res, next) {
    console.log(req.body)
    res.send(req.body)
});

module.exports = router;


text:
layout: single
title: "2014-09-29 - Cool NoSQL on Azure with DocumentDB"
date: 2014-09-30 10:2:00 +0000
comments: true
published: true
categories: ["videos"]
tags: ["Videos"]
alias: ["/videos/2014-09-29---cool-nosql-on-azure-with-documentdb"]
author: Maarten Balliauw
redirect_from:
 - /2014-09-29---cool-nosql-on-azure-with-documentdb.html
 - /2014-09-29---cool-nosql-on-azure-with-documentdb.html
---

DocumentDB is the latest NoSQL storage option released to Azure. In this session you will learn what DocumentDB is, what features it contains, how it is different to other storage solutions and in what kind of situations you should/could use it. You will also see a lot of hands-on to show what is possible with DocumentDB.

Speaker: Jan Hentschel is a Senior Software Development Lead at Ultra Tendency UG. He is a Microsoft Azure MVP and Microsoft Certified Trainer focusing on building enterprise applications based on Microsoft technologies.

Video

Slide deck

					Cool NoSQL on Azure with DocumentDB


text:
package omtteam.omlib.util.camo;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public class CamoResult {
    private final boolean success;
    private final EnumTool tool;

    public CamoResult(boolean success, EnumTool tool) {
        this.success = success;
        this.tool = tool;
    }

    @Nonnull
    public boolean isSuccess() {
        return success;
    }

    @Nullable
    public EnumTool getTool() {
        return tool;
    }
}


text:
var Scanner = HTMLTools.Scanner;
var getCharacterReference = HTMLTools.Parse.getCharacterReference;

Tinytest.add("html-tools - entities", function (test) {
  var succeed = function (input, match, codepoints) {
    if (typeof input === 'string')
      input = {input: input};

    // match arg is optional; codepoints is never a string
    if (typeof match !== 'string') {
      codepoints = match;
      match = input.input;
    }

    var scanner = new Scanner(input.input);
    var result = getCharacterReference(scanner, input.inAttribute, input.allowedChar);
    test.isTrue(result);
    test.equal(scanner.pos, match.length);
    test.equal(result, {
      t: 'CharRef',
      v: match,
      cp: _.map(codepoints,
                function (x) { return (typeof x === 'string' ?
                                       x.charCodeAt(0) : x); })
    });
  };

  var ignore = function (input) {
    if (typeof input === 'string')
      input = {input: input};

    var scanner = new Scanner(input.input);
    var result = getCharacterReference(scanner, input.inAttribute, input.allowedChar);
    test.isFalse(result);
    test.equal(scanner.pos, 0);
  };

  var fatal = function (input, messageContains) {
    if (typeof input === 'string')
      input = {input: input};

    var scanner = new Scanner(input.input);
    var error;
    try {
      getCharacterReference(scanner, input.inAttribute, input.allowedChar);
    } catch (e) {
      error = e;
    }
    test.isTrue(error);
    if (error)
      test.isTrue(messageContains && error.message.indexOf(messageContains) >= 0, error.message);
  };

  ignore('a');
  ignore('&');
  ignore('&&');
  ignore('&\t');
  ignore('& ');
  fatal('&#', 'Invalid numerical character reference starting with &#');
  ignore('&a');
  fatal('&a;', 'Invalid character reference: &a;');
  ignore({input: '&"', allowedChar: '"'});
  ignore('&"');

  succeed('>', ['>']);
  fatal('&gt', 'Character reference requires semicolon');
  ignore('&aaa');
  fatal('&gta', 'Character reference requires semicolon');
  ignore({input: '&gta', inAttribute: true});
  fatal({input: '&gt=', inAttribute: true}, 'Character reference requires semicolon: &gt');

  succeed('>;', '>', ['>']);

  fatal('&asdflkj;', 'Invalid character reference: &asdflkj;');
  fatal('&A0asdflkj;', 'Invalid character reference: &A0asdflkj;');
  ignore('&A0asdflkj');

  succeed('𝕫', [120171]);
  succeed('∾̳', [8766, 819]);

  succeed('
', [10]);
  fatal('&#10', 'Invalid numerical character reference starting with &#');
  fatal('&#xg;', 'Invalid numerical character reference starting with &#');
  fatal('&#;', 'Invalid numerical character reference starting with &#');
  fatal('&#a;', 'Invalid numerical character reference starting with &#');
  fatal('&#a', 'Invalid numerical character reference starting with &#');
  fatal('&#z', 'Invalid numerical character reference starting with &#');
  succeed('
', [10]);
  fatal('�', 'Numerical character reference too large: 1000000000010');
  succeed('
', [10]);
  fatal('�', 'Numerical character reference too large: 0x100000000000a');
  succeed('
', [10]);
  succeed('
', [10]);
  succeed('
', [10]);
  succeed('
', [10]);
  succeed('
', [10]);

  fatal('�', 'Illegal codepoint in numerical character reference: �');
  fatal('�', 'Illegal codepoint in numerical character reference: �');

  fatal('', 'Illegal codepoint in numerical character reference: ');
  succeed('', [12]);
  fatal('', 'Illegal codepoint in numerical character reference: ');
  succeed('', [12]);

  fatal('', 'Illegal codepoint in numerical character reference');
  fatal('', 'Illegal codepoint in numerical character reference');
  succeed('􏿽', [0x10fffd]);

  fatal('', 'Illegal codepoint in numerical character reference');
  fatal('', 'Illegal codepoint in numerical character reference');
  succeed('􏿽', [0x10fffd]);

});


text:
<?php

namespace HbgEventImporter\MiddleLayer;

class SyncManager
{
    public $apiUrl;
    public $apiKey;
    public $singularName;
    public $pluralName;
    public $isCdnSyncEnabled;

    public function __construct($singularName, $pluralName)
    {
        $this->isCdnSyncEnabled = get_option('options_enable_cdn_api_sync');
        $this->apiUrl = get_option('options_cdn_api_url');
        $this->apiKey = get_option('options_cdn_api_key');
        $this->singularName = $singularName;
        $this->pluralName = $pluralName;
    }

    public function deleteItem($term)
    {
        $this->delete($term);
    }

    public function saveItem($id)
    {
        $data = $this->getRestResponse($id);
        if (empty($data)) {
            return;
        }
        $json = wp_json_encode($data);
        $this->post($json);
    }

    public function saveEmbeddedItem($id)
    {
        $data = $this->getRestResponse($id, true);
        if (empty($data)) {
            return;
        }
        $json = wp_json_encode($data);
        $this->post($json);
    }

    public function post($body)
    {
        $url = $this->apiUrl . '/' . $this->pluralName;
        $args = [
          'body' => $body,
          'headers' => [
            'Content-Type' => 'application/json',
            'x-api-key' => $this->apiKey,
          ],
          'sslverify' => defined('DEV_MODE') && DEV_MODE == true ? false : true,
        ];
        $response = wp_remote_post($url, $args);

        if (is_wp_error($response)) {
            $errorMessage = $response->get_error_message();
            error_log("Middle Layer API POST \"$this->pluralName\" error: $errorMessage");
        }
    }

    public function delete($id)
    {
        $url = $this->apiUrl . '/' . $this->pluralName . '/' . $id;
        $args = array(
          'headers' => [
            'x-api-key' => $this->apiKey,
          ],
          'method' => 'DELETE',
          'sslverify' => defined('DEV_MODE') && DEV_MODE == true ? false : true,
        );
        $response = wp_remote_request($url, $args);

        if (is_wp_error($response)) {
            $errorMessage = $response->get_error_message();
            error_log("Middle Layer API DELETE \"$this->pluralName/$id\" error: $errorMessage");
        }
    }

    public function getRestResponse($id, $embedded = false)
    {
        $request = new \WP_REST_Request('GET', '/wp/v2/' . $this->singularName . '/' . $id);
        $response = rest_do_request($request);

        if ($response->is_error()) {
            $error = $response->as_error();
            $errorMessage = $error->get_error_message();
            $errorData = $error->get_error_data();
            $status = isset($errorData['status']) ? $errorData['status'] : 500;
            error_log("Get REST response \"$this->singularName/$id\" error: ($status) $errorMessage");
            return;
        }

        $server = rest_get_server();
        $data = $server->response_to_data($response, $embedded);

        return $data;
    }

    public function savePost($postId)
    {
        $post = get_post((int)$postId);

        if (empty($post) || $post->post_type !== $this->singularName) {
            return;
        }

        if ($post->post_status === 'auto-draft') {
            return;
        }

        if ($post->post_status === 'publish') {
            $this->saveEmbeddedItem($postId);
            return;
        }

        $this->deleteItem($postId);
    }

    public function deletePost($postId)
    {
        $post = get_post($postId);
        if (empty($post) || $post->post_type !== $this->singularName) {
            return;
        }

        $this->deleteItem($postId);
    }

    public function getPosts($page = 1, $items = [])
    {
        $args = array(
                'paged' => $page,
                'posts_per_page' => 50,
                'post_type'   => $this->singularName,
                'post_status' => 'publish',
            );
        $query = new \WP_Query($args);

        if (!empty($query->posts)) {
            $items = array_merge($items, $query->posts);
        }

        if ($query->max_num_pages && (int)$page < (int)$query->max_num_pages) {
            return $this->getPosts(++$page, $items);
        }

        return $items;
    }

    public function startPopulate()
    {
        $posts = $this->getPosts();
        foreach ($posts as $post) {
            $this->saveEmbeddedItem($post->ID);
        }
    }
}


text:
export const swap = (arr, indexOfA, indexOfB) => {
  const tmp = arr[indexOfA];

  arr[indexOfA] = arr[indexOfB];
  arr[indexOfB] = tmp;
};


text:
package org.springframework.cloud.stream.metrics;

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

import org.springframework.boot.actuate.endpoint.MetricsEndpoint;
import org.springframework.boot.actuate.endpoint.MetricsEndpointMetricReader;
import org.springframework.boot.actuate.metrics.Metric;
import org.springframework.boot.actuate.metrics.export.Exporter;
import org.springframework.boot.actuate.metrics.export.MetricCopyExporter;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.messaging.MessageChannel;
import org.springframework.util.ObjectUtils;
import org.springframework.util.PatternMatchUtils;

/**
 *
 * Component that sends {@link ApplicationMetrics} from
 * {@link MetricsEndpointMetricReader} downstream via the configured metrics channel.
 *
 * It uses the Spring Boot support for {@link Exporter} to periodically emit messages
 * polled from the endpoint.
 *
 * @author Vinicius Carvalho
 */
public class ApplicationMetricsExporter implements Exporter {

	private MessageChannel source;

	private ApplicationMetricsProperties properties;

	private MetricsEndpointMetricReader metricsReader;

	public ApplicationMetricsExporter(MetricsEndpoint endpoint, MessageChannel source,
			ApplicationMetricsProperties properties) {
		this.source = source;
		this.properties = properties;
		this.metricsReader = new MetricsEndpointMetricReader(endpoint);
	}

	@Override
	public void export() {
		ApplicationMetrics appMetrics = new ApplicationMetrics(
				this.properties.getMetricName(), this.properties.getInstanceIndex(),
				filter());
		appMetrics.setProperties(this.properties.getExportProperties());
		source.send(MessageBuilder.withPayload(appMetrics).build());
	}

	/**
	 * Copy of similarly named method in {@link MetricCopyExporter}.
	 */
	protected Collection<Metric<?>> filter() {
		Collection<Metric<?>> result = new ArrayList<>();
		Iterable<Metric<?>> metrics = metricsReader.findAll();
		for (Metric<?> metric : metrics) {
			if (isMatch(metric.getName(), this.properties.getTrigger().getIncludes(),
					this.properties.getTrigger().getExcludes())) {
				result.add(metric);
			}
		}
		return result;
	}

	/**
	 * Copy of similarly named method in {@link MetricCopyExporter}.
	 */
	private boolean isMatch(String name, String[] includes, String[] excludes) {
		if (ObjectUtils.isEmpty(includes)
				|| PatternMatchUtils.simpleMatch(includes, name)) {
			return !PatternMatchUtils.simpleMatch(excludes, name);
		}
		return false;
	}

}


text:
"""accumulated precip."""
import datetime

import pandas as pd
from pyiem.util import get_autoplot_context, get_sqlalchemy_conn
from pyiem.plot import figure_axes
from pyiem.exceptions import NoDataFound

PDICT = {
    "precip": "Precipitation",
    "snow": "Snow",
}

def get_description():
    """Return a dict describing how to call this plotter"""
    desc = {}
    desc["data"] = True
    desc[
        "description"
    ] = """This chart presents year to date accumulated
    precipitation for a station of your choice.  The year with the highest and
    lowest accumulation is shown along with the envelop of observations and
    long term average.  You can optionally plot up to three additional years
    of your choice.

You can specify the start date (ignore the year) for when to start
    the 365 day accumulation of precipitation.  The year shown is the year
    for the start of the accumulation period.  For example, if you accumulate
    after 1 October, the year 2020 would represent the period from 1 Oct 2020
    to 30 Sep 2021.

Accumulating snowfall data is frought with peril, but this app will let
    you do it!  The app has a tight requirement of no less than 3 days of
    missing data for the year to be considered in the plot.

    """
    today = datetime.date.today()
    thisyear = today.year
    desc["arguments"] = [
        dict(
            type="station",
            name="station",
            default="IATDSM",
            label="Select Station:",
            network="IACLIMATE",
        ),
        dict(
            type="select",
            options=PDICT,
            name="var",
            default="precip",
            label="Accumulate Precipitation or Snow?",
        ),
        dict(
            type="year",
            name="year1",
            default=thisyear,
            label="Additional Year to Plot:",
        ),
        dict(
            type="year",
            name="year2",
            optional=True,
            default=(thisyear - 1),
            label="Additional Year to Plot: (optional)",
        ),
        dict(
            type="year",
            name="year3",
            optional=True,
            default=(thisyear - 2),
            label="Additional Year to Plot: (optional)",
        ),
        dict(
            type="sday",
            name="sdate",
            default="0101",
            label="Start Day of Year for Plot:",
        ),
        dict(
            optional=True,
            type="sday",
            name="edate",
            default=f"{today:%m%d}",
            label="End Day of Year for Plot:",
        ),
        dict(
            type="int",
            default="3",
            label="Number of missing days to allow before excluding year",
            name="m",
        ),
    ]
    return desc

def cull_missing(df, colname, missingdays):
    """Figure out which years need to go from the analysis."""
    df2 = df[["binyear", colname]]
    nancounts = df2.groupby("binyear").agg(lambda x: x.isnull().sum())
    # cull anything with more than 3 days NaN
    df2 = nancounts[nancounts[colname] > missingdays]
    years = []
    if not df2.empty:
        years = list(df2.index.values)
    resdf = df[~df["binyear"].isin(years)]
    minyear = resdf["binyear"].min()
    # Prevent scary cullyears listing
    return resdf, list(filter(lambda x: x > minyear, years))

def plotter(fdict):
    """Go"""
    ctx = get_autoplot_context(fdict, get_description())
    station = ctx["station"]
    ab = ctx["_nt"].sts[station]["archive_begin"]
    if ab is None:
        raise NoDataFound("Unknown station metadata.")
    year1 = ctx.get("year1")
    year2 = ctx.get("year2")
    year3 = ctx.get("year3")
    sdate = ctx["sdate"]
    # belt and suspenders
    assert ctx["var"] in PDICT
    with get_sqlalchemy_conn("coop") as conn:
        climo = pd.read_sql(
            """
            SELECT to_char(valid, 'mmdd') as sday, precip as cprecip,
            snow as csnow
            from ncei_climate91 where station = %s ORDER by sday
            """,
            conn,
            params=(ctx["_nt"].sts[station]["ncei91"],),
            index_col="sday",
        )
        df = pd.read_sql(
            f"""
            with obs as (
                SELECT day, {ctx["var"]}, sday,
                case when sday >= %s then year else year - 1 end as binyear
                from alldata WHERE station = %s
            )
            SELECT day, binyear::int, {ctx["var"]}, sday,
            row_number() OVER (PARTITION by binyear ORDER by day ASC) as row,
            sum({ctx["var"]}) OVER (PARTITION by binyear ORDER by day ASC)
                as accum
            from obs ORDER by day ASC
        """,
            conn,
            params=(sdate.strftime("%m%d"), station),
            index_col="day",
        )
    if df.empty:
        raise NoDataFound("No data found!")
    # Truncate plot
    doy_trunc = 365
    today = ctx.get("edate", datetime.date.today())
    if ctx.get("edate") is not None:
        today_doy = int(today.strftime("%j"))
        sdate_doy = int(sdate.strftime("%j"))
        offset = 0 if today_doy > sdate_doy else 365
        doy_trunc = today_doy + offset - sdate_doy
        df = df[df["row"] <= doy_trunc]

    df, cullyears = cull_missing(df, ctx["var"], ctx["m"])
    if not climo.empty:
        df = df.join(climo, how="left", on="sday")

    extra = "" if doy_trunc == 365 else f" through {today.strftime('%-d %B')}"
    title = f"Accumulated {PDICT[ctx['var']]}{extra} after {sdate:%-d %B}"
    subtitle = (
        f"{ctx['_sname']} ({df['binyear'].min()}-{datetime.date.today().year})"
    )
    if cullyears:
        subtitle += (
            f", {len(cullyears)} years excluded due to "
            f"missing > {ctx['m']} days"
        )

    (fig, ax) = figure_axes(title=title, subtitle=subtitle, apctx=ctx)
    # Average
    jday = df[["row", "accum"]].groupby("row").mean()
    jday["accum"].values[-1] = jday["accum"].values[-2]
    if climo.empty:
        ax.plot(
            range(1, len(jday.index) + 1),
            jday["accum"],
            lw=2,
            zorder=5,
            color="k",
            label=f"Simple Average - {jday['accum'].iloc[-1]:.2f}",
        )

    # Min and Max
    jmin = df[["row", "accum"]].groupby("row").min()
    jmax = df[["row", "accum"]].groupby("row").max()
    ax.fill_between(
        range(1, len(jday.index) + 1),
        jmin["accum"],
        jmax["accum"],
        zorder=2,
        color="tan",
    )

    # find max year
    plotted = []
    for year, color in zip(
        [
            df["binyear"][df["accum"].idxmax()],
            df["binyear"][df[df["row"] == doy_trunc]["accum"].idxmin()],
            year1,
            year2,
            year3,
        ],
        ["b", "brown", "r", "g", "purple"],
    ):
        if year is None or year in plotted:
            continue
        plotted.append(year)
        df2 = df[df["binyear"] == year]
        if df2.empty:
            continue
        lastrow = df2.iloc[-1]
        extra = ""
        if (lastrow["row"] + 2) < doy_trunc:
            extra = f" to {df2.index.values[-1].strftime('%-d %b')}"
        labelyear = year
        if df2.index.values[0].year != df2.index.values[-1].year:
            labelyear = (
                f"{df2.index.values[0].year}-{df2.index.values[-1].year}"
            )
        ax.plot(
            range(1, len(df2.index) + 1),
            df2["accum"],
            label=f"{labelyear} - {lastrow['accum']:.2f}{extra}",
            color=color,
            lw=2,
        )
    # NCEI91 Climatology
    if not climo.empty:
        df2 = df[df["binyear"] == 2000]
        acc = df2[f"c{ctx['var']}"].cumsum()
        maxval = acc.max()
        ax.plot(
            range(1, len(acc.index) + 1),
            acc,
            label=f"NCEI91-20 - {maxval:.2f}",
            color="k",
            linestyle="--",
            lw=2,
        )

    ax.set_ylabel(PDICT[ctx["var"]] + " [inch]")
    ax.grid(True)
    ax.legend(loc=2)
    xticks = []
    xticklabels = []
    for i in range(doy_trunc + 1):
        date = sdate + datetime.timedelta(days=i)
        if date.day != 1:
            continue
        xticks.append(i)
        xticklabels.append(date.strftime("%b"))
    ax.set_xlim(0, doy_trunc + 1)
    ax.set_ylim(bottom=-0.1)
    ax.set_xticks(xticks)
    ax.set_xticklabels(xticklabels)

    return fig, df

if __name__ == "__main__":
    plotter(dict(sdate="2000-07-01", station="IA8706", var="snow"))