text:
using MarkdownEditor.Resources;

namespace MarkdownEditor
{
    /// <summary>
    /// 文字列リソースにアクセスできるようにします。
    /// </summary>
    public class LocalizedStrings
    {
        private static AppResources _localizedResources = new AppResources();

        public AppResources LocalizedResources { get { return _localizedResources; } }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.asksunny.codegen.data;

import java.util.List;

import com.asksunny.codegen.CodeGenConfig;
import com.asksunny.schema.Entity;
import com.asksunny.schema.Schema;

public class BottomUpSchemaDataGenerator {

	private Schema schema;
	private CodeGenConfig config;
	private String schemaUri;

	public void generateData() {
		System.out.println(config.getSchema().getAllEntities().size());
		config.getSchema().buildRelationship();
		List<Entity> entities = config.getSchema().getAllEntities();
		int size = entities.size();
		for (int i = 0; i < size; i++) {
			Entity entity = entities.get(i);
			System.out.println("BottomUpEntityDataGenerator for entity:" + entity.getName());
			if (this.config.isDebug()) {
				System.out.println("Generating Data for entity:" + entity.getName());
			}
			if (entity.isIgnoreData()) {
				System.out.println("Ignore data generation for entity:" + entity.getName());
				continue;
			}
			BottomUpEntityDataGenerator entityGen = EntityGeneratorFactory.createEntityGenerator(entity, config);
			try {
				entityGen.generateFullDataSet();
			} catch (Throwable ex) {
				ex.printStackTrace();
			}
		}
		for (BottomUpEntityDataGenerator entityGen : EntityGeneratorFactory.getAllCachedEntityGenerators()) {
			try {
				entityGen.generateFullDataSet();
			} catch (Throwable ex) {
				ex.printStackTrace();
			}
		}

	}

	public BottomUpSchemaDataGenerator(CodeGenConfig config, Schema schema) {
		super();
		this.config = config;
		this.schema = schema;
	}

	public Schema getSchema() {
		return schema;
	}

	public void setSchema(Schema schema) {
		this.schema = schema;
	}

	public BottomUpSchemaDataGenerator(Schema schema) {
		super();
		this.schema = schema;
	}

	public BottomUpSchemaDataGenerator() {

	}

	public String getSchemaUri() {
		return schemaUri;
	}

	public void setSchemaUri(String schemaUri) {
		this.schemaUri = schemaUri;
	}

	public CodeGenConfig getConfig() {
		return config;
	}

	public void setConfig(CodeGenConfig config) {
		this.config = config;
	}

	public void close() {
		for (BottomUpEntityDataGenerator entityGen : EntityGeneratorFactory.getAllCachedEntityGenerators()) {
			try {
				entityGen.close();
			} catch (Exception e) {
				;
			}
		}
	}

}


text:
@implementation My1ClassName2With3Digits {

}

@end


text:
#include "third_party/blink/renderer/core/editing/commands/insert_paragraph_separator_command.h"

#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/node_traversal.h"
#include "third_party/blink/renderer/core/dom/text.h"
#include "third_party/blink/renderer/core/editing/commands/delete_selection_options.h"
#include "third_party/blink/renderer/core/editing/commands/editing_commands_utilities.h"
#include "third_party/blink/renderer/core/editing/commands/insert_line_break_command.h"
#include "third_party/blink/renderer/core/editing/editing_style.h"
#include "third_party/blink/renderer/core/editing/editing_utilities.h"
#include "third_party/blink/renderer/core/editing/selection_template.h"
#include "third_party/blink/renderer/core/editing/visible_position.h"
#include "third_party/blink/renderer/core/editing/visible_selection.h"
#include "third_party/blink/renderer/core/editing/visible_units.h"
#include "third_party/blink/renderer/core/html/html_br_element.h"
#include "third_party/blink/renderer/core/html/html_element.h"
#include "third_party/blink/renderer/core/html/html_quote_element.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/layout/layout_text.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"

namespace blink {

// When inserting a new line, we want to avoid nesting empty divs if we can.
// Otherwise, when pasting, it's easy to have each new line be a div deeper than
// the previous. E.g., in the case below, we want to insert at ^ instead of |.
//
foo
bar
|
^
static Element* HighestVisuallyEquivalentDivBelowRoot(Element* start_block) {
  Element* cur_block = start_block;
  // We don't want to return a root node (if it happens to be a div, e.g., in a
  // document fragment) because there are no siblings for us to append to.
  while (!cur_block->nextSibling() &&
         IsA<HTMLDivElement>(*cur_block->parentElement()) &&
         cur_block->parentElement()->parentElement()) {
    if (cur_block->parentElement()->hasAttributes())
      break;
    cur_block = cur_block->parentElement();
  }
  return cur_block;
}

static bool InSameBlock(const VisiblePosition& a, const VisiblePosition& b) {
  DCHECK(a.IsValid()) << a;
  DCHECK(b.IsValid()) << b;
  return !a.IsNull() &&
         EnclosingBlock(a.DeepEquivalent().ComputeContainerNode()) ==
             EnclosingBlock(b.DeepEquivalent().ComputeContainerNode());
}

InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand(
    Document& document,
    bool must_use_default_paragraph_element,
    bool paste_blockquote_into_unquoted_area)
    : CompositeEditCommand(document),
      must_use_default_paragraph_element_(must_use_default_paragraph_element),
      paste_blockquote_into_unquoted_area_(
          paste_blockquote_into_unquoted_area) {}

bool InsertParagraphSeparatorCommand::PreservesTypingStyle() const {
  return true;
}

void InsertParagraphSeparatorCommand::CalculateStyleBeforeInsertion(
    const Position& pos) {
  DCHECK(!GetDocument().NeedsLayoutTreeUpdate());
  DocumentLifecycle::DisallowTransitionScope disallow_transition(
      GetDocument().Lifecycle());

  // It is only important to set a style to apply later if we're at the
  // boundaries of a paragraph. Otherwise, content that is moved as part of the
  // work of the command will lend their styles to the new paragraph without any
  // extra work needed.
  VisiblePosition visible_pos = CreateVisiblePosition(pos);
  if (!IsStartOfParagraph(visible_pos) && !IsEndOfParagraph(visible_pos))
    return;

  DCHECK(pos.IsNotNull());
  style_ = MakeGarbageCollected<EditingStyle>(pos);
  style_->MergeTypingStyle(pos.GetDocument());
}

void InsertParagraphSeparatorCommand::ApplyStyleAfterInsertion(
    Element* original_enclosing_block,
    EditingState* editing_state) {
  // Not only do we break out of header tags, but we also do not preserve the
  // typing style, in order to match other browsers.
  if (original_enclosing_block->HasTagName(html_names::kH1Tag) ||
      original_enclosing_block->HasTagName(html_names::kH2Tag) ||
      original_enclosing_block->HasTagName(html_names::kH3Tag) ||
      original_enclosing_block->HasTagName(html_names::kH4Tag) ||
      original_enclosing_block->HasTagName(html_names::kH5Tag)) {
    return;
  }

  if (!style_)
    return;

  style_->PrepareToApplyAt(EndingVisibleSelection().Start());
  if (!style_->IsEmpty())
    ApplyStyle(style_.Get(), editing_state);
}

bool InsertParagraphSeparatorCommand::ShouldUseDefaultParagraphElement(
    Element* enclosing_block) const {
  DCHECK(!GetDocument().NeedsLayoutTreeUpdate());

  if (must_use_default_paragraph_element_)
    return true;

  // Assumes that if there was a range selection, it was already deleted.
  if (!IsEndOfBlock(EndingVisibleSelection().VisibleStart()))
    return false;

  return enclosing_block->HasTagName(html_names::kH1Tag) ||
         enclosing_block->HasTagName(html_names::kH2Tag) ||
         enclosing_block->HasTagName(html_names::kH3Tag) ||
         enclosing_block->HasTagName(html_names::kH4Tag) ||
         enclosing_block->HasTagName(html_names::kH5Tag);
}

void InsertParagraphSeparatorCommand::GetAncestorsInsideBlock(
    const Node* insertion_node,
    Element* outer_block,
    HeapVector<Member<Element>>& ancestors) {
  ancestors.clear();

  // Build up list of ancestors elements between the insertion node and the
  // outer block.
  if (insertion_node != outer_block) {
    for (Element* n = insertion_node->parentElement(); n && n != outer_block;
         n = n->parentElement())
      ancestors.push_back(n);
  }
}

Element* InsertParagraphSeparatorCommand::CloneHierarchyUnderNewBlock(
    const HeapVector<Member<Element>>& ancestors,
    Element* block_to_insert,
    EditingState* editing_state) {
  // Make clones of ancestors in between the start node and the start block.
  Element* parent = block_to_insert;
  for (wtf_size_t i = ancestors.size(); i != 0; --i) {
    Element& ancestor = *ancestors[i - 1];
    Element& child = ancestor.CloneWithoutChildren();
    // It should always be okay to remove id from the cloned elements, since the
    // originals are not deleted.
    child.removeAttribute(html_names::kIdAttr);
    AppendNode(&child, parent, editing_state);
    if (editing_state->IsAborted())
      return nullptr;
    parent = &child;
  }

  return parent;
}

void InsertParagraphSeparatorCommand::DoApply(EditingState* editing_state) {
  // TODO(editing-dev): We shouldn't construct an
  // InsertParagraphSeparatorCommand with none or invalid selection.
  const VisibleSelection& visible_selection = EndingVisibleSelection();
  if (visible_selection.IsNone() ||
      !visible_selection.IsValidFor(GetDocument()))
    return;

  Position insertion_position = visible_selection.Start();

  TextAffinity affinity = visible_selection.Affinity();

  // Delete the current selection.
  if (EndingSelection().IsRange()) {
    GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kEditing);
    CalculateStyleBeforeInsertion(insertion_position);
    if (!DeleteSelection(editing_state, DeleteSelectionOptions::NormalDelete()))
      return;
    const VisibleSelection& visble_selection_after_delete =
        EndingVisibleSelection();
    insertion_position = visble_selection_after_delete.Start();
    affinity = visble_selection_after_delete.Affinity();
  }

  GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kEditing);

  // FIXME: The parentAnchoredEquivalent conversion needs to be moved into
  // enclosingBlock.
  Element* start_block = EnclosingBlock(
      insertion_position.ParentAnchoredEquivalent().ComputeContainerNode());
  Node* list_child_node = EnclosingListChild(
      insertion_position.ParentAnchoredEquivalent().ComputeContainerNode());
  auto* list_child = DynamicTo<HTMLElement>(list_child_node);
  Position canonical_pos =
      CreateVisiblePosition(insertion_position).DeepEquivalent();
  if (!start_block || !start_block->NonShadowBoundaryParentNode() ||
      IsTableCell(start_block) ||
      IsA<HTMLFormElement>(*start_block)
      // FIXME: If the node is hidden, we don't have a canonical position so we
      // will do the wrong thing for tables and
.
      // https://bugs.webkit.org/show_bug.cgi?id=40342
      || (!canonical_pos.IsNull() &&
          IsDisplayInsideTable(canonical_pos.AnchorNode())) ||
      (!canonical_pos.IsNull() &&
       IsA<HTMLHRElement>(*canonical_pos.AnchorNode()))) {
    ApplyCommandToComposite(
        MakeGarbageCollected<InsertLineBreakCommand>(GetDocument()),
        editing_state);
    return;
  }

  // Use the leftmost candidate.
  insertion_position = MostBackwardCaretPosition(insertion_position);
  if (!IsVisuallyEquivalentCandidate(insertion_position))
    insertion_position = MostForwardCaretPosition(insertion_position);

  // Adjust the insertion position after the delete
  const Position original_insertion_position = insertion_position;
  const Element* enclosing_anchor =
      EnclosingAnchorElement(original_insertion_position);
  insertion_position =
      PositionAvoidingSpecialElementBoundary(insertion_position, editing_state);
  if (editing_state->IsAborted())
    return;
  // InsertTextCommandTest.AnchorElementWithBlockCrash reaches here.
  ABORT_EDITING_COMMAND_IF(!start_block->parentNode());
  if (list_child == enclosing_anchor) {
    // |positionAvoidingSpecialElementBoundary()| creates new A element and
    // move to another place.
    list_child =
        To<HTMLElement>(EnclosingAnchorElement(original_insertion_position));
  }

  GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kEditing);
  CalculateStyleBeforeInsertion(insertion_position);

  //---------------------------------------------------------------------
  // Handle special case of typing return on an empty list item
  if (BreakOutOfEmptyListItem(editing_state) || editing_state->IsAborted())
    return;

  //---------------------------------------------------------------------
  // Prepare for more general cases.

  // Create block to be inserted.
  bool nest_new_block = false;
  Element* block_to_insert = nullptr;
  if (IsRootEditableElement(*start_block)) {
    block_to_insert = CreateDefaultParagraphElement(GetDocument());
    nest_new_block = true;
  } else if (ShouldUseDefaultParagraphElement(start_block)) {
    block_to_insert = CreateDefaultParagraphElement(GetDocument());
  } else {
    block_to_insert = &start_block->CloneWithoutChildren();
  }

  VisiblePosition visible_pos =
      CreateVisiblePosition(insertion_position, affinity);
  bool is_first_in_block = IsStartOfBlock(visible_pos);
  bool is_last_in_block = IsEndOfBlock(visible_pos);

  //---------------------------------------------------------------------
  // Handle case when position is in the last visible position in its block,
  // including when the block is empty.
  if (is_last_in_block) {
    if (nest_new_block) {
      if (is_first_in_block && !LineBreakExistsAtVisiblePosition(visible_pos)) {
        // The block is empty.  Create an empty block to
        // represent the paragraph that we're leaving.
        HTMLElement* extra_block = CreateDefaultParagraphElement(GetDocument());
        AppendNode(extra_block, start_block, editing_state);
        if (editing_state->IsAborted())
          return;
        AppendBlockPlaceholder(extra_block, editing_state);
        if (editing_state->IsAborted())
          return;
      }
      AppendNode(block_to_insert, start_block, editing_state);
      if (editing_state->IsAborted())
        return;
    } else {
      // We can get here if we pasted a copied portion of a blockquote with a
      // newline at the end and are trying to paste it into an unquoted area. We
      // then don't want the newline within the blockquote or else it will also
      // be quoted.
      if (paste_blockquote_into_unquoted_area_) {
        if (auto* highest_blockquote =
                To<HTMLQuoteElement>(HighestEnclosingNodeOfType(
                    canonical_pos, &IsMailHTMLBlockquoteElement)))
          start_block = highest_blockquote;
      }

      if (list_child && list_child != start_block) {
        Element& list_child_to_insert = list_child->CloneWithoutChildren();
        AppendNode(block_to_insert, &list_child_to_insert, editing_state);
        if (editing_state->IsAborted())
          return;
        InsertNodeAfter(&list_child_to_insert, list_child, editing_state);
      } else {
        // Most of the time we want to stay at the nesting level of the
        // startBlock (e.g., when nesting within lists). However, for div nodes,
        // this can result in nested div tags that are hard to break out of.
        Element* sibling_element = start_block;
        if (IsA<HTMLDivElement>(*block_to_insert))
          sibling_element = HighestVisuallyEquivalentDivBelowRoot(start_block);
        InsertNodeAfter(block_to_insert, sibling_element, editing_state);
      }
      if (editing_state->IsAborted())
        return;
    }

    // Recreate the same structure in the new paragraph.

    HeapVector<Member<Element>> ancestors;
    GetAncestorsInsideBlock(
        PositionOutsideTabSpan(insertion_position).AnchorNode(), start_block,
        ancestors);
    Element* parent =
        CloneHierarchyUnderNewBlock(ancestors, block_to_insert, editing_state);
    if (editing_state->IsAborted())
      return;

    AppendBlockPlaceholder(parent, editing_state);
    if (editing_state->IsAborted())
      return;

    SetEndingSelection(SelectionForUndoStep::From(
        SelectionInDOMTree::Builder()
            .Collapse(Position::FirstPositionInNode(*parent))
            .Build()));
    return;
  }

  //---------------------------------------------------------------------
  // Handle case when position is in the first visible position in its block,
  // and similar case where previous position is in another, presumeably nested,
  // block.
  if (is_first_in_block ||
      !InSameBlock(visible_pos, PreviousPositionOf(visible_pos))) {
    Node* ref_node = nullptr;
    insertion_position = PositionOutsideTabSpan(insertion_position);

    if (is_first_in_block && !nest_new_block) {
      if (list_child && list_child != start_block) {
        Element& list_child_to_insert = list_child->CloneWithoutChildren();
        AppendNode(block_to_insert, &list_child_to_insert, editing_state);
        if (editing_state->IsAborted())
          return;
        InsertNodeBefore(&list_child_to_insert, list_child, editing_state);
        if (editing_state->IsAborted())
          return;
      } else {
        ref_node = start_block;
      }
    } else if (is_first_in_block && nest_new_block) {
      // startBlock should always have children, otherwise isLastInBlock would
      // be true and it's handled above.
      DCHECK(start_block->HasChildren());
      ref_node = start_block->firstChild();
    } else if (insertion_position.AnchorNode() == start_block &&
               nest_new_block) {
      ref_node = NodeTraversal::ChildAt(
          *start_block, insertion_position.ComputeEditingOffset());
      DCHECK(ref_node);  // must be true or we'd be in the end of block case
    } else {
      ref_node = insertion_position.AnchorNode();
    }

    GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kEditing);

    // find ending selection position easily before inserting the paragraph
    insertion_position = MostForwardCaretPosition(insertion_position);

    if (ref_node) {
      InsertNodeBefore(block_to_insert, ref_node, editing_state);
      if (editing_state->IsAborted())
        return;
    }

    // Recreate the same structure in the new paragraph.

    HeapVector<Member<Element>> ancestors;
    insertion_position = PositionAvoidingSpecialElementBoundary(
        PositionOutsideTabSpan(insertion_position), editing_state);
    if (editing_state->IsAborted())
      return;
    GetAncestorsInsideBlock(insertion_position.AnchorNode(), start_block,
                            ancestors);

    Element* placeholder =
        CloneHierarchyUnderNewBlock(ancestors, block_to_insert, editing_state);
    if (editing_state->IsAborted())
      return;
    AppendBlockPlaceholder(placeholder, editing_state);
    if (editing_state->IsAborted())
      return;

    // In this case, we need to set the new ending selection.
    SetEndingSelection(SelectionForUndoStep::From(
        SelectionInDOMTree::Builder()
            .Collapse(insertion_position)
            .Build()));
    return;
  }

  //---------------------------------------------------------------------
  // Handle the (more complicated) general case,

  // All of the content in the current block after visiblePos is
  // about to be wrapped in a new paragraph element.  Add a br before
  // it if visiblePos is at the start of a paragraph so that the
  // content will move down a line.
  if (IsStartOfParagraph(visible_pos)) {
    auto* br = MakeGarbageCollected<HTMLBRElement>(GetDocument());
    InsertNodeAt(br, insertion_position, editing_state);
    if (editing_state->IsAborted())
      return;
    GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kEditing);

    insertion_position = Position::InParentAfterNode(*br);
    visible_pos = CreateVisiblePosition(insertion_position);
    // If the insertion point is a break element, there is nothing else
    // we need to do.
    if (visible_pos.IsNotNull() &&
        visible_pos.DeepEquivalent().AnchorNode()->GetLayoutObject()->IsBR()) {
      SetEndingSelection(SelectionForUndoStep::From(
          SelectionInDOMTree::Builder()
              .Collapse(insertion_position)
              .Build()));
      return;
    }
  }

  // Move downstream. Typing style code will take care of carrying along the
  // style of the upstream position.
  insertion_position = MostForwardCaretPosition(insertion_position);

  // At this point, the insertionPosition's node could be a container, and we
  // want to make sure we include all of the correct nodes when building the
  // ancestor list. So this needs to be the deepest representation of the
  // position before we walk the DOM tree.
  VisiblePosition visible_insertion_position =
      CreateVisiblePosition(insertion_position);
  ABORT_EDITING_COMMAND_IF(visible_insertion_position.IsNull());

  insertion_position =
      PositionOutsideTabSpan(visible_insertion_position.DeepEquivalent());
  // If the returned position lies either at the end or at the start of an
  // element that is ignored by editing we should move to its upstream or
  // downstream position.
  if (EditingIgnoresContent(*insertion_position.AnchorNode())) {
    if (insertion_position.AtLastEditingPositionForNode())
      insertion_position = MostForwardCaretPosition(insertion_position);
    else if (insertion_position.AtFirstEditingPositionForNode())
      insertion_position = MostBackwardCaretPosition(insertion_position);
  }

  ABORT_EDITING_COMMAND_IF(!IsEditablePosition(insertion_position));
  // Make sure we do not cause a rendered space to become unrendered.
  // FIXME: We need the affinity for pos, but mostForwardCaretPosition does not
  // give it
  Position leading_whitespace = LeadingCollapsibleWhitespacePosition(
      insertion_position, TextAffinity::kDefault);
  // FIXME: leadingCollapsibleWhitespacePosition is returning the position
  // before preserved newlines for positions after the preserved newline,
  // causing the newline to be turned into a nbsp.
  if (leading_whitespace.IsNotNull()) {
    if (auto* text_node = DynamicTo<Text>(leading_whitespace.AnchorNode())) {
      DCHECK(!text_node->GetLayoutObject() ||
             text_node->GetLayoutObject()->Style()->CollapseWhiteSpace())
          << text_node;
      ReplaceTextInNode(text_node,
                        leading_whitespace.ComputeOffsetInContainerNode(), 1,
                        NonBreakingSpaceString());
      GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kEditing);
    }
  }

  // Split at pos if in the middle of a text node.
  Position position_after_split;
  if (insertion_position.IsOffsetInAnchor()) {
    if (auto* text_node =
            DynamicTo<Text>(insertion_position.ComputeContainerNode())) {
      int text_offset = insertion_position.OffsetInContainerNode();
      bool at_end = static_cast<unsigned>(text_offset) >= text_node->length();
      if (text_offset > 0 && !at_end) {
        SplitTextNode(text_node, text_offset);
        GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kEditing);

        position_after_split = Position::FirstPositionInNode(*text_node);
        insertion_position =
            Position(text_node->previousSibling(), text_offset);
      }
    }
  }

  // If we got detached due to mutation events, just bail out.
  if (!start_block->parentNode())
    return;

  // Put the added block in the tree.
  if (nest_new_block) {
    AppendNode(block_to_insert, start_block, editing_state);
  } else if (list_child && list_child != start_block) {
    Element& list_child_to_insert = list_child->CloneWithoutChildren();
    AppendNode(block_to_insert, &list_child_to_insert, editing_state);
    if (editing_state->IsAborted())
      return;
    InsertNodeAfter(&list_child_to_insert, list_child, editing_state);
  } else {
    InsertNodeAfter(block_to_insert, start_block, editing_state);
  }
  if (editing_state->IsAborted())
    return;

  GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kEditing);
  visible_pos = CreateVisiblePosition(insertion_position);

  // If the paragraph separator was inserted at the end of a paragraph, an empty
  // line must be created.  All of the nodes, starting at visiblePos, are about
  // to be added to the new paragraph element.  If the first node to be inserted
  // won't be one that will hold an empty line open, add a br.
  if (IsEndOfParagraph(visible_pos) &&
      !LineBreakExistsAtVisiblePosition(visible_pos)) {
    AppendNode(MakeGarbageCollected<HTMLBRElement>(GetDocument()),
               block_to_insert, editing_state);
    if (editing_state->IsAborted())
      return;
    GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kEditing);
  }

  // Move the start node and the siblings of the start node.
  if (CreateVisiblePosition(insertion_position).DeepEquivalent() !=
      VisiblePosition::BeforeNode(*block_to_insert).DeepEquivalent()) {
    Node* n;
    if (insertion_position.ComputeContainerNode() == start_block) {
      n = insertion_position.ComputeNodeAfterPosition();
    } else {
      Node* split_to = insertion_position.ComputeContainerNode();
      if (split_to->IsTextNode() &&
          insertion_position.OffsetInContainerNode() >=
              CaretMaxOffset(split_to))
        split_to = NodeTraversal::Next(*split_to, start_block);
      if (split_to)
        SplitTreeToNode(split_to, start_block);

      GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kEditing);

      for (n = start_block->firstChild(); n; n = n->nextSibling()) {
        VisiblePosition before_node_position = VisiblePosition::BeforeNode(*n);
        if (!before_node_position.IsNull() &&
            ComparePositions(CreateVisiblePosition(insertion_position),
                             before_node_position) <= 0)
          break;
      }
    }

    MoveRemainingSiblingsToNewParent(n, block_to_insert, block_to_insert,
                                     editing_state);
    if (editing_state->IsAborted())
      return;
  }

  // Handle whitespace that occurs after the split
  if (position_after_split.IsNotNull()) {
    GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kEditing);
    if (!IsRenderedCharacter(position_after_split)) {
      // Clear out all whitespace and insert one non-breaking space
      DCHECK(!position_after_split.ComputeContainerNode()->GetLayoutObject() ||
             position_after_split.ComputeContainerNode()
                 ->GetLayoutObject()
                 ->Style()
                 ->CollapseWhiteSpace())
          << position_after_split;
      DeleteInsignificantTextDownstream(position_after_split);
      if (position_after_split.AnchorNode()->IsTextNode()) {
        InsertTextIntoNode(
            To<Text>(position_after_split.ComputeContainerNode()), 0,
            NonBreakingSpaceString());
      }
    }
  }

  SetEndingSelection(SelectionForUndoStep::From(
      SelectionInDOMTree::Builder()
          .Collapse(Position::FirstPositionInNode(*block_to_insert))
          .Build()));
  ApplyStyleAfterInsertion(start_block, editing_state);
}

void InsertParagraphSeparatorCommand::Trace(Visitor* visitor) const {
  visitor->Trace(style_);
  CompositeEditCommand::Trace(visitor);
}

}  // namespace blink


text:
import React from 'react';
import { Router, Route } from 'react-router';

export default function configureRoutes(history, App) {
  return (
    <Router history={history}>
      <Route path="/" component={App} />
    </Router>
  );
}


text:
package org.wso2.carbon.analytics.data.commons.sources;

import org.wso2.carbon.analytics.data.commons.exception.AnalyticsException;

import java.io.Serializable;

/**
 * This interface represents a record group, which represents the availability set of records local to a common environment.
 */
public interface RecordGroup extends Serializable {

    /**
     * Returns all the locations this record group is situation at.
     * @return The list of hosts
     * @throws AnalyticsException
     */
    String[] getLocations() throws AnalyticsException;

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="sling:OsgiConfig"
    mobile.resourceTypes="[Adobe/We-Shop/components/ng-ionic-page]"
    README="Use these configuration settings to indicate which resource types should be supported by the mobile emulators."/>


text:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var jsonwebtoken_1 = require("jsonwebtoken");
exports.TokenExpiredError = jsonwebtoken_1.TokenExpiredError;
exports.NotBeforeError = jsonwebtoken_1.NotBeforeError;
exports.JsonWebTokenError = jsonwebtoken_1.JsonWebTokenError;
var JwtHandler_1 = require("./src/JwtHandler");
exports.JwtHandler = JwtHandler_1.JwtHandler;
var MissingKeyIdError_1 = require("./src/MissingKeyIdError");
exports.MissingKeyIdError = MissingKeyIdError_1.MissingKeyIdError;
var UnknownKeyIdError_1 = require("./src/UnknownKeyIdError");
exports.UnknownKeyIdError = UnknownKeyIdError_1.UnknownKeyIdError;
//# sourceMappingURL=index.js.map


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Proc. Linn. Soc. N. S. W. 60(3/4): 283 (1935)

#### Original name
Chaetothyrium fusisporum L.R. Fraser, 1935

### Remarks
null


text:
This is the iOS app that is viewer of GitHub repositories and sources.
It is open source and [available on the App Store](https://itunes.apple.com/us/app/octsurfer/id577431157).

I welcome your paticipation, and please add missing feature or report issues.

## Thanks to third party libraries

OctSurfer uses some third party libraries.

Put these libraries in "Classes/Externals" directory and build.

* [SVProgressHUD](https://github.com/samvermette/SVProgressHUD)
* [MessagePack](https://github.com/msgpack/msgpack-objectivec)
* [AAMFeedback](https://github.com/fladdict/AAMFeedback)
* [Reachability](http://developer.apple.com/library/ios/#samplecode/Reachability/Introduction/Intro.html)

Put the library in "HTML/js" directory.

* [Rainbow](https://github.com/ccampbell/rainbow)


text:
<Title>AdjacencyGraph</Title>

AdjacencyGraph

The AdjacencyGraph concept provides an interface for efficient access
of the adjacent vertices to a vertex in a graph. This is quite similar
to the IncidenceGraph concept (the
target of an out-edge is an adjacent vertex). Both concepts are
provided because in some contexts there is only concern for the
vertices, whereas in other contexts the edges are also important.

Refinement of

Graph

Notation

<tt>G</tt>
A type that is a model of Graph.

<tt>g</tt>
An object of type <tt>G</tt>.

<tt>v</tt>
An object of type <tt>boost::graph_traits<G>::vertex_descriptor</tt>.

Associated Types

<tt>boost::graph_traits<G>::traversal_category</tt>

 This tag type must be convertible to <tt>adjacency_graph_tag</tt>.

boost::graph_traits<G>::adjacency_iterator

An adjacency iterator for a vertex v provides access to the
vertices adjacent to v.  As such, the value type of an
adjacency iterator is the vertex descriptor type of its graph. An
adjacency iterator must meet the requirements of MultiPassInputIterator.

Valid Expressions

<TT>adjacent_vertices(v, g)</TT>

Returns an iterator-range providing access to the vertices adjacent to
vertex <TT>v</TT> in graph <TT>g</TT>.[1]

 Return type:
<TT>std::pair<adjacency_iterator, adjacency_iterator></TT>

Complexity guarantees

The <TT>adjacent_vertices()</TT> function must return in constant time.

See Also

Graph concepts,
<tt>adjacency_iterator</tt>

Concept Checking Class

  template <class G>
  struct AdjacencyGraphConcept
  {
    typedef typename boost::graph_traits<G>::adjacency_iterator
      adjacency_iterator;
    void constraints() {
      BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<adjacency_iterator> ));

      p = adjacent_vertices(v, g);
      v = *p.first;
      const_constraints(g);
    }
    void const_constraints(const G& g) {
      p = adjacent_vertices(v, g);
    }
    std::pair<adjacency_iterator,adjacency_iterator> p;
    typename boost::graph_traits<G>::vertex_descriptor v;
    G g;
  };

Design Rationale

The AdjacencyGraph concept is somewhat frivolous since IncidenceGraph really covers the same
functionality (and more).  The AdjacencyGraph concept exists because
there are situations when <tt>adjacent_vertices()</tt> is more
convenient to use than <tt>out_edges()</tt>. If you are constructing a
graph class and do not want to put in the extra work of creating an
adjacency iterator, have no fear. There is an adaptor class named  <tt>adjacency_iterator</tt> that
you can use to create an adjacency iterator out of an out-edge
iterator.

Notes

[1]  The case of a
multigraph (where multiple edges can connect the same two
vertices) brings up an issue as to whether the iterators returned by
the <TT>adjacent_vertices()</TT> function access a range that
includes each adjacent vertex once, or whether it should match the
behavior of the <TT>out_edges()</TT> function, and access a
range that may include an adjacent vertex more than once. For now the
behavior is defined to match that of <TT>out_edges()</TT>,
though this decision may need to be reviewed in light of more
experience with graph algorithm implementations.

Copyright © 2000-2001
Jeremy Siek, Indiana University (jsiek@osl.iu.edu)


text:
import flask

from ruddock import auth_utils
from ruddock.modules.account import blueprint, helpers

@blueprint.route("/request")
def request_account():
  """Provides a form to request an account."""
  return flask.render_template("request_account.html")

@blueprint.route("/request/submit", methods=["POST"])
def request_account_submit():
  """Handles an account creation request."""
  uid = flask.request.form.get("uid", None)
  last_name = flask.request.form.get("last_name", None)
  if uid is None or last_name is None:
    flask.flash("Invalid request.")
    return flask.redirect(flask.url_for("account.request_account"))

  success, error_msg = helpers.handle_request_account(uid, last_name)
  if success:
    flask.flash("An email has been sent with a link to create your account.")
    return flask.redirect(flask.url_for("home"))
  else:
    flask.flash(error_msg)
    return flask.redirect(flask.url_for("account.request_account"))

@blueprint.route("/create/<create_account_key>")
def create_account(create_account_key):
  """Checks the key. If valid, displays the create account page."""
  user_id = auth_utils.check_create_account_key(create_account_key)
  if user_id is None:
    flask.flash("Invalid request. Please check your link and try again.")
    return flask.redirect(flask.url_for("home"))

  user_data = helpers.get_user_data(user_id)
  if user_data is None:
    flask.flash("An unexpected error occurred. Please find an IMSS rep.")
    return flask.redirect(flask.url_for("home"))
  return flask.render_template("create_account.html", user_data=user_data,
      key=create_account_key)

@blueprint.route("/create/<create_account_key>/submit", methods=["POST"])
def create_account_submit(create_account_key):
  """Handles a create account request."""
  user_id = auth_utils.check_create_account_key(create_account_key)
  if user_id is None:
    # Key is invalid.
    flask.flash("Someone's been naughty.")
    return flask.redirect(flask.url_for("home"))
  username = flask.request.form.get("username", None)
  password = flask.request.form.get("password", None)
  password2 = flask.request.form.get("password2", None)
  birthday = flask.request.form.get("birthday", None)
  if username is None \
      or password is None \
      or password2 is None \
      or birthday is None:
    flask.flash("Invalid request.")
    return flask.redirect(flask.url_for("home"))

  if helpers.handle_create_account(user_id, username, password, password2,
      birthday):
    flask.flash("Account successfully created.")
    return flask.redirect(flask.url_for("home"))
  else:
    # Flashes already handled.
    return flask.redirect(flask.url_for("account.create_account",
        create_account_key=create_account_key))


text:
'use strict';
var util = require('util');
var path = require('path');
var yeoman = require('yeoman-generator');

var CrudGenerator = module.exports = function CrudGenerator(args, options, config) {
  yeoman.generators.Base.apply(this, arguments);

  this.on('end', function () {
    this.installDependencies({ skipInstall: options['skip-install'] });
  });

  this.pkg = JSON.parse(this.readFileAsString(path.join(__dirname, '../package.json')));
};

util.inherits(CrudGenerator, yeoman.generators.Base);

CrudGenerator.prototype.askFor = function askFor() {
  var cb = this.async();

  // have Yeoman greet the user.
  console.log(this.yeoman);

  var prompts = [{
    type: 'input',
    name: 'appName',
    message: 'Name your app.'
  },
  {
    type: 'list',
    name: 'appLanguage',
    message: 'Pick your Server-Side Language.',
    choices: [
      'node.js',
      'python'
    ],
    default: 'node.js'
  },
  {
    type: 'input',
    name: 'appPort',
    validate: function( value ) {
      // checks if the port is a number
      if( !isNaN(parseFloat(n)) && isFinite(n) ) {
        return true;
      } else {
        return "Port must be a number";
      }
    }
  }];

  this.prompt(prompts, function (props) {
    this.appLanguage = props.appLanguage;
    this.appName = props.appName;
    this.appPort = props.appPort;

    cb();
  }.bind(this));
};

CrudGenerator.prototype.app = function app() {
  var s = this.appLanguage + '/';

  switch(this.appLanguage) {
    case 'node.js':
      this.mkdir('app');
      this.mkdir('app/config');
      this.mkdir('app/models');
      this.mkdir('app/views');
      this.mkdir('app/public');

      this.copy(s + 'server.js', 'app/server.js');
      this.copy(s + 'routes.js', 'app/routes.js');
      this.copy(s + '/config/auth.js', 'app/config/auth.js');
      this.template(s + '/config/database.js', 'app/config/database.js');
      this.copy(s + '/config/passport.js', 'app/config/passport.js');
      this.copy(s + '/models/user.js', 'app/models/user.js');
      this.copy(s + '/views/index.ejs', 'app/views/index.ejs');
      this.template(s + '/views/head.ejs', 'app/views/head.ejs');
      this.copy(s + '/views/login.ejs', 'app/views/login.ejs');
      this.copy(s + '/views/profile.ejs', 'app/views/profile.ejs');
      this.copy(s + '/views/signup.ejs', 'app/views/signup.ejs');

      this.template(s + '_bower.json', 'bower.json');
      this.template(s + '_package.json', 'package.json');
      this.copy(s + 'bowerrc', '.bowerrc');
      this.copy(s + 'editorconfig', '.editorconfig');
      this.copy(s + 'gitignore', '.gitignore');
      this.copy(s + 'Gruntfile.js', 'Gruntfile.js');
      this.copy(s + 'jshintrc', '.jshintrc');
      this.template(s + 'README.md', 'README.md');
      break;

    case 'python':
      console.log('Python is not yet implemented.')

    default:
      console.log('uh-oh, no such generator Language.');
  }
};


text:
// This file was generated based on 'C:\Users\Kuro\Documents\Fuse\Welcome\.build\Simulator\Android\Cache\GeneratedCode\MainView.g.uno'.
// WARNING: Changes might be lost if you edit this file directly.

#include <_root.Camera.h>
#include <_root.MainView.Fuse_Elements_Element_float_Opacity_Property.h>
#include <_root.MainView.Fuse_Rotation_float_Degrees_Property.h>
#include <_root.MainView.Fuse_Scaling_float_Factor_Property.h>
#include <_root.MainView.Fuse_Translation_float_X_Property.h>
#include <_root.MainView.Fuse_Triggers_Timeline_double_TargetProgress_Property.h>
#include <_root.MainView.h>
#include <_root.Notes.h>
#include <_root.Payment.h>
#include <_root.T.h>
#include <_root.WelcomeAnimation_bundle.h>
#include <Fuse.Animations.Animator.h>
#include <Fuse.Animations.Change-1.h>
#include <Fuse.Animations.Easing.h>
#include <Fuse.Animations.Move.h>
#include <Fuse.Animations.TrackAnimator.h>
#include <Fuse.Animations.TransformAnimator-1.h>
#include <Fuse.AppBase.h>
#include <Fuse.BasicTheme.BasicTheme.h>
#include <Fuse.Behavior.h>
#include <Fuse.Controls.Circle.h>
#include <Fuse.Controls.Control.h>
#include <Fuse.Controls.Image.h>
#include <Fuse.Controls.Page.h>
#include <Fuse.Controls.PageControl.h>
#include <Fuse.Controls.Panel.h>
#include <Fuse.Controls.Shape.h>
#include <Fuse.Controls.StackPanel.h>
#include <Fuse.Controls.Text.h>
#include <Fuse.Controls.TextControl.h>
#include <Fuse.Controls.Viewbox.h>
#include <Fuse.Drawing.Brush.h>
#include <Fuse.Drawing.StaticSolidColor.h>
#include <Fuse.Drawing.Stroke.h>
#include <Fuse.Elements.Alignment.h>
#include <Fuse.Elements.Element.h>
#include <Fuse.Elements.SizeUnit.h>
#include <Fuse.iOS.StatusBarConfig.h>
#include <Fuse.ITranslationMode.h>
#include <Fuse.Navigation.WhileActive.h>
#include <Fuse.Node.h>
#include <Fuse.Rotation.h>
#include <Fuse.Scaling.h>
#include <Fuse.StylePropertyWithUnit-3.h>
#include <Fuse.Theme.h>
#include <Fuse.Transform.h>
#include <Fuse.Translation.h>
#include <Fuse.TranslationModes.h>
#include <Fuse.Triggers.Timeline.h>
#include <Fuse.Triggers.Trigger.h>
#include <Uno.Bool.h>
#include <Uno.BundleFile.h>
#include <Uno.Collections.ICollection-1.h>
#include <Uno.Collections.IList-1.h>
#include <Uno.Double.h>
#include <Uno.Float.h>
#include <Uno.Float2.h>
#include <Uno.Float4.h>
#include <Uno.Platform.iOS.StatusBarStyle.h>
#include <Uno.String.h>
#include <Uno.UX.BundleFileSource.h>
#include <Uno.UX.FileSource.h>
#include <Uno.UX.Property-1.h>
static uString* STRINGS[17];
static uType* TYPES[30];

namespace g{

// public partial sealed class MainView :102
// {
// static MainView() :180
static void MainView__cctor__fn(uType* __type)
{
}

::g::Fuse::AppBase_type* MainView_typeof()
{
    static uSStrong< ::g::Fuse::AppBase_type*> type;
    if (type != NULL) return type;

    uTypeOptions options;
    options.FieldCount = 50;
    options.ObjectSize = sizeof(MainView);
    options.TypeSize = sizeof(::g::Fuse::AppBase_type);
    type = (::g::Fuse::AppBase_type*)uClassType::New("MainView", options);
    type->SetBase(::g::Fuse::App_typeof());
    type->fp_ctor_ = (void*)MainView__New1_fn;
    type->fp_cctor_ = MainView__cctor__fn;
    ::STRINGS[0] = uString::Const("Swipe left");
    ::STRINGS[1] = uString::Const("panel2");
    ::STRINGS[2] = uString::Const("camera");
    ::STRINGS[3] = uString::Const("arrow1");
    ::STRINGS[4] = uString::Const("payment");
    ::STRINGS[5] = uString::Const("notes");
    ::STRINGS[6] = uString::Const("arrow2");
    ::STRINGS[7] = uString::Const("Send");
    ::STRINGS[8] = uString::Const("sendImage");
    ::STRINGS[9] = uString::Const("Take a photo.");
    ::STRINGS[10] = uString::Const("text1");
    ::STRINGS[11] = uString::Const("Add price and a license.");
    ::STRINGS[12] = uString::Const("text2");
    ::STRINGS[13] = uString::Const("Share.");
    ::STRINGS[14] = uString::Const("text3");
    ::STRINGS[15] = uString::Const("Done!");
    ::STRINGS[16] = uString::Const("text4");
    ::TYPES[0] = ::g::Fuse::Elements::Element_typeof();
    ::TYPES[1] = ::g::Fuse::Animations::Change_typeof()->MakeType(::g::Uno::Double_typeof());
    ::TYPES[2] = ::g::Uno::UX::Property_typeof()->MakeType(::g::Uno::Double_typeof());
    ::TYPES[3] = ::g::Fuse::Animations::Change_typeof()->MakeType(::g::Uno::Float_typeof());
    ::TYPES[4] = ::g::Uno::UX::Property_typeof()->MakeType(::g::Uno::Float_typeof());
    ::TYPES[5] = ::g::Fuse::Controls::Panel_typeof();
    ::TYPES[6] = ::g::Fuse::Node_typeof();
    ::TYPES[7] = ::g::Fuse::Behavior_typeof();
    ::TYPES[8] = ::g::Fuse::iOS::StatusBarConfig_typeof();
    ::TYPES[9] = ::g::Fuse::Controls::Control_typeof();
    ::TYPES[10] = ::g::Fuse::Drawing::Brush_typeof();
    ::TYPES[11] = ::g::Fuse::Controls::TextControl_typeof();
    ::TYPES[12] = ::g::Fuse::Controls::Viewbox_typeof();
    ::TYPES[13] = ::g::Fuse::Controls::Image_typeof();
    ::TYPES[14] = ::g::Uno::UX::FileSource_typeof();
    ::TYPES[15] = ::g::WelcomeAnimation_bundle_typeof();
    ::TYPES[16] = ::g::Fuse::Transform_typeof();
    ::TYPES[17] = ::g::Fuse::Rotation_typeof();
    ::TYPES[18] = ::g::Fuse::Scaling_typeof();
    ::TYPES[19] = ::g::Fuse::Translation_typeof();
    ::TYPES[20] = ::g::Fuse::Controls::Shape_typeof();
    ::TYPES[21] = ::g::Fuse::Drawing::Stroke_typeof();
    ::TYPES[22] = ::g::Fuse::Triggers::Trigger_typeof();
    ::TYPES[23] = ::g::Fuse::Animations::Animator_typeof();
    ::TYPES[24] = ::g::Fuse::Animations::TrackAnimator_typeof();
    ::TYPES[25] = ::g::Fuse::Animations::TransformAnimator_typeof()->MakeType(::g::Fuse::Translation_typeof());
    ::TYPES[26] = ::g::Fuse::Animations::Move_typeof();
    ::TYPES[27] = ::g::Fuse::TranslationModes_typeof();
    ::TYPES[28] = ::g::Fuse::AppBase_typeof();
    ::TYPES[29] = ::g::Fuse::BasicTheme::BasicTheme_typeof();
    type->SetFields(16,
        ::g::Fuse::Controls::Image_typeof(), offsetof(::g::MainView, arrow1), 0,
        MainView__Fuse_Elements_Element_float_Opacity_Property_typeof(), offsetof(::g::MainView, arrow1_Opacity_inst), 0,
        ::g::Fuse::Controls::Image_typeof(), offsetof(::g::MainView, arrow2), 0,
        MainView__Fuse_Elements_Element_float_Opacity_Property_typeof(), offsetof(::g::MainView, arrow2_Opacity_inst), 0,
        ::g::Camera_typeof(), offsetof(::g::MainView, camera), 0,
        MainView__Fuse_Elements_Element_float_Opacity_Property_typeof(), offsetof(::g::MainView, camera_Opacity_inst), 0,
        ::g::Notes_typeof(), offsetof(::g::MainView, notes), 0,
        MainView__Fuse_Elements_Element_float_Opacity_Property_typeof(), offsetof(::g::MainView, notes_Opacity_inst), 0,
        ::g::Fuse::Rotation_typeof(), offsetof(::g::MainView, notesRot), 0,
        MainView__Fuse_Rotation_float_Degrees_Property_typeof(), offsetof(::g::MainView, notesRot_Degrees_inst), 0,
        ::g::Fuse::Translation_typeof(), offsetof(::g::MainView, notesTrans), 0,
        MainView__Fuse_Translation_float_X_Property_typeof(), offsetof(::g::MainView, notesTrans_X_inst), 0,
        ::g::Fuse::Controls::Panel_typeof(), offsetof(::g::MainView, panel2), 0,
        ::g::Payment_typeof(), offsetof(::g::MainView, payment), 0,
        MainView__Fuse_Elements_Element_float_Opacity_Property_typeof(), offsetof(::g::MainView, payment_Opacity_inst), 0,
        ::g::Fuse::Rotation_typeof(), offsetof(::g::MainView, paymentRot), 0,
        MainView__Fuse_Rotation_float_Degrees_Property_typeof(), offsetof(::g::MainView, paymentRot_Degrees_inst), 0,
        ::g::Fuse::Translation_typeof(), offsetof(::g::MainView, paymentTrans), 0,
        MainView__Fuse_Translation_float_X_Property_typeof(), offsetof(::g::MainView, paymentTrans_X_inst), 0,
        ::g::Fuse::Controls::Panel_typeof(), offsetof(::g::MainView, Send), 0,
        MainView__Fuse_Elements_Element_float_Opacity_Property_typeof(), offsetof(::g::MainView, Send_Opacity_inst), 0,
        ::g::Fuse::Controls::Panel_typeof(), offsetof(::g::MainView, sendImage), 0,
        ::g::Fuse::Scaling_typeof(), offsetof(::g::MainView, sendScaling), 0,
        MainView__Fuse_Scaling_float_Factor_Property_typeof(), offsetof(::g::MainView, sendScaling_Factor_inst), 0,
        ::g::T_typeof(), offsetof(::g::MainView, text1), 0,
        MainView__Fuse_Elements_Element_float_Opacity_Property_typeof(), offsetof(::g::MainView, text1_Opacity_inst), 0,
        ::g::T_typeof(), offsetof(::g::MainView, text2), 0,
        MainView__Fuse_Elements_Element_float_Opacity_Property_typeof(), offsetof(::g::MainView, text2_Opacity_inst), 0,
        ::g::T_typeof(), offsetof(::g::MainView, text3), 0,
        MainView__Fuse_Elements_Element_float_Opacity_Property_typeof(), offsetof(::g::MainView, text3_Opacity_inst), 0,
        ::g::T_typeof(), offsetof(::g::MainView, text4), 0,
        MainView__Fuse_Elements_Element_float_Opacity_Property_typeof(), offsetof(::g::MainView, text4_Opacity_inst), 0,
        ::g::Fuse::Triggers::Timeline_typeof(), offsetof(::g::MainView, timeline), 0,
        MainView__Fuse_Triggers_Timeline_double_TargetProgress_Property_typeof(), offsetof(::g::MainView, timeline_TargetProgress_inst), 0);
    type->Reflection.SetFunctions(1,
        new uFunction(".ctor", NULL, (void*)MainView__New1_fn, 0, true, MainView_typeof(), 0));
    return type;
}

// public MainView() :183
void MainView__ctor_3_fn(MainView* __this)
{
    __this->ctor_3();
}

// internal void InitializeUX() :187
void MainView__InitializeUX_fn(MainView* __this)
{
    __this->InitializeUX();
}

// public MainView New() :183
void MainView__New1_fn(MainView** __retval)
{
    *__retval = MainView::New1();
}

// public MainView() [instance] :183
void MainView::ctor_3()
{
    ctor_2();
    InitializeUX();
}

// internal void InitializeUX() [instance] :187
void MainView::InitializeUX()
{
    bool ret2;
    bool ret3;
    bool ret4;
    bool ret5;
    bool ret6;
    bool ret7;
    timeline = ::g::Fuse::Triggers::Timeline::New1();
    timeline_TargetProgress_inst = MainView__Fuse_Triggers_Timeline_double_TargetProgress_Property::New1(timeline);
    camera = ::g::Camera::New3();
    camera_Opacity_inst = MainView__Fuse_Elements_Element_float_Opacity_Property::New1(camera);
    text1 = ::g::T::New3();
    text1_Opacity_inst = MainView__Fuse_Elements_Element_float_Opacity_Property::New1(text1);
    paymentTrans = ::g::Fuse::Translation::New1();
    paymentTrans_X_inst = MainView__Fuse_Translation_float_X_Property::New1(paymentTrans);
    notesTrans = ::g::Fuse::Translation::New1();
    notesTrans_X_inst = MainView__Fuse_Translation_float_X_Property::New1(notesTrans);
    payment = ::g::Payment::New3();
    payment_Opacity_inst = MainView__Fuse_Elements_Element_float_Opacity_Property::New1(payment);
    notes = ::g::Notes::New3();
    notes_Opacity_inst = MainView__Fuse_Elements_Element_float_Opacity_Property::New1(notes);
    paymentRot = ::g::Fuse::Rotation::New1();
    paymentRot_Degrees_inst = MainView__Fuse_Rotation_float_Degrees_Property::New1(paymentRot);
    notesRot = ::g::Fuse::Rotation::New1();
    notesRot_Degrees_inst = MainView__Fuse_Rotation_float_Degrees_Property::New1(notesRot);
    text2 = ::g::T::New3();
    text2_Opacity_inst = MainView__Fuse_Elements_Element_float_Opacity_Property::New1(text2);
    arrow1 = ::g::Fuse::Controls::Image::New2();
    arrow1_Opacity_inst = MainView__Fuse_Elements_Element_float_Opacity_Property::New1(arrow1);
    text3 = ::g::T::New3();
    text3_Opacity_inst = MainView__Fuse_Elements_Element_float_Opacity_Property::New1(text3);
    Send = ::g::Fuse::Controls::Panel::New1();
    Send_Opacity_inst = MainView__Fuse_Elements_Element_float_Opacity_Property::New1(Send);
    arrow2 = ::g::Fuse::Controls::Image::New2();
    arrow2_Opacity_inst = MainView__Fuse_Elements_Element_float_Opacity_Property::New1(arrow2);
    sendScaling = ::g::Fuse::Scaling::New1();
    sendScaling_Factor_inst = MainView__Fuse_Scaling_float_Factor_Property::New1(sendScaling);
    text4 = ::g::T::New3();
    text4_Opacity_inst = MainView__Fuse_Elements_Element_float_Opacity_Property::New1(text4);
    ::g::Fuse::Controls::PageControl* temp = ::g::Fuse::Controls::PageControl::New2();
    ::g::Fuse::iOS::StatusBarConfig* temp1 = ::g::Fuse::iOS::StatusBarConfig::New1();
    ::g::Fuse::Controls::Page* temp2 = ::g::Fuse::Controls::Page::New2();
    ::g::Fuse::Controls::Text* temp3 = ::g::Fuse::Controls::Text::New2();
    ::g::Fuse::Drawing::StaticSolidColor* temp4 = ::g::Fuse::Drawing::StaticSolidColor::New1(::g::Uno::Float4__New2(0.9254902f, 0.2862745f, 0.5411765f, 1.0f));
    ::g::Fuse::Controls::Page* temp5 = ::g::Fuse::Controls::Page::New2();
    ::g::Fuse::Controls::Panel* temp6 = ::g::Fuse::Controls::Panel::New1();
    ::g::Fuse::Controls::Viewbox* temp7 = ::g::Fuse::Controls::Viewbox::New2();
    ::g::Fuse::Controls::Panel* temp8 = ::g::Fuse::Controls::Panel::New1();
    ::g::Fuse::Controls::Panel* temp9 = ::g::Fuse::Controls::Panel::New1();
    panel2 = ::g::Fuse::Controls::Panel::New1();
    sendImage = ::g::Fuse::Controls::Panel::New1();
    ::g::Fuse::Controls::Image* temp10 = ::g::Fuse::Controls::Image::New2();
    ::g::Fuse::Controls::Image* temp11 = ::g::Fuse::Controls::Image::New2();
    ::g::Fuse::Translation* temp12 = ::g::Fuse::Translation::New1();
    ::g::Fuse::Rotation* temp13 = ::g::Fuse::Rotation::New1();
    ::g::Fuse::Controls::Circle* temp14 = ::g::Fuse::Controls::Circle::New2();
    ::g::Fuse::Drawing::Stroke* temp15 = ::g::Fuse::Drawing::Stroke::New1();
    ::g::Fuse::Drawing::StaticSolidColor* temp16 = ::g::Fuse::Drawing::StaticSolidColor::New1(::g::Uno::Float4__New2(1.0f, 1.0f, 1.0f, 1.0f));
    ::g::Fuse::Drawing::StaticSolidColor* temp17 = ::g::Fuse::Drawing::StaticSolidColor::New1(::g::Uno::Float4__New2(0.3882353f, 0.2039216f, 0.6431373f, 1.0f));
    ::g::Fuse::Controls::Panel* temp18 = ::g::Fuse::Controls::Panel::New1();
    ::g::Fuse::Controls::StackPanel* temp19 = ::g::Fuse::Controls::StackPanel::New2();
    ::g::Fuse::Navigation::WhileActive* temp20 = ::g::Fuse::Navigation::WhileActive::New1();
    ::g::Fuse::Animations::Change* temp21 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[1/*Fuse.Animations.Change<double>*/], timeline_TargetProgress_inst);
    ::g::Fuse::Animations::Change* temp22 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], camera_Opacity_inst);
    ::g::Fuse::Animations::Change* temp23 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], text1_Opacity_inst);
    ::g::Fuse::Animations::Move* temp24 = ::g::Fuse::Animations::Move::New1();
    ::g::Fuse::Animations::Change* temp25 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], paymentTrans_X_inst);
    ::g::Fuse::Animations::Change* temp26 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], notesTrans_X_inst);
    ::g::Fuse::Animations::Change* temp27 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], payment_Opacity_inst);
    ::g::Fuse::Animations::Change* temp28 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], notes_Opacity_inst);
    ::g::Fuse::Animations::Change* temp29 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], paymentRot_Degrees_inst);
    ::g::Fuse::Animations::Change* temp30 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], notesRot_Degrees_inst);
    ::g::Fuse::Animations::Change* temp31 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], text2_Opacity_inst);
    ::g::Fuse::Animations::Change* temp32 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], arrow1_Opacity_inst);
    ::g::Fuse::Animations::Change* temp33 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], text3_Opacity_inst);
    ::g::Fuse::Animations::Move* temp34 = ::g::Fuse::Animations::Move::New1();
    ::g::Fuse::Animations::Change* temp35 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], Send_Opacity_inst);
    ::g::Fuse::Animations::Change* temp36 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], text3_Opacity_inst);
    ::g::Fuse::Animations::Change* temp37 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], arrow2_Opacity_inst);
    ::g::Fuse::Animations::Move* temp38 = ::g::Fuse::Animations::Move::New1();
    ::g::Fuse::Animations::Change* temp39 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], sendScaling_Factor_inst);
    ::g::Fuse::Animations::Change* temp40 = (::g::Fuse::Animations::Change*)::g::Fuse::Animations::Change::New1(::TYPES[3/*Fuse.Animations.Change<float>*/], text4_Opacity_inst);
    ::g::Fuse::Drawing::StaticSolidColor* temp41 = ::g::Fuse::Drawing::StaticSolidColor::New1(::g::Uno::Float4__New2(0.3882353f, 0.2039216f, 0.6431373f, 1.0f));
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), temp2);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), temp5);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp->Behaviors()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[7/*Fuse.Behavior*/])), temp1);
    temp1->Style(1);
    temp2->Background(temp4);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp2->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), temp3);
    temp3->Value(::STRINGS[0/*"Swipe left"*/]);
    temp3->FontSize(20.0f);
    temp3->TextColor(::g::Uno::Float4__New2(1.0f, 1.0f, 1.0f, 1.0f));
    temp3->Alignment(10);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp5->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), temp6);
    temp6->Background(temp41);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp6->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), temp7);
    temp7->Alignment(10);
    temp7->Content1(temp8);
    temp8->Width(500.0f);
    temp8->Height(800.0f);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp8->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), temp9);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp8->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), temp18);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp8->Behaviors()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[7/*Fuse.Behavior*/])), temp20);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp8->Behaviors()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[7/*Fuse.Behavior*/])), timeline);
    ::g::Fuse::StylePropertyWithUnit__Set1_fn(uPtr(::g::Fuse::Elements::Element::HeightProperty()), temp9, uCRef(80.0f), uCRef<int>(1), &ret2);
    temp9->Alignment(12);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp9->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), panel2);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp9->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), Send);
    uPtr(panel2)->Name(::STRINGS[1/*"panel2"*/]);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(panel2)->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), camera);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(panel2)->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), payment);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(panel2)->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), notes);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(panel2)->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), arrow2);
    uPtr(camera)->Opacity(0.0f);
    uPtr(camera)->Name(::STRINGS[2/*"camera"*/]);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(camera)->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), arrow1);
    uPtr(arrow1)->Width(50.0f);
    uPtr(arrow1)->Height(50.0f);
    uPtr(arrow1)->Offset(::g::Uno::Float2__New2(0.0f, 80.0f));
    uPtr(arrow1)->Opacity(0.0f);
    uPtr(arrow1)->Name(::STRINGS[3/*"arrow1"*/]);
    uPtr(arrow1)->File(::g::Uno::UX::BundleFileSource::New1(::g::WelcomeAnimation_bundle::Arrow8e409a4c()));
    uPtr(payment)->Opacity(0.0f);
    uPtr(payment)->Name(::STRINGS[4/*"payment"*/]);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(payment)->Transforms()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[16/*Fuse.Transform*/])), paymentTrans);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(payment)->Transforms()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[16/*Fuse.Transform*/])), paymentRot);
    uPtr(paymentRot)->Degrees(45.0f);
    uPtr(notes)->Opacity(0.0f);
    uPtr(notes)->Name(::STRINGS[5/*"notes"*/]);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(notes)->Transforms()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[16/*Fuse.Transform*/])), notesTrans);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(notes)->Transforms()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[16/*Fuse.Transform*/])), notesRot);
    uPtr(notesRot)->Degrees(-45.0f);
    uPtr(arrow2)->Width(50.0f);
    uPtr(arrow2)->Height(50.0f);
    uPtr(arrow2)->Offset(::g::Uno::Float2__New2(0.0f, 80.0f));
    uPtr(arrow2)->Opacity(0.0f);
    uPtr(arrow2)->Name(::STRINGS[6/*"arrow2"*/]);
    uPtr(arrow2)->File(::g::Uno::UX::BundleFileSource::New1(::g::WelcomeAnimation_bundle::Arrow8e409a4c()));
    uPtr(Send)->Width(80.0f);
    uPtr(Send)->Height(80.0f);
    uPtr(Send)->Opacity(0.0f);
    uPtr(Send)->Name(::STRINGS[7/*"Send"*/]);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(Send)->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), sendImage);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(Send)->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), temp14);
    uPtr(sendImage)->Name(::STRINGS[8/*"sendImage"*/]);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(sendImage)->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), temp10);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(sendImage)->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), temp11);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(sendImage)->Transforms()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[16/*Fuse.Transform*/])), sendScaling);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(sendImage)->Transforms()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[16/*Fuse.Transform*/])), temp12);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(sendImage)->Transforms()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[16/*Fuse.Transform*/])), temp13);
    ::g::Fuse::StylePropertyWithUnit__Set1_fn(uPtr(::g::Fuse::Elements::Element::WidthProperty()), temp10, uCRef(60.0f), uCRef<int>(1), &ret3);
    ::g::Fuse::StylePropertyWithUnit__Set1_fn(uPtr(::g::Fuse::Elements::Element::HeightProperty()), temp10, uCRef(60.0f), uCRef<int>(1), &ret4);
    temp10->File(::g::Uno::UX::BundleFileSource::New1(::g::WelcomeAnimation_bundle::sendaf605e11()));
    temp11->Color(::g::Uno::Float4__New2(0.3882353f, 0.2039216f, 0.6431373f, 1.0f));
    ::g::Fuse::StylePropertyWithUnit__Set1_fn(uPtr(::g::Fuse::Elements::Element::WidthProperty()), temp11, uCRef(90.0f), uCRef<int>(1), &ret5);
    ::g::Fuse::StylePropertyWithUnit__Set1_fn(uPtr(::g::Fuse::Elements::Element::HeightProperty()), temp11, uCRef(90.0f), uCRef<int>(1), &ret6);
    temp11->File(::g::Uno::UX::BundleFileSource::New1(::g::WelcomeAnimation_bundle::sendaf605e11()));
    uPtr(sendScaling)->Factor(0.7f);
    temp12->X(5.0f);
    temp13->Degrees(-45.0f);
    temp14->Fill(temp17);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp14->Strokes()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[21/*Fuse.Drawing.Stroke*/])), temp15);
    temp15->Width(3.0f);
    temp15->Brush(temp16);
    ::g::Fuse::StylePropertyWithUnit__Set1_fn(uPtr(::g::Fuse::Elements::Element::HeightProperty()), temp18, uCRef(90.0f), uCRef<int>(1), &ret7);
    temp18->Alignment(4);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp18->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), temp19);
    temp19->Alignment(14);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp19->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), text1);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp19->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), text2);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp19->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), text3);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp19->Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[6/*Fuse.Node*/])), text4);
    uPtr(text1)->Value(::STRINGS[9/*"Take a photo."*/]);
    uPtr(text1)->Name(::STRINGS[10/*"text1"*/]);
    uPtr(text2)->Value(::STRINGS[11/*"Add price a...*/]);
    uPtr(text2)->Name(::STRINGS[12/*"text2"*/]);
    uPtr(text3)->Value(::STRINGS[13/*"Share."*/]);
    uPtr(text3)->Name(::STRINGS[14/*"text3"*/]);
    uPtr(text4)->Value(::STRINGS[15/*"Done!"*/]);
    uPtr(text4)->TextColor(::g::Uno::Float4__New2(1.0f, 1.0f, 1.0f, 1.0f));
    uPtr(text4)->Margin(::g::Uno::Float4__New2(0.0f, 15.0f, 0.0f, 15.0f));
    uPtr(text4)->Name(::STRINGS[16/*"text4"*/]);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp20->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp21);
    ::g::Fuse::Animations::Change__set_Value_fn(temp21, uCRef(1.0));
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp22);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp23);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp24);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp25);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp26);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp27);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp28);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp29);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp30);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp31);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp32);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp33);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp34);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp35);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp36);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp37);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp38);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp39);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(uPtr(timeline)->Animators()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[23/*Fuse.Animations.Animator*/])), temp40);
    ::g::Fuse::Animations::Change__set_Value_fn(temp22, uCRef(1.0f));
    temp22->Duration(1.0);
    ::g::Fuse::Animations::Change__set_Value_fn(temp23, uCRef(1.0f));
    temp23->Duration(1.0);
    temp24->Y(-2.0f);
    temp24->Easing(26);
    temp24->Duration(1.0);
    temp24->Delay(1.0);
    temp24->RelativeTo(::g::Fuse::TranslationModes::Size());
    temp24->Target(camera);
    ::g::Fuse::Animations::Change__set_Value_fn(temp25, uCRef(-30.0f));
    temp25->Easing(26);
    temp25->Duration(1.0);
    temp25->Delay(1.0);
    ::g::Fuse::Animations::Change__set_Value_fn(temp26, uCRef(30.0f));
    temp26->Easing(26);
    temp26->Duration(1.0);
    temp26->Delay(1.0);
    ::g::Fuse::Animations::Change__set_Value_fn(temp27, uCRef(1.0f));
    temp27->Easing(26);
    temp27->Duration(1.0);
    temp27->Delay(1.0);
    ::g::Fuse::Animations::Change__set_Value_fn(temp28, uCRef(1.0f));
    temp28->Easing(26);
    temp28->Duration(1.0);
    temp28->Delay(1.0);
    ::g::Fuse::Animations::Change__set_Value_fn(temp29, uCRef(0.0f));
    temp29->Easing(26);
    temp29->Duration(1.0);
    temp29->Delay(1.0);
    ::g::Fuse::Animations::Change__set_Value_fn(temp30, uCRef(0.0f));
    temp30->Easing(26);
    temp30->Duration(1.0);
    temp30->Delay(1.0);
    ::g::Fuse::Animations::Change__set_Value_fn(temp31, uCRef(1.0f));
    temp31->Duration(1.0);
    temp31->Delay(1.0);
    ::g::Fuse::Animations::Change__set_Value_fn(temp32, uCRef(1.0f));
    temp32->Duration(0.6);
    temp32->Delay(1.5);
    ::g::Fuse::Animations::Change__set_Value_fn(temp33, uCRef(1.0f));
    temp33->Duration(1.0);
    temp33->Delay(2.0);
    temp34->Y(-0.25f);
    temp34->Easing(26);
    temp34->Duration(1.0);
    temp34->Delay(3.0);
    temp34->RelativeTo(::g::Fuse::TranslationModes::Size());
    temp34->Target(panel2);
    ::g::Fuse::Animations::Change__set_Value_fn(temp35, uCRef(1.0f));
    temp35->Duration(1.0);
    temp35->Delay(3.0);
    ::g::Fuse::Animations::Change__set_Value_fn(temp36, uCRef(1.0f));
    temp36->Duration(1.0);
    temp36->Delay(3.0);
    ::g::Fuse::Animations::Change__set_Value_fn(temp37, uCRef(1.0f));
    temp37->Duration(0.6);
    temp37->Delay(3.5);
    temp38->X(25.0f);
    temp38->Easing(26);
    temp38->Duration(0.8);
    temp38->Delay(3.5);
    temp38->Target(sendImage);
    ::g::Fuse::Animations::Change__set_Value_fn(temp39, uCRef(1.0f));
    temp39->Easing(26);
    temp39->Duration(0.8);
    temp39->Delay(3.5);
    ::g::Fuse::Animations::Change__set_Value_fn(temp40, uCRef(1.0f));
    temp40->Duration(1.0);
    temp40->Delay(4.7);
    RootNode(temp);
    Theme(::g::Fuse::BasicTheme::BasicTheme::Singleton1());
}

// public MainView New() [static] :183
MainView* MainView::New1()
{
    MainView* obj1 = (MainView*)uNew(MainView_typeof());
    obj1->ctor_3();
    return obj1;
}
// }

} // ::g


text:
// -----------------------------------------------------------------------
// <copyright file="HistoricalDataBroker.cs" company="">
// Copyright 2013 Alexander Soffronow Pagonidis
// </copyright>
// -----------------------------------------------------------------------

// The HistoricalDataBroker sits between the HistoricalDataServer
// and the external data source adapters.
// Requests for data are handled in RequestHistoricalData(),
// then forwarded to local storage, the appropriate external data source, or both.
// When data returns, it's sent through the HistoricalDataArrived event.

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Timers;
using System.Windows;
using NLog;
using QDMS;
using QDMSServer.DataSources;
using Timer = System.Timers.Timer;

namespace QDMSServer
{
    public class HistoricalDataBroker : IDisposable, IHistoricalDataBroker
    {
        ///
        /// Holds the real time data sources.
        ///
        public ObservableDictionary<string, IHistoricalDataSource> DataSources { get; private set; }

        private readonly IDataStorage _dataStorage;

        private readonly Logger _logger = LogManager.GetCurrentClassLogger();

        private Timer _connectionTimer; //tries to reconnect every once in a while if a datasource is disconnected

        public event EventHandler<HistoricalDataEventArgs> HistoricalDataArrived;
        public event EventHandler<ErrorArgs> Error;

        ///
        /// Keeps track of IDs assigned to requests that have already been used, so there are no duplicates.
        ///
        private List<int> _usedIDs;

        private readonly object _localStorageLock = new object();

        //when we get a new data request first we check the local storage
        //if only part of the data is there, we create subrequests to the outside storages, they are held
        //in _subRequests. When they have all arrived, we grab what we need from the local storage (where
        //new data has been saved) and send it off
        private readonly ConcurrentDictionary<int, HistoricalDataRequest> _originalRequests;

        private readonly ConcurrentDictionary<int, List<HistoricalDataRequest>> _subRequests;

        public void Dispose()
        {
            if (_connectionTimer != null)
            {
                _connectionTimer.Dispose();
                _connectionTimer = null;
            }

            foreach(var ds in DataSources.Values)
            {
                ds.Disconnect();
            }

            /*
            if (DataSources.ContainsKey("Interactive Brokers"))
            {
                ((IB)DataSources["Interactive Brokers"]).Dispose();
            }
            */
            if (DataSources.ContainsKey("ContinuousFuturesBroker"))
            {
                ((IContinuousFuturesBroker)DataSources["ContinuousFuturesBroker"]).Dispose();
            }
        }

        public HistoricalDataBroker(IContinuousFuturesBroker cfBroker, IDataStorage localStorage, IEnumerable<QDMS.IHistoricalDataSource> additionalSources = null)
        {
            if (cfBroker == null)
                throw new ArgumentNullException("cfBroker");
            if (localStorage == null)
                throw new ArgumentNullException("localStorage");

            _dataStorage = localStorage;

            DataSources = new ObservableDictionary<string, QDMS.IHistoricalDataSource>
            {
                /*
                { "Interactive Brokers", new IB(Properties.Settings.Default.histClientIBID) },
                { "Yahoo", new Yahoo() },
                { "Quandl", new Quandl() },
                { "FRED", new FRED() },
                { "Google", new Google() }
                */
            };

            //add the continuous futures broker to the data sources
            DataSources.Add("ContinuousFuturesBroker", cfBroker);

            //add additional sources
            if (additionalSources != null)
            {
                foreach (IHistoricalDataSource ds in additionalSources)
                {
                    if (!DataSources.ContainsKey(ds.Name))
                        DataSources.Add(ds.Name, ds);
                }
            }

            foreach (IHistoricalDataSource ds in DataSources.Values)
            {
                ds.Error += DatasourceError;
                ds.HistoricalDataArrived += ExternalHistoricalDataArrived;
                ds.Disconnected += SourceDisconnects;
            }

            _dataStorage.Error += DatasourceError;
            _dataStorage.HistoricalDataArrived += LocalStorageHistoricalDataArrived;

            _connectionTimer = new Timer(10000);
            _connectionTimer.Elapsed += ConnectionTimerElapsed;
            _connectionTimer.Start();

            _originalRequests = new ConcurrentDictionary<int, HistoricalDataRequest>();
            _subRequests = new ConcurrentDictionary<int, List<HistoricalDataRequest>>();
            _usedIDs = new List<int>();

            TryConnect();
        }

        ///
        /// This method is called when a data source disconnects
        ///
        private void SourceDisconnects(object sender, DataSourceDisconnectEventArgs e)
        {
            Log(LogLevel.Info, string.Format("Historical Data Broker: Data source {0} disconnected", e.SourceName));
        }

        ///
        /// Add a message to the log.
        ///
        private void Log(LogLevel level, string message)
        {
            _logger.Log(level, message);
        }

        ///
        /// This method handles data arrivals from the local database
        ///
        private void LocalStorageHistoricalDataArrived(object sender, HistoricalDataEventArgs e)
        {
            Log(LogLevel.Info, string.Format("Pulled {0} data points from local storage on instrument {1}.",
                e.Data.Count,
                e.Request.Instrument.Symbol));

            //pass up the data to the server so it can be sent out
            ReturnData(e);
        }

        ///
        /// Raise the event in a threadsafe manner
        ///
        static private void RaiseEvent<T>(EventHandler<T> @event, object sender, T e)
        where T : EventArgs
        {
            EventHandler<T> handler = @event;
            if (handler == null) return;
            handler(sender, e);
        }

        ///
        /// This one handles data arrivals from historical data sources other than local storage
        ///
        private void ExternalHistoricalDataArrived(object sender, HistoricalDataEventArgs e)
        {
            //save the data to local storage, then (maybe) send the original request to be fulfilled by local storage, which now has all the data available
            HistoricalDataRequest originalRequest;
            int assignedID = e.Request.IsSubrequestFor.HasValue ? e.Request.IsSubrequestFor.Value : e.Request.AssignedID;
            bool gotOriginalRequest = _originalRequests.TryGetValue(assignedID, out originalRequest);
            if (!gotOriginalRequest)
                throw new Exception("Something went wrong: original request disappeared");

            if (e.Request.SaveDataToStorage) //the request asked to save newly arrived data in local storage
            {
                bool doAdjustment = e.Data.Any(x => x.Split.HasValue || x.Dividend.HasValue);
                AddData(new DataAdditionRequest(e.Request.Frequency, e.Request.Instrument, e.Data, true, doAdjustment));

                //check if there is a list in the subrequests for this request...
                if (e.Request.IsSubrequestFor.HasValue && _subRequests.ContainsKey(e.Request.IsSubrequestFor.Value))
                {
                    //remove this item...if the list is empty, remove it and send the original request to the
                    //local storage, because all the requests to external data sources have now arrived
                    _subRequests[e.Request.IsSubrequestFor.Value].Remove(e.Request);
                    if (_subRequests[e.Request.IsSubrequestFor.Value].Count == 0)
                    {
                        List<HistoricalDataRequest> tmpList;
                        _subRequests.TryRemove(e.Request.IsSubrequestFor.Value, out tmpList); //remove the list for this ID

                        _dataStorage.RequestHistoricalData(originalRequest); //and finally send the original request to the local db
                    }
                }
                else //there is not -- this is a standalone request, so just grab the data from the db and return it
                {
                    if (e.Request.DataLocation == DataLocation.ExternalOnly)
                    {
                        //if the request specifies only fresh data, we don't want to go through local storage
                        ReturnData(new HistoricalDataEventArgs(e.Request, e.Data));
                    }
                    else
                    {
                        _dataStorage.RequestHistoricalData(originalRequest);
                    }
                }

                Log(LogLevel.Info, string.Format("Pulled {0} data points from source {1} on instrument {2}.",
                    e.Data.Count,
                    e.Request.Instrument.Datasource.Name,
                    e.Request.Instrument.Symbol));
            }
            else //the data does NOT go to local storage, so we have to load that stuff and combine it right here
            {
                //grab the rest of the data from historical storage if needed
                //unless the request specifies fresh data only
                var storageData = new List<OHLCBar>();
                if (e.Data.Count > 0 &&
                    e.Data[0].Date.ToDateTime() > originalRequest.StartingDate &&
                    e.Request.DataLocation != DataLocation.ExternalOnly)
                {
                    lock (_localStorageLock)
                    {

                        //we add half a bar to the request limit so that the data we get starts with the next one
                        DateTime correctedDateTime = e.Data[0].Date.Date.ToDateTime().AddMilliseconds(originalRequest.Frequency.ToTimeSpan().TotalMilliseconds / 2);
                        storageData = _dataStorage.GetData(originalRequest.Instrument, originalRequest.StartingDate,
                            correctedDateTime, originalRequest.Frequency);
                    }
                }

                //then send the data to the server through the event, so it can be send out to the client
                ReturnData(new HistoricalDataEventArgs(e.Request, storageData.Concat(e.Data).ToList()));

                Log(LogLevel.Info, string.Format("Pulled {0} data points from source {1} on instrument {2} and {3} points from local storage.",
                    e.Data.Count,
                    e.Request.Instrument.Datasource.Name,
                    e.Request.Instrument.Symbol,
                    storageData.Count));
            }
        }

        ///
        /// Raise the event that returns data to the server, after applying an RTH filter if needed.
        ///
        private void ReturnData(HistoricalDataEventArgs e)
        {
            //if needed, we filter out the data outside of regular trading hours
            if (e.Request.RTHOnly &&
                e.Request.Frequency < BarSize.OneDay &&
                e.Request.Instrument.Sessions != null)
            {
                RTHFilter.Filter(e.Data, e.Request.Instrument.Sessions.ToList());
            }

            //For daily+ data using RTH, we set the bar opening and closing times using
            if (e.Request.Frequency >= BarSize.OneDay)
            {
                MyUtils.SetSessionTimes(e.Data, e.Request.Instrument);
            }

            RaiseEvent(HistoricalDataArrived, this, new HistoricalDataEventArgs(e.Request, e.Data));
        }

        ///
        /// Fires when any of the underlying data sources raise their error event.
        ///
        private void DatasourceError(object sender, ErrorArgs e)
        {
            RaiseEvent(Error, sender, new ErrorArgs(-1, "HDB Client Error: " + e.ErrorMessage, e.RequestID));
            Log(LogLevel.Error, string.Format("HDB: {0} - {1}", e.ErrorCode, e.ErrorMessage));
        }

        ///
        /// There is a timer which periodically calls the tryconnect function to connect to any disconnected data sources
        ///
        private void ConnectionTimerElapsed(object sender, ElapsedEventArgs e)
        {
            TryConnect();
        }

        ///
        /// Loops through data sources and tries to connect to those that are disconnected
        ///
        private void TryConnect()
        {
            if (!_dataStorage.Connected)
                _dataStorage.Connect();

            foreach (KeyValuePair<string, IHistoricalDataSource> s in DataSources)
            {
                if (!s.Value.Connected)
                {
                    Log(LogLevel.Info, string.Format("Historical Data Broker: Trying to connect to data source {0}", s.Key));
                    s.Value.Connect();
                }
            }
        }

        ///
        /// Ensures that the data source specified is present and connected.
        /// Throws an exception otherwise.
        ///
        private void CheckDataSource(string name)
        {
            if (!DataSources.ContainsKey(name))
                throw new Exception(string.Format("Data source {0} does not exist.", name));
            if (!DataSources[name].Connected)
                throw new Exception(string.Format("Data source {0} is not connected.", name));
        }

        ///
        /// Processes incoming historical data requests.
        ///
        public void RequestHistoricalData(HistoricalDataRequest request)
        {
            //assign an ID to the request
            request.AssignedID = GetUniqueRequestID();

            _originalRequests.TryAdd(request.AssignedID, request);

            //request says to ignore the external data source, just send the request as-is to the local storage
            if (request.DataLocation == DataLocation.LocalOnly)
            {
                lock (_localStorageLock)
                {
                    _dataStorage.RequestHistoricalData(request);
                }
                return;
            }

            //request is for fresh data ONLY -- send the request directly to the external data source
            if (request.DataLocation == DataLocation.ExternalOnly)
            {
                //make sure data source is present and available
                try
                {
                    CheckDataSource(request.Instrument.Datasource.Name);
                }
                catch (Exception ex)
                {
                    Log(LogLevel.Error, string.Format("Could not fulfill request ID {0}, error: {1}", request.AssignedID, ex.Message));
                    throw;
                }

                ForwardHistoricalRequest(request);
                return;
            }

            //check if the data source is present and available...
            //if not, simply send the request to local storage and throw an exception
            try
            {
                CheckDataSource(request.Instrument.Datasource.Name);
            }
            catch (Exception ex)
            {
                lock (_localStorageLock)
                {
                    _dataStorage.RequestHistoricalData(request);
                }

                Log(LogLevel.Error, string.Format("Data source problem for request ID {0}, forwarded directly to local storage. Error: {1}", request.AssignedID, ex.Message));
                throw;
            }

            //we are allowed to use data from local storage, but want to get any missing data from the external data source
            lock (_localStorageLock)
            {
                if (request.Instrument.ID == null) return;

                //we need to get some detailed info on the data we have available locally
                //check which dates are available in local storage
                var localDataInfo = _dataStorage.GetStorageInfo(request.Instrument.ID.Value, request.Frequency);

                //if the local storage can satisfy the request, send it there immediately
                if (localDataInfo != null
                    && localDataInfo.LatestDate >= request.EndingDate
                    && localDataInfo.EarliestDate <= request.StartingDate)
                {
                    _dataStorage.RequestHistoricalData(request);
                    return;
                }

                //alternatively, we know from the expiration that there exists no new data, so go to local storage
                if (localDataInfo != null && request.Instrument.Expiration.HasValue)
                {
                    //get the right session
                    var dotw = request.Instrument.Expiration.Value.Date.DayOfWeek.ToInt();
                    var session = request.Instrument.Sessions.First(x => (int)x.ClosingDay == dotw && x.IsSessionEnd);

                    //if it exists, use it to set the proper time
                    if (session != null
                        && localDataInfo.LatestDate >= (request.Instrument.Expiration.Value.Date + session.ClosingTime))
                    {
                        _dataStorage.RequestHistoricalData(request);
                        return;
                    }
                }

                //we have no data available at all, send off the request as it is
                if (localDataInfo == null ||
                    (request.Instrument.IsContinuousFuture &&
                        request.Instrument.ContinuousFuture.AdjustmentMode != ContinuousFuturesAdjustmentMode.NoAdjustment))
                {
                    //if the instruemnt is a continuous future and it has ratio or difference adjustment mode
                    //then we can't load data from local storage, because it would screw up the adjustment calcs
                    //therefore in that case we send the entire request, without splitting it up
                    ForwardHistoricalRequest(request);
                }
                else //we have SOME data available, check how it holds up, possibly split up into subrequests
                {
                    GenerateSubRequests(request, localDataInfo);
                }
            }
        }

        ///
        /// When a data request can be partly filled by the local db,
        /// we need to split it into one or two sub-requests for the parts that
        /// are not locally available. This method does that and forwards the sub-requests.
        ///
        private void GenerateSubRequests(HistoricalDataRequest request, StoredDataInfo localDataInfo)
        {
            _subRequests.TryAdd(request.AssignedID, new List<HistoricalDataRequest>());

            //earlier data that may be needed
            HistoricalDataRequest newBackRequest = null;
            if (localDataInfo.EarliestDate > request.StartingDate)
            {
                newBackRequest = (HistoricalDataRequest)request.Clone();
                newBackRequest.EndingDate = localDataInfo.EarliestDate.AddMilliseconds(-request.Frequency.ToTimeSpan().TotalMilliseconds / 2);
                newBackRequest.IsSubrequestFor = request.AssignedID;
                newBackRequest.AssignedID = GetUniqueRequestID();
                _subRequests[newBackRequest.IsSubrequestFor.Value].Add(newBackRequest);
            }

            //later data that may be needed
            HistoricalDataRequest newForwardRequest = null;
            if (localDataInfo.LatestDate < request.EndingDate)
            {
                //the local storage is insufficient, so we save the original request, make a copy,
                //modify it, and pass it to the external data source
                newForwardRequest = (HistoricalDataRequest)request.Clone();
                newForwardRequest.StartingDate = localDataInfo.LatestDate.AddMilliseconds(request.Frequency.ToTimeSpan().TotalMilliseconds / 2);
                newForwardRequest.IsSubrequestFor = request.AssignedID;
                newForwardRequest.AssignedID = GetUniqueRequestID();
                _subRequests[newForwardRequest.IsSubrequestFor.Value].Add(newForwardRequest);
            }

            //we send these together, because too large of a delay between the two requests can cause problems
            if (newBackRequest != null)
            {
                ForwardHistoricalRequest(newBackRequest);
            }
            if (newForwardRequest != null)
            {
                ForwardHistoricalRequest(newForwardRequest);
            }
        }

        ///
        /// Sends off a historical data reques to the datasource that needs to fulfill it
        ///
        private void ForwardHistoricalRequest(HistoricalDataRequest request)
        {
            string timezone = request.Instrument.Exchange == null ? "UTC" : request.Instrument.Exchange.Timezone;
            var exchangeTZ = TimeZoneInfo.FindSystemTimeZoneById(timezone);

            //limit the ending date to the present
            var now = TimeZoneInfo.ConvertTime(DateTime.Now, TimeZoneInfo.Local, exchangeTZ);
            DateTime endDate = request.EndingDate > now ? now : request.EndingDate;
            request.EndingDate = endDate;

            if (request.Instrument.IsContinuousFuture)
            {
                DataSources["ContinuousFuturesBroker"].RequestHistoricalData(request);
            }
            else
            {
                DataSources[request.Instrument.Datasource.Name].RequestHistoricalData(request);
            }
        }

        ///
        /// Gets a new unique AssignedID to identify requests with.
        ///
        private int GetUniqueRequestID()
        {
            //requests can arrive very close to each other and thus have the same seed, so we need to make sure it's unique
            var rand = new Random();
            int id;
            do
            {
                id = rand.Next(1, int.MaxValue);
            } while (_usedIDs.Contains(id));

            _usedIDs.Add(id);
            return id;
        }

        ///
        /// Forwards a data addition request to local storage.
        ///
        public void AddData(DataAdditionRequest request)
        {
            if(request.Data.Count == 0)
            {
                Log(LogLevel.Info, string.Format("HDB: AddData called with zero bars, request: {0}", request));
                return;
            }

            lock (_localStorageLock)
            {
                _dataStorage.AddData(request.Data, request.Instrument, request.Frequency, request.Overwrite);
            }
        }

        public List<StoredDataInfo> GetAvailableDataInfo(Instrument instrument)
        {
            if (instrument.ID == null)
            {
                Log(LogLevel.Info, "Request for available data on instrument without ID.");
                return new List<StoredDataInfo>();
            }

            return _dataStorage.GetStorageInfo(instrument.ID.Value);
        }
    }
}


text:
import { expect } from 'chai';
import ZohoInvoice from './zoho-invoice';

describe('zoho-invoice', function() {

    it('should create an instance', function() {
        let zohoInvoice = ZohoInvoice();

        expect(zohoInvoice).to.have.all.keys([
            'AUTH_TOKEN',
            'API_PROTOCOL',
            'API_HOST',
            'API_PATH',
            'invoices',
            'contacts',
            'organizations',
            'settings'
        ]);
    });

    it('should set the authtoken via the constructor', function() {
        let zohoInvoice = ZohoInvoice('123456');
        expect(zohoInvoice.AUTH_TOKEN).to.equal('123456');
    });

    it('should set the authtoken via the setAuthToken method', function() {
        let zohoInvoice = ZohoInvoice();
        zohoInvoice.setAuthToken('123456');
        expect(zohoInvoice.AUTH_TOKEN).to.equal('123456');
    });

});


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Interface thobe.logfileviewer.plugin.source.logstream.ILogStream</title>
<meta name="date" content="2015-05-03">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Interface
thobe.logfileviewer.plugin.source.logstream.ILogStream

Packages that use ILogStream

Package
Description

thobe.logfileviewer.plugin.api

thobe.logfileviewer.plugin.source.logstream

Uses of ILogStream in thobe.logfileviewer.plugin.api

Methods in thobe.logfileviewer.plugin.api that return ILogStream

Modifier and Type
Method and Description

ILogStream
IPlugin.getLogstream()

Returns a reference to the currently open LogStream.

Uses of ILogStream in thobe.logfileviewer.plugin.source.logstream

Subinterfaces of ILogStream in thobe.logfileviewer.plugin.source.logstream

Modifier and Type
Interface and Description

interface
ILogStreamAccess

Interface that offers access to the LogStream in the way to register/unregister as listener.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes