text:
TEST_CASE("Types")
{
    REQUIRE(Type::tBoolean().type == Type::Boolean);
    REQUIRE(Type::tByte().type == Type::Byte);
    REQUIRE(Type::tChar().type == Type::Char);
    REQUIRE(Type::tDouble().type == Type::Double);
    REQUIRE(Type::tFloat().type == Type::Float);
    REQUIRE(Type::tInt().type == Type::Int);
    REQUIRE(Type::tLong().type == Type::Long);
    REQUIRE(Type::tShort().type == Type::Short);
    REQUIRE(Type::tObject("String").type == Type::Object);
    REQUIRE(Type::tObject("String").object == "String");
    REQUIRE(Type::tObject("java.lang.String", 2).type == Type::Object);
    REQUIRE(Type::tObject("java.lang.String", 2).object == "java.lang.String");
    REQUIRE(Type::tObject("java.lang.String", 2).dimensions == 2);
}


text:
namespace _2.ConditionStatmentEx12NumberChecker
{
    using System;
    using System.Collections.Generic;
    using System.Linq;

    public class NumberChecker
    {
        public static void Main()
        {

            try
            {
                var input = int.Parse(Console.ReadLine());
                Console.WriteLine("It is a number.");
            }
            catch
            {
                Console.WriteLine("Invalid input!");
            }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.facebook.buck.parser;

import static java.nio.charset.StandardCharsets.UTF_8;

import com.facebook.buck.event.PerfEventId;
import com.facebook.buck.event.SimplePerfEvent;
import com.facebook.buck.json.JsonObjectHashing;
import com.facebook.buck.log.Logger;
import com.facebook.buck.model.BuckVersion;
import com.facebook.buck.model.BuildFileTree;
import com.facebook.buck.model.BuildTarget;
import com.facebook.buck.model.Flavored;
import com.facebook.buck.model.UnflavoredBuildTarget;
import com.facebook.buck.rules.BuckPyFunction;
import com.facebook.buck.rules.BuildRuleType;
import com.facebook.buck.rules.Cell;
import com.facebook.buck.rules.ConstructorArgMarshaller;
import com.facebook.buck.rules.Description;
import com.facebook.buck.rules.ParamInfoException;
import com.facebook.buck.rules.TargetNode;
import com.facebook.buck.rules.TargetNodeFactory;
import com.facebook.buck.rules.VisibilityPattern;
import com.facebook.buck.util.HumanReadableException;
import com.google.common.base.Function;
import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
import com.google.common.cache.LoadingCache;
import com.google.common.collect.ImmutableSet;
import com.google.common.hash.Hasher;
import com.google.common.hash.Hashing;

import java.io.IOException;
import java.nio.file.Path;
import java.util.Map;
import java.util.Optional;

/**
 * Creates {@link TargetNode} instances from raw data coming in form the
 * {@link com.facebook.buck.json.ProjectBuildFileParser}.
 */
public class DefaultParserTargetNodeFactory implements ParserTargetNodeFactory<TargetNode<?, ?>> {

  private static final Logger LOG = Logger.get(DefaultParserTargetNodeFactory.class);

  private final ConstructorArgMarshaller marshaller;
  private final Optional<LoadingCache<Cell, BuildFileTree>> buildFileTrees;
  private final TargetNodeListener<TargetNode<?, ?>> nodeListener;
  private final TargetNodeFactory targetNodeFactory;

  private DefaultParserTargetNodeFactory(
      ConstructorArgMarshaller marshaller,
      Optional<LoadingCache<Cell, BuildFileTree>> buildFileTrees,
      TargetNodeListener<TargetNode<?, ?>> nodeListener,
      TargetNodeFactory targetNodeFactory) {
    this.marshaller = marshaller;
    this.buildFileTrees = buildFileTrees;
    this.nodeListener = nodeListener;
    this.targetNodeFactory = targetNodeFactory;
  }

  public static ParserTargetNodeFactory<TargetNode<?, ?>> createForParser(
      ConstructorArgMarshaller marshaller,
      LoadingCache<Cell, BuildFileTree> buildFileTrees,
      TargetNodeListener<TargetNode<?, ?>> nodeListener,
      TargetNodeFactory targetNodeFactory) {
    return new DefaultParserTargetNodeFactory(
        marshaller,
        Optional.of(buildFileTrees),
        nodeListener,
        targetNodeFactory);
  }

  public static ParserTargetNodeFactory<TargetNode<?, ?>> createForDistributedBuild(
      ConstructorArgMarshaller marshaller,
      TargetNodeFactory targetNodeFactory) {
    return new DefaultParserTargetNodeFactory(
        marshaller,
        Optional.empty(),
        (buildFile, node) -> {
          // No-op.
        },
        targetNodeFactory);
  }

  @Override
  public TargetNode<?, ?> createTargetNode(
      Cell cell,
      Path buildFile,
      BuildTarget target,
      Map<String, Object> rawNode,
      Function<PerfEventId, SimplePerfEvent.Scope> perfEventScope) {
    BuildRuleType buildRuleType = parseBuildRuleTypeFromRawRule(cell, rawNode);

    // Because of the way that the parser works, we know this can never return null.
    Description<?> description = cell.getDescription(buildRuleType);

    UnflavoredBuildTarget unflavoredBuildTarget = target.withoutCell().getUnflavoredBuildTarget();
    if (target.isFlavored()) {
      if (description instanceof Flavored) {
        if (!((Flavored) description).hasFlavors(
            ImmutableSet.copyOf(target.getFlavors()))) {
          throw UnexpectedFlavorException.createWithSuggestions(cell, target);
        }
      } else {
        LOG.warn(
            "Target %s (type %s) must implement the Flavored interface " +
                "before we can check if it supports flavors: %s",
            unflavoredBuildTarget,
            buildRuleType,
            target.getFlavors());
        throw new HumanReadableException(
            "Target %s (type %s) does not currently support flavors (tried %s)",
            unflavoredBuildTarget,
            buildRuleType,
            target.getFlavors());
      }
    }

    UnflavoredBuildTarget unflavoredBuildTargetFromRawData =
        RawNodeParsePipeline.parseBuildTargetFromRawRule(
            cell.getRoot(),
            rawNode,
            buildFile);
    if (!unflavoredBuildTarget.equals(unflavoredBuildTargetFromRawData)) {
      throw new IllegalStateException(
          String.format(
              "Inconsistent internal state, target from data: %s, expected: %s, raw data: %s",
              unflavoredBuildTargetFromRawData,
              unflavoredBuildTarget,
              Joiner.on(',').withKeyValueSeparator("->").join(rawNode)));
    }

    Cell targetCell = cell.getCell(target);
    Object constructorArg = description.createUnpopulatedConstructorArg();
    try {
      ImmutableSet.Builder<BuildTarget> declaredDeps = ImmutableSet.builder();
      ImmutableSet.Builder<VisibilityPattern> visibilityPatterns =
          ImmutableSet.builder();
      try (SimplePerfEvent.Scope scope =
               perfEventScope.apply(PerfEventId.of("MarshalledConstructorArg"))) {
        marshaller.populate(
            targetCell.getCellPathResolver(),
            targetCell.getFilesystem(),
            target,
            constructorArg,
            declaredDeps,
            visibilityPatterns,
            rawNode);
      }
      try (SimplePerfEvent.Scope scope =
               perfEventScope.apply(PerfEventId.of("CreatedTargetNode"))) {
        Hasher hasher = Hashing.sha1().newHasher();
        hasher.putString(BuckVersion.getVersion(), UTF_8);
        JsonObjectHashing.hashJsonObject(hasher, rawNode);
        TargetNode<?, ?> node = targetNodeFactory.createFromObject(
            hasher.hash(),
            description,
            constructorArg,
            targetCell.getFilesystem(),
            target,
            declaredDeps.build(),
            visibilityPatterns.build(),
            targetCell.getCellPathResolver());
        if (buildFileTrees.isPresent() && cell.isEnforcingBuckPackageBoundaries()) {
          enforceBuckPackageBoundaries(
              target,
              buildFileTrees.get().getUnchecked(targetCell),
              node.getInputs());
        }
        nodeListener.onCreate(buildFile, node);
        return node;
      }
    } catch (NoSuchBuildTargetException e) {
      throw new HumanReadableException(e);
    } catch (ParamInfoException e) {
      throw new HumanReadableException("%s: %s", target, e.getMessage());
    } catch (IOException e) {
      throw new HumanReadableException(e.getMessage(), e);
    }
  }

  protected void enforceBuckPackageBoundaries(
      BuildTarget target,
      BuildFileTree buildFileTree,
      ImmutableSet<Path> paths) {
    Path basePath = target.getBasePath();

    for (Path path : paths) {
      if (!basePath.toString().isEmpty() && !path.startsWith(basePath)) {
        throw new HumanReadableException(
            "'%s' in '%s' refers to a parent directory.",
            basePath.relativize(path),
            target);
      }

      Optional<Path> ancestor = buildFileTree.getBasePathOfAncestorTarget(path);
      // It should not be possible for us to ever get an Optional.empty() for this because that
      // would require one of two conditions:
      // 1) The source path references parent directories, which we check for above.
      // 2) You don't have a build file above this file, which is impossible if it is referenced in
      //    a build file *unless* you happen to be referencing something that is ignored.
      if (!ancestor.isPresent()) {
        throw new HumanReadableException(
            "'%s' in '%s' crosses a buck package boundary.  This is probably caused by " +
                "specifying one of the folders in '%s' in your .buckconfig under `project.ignore`.",
            path,
            target,
            path);
      }
      if (!ancestor.get().equals(basePath)) {
        throw new HumanReadableException(
            "'%s' in '%s' crosses a buck package boundary.  This file is owned by '%s'.  Find " +
                "the owning rule that references '%s', and use a reference to that rule instead " +
                "of referencing the desired file directly.",
            path,
            target,
            ancestor.get(),
            path);
      }
    }
  }

  private static BuildRuleType parseBuildRuleTypeFromRawRule(
      Cell cell,
      Map<String, Object> map) {
    String type = (String) Preconditions.checkNotNull(
        map.get(BuckPyFunction.TYPE_PROPERTY_NAME));
    return cell.getBuildRuleType(type);
  }

}


text:
//------------------------------------------------------------------------------
// <copyright file="PropertyIDSet.cs" company="Microsoft">
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
// <owner current="true" primary="true">[....]</owner>
// <owner current="true" primary="false">[....]</owner>
//------------------------------------------------------------------------------

using System;
using System.Data;
using System.Data.Common;
using System.Data.ProviderBase;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;

namespace System.Data.OleDb {

    internal sealed class PropertyIDSet : DbBuffer {

        static private readonly int PropertyIDSetAndValueSize = ODB.SizeOf_tagDBPROPIDSET + ADP.PtrSize; // sizeof(tagDBPROPIDSET) + sizeof(int)
        static private readonly int PropertyIDSetSize = ODB.SizeOf_tagDBPROPIDSET;

        private int _count;

        // the PropertyID is stored at the end of the tagDBPROPIDSET structure
        // this way only a single memory allocation is required instead of two
        internal PropertyIDSet(Guid propertySet, int propertyID) : base(PropertyIDSetAndValueSize) {
            _count = 1;

            // rgPropertyIDs references where that PropertyID is stored
            // depending on IntPtr.Size, tagDBPROPIDSET is either 24 or 28 bytes long
            IntPtr ptr = ADP.IntPtrOffset(base.handle, PropertyIDSetSize);
            Marshal.WriteIntPtr(base.handle, 0, ptr);

            Marshal.WriteInt32(base.handle, ADP.PtrSize, /*propertyid count*/1);

            ptr = ADP.IntPtrOffset(base.handle, ODB.OffsetOf_tagDBPROPIDSET_PropertySet);
            Marshal.StructureToPtr(propertySet, ptr, false/*deleteold*/);

            // write the propertyID at the same offset
            Marshal.WriteInt32(base.handle, PropertyIDSetSize, propertyID);
        }

        // no propertyIDs, just the propertyset guids
        internal PropertyIDSet(Guid[] propertySets) : base(PropertyIDSetSize * propertySets.Length) {
            _count = propertySets.Length;
            for(int i = 0; i < propertySets.Length; ++i) {
                IntPtr ptr = ADP.IntPtrOffset(base.handle, (i * PropertyIDSetSize) + ODB.OffsetOf_tagDBPROPIDSET_PropertySet);
                Marshal.StructureToPtr(propertySets[i], ptr, false/*deleteold*/);
            }
        }

        internal int Count {
            get {
                return _count;
            }
        }
    }
}


text:
title:  Inside Story
date:   20/09/2019
---

#### U.S. Biker Embraces Sabbath

_By ANDREW MCCHESNEY, Adventist Mission_

The invitation startled Richard Smith as he stopped at a senior center to collect meals to deliver on his Harley-Davidson motorcycle to retirees in the U.S. state of West Virginia.

"Would you like to go to the Seventh-day Adventist church with me?" asked Ruth, who also worked at the senior center.

"I don't know," Richard said. "I don't know anything about the Adventist Church."

Richard, 72, had visited various Sunday churches during two marriages and two jobs. But he had never been baptized. He didn't know which church to join, and he often thought, If God wakes me up one day and says go to a different church, I want to be able to pack up and move.

So, when Ruth invited him to church, he replied, "Let's try my churches first."

He asked Ruth, a divorced nurse six years his junior, for her opinion after visiting a church together on Sunday.

"If I just wanted breakfast, it was good," Ruth said about the church's doughnuts and fruit juice.

In reply to his query after the second church, Ruth noted that the pastor had spent much more time on the announcements than the sermon.

Ruth's observations gave Richard a new perspective, and he finally agreed to go with her to an Adventist church. Soon he began to ply its pastor, Bill Hunt, with questions about the Bible, and the answers amazed him.

"It was like I had this veil over my head," Richard said. "I could see through it, but everything was kind of hazy. Bill yanked that veil off my head, and I said, 'Wow, things are as clear as a bell!' "

Richard also shared a common interest with the pastor; they both are bikers.

Then the pastor invited Richard to attend an evangelistic series—one of 35 evangelistic series in West Virginia that were funded by a 2015 Thirteenth Sabbath Offering. Richard attended with Ruth and was baptized. In all, eight people were baptized after the 2016 meetings at the Huntington church.

Today, Richard, pictured left, is 72 and sharing his love for Jesus with anyone who will listen.

"The Lord takes such good care of me, and I think, Why?" he said. "I know He takes care of everybody, but why? It's like I am sitting down at the table, looking at my plate, and everything on it I like to eat. What more can I ask for?"


text:
require 'spec_helper'
require 'vk/api/account/onoff_options'

RSpec.describe Vk::API::Account::OnoffOptions do
  subject { described_class }
  it { is_expected.to respond_to :[] }
end


text:
package com.unipad.brain.number;

import android.view.View;

import com.unipad.brain.AbsBaseGameService;
import com.unipad.brain.R;
import com.unipad.brain.number.view.NumberMemoryLayout;
import com.unipad.common.AbsMatchActivity;
import com.unipad.common.CommonActivity;
import com.unipad.common.Constant;
import com.unipad.utils.SharepreferenceUtils;

/**
 * Created by gongkan on 2016/7/4.
 */
public class BinaryRightFragment extends NumberRightFragment{

    @Override
    public boolean isNeedShowCurrent() {
        return true;
    }

    @Override
    public String getCompeteItem() {
        return Constant.getProjectName(((AbsMatchActivity) getActivity()).getProjectId());
    }

    @Override
    public void initAnswerView() {
        View.inflate(getActivity(), R.layout.binary_v_bottom, mLayoutBottom);
        mLayoutBottom.findViewById(R.id.ibtn_binary_0).setOnClickListener(this);
        mLayoutBottom.findViewById(R.id.ibtn_binary_1).setOnClickListener(this);
        mLayoutBottom.findViewById(R.id.btn_delete).setOnClickListener(this);
        mLayoutBottom.findViewById(R.id.btn_go_top).setOnClickListener(this);
    }

    @Override
    public void initMemoryView() {
        frameLayout.removeAllViews();
        frameLayout.addView(new NumberMemoryLayout(getActivity(), service.lineNumbers, SharepreferenceUtils.getInt(mActivity.getProjectId() + "_linemode", 0)));
    }

    @Override
    public void rememoryTimeToEnd(int answerTime) {
        super.rememoryTimeToEnd(answerTime);
        if (isMatchMode()) {
            getAnswer();
        }else{
            showAnswer();
        }
    }
    @Override
    public void updateView(int pre, int next) {
        super.updateView(pre, next);
        if (service.state == AbsBaseGameService.GO_IN_MATCH_START_MEMORY){
            NumberMemoryLayout memoryLayout = (NumberMemoryLayout) frameLayout.getChildAt(0);
            memoryLayout.updateView(pre, next);
        }

    }
}


text:
<?php

namespace Asoc\Dadatata\Model;

interface ThingInterface
{
    public function getKey();

    public function setKey($key);

    public function getMime();

    public function setMime($mime);

    public function getSize();

    public function setSize($size);

    public function setHashes(array $hashes);

    public function getHashes();

    public function setHash($type, $hash);

    public function getHash($type);

    public function addVariant($name, ThingInterface $thing);

    public function removeVariant($name);

    public function getVariant($name);

    public function getVariants();

    public function hasVariant($name);

    public function setFragments($count);

    public function getFragments();
}


text:
FROM ubuntu:16.04
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8842CE5E
RUN echo deb http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu xenial main >/etc/apt/sources.list.d/bitcoin.list
RUN apt-get update
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get install -y git build-essential g++ libboost-all-dev libdb4.8++-dev libqrencode-dev libssl-dev


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

    <!-- TextAppearance -->
    <style name="TextAppearance.MvxMaterial" parent="android:TextAppearance">
        <item name="android:textColor">@color/dark_gray</item>
    </style>

</resources>


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Komunikator: Dokumentacja klasy android.support.v7.appcompat.R.bool</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

Komunikator
    0.3

Jest to aplikacja przeznaczona na urządzenia z systemem operacyjnym Google Android. Dzięki niej użytkownicy będą mogli komunikować się między sobą, tworzyć konwersacje oraz dodawać znajomych.

Statyczne atrybuty publiczne |
Lista wszystkich składowych

Dokumentacja klasy android.support.v7.appcompat.R.bool

Statyczne atrybuty publiczne

static final int 	abc_action_bar_embed_tabs = 0x7f0a0000

static final int 	abc_allow_stacked_button_bar = 0x7f0a0001

static final int 	abc_config_actionMenuItemAllCaps = 0x7f0a0002

static final int 	abc_config_closeDialogWhenTouchOutside = 0x7f0a0003

static final int 	abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f0a0004

Opis szczegółowy

Definicja w linii 252 pliku R.java.

Dokumentacja atrybutów składowych

◆ abc_action_bar_embed_tabs

          final int android.support.v7.appcompat.R.bool.abc_action_bar_embed_tabs = 0x7f0a0000

static

Definicja w linii 253 pliku R.java.

◆ abc_allow_stacked_button_bar

          final int android.support.v7.appcompat.R.bool.abc_allow_stacked_button_bar = 0x7f0a0001

static

Definicja w linii 254 pliku R.java.

◆ abc_config_actionMenuItemAllCaps

          final int android.support.v7.appcompat.R.bool.abc_config_actionMenuItemAllCaps = 0x7f0a0002

static

Definicja w linii 255 pliku R.java.

◆ abc_config_closeDialogWhenTouchOutside

          final int android.support.v7.appcompat.R.bool.abc_config_closeDialogWhenTouchOutside = 0x7f0a0003

static

Definicja w linii 256 pliku R.java.

◆ abc_config_showMenuShortcutsWhenKeyboardPresent

          final int android.support.v7.appcompat.R.bool.abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f0a0004

static

Definicja w linii 257 pliku R.java.

Dokumentacja dla tej klasy została wygenerowana z pliku:

E:/aplikacja_mobilna_komunikator/Komunikator/app/build/generated/source/r/debug/android/support/v7/appcompat/R.java

android

support

v7

appcompat

R

bool

Wygenerowano przez

     1.8.13


text:
package org.jbpm.console.ng.documents.backend.server.marshalling;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.Date;
import java.util.HashMap;

import org.apache.commons.io.IOUtils;
import org.drools.core.common.DroolsObjectInputStream;
import org.jbpm.console.ng.dm.model.DocumentSummary;
import org.jbpm.console.ng.documents.backend.server.DocumentService;
import org.jbpm.console.ng.documents.backend.server.DocumentServiceCMISImpl;
import org.jbpm.document.Document;
import org.kie.api.marshalling.ObjectMarshallingStrategy;

public class CMISDocumentMarshallingStrategy implements
		ObjectMarshallingStrategy {

//	@Inject TODO cannot do injection, it just does not fill it.
	private DocumentService documentService;

	public CMISDocumentMarshallingStrategy() {
		documentService = new DocumentServiceCMISImpl();
		documentService.init();
	}
	@Override
	public boolean accept(Object o) {
		return o instanceof Document;
	}

	@Override
	public void write(ObjectOutputStream os, Object object) throws IOException {
		Document document = (Document) object;
		documentService.createDocument(new DocumentSummary(document.getName(), "", "/"));
	}

	@Override
	public Object read(ObjectInputStream os) throws IOException,
			ClassNotFoundException {
        String objectId = os.readUTF();
        String canonicalName = os.readUTF();
        String link = os.readUTF();
        try {
        	DocumentSummary doc = (DocumentSummary)this.documentService.getDocument(objectId);
            Document document = (Document) Class.forName(canonicalName).newInstance();
            document.setIdentifier(objectId);
            document.setLink(link);
            document.setName(doc.getName());
            document.setSize(10);
            document.setLastModified(new Date());
            document.setAttributes(new HashMap<String, String>());
            document.setContent(doc.getContent());
            return document;
        } catch(Exception e) {
            throw new RuntimeException("Cannot read document", e);
        }
	}

	@Override
	public byte[] marshal(Context context, ObjectOutputStream os, Object object)
			throws IOException {
		String path = "/";
		Document document = (Document) object;
		DocumentSummary summary = new DocumentSummary(document.getName(), "", path);
		summary.setContent(document.getContent());
		documentService.createDocument(summary);
		ByteArrayOutputStream buff = new ByteArrayOutputStream();
		ObjectOutputStream oos = new ObjectOutputStream(buff);
		oos.writeUTF(summary.getId());
		oos.writeUTF(document.getClass().getCanonicalName());
		String link = "http://localhost:8080/magnoliaAuthor/dms" + path + document.getName();
		oos.writeUTF(link);
		oos.close();
		return buff.toByteArray();
	}

	@Override
	public Object unmarshal(Context context,
			ObjectInputStream objectInputStream, byte[] object,
			ClassLoader classLoader) throws IOException, ClassNotFoundException {

		DroolsObjectInputStream is = new DroolsObjectInputStream(
				new ByteArrayInputStream(object), classLoader);
		// first we read out the object id and class name we stored during
		// marshaling
		String objectId = is.readUTF();
		String canonicalName = is.readUTF();
		String link = is.readUTF();
		Document document = null;
		try {
			document = (Document) Class.forName(canonicalName).newInstance();
			DocumentSummary storedDoc = (DocumentSummary)this.documentService.getDocument(objectId);
			document.setIdentifier(storedDoc.getId());
			document.setName(storedDoc.getName());
			document.setLink(link);
			document.setLastModified(new Date());
			document.setSize(10);
			document.setAttributes(new HashMap<String, String>());
			InputStream stream = this.documentService.getDocumentContent(objectId);
			byte[] content = IOUtils.toByteArray(stream);
			document.setContent(content);
		} catch (Exception e) {
			throw new RuntimeException(
					"Cannot read document from storage service", e);
		}
		return document;
	}

	@Override
	public Context createContext() {
		// TODO Auto-generated method stub
		return null;
	}

}


text:
<?php

namespace Silly\Test\Mock;

use Psr\Container\ContainerInterface;

class ArrayContainer implements ContainerInterface
{
    private $entries = [];

    public function __construct(array $entries = [])
    {
        $this->entries = $entries;
    }

    public function get($id)
    {
        return $this->entries[$id];
    }

    public function has($id): bool
    {
        return isset($this->entries[$id]);
    }
}


text:
using System.Text.Json;
using Azure.Core;

namespace Azure.AI.TextAnalytics.Legacy
{
    internal partial class EntityLinkingTaskResult
    {
        internal static EntityLinkingTaskResult DeserializeEntityLinkingTaskResult(JsonElement element)
        {
            Optional<EntityLinkingResult> results = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("results"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    results = EntityLinkingResult.DeserializeEntityLinkingResult(property.Value);
                    continue;
                }
            }
            return new EntityLinkingTaskResult(results.Value);
        }
    }
}


text:
/*
 * slotted-multi-test-app.c
 *
 *  Created on: Feb 16, 2015
 *      Author: olaf
 */

#include "contiki.h"
#include <stdio.h> /* For printf() */
#include "net/netstack.h"

#include "chaos-control.h"
#include "slotted-multi-test.h"

PROCESS(chaos_slotted_multi_test_app_process, "Chaos Slotted Multi Test App Process");
AUTOSTART_PROCESSES(&chaos_slotted_multi_test_app_process);

static void round_begin(const uint16_t round_count, const uint8_t id);

CHAOS_APP(slotted_multi_test, SLOTTED_MULTI_TEST_SLOT_LEN, SLOTTED_MULTI_TEST_ROUND_MAX_SLOTS, 1, slotted_multi_test_is_pending, round_begin);
CHAOS_APPS(&slotted_multi_test);

static void round_begin(const uint16_t round_count, const uint8_t id){
  slotted_multi_test_round_begin(round_count, id);
  process_poll(&chaos_slotted_multi_test_app_process);
}

PROCESS_THREAD(chaos_slotted_multi_test_app_process, ev, data)
{
	PROCESS_BEGIN();
	printf("Chaos Slotted Multi Test App Process started\n");

	NETSTACK_MAC.on();

	while( 1 ){
		PROCESS_YIELD();
		printf("Chaos round complete!\n");
	}
	PROCESS_END();
}


text:
<?php

defined('_JEXEC') or die;
?>
<div class="logout<?php echo $this->pageclass_sfx?>">
	<?php if ($this->params->get('show_page_heading')) : ?>

		<?php echo $this->escape($this->params->get('page_heading')); ?>

	<?php endif; ?>

	<?php if (($this->params->get('logoutdescription_show') == 1 && str_replace(' ', '', $this->params->get('logout_description')) != '')|| $this->params->get('logout_image') != '') : ?>

	<?php endif ; ?>

		<?php if ($this->params->get('logoutdescription_show') == 1) : ?>
			<?php echo $this->params->get('logout_description'); ?>
		<?php endif; ?>

		<?php if (($this->params->get('logout_image')!='')) :?>
			<img src="<?php echo $this->escape($this->params->get('logout_image')); ?>" class="logout-image" alt="<?php echo JTEXT::_('COM_USER_LOGOUT_IMAGE_ALT')?>"/>
		<?php endif; ?>

	<?php if (($this->params->get('logoutdescription_show') == 1 && str_replace(' ', '', $this->params->get('logout_description')) != '')|| $this->params->get('logout_image') != '') : ?>

	<?php endif ; ?>

	<form action="<?php echo JRoute::_('index.php?option=com_users&task=user.logout'); ?>" method="post">

			<button type="submit" class="button"><?php echo JText::_('JLOGOUT'); ?></button>
			<input type="hidden" name="return" value="<?php echo base64_encode($this->params->get('logout_redirect_url', $this->form->getValue('return'))); ?>" />
			<?php echo JHtml::_('form.token'); ?>

	</form>


text:
class BelanjaController {
  constructor() {
  }
}

export default BelanjaController;


text:
function [pos, force] = rigid_movable(K_robot, K_rm, Mass_rm, mu_static_rigid, mu_dynamic_rigid)

%% World Parameters
Robot_Home_Position = 0.00; % Robot's initial position
Robot_Current_Position = 0.60; % Object Surface at its initial position
time = 0.00:0.01:1.2; % 1200 ms time-window

%% Robot and Environment Parameters

g = 9.81; % Acceleration due to gravity

eqbm_point_1 = 0.50; % First Desired JEP (1-DOF)
eqbm_point_2 = 0.75; % Second Desired JEP (1-DOF)
eqbm_point_3 = 0.90; % Third Desired JEP (1-DOF)

%% Distance Function

% Equilibrium point transitions : Distance between every desired JEP being
% sampled into uniformly spaced 100 intermediate equilibrium points:

dist_eqbm_pt2 = Robot_Current_Position:0.01:eqbm_point_2;
dist_eqbm_pt3 = eqbm_point_2+0.01:0.01:eqbm_point_3;
dist = [dist_eqbm_pt2';dist_eqbm_pt3'];

%% Rigid-Movable Category

% Input: Robot Stiffness, Object Stiffness, Object Mass, Static Friction Coefficient, Kinetic Friction Coefficient
% Output: applied_force, sensed_force, robot_current_position

% Concept: Two steps:

% First Step:

%(When the applied force is less than the force required to overcome the static friction, which means the robot is still at rest).
% The robot pushes the object with applied force proportional to the robot stiffness.
% This gives rise to deformation in the object according to its stiffness.
% The robot's current position gets updated to the deformed surface.
% The sensed force is the resistance offered by the object to this
% deformation which is proportional to the object stiffness. Note, if at
% any instant, the deformation is larger than the corresponding next
% intermediate equilibrium point, the robot can go only to the next
% equilibrium point and so the object deformation is given by that value.
% (Equivalent to the fact that if the deformation is larger compared to next jump in the eqbm. point,
% the object comes back to the next intermediate eqbm. point due
% to its elasticity.

% Second Step:

%(When the applied force overcomes the force due to static friction, and
%the object starts sliding)
% The robot pushes the object with applied force proportional to the robot stiffness.
% The friction force (proportional to the kinetic friction) opposes the applied force.
% The net force when divided by the mass of the object gives the acceleration of the object.
% This inturn gives velocity and position of the object when integrated.
% This position is the new position of the object. If this position is larger than the next
% intermediate equilibrum point of the robot, the robot loses contact with
% the object. For this simulation, we have considered the case when the
% above situation does not happen. This is equivalent to the situation that
% the robot is always in contact with the object and that is possible when
% the maximum distance the object can travel in one-time step is given by
% the distance to the next equilibrium point. This assumption should be
% fine considering the day-to-day object surface friction coefficients eg.
% wood, concrete, glass, etc. The robot's current position gets updated to the new position of the object.
% The sensed force is the resistance offered by the object to this
% applied force and is given by a force which is proportional to the object stiffness
% (when the object is statitionary) or the kinetic frictional force (when the object is in motion).

stat_force = Mass_rm*g*mu_static_rigid;
Robot_Current_Position = 0.60; % Object Surface
index = 1;
for i = 1:length(dist)
    if index == 1
        applied_force_rm(i) = K_robot*(dist(i) - Robot_Current_Position);
        deform_rm(i) = applied_force_rm(i)/(K_rm);
        if i == 1
            if (Robot_Current_Position + deform_rm(i)) <= dist(i)
                Robot_Current_Position = Robot_Current_Position + deform_rm(i);
            else
                Robot_Current_Position = Robot_Current_Position + (dist(i) - Robot_Current_Position);
            end
        else
            if (Robot_Current_Position + deform_rm(i)) <= dist(i)
                Robot_Current_Position = Robot_Current_Position + deform_rm(i) - deform_rm(i-1);
            else
                Robot_Current_Position = Robot_Current_Position + (dist(i) - dist(i-1));
            end
        end
        sensed_force_rm(i) =  K_rm*(Robot_Current_Position - 0.60);
    else
        applied_force_rm(i) = K_robot*(dist(i) - Robot_Current_Position);
    end

    if (applied_force_rm(i) <= stat_force) && (index == 1)
        sensed_force_rm(i) = sensed_force_rm(i);
        acc_rm(i) = 0;
        vel_rm(i) = 0;
        pos_rm(i) = 0;
        Robot_Current_Position = Robot_Current_Position;
    else
        net_force_rm = applied_force_rm(i) - Mass_rm*g*mu_dynamic_rigid;
        sensed_force_rm(i) = Mass_rm*g*mu_dynamic_rigid;
        if net_force_rm < 0
            net_force_rm = 0;
            acc_rm(i) = 0;
            vel_rm(i) = 0;
            pos_rm(i) = 0;
            Robot_Current_Position = Robot_Current_Position;
        else
            acc_rm(i) = net_force_rm/Mass_rm;
            vel_rm(i) = vel_rm(i-1)+acc_rm(i)*0.01;
            pos_rm(i) = pos_rm(i-1)+vel_rm(i)*0.01;
            if (Robot_Current_Position + pos_rm(i) - pos_rm(i-1)) <= dist(i)
                Robot_Current_Position = Robot_Current_Position + pos_rm(i) - pos_rm(i-1);
            else
                Robot_Current_Position = Robot_Current_Position + dist(i) - dist(i-1);
            end
        end
        index = index+1;
    end
    robot_pos_rm(i) = Robot_Current_Position;
end
Robot_Current_Position;
for i = length(dist)+1:length(time)
    sensed_force_rm(i) = sensed_force_rm(i-1);
    pos_rm(i) = pos_rm(i-1);
    robot_pos_rm(i) = Robot_Current_Position;
end

force = sensed_force_rm;
pos = robot_pos_rm;

end


text:
var interface_able_polecat___command___chain_interface =
[
    [ "getBottomCommandTarget", "interface_able_polecat___command___chain_interface.html#af7a918af43e7bf03f9b815c0d9cb4ff4", null ],
    [ "getTopCommandTarget", "interface_able_polecat___command___chain_interface.html#ae62d6679a43700f22fda4d1613a3c2ce", null ],
    [ "setCommandLink", "interface_able_polecat___command___chain_interface.html#acb3b9b68b805ffd1619966a5ed7c0a39", null ]
];


text:
using Mvc.Stream.Tests.Mocks;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Masuit.Tools.Test.Mvc.Mocks
{
    public class MockHttpFilesCollection : HttpFileCollectionBase
    {
        private readonly Dictionary<string, MockHttpPostedFileBase> _files
            = new Dictionary<string, MockHttpPostedFileBase>();

        public MockHttpFilesCollection(MockHttpPostedFileBase file)
        {
            if (file != null)
            {
                _files.Add(file.FileName, file);
            }
        }

        public override int Count => _files.Count;

        public override HttpPostedFileBase this[int index] => _files.Skip(index).Take(1).FirstOrDefault().Value;

        public override HttpPostedFileBase this[string name] => _files[name];

        public override string[] AllKeys
        {
            get
            {
                return _files.Select(x => x.Key).ToArray();
            }
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>BtSearch</artifactId>
        <groupId>com.erola</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>BtSearch.Spider</artifactId>

    <dependencies>
        <dependency>
            <artifactId>BtSearch.Util</artifactId>
            <groupId>com.erola</groupId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <artifactId>BtSearch.Model</artifactId>
            <groupId>com.erola</groupId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <artifactId>BtSearch.Service</artifactId>
            <groupId>com.erola</groupId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ardverk</groupId>
            <artifactId>bee-encode</artifactId>
            <version>0.2</version>
            <type>jar</type>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/bee-encode-0.2.jar</systemPath>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <targetPath>${project.build.directory}</targetPath>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>${project.basedir}/../SpiderConfig</directory>
                <targetPath>${project.build.directory}</targetPath>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <!-- 打包发布源码 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <attach>true</attach>
                    <outputDirectory>
                        ${project.build.directory}
                    </outputDirectory>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- 生成可执行JAR包 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                            <mainClass>com.erola.btsearch.spider.Spider</mainClass>
                        </manifest>
                        <manifestEntries>
                            <Class-Path>./</Class-Path>
                        </manifestEntries>
                    </archive>
                    <outputDirectory>
                        ${project.build.directory}
                    </outputDirectory>
                </configuration>
            </plugin>
            <!-- 拷贝依赖的JAR包到lib目录 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>
                                ${project.build.directory}/lib
                            </outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>


text:
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Collections.Generic;

namespace System.Threading.Tasks.Channels
{
    public static partial class Channel
    {
        /// Provides a channel around an enumerable.
        private sealed class EnumerableChannel<T> : IReadableChannel<T>
        {
            /// A task completed when the channel is done.
            private readonly TaskCompletionSource<VoidResult> _completion = new TaskCompletionSource<VoidResult>(TaskCreationOptions.RunContinuationsAsynchronously);
            /// The wrapped enumerator.
            private readonly IEnumerator<T> _source;
            /// true if the next item to yield is _source.Current; false if _source.MoveNext() needs to be invoked.
            private bool _currentIsNext;

            /// The object used to synchronize access to state in the channel.
            private object SyncObj => _completion;

            /// Initializes the channel, getting an enumerator from the enumerable.
            internal EnumerableChannel(IEnumerable<T> source)
            {
                _source = source.GetEnumerator();
            }

            public Task Completion => _completion.Task;

            public ValueTask<T> ReadAsync(CancellationToken cancellationToken)
            {
                // Fast-path cancellation check
                if (cancellationToken.IsCancellationRequested)
                    return Task.FromCanceled<T>(cancellationToken);

                lock (SyncObj)
                {
                    // If we're not yet completed, ensure that _source.Current is the next item
                    // to yield, and yield it.
                    if (!_completion.Task.IsCompleted && (_currentIsNext || MoveNext()))
                    {
                        _currentIsNext = false;
                        return _source.Current;
                    }
                }

                // No more data is available.  Fail.
                return Task.FromException<T>(CreateInvalidCompletionException());
            }

            public bool TryRead(out T item)
            {
                lock (SyncObj)
                {
                    // If we're not yet completed, ensure that _source.Current is the next item
                    // to yield, and yield it.
                    if (!_completion.Task.IsCompleted && (_currentIsNext || MoveNext()))
                    {
                        _currentIsNext = false;
                        item = _source.Current;
                        return true;
                    }
                }

                // No more data is available.
                item = default(T);
                return false;
            }

            public Task<bool> WaitToReadAsync(CancellationToken cancellationToken)
            {
                // Fast-path cancellation check
                if (cancellationToken.IsCancellationRequested)
                    return Task.FromCanceled<bool>(cancellationToken);

                lock (SyncObj)
                {
                    // If we've already pushed the enumerator ahead in a previous call and _source.Current
                    // is the next value to yield, data is available.
                    if (_currentIsNext)
                        return s_trueTask;

                    // If we're already completed, no more data is available.
                    if (_completion.Task.IsCompleted)
                        return s_falseTask;

                    // Otherwise, move next.
                    return MoveNext() ? s_trueTask : s_falseTask;
                }
            }

            private bool MoveNext()
            {
                // Move next on the enumerator.
                if (_source.MoveNext())
                {
                    _currentIsNext = true;
                    return true;
                }

                // There's no more data available.  Complete the channel.
                _source.Dispose();
                _completion.TrySetResult(default(VoidResult));
                return false;
            }
        }
    }
}


text:
package com.rusticisoftware.tincan;

import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.rusticisoftware.tincan.exceptions.IncompatibleTCAPIVersion;
import com.rusticisoftware.tincan.json.JSONBase;
import com.rusticisoftware.tincan.json.Mapper;

/**
 * ContextActivities Model class
 */
public class ContextActivities extends JSONBase {
    private List<Activity> parent;
    private List<Activity> grouping;
    private List<Activity> other;
    private List<Activity> category;

	public ContextActivities() {
	}

    public ContextActivities(JsonNode jsonNode) throws URISyntaxException {
        this();

        JsonNode parentNode = jsonNode.path("parent");
        if (! parentNode.isMissingNode()) {
            this.parent = new ArrayList<Activity>();

            if (parentNode.isArray()) {
                for (JsonNode element : parentNode) {
                    this.parent.add(new Activity(element));
                }
            }
            else {
                this.parent.add(new Activity(parentNode));
            }
        }

        JsonNode groupingNode = jsonNode.path("grouping");
        if (! groupingNode.isMissingNode()) {
            this.grouping = new ArrayList<Activity>();

            if (groupingNode.isArray()) {
                for (JsonNode element : groupingNode) {
                    this.grouping.add(new Activity(element));
                }
            }
            else {
                this.grouping.add(new Activity(groupingNode));
            }
        }

        JsonNode otherNode = jsonNode.path("other");
        if (! otherNode.isMissingNode()) {
            this.other = new ArrayList<Activity>();

            if (otherNode.isArray()) {
                for (JsonNode element : otherNode) {
                    this.other.add(new Activity(element));
                }
            }
            else {
                this.other.add(new Activity(otherNode));
            }
        }

        JsonNode categoryNode = jsonNode.path("category");
        if (! categoryNode.isMissingNode()) {
            this.category = new ArrayList<Activity>();

            if (categoryNode.isArray()) {
                for (JsonNode element : categoryNode) {
                    this.category.add(new Activity(element));
                }
            }
            else {
                this.category.add(new Activity(categoryNode));
            }
        }
    }

    @Override
    public ObjectNode toJSONNode(TCAPIVersion version) {
        ObjectMapper mapper = Mapper.getInstance();
        ObjectNode node = mapper.createObjectNode();

        if (this.getParent() != null && this.getParent().size() > 0) {
            if (version.equals(TCAPIVersion.V095) && this.getParent().size() > 1) {
                throw new IncompatibleTCAPIVersion("Version " + TCAPIVersion.V095.toString() + " doesn't support lists of activities (parent)");
            }

            if (version.equals(TCAPIVersion.V095)) {
                node.put("parent", this.getParent().get(0).toJSONNode(version));
            }
            else {
                ArrayNode parent = mapper.createArrayNode();
                node.put("parent", parent);

                for (Activity element : this.getParent()) {
                    parent.add(element.toJSONNode(version));
                }
            }
        }
        if (this.getGrouping() != null && this.getGrouping().size() > 0) {
            if (version.equals(TCAPIVersion.V095) && this.getGrouping().size() > 1) {
                throw new IncompatibleTCAPIVersion("Version " + TCAPIVersion.V095.toString() + " doesn't support lists of activities (grouping)");
            }

            if (version.equals(TCAPIVersion.V095)) {
                node.put("grouping", this.getGrouping().get(0).toJSONNode(version));
            }
            else {
                ArrayNode grouping = mapper.createArrayNode();
                node.put("grouping", grouping);

                for (Activity element : this.getGrouping()) {
                    grouping.add(element.toJSONNode(version));
                }
            }
        }
        if (this.getOther() != null && this.getOther().size() > 0) {
            if (version.equals(TCAPIVersion.V095) && this.getOther().size() > 1) {
                throw new IncompatibleTCAPIVersion("Version " + TCAPIVersion.V095.toString() + " doesn't support lists of activities (other)");
            }

            if (version.equals(TCAPIVersion.V095)) {
                node.put("other", this.getGrouping().get(0).toJSONNode(version));
            }
            else {
                ArrayNode other = mapper.createArrayNode();
                node.put("other", other);

                for (Activity element : this.getOther()) {
                    other.add(element.toJSONNode(version));
                }
            }
        }
        if (this.getCategory() != null && this.getCategory().size() > 0) {
            if (version.ordinal() <= TCAPIVersion.V100.ordinal()) {
                ArrayNode category = mapper.createArrayNode();
                node.put("category", category);

                for (Activity element : this.getCategory()) {
                    category.add(element.toJSONNode(version));
                }
            } else {
                throw new IncompatibleTCAPIVersion("Version " + version.toString() + " doesn't support the category context activity");
            }
        }

        return node;
    }

	public List<Activity> getParent() {
		return parent;
	}

	public void setParent(List<Activity> parent) {
		this.parent = parent;
	}

	public List<Activity> getGrouping() {
		return grouping;
	}

	public void setGrouping(List<Activity> grouping) {
		this.grouping = grouping;
	}

	public List<Activity> getOther() {
		return other;
	}

	public void setOther(List<Activity> other) {
		this.other = other;
	}

	public List<Activity> getCategory() {
		return category;
	}

	public void setCategory(List<Activity> category) {
		this.category = category;
	}
}


text:
from django.views.generic import TemplateView

class RobotsView(TemplateView):
    template_name = "robots.txt"

    def render_to_response(self, context, **kwargs):
        return super(RobotsView, self).render_to_response(context, content_type='text/plain', **kwargs)


text:
def your_sort
end


text:
package com.cloudhopper.smpp;

import com.cloudhopper.smpp.pdu.Pdu;

/**
 * Low-level PDU traffic listener.
 * Could be used for PDU filtering.
 * Use with caution.
 *
 * @author t3hk0d3
 */
public interface SmppSessionListener extends SmppSessionHandler {

    /**
     * Called when ANY PDU received from connection.
     * This method could be used to sniff all incoming SMPP packet traffic,
     * and also permit/deny it from futher processing.
     * Could be used for advanced packet logging, counters and filtering.
     * @param pdu
     * @return boolean allow PDU processing. If false PDU would be discarded.
     */
    public boolean firePduReceived(Pdu pdu);

    /**
     * Called when ANY PDU received from connection.
     * This method could be used to sniff all outgoing SMPP packet traffic,
     * and also permit/deny it from sending.
     * Could be used for advanced packet logging, counters and filtering.
     * @param pdu
     * @return boolean allow PDU sending. If false PDU would be discarded.
     */
    public boolean firePduDispatch(Pdu pdu);

}


text:
/* ###
 * IP: GHIDRA
 * REVIEWED: YES
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package ghidra.framework.model;

/**
 * Interface to define a set of Tools. NOTE: ToolSets are currently not
 * implemented.
 */
public interface ToolSet {

    /**
     * Get the name for the toolset.
     */
    String getName();

    /**
     * Set the name on the toolset.
     */
    void setName(String name);
    /**
     * Get the description of the toolset.
     */
    String getDescription();

}


text:
using System.Collections.Generic;
using EasyApi.Formatting;
using EasyApi.Metadata;
using EasyApi.Metadata.Attributes.Formatting;
using NUnit.Framework;
using static EasyApi.Tests.TestUtils.ExtraPropertyHelpers;
using static EasyApi.Tests.TestUtils.TestCaseHelpers;

namespace EasyApi.Tests.Metadata.Attributes.Formatting
{
	[TestFixture]
	[TestOf(typeof(ObjectResponseAttribute))]
	[Parallelizable]
	public class ObjectResponseAttributeTests : MetadataAttributeTests<ObjectResponseAttribute>
	{
		protected override ObjectResponseAttribute DefaultAttribute()
		{
			return new ObjectResponseAttribute();
		}

		protected override IExtraPropertyMetadata AttributeMetadataProperty => MetadataProperties.ResponseContentFormatter;

		protected override IEnumerable<TestCaseData> AddPropertiesToTestCases => TestCases(
			TestCase(
				new ObjectResponseAttribute(),
				Is.InstanceOf<ObjectContentFormatter>().And.Property(nameof(ObjectContentFormatter.MediaTypeFormatterSelector)).Matches(Is.InstanceOf<MultipleMediaTypeFormatterSelector>())
			),
			TestCase(new ObjectResponseAttribute(), ExtraProperties(AttributeMetadataProperty.Create(new StringContentFormatter())), Is.InstanceOf<ObjectContentFormatter>())
		);
	}
}


text:
package org.apache.hadoop.yarn.api.protocolrecords;

import java.util.List;

import org.apache.hadoop.classification.InterfaceAudience.Public;
import org.apache.hadoop.classification.InterfaceStability.Stable;
import org.apache.hadoop.yarn.api.ContainerManagementProtocol;
import org.apache.hadoop.yarn.api.records.ContainerLaunchContext;
import org.apache.hadoop.yarn.util.Records;

/**
 *

 * The request which contains a list of {@link StartContainerRequest} sent by
 * the ApplicationMaster to the NodeManager to
 * start containers.
 *

 *
 *

 * In each {@link StartContainerRequest}, the ApplicationMaster has
 * to provide details such as allocated resource capability, security tokens (if
 * enabled), command to be executed to start the container, environment for the
 * process, necessary binaries/jar/shared-objects etc. via the
 * {@link ContainerLaunchContext}.
 *

 *
 * @see ContainerManagementProtocol#startContainers(StartContainersRequest)
 */
@Public
@Stable
public abstract class StartContainersRequest {

  @Public
  @Stable
  public static StartContainersRequest newInstance(
      List<StartContainerRequest> requests) {
    StartContainersRequest request =
        Records.newRecord(StartContainersRequest.class);
    request.setStartContainerRequests(requests);
    return request;
  }

  /**
   * Get a list of {@link StartContainerRequest} to start containers.
   * @return a list of {@link StartContainerRequest} to start containers.
   */
  @Public
  @Stable
  public abstract List<StartContainerRequest> getStartContainerRequests();

  /**
   * Set a list of {@link StartContainerRequest} to start containers.
   * @param request a list of {@link StartContainerRequest} to start containers
   */
  @Public
  @Stable
  public abstract void setStartContainerRequests(
      List<StartContainerRequest> request);
}


text:
<?php

namespace DMS\Filter\Rules;

/**
 * Float Rule
 * Converts content into a Float
 *
 * @package DMS
 * @subpackage Filter
 *
 * @Annotation
 */
class Float extends Rule
{

}


text:
using NUnit.Framework;
using System;
using DevAchievements.Domain.Specifications;

namespace DevAchievements.Domain.UnitTests.Specifications
{
    [TestFixture ()]
    public class DeveloperMustHaveValidUsernameSpecificationTest
    {
        [Test ()]
		public void IsSatisfiedBy_LessThan1Chars_False ()
        {
			var target = new DeveloperMustHaveValidUsernameSpecification ();
			var developer = new Developer () { Username = "" };

			Assert.IsFalse (target.IsSatisfiedBy (developer));
			Assert.AreEqual (target.NotSatisfiedReason, "Username must have at least 1 char.");
        }

		[Test ()]
		public void IsSatisfiedBy_ThereAreInvalidChars_False ()
		{
			var target = new DeveloperMustHaveValidUsernameSpecification ();
			var developer = new Developer () { Username = " " };
			Assert.IsFalse (target.IsSatisfiedBy (developer));
			Assert.AreEqual (target.NotSatisfiedReason, "Username must have only valid chars: letters, numbers and _.");

			developer.Username = "[";
			Assert.IsFalse (target.IsSatisfiedBy (developer));
			Assert.AreEqual (target.NotSatisfiedReason, "Username must have only valid chars: letters, numbers and _.");

			developer.Username = "*";
			Assert.IsFalse (target.IsSatisfiedBy (developer));
			Assert.AreEqual (target.NotSatisfiedReason, "Username must have only valid chars: letters, numbers and _.");
		}

		[Test ()]
		public void IsSatisfiedBy_ThereAreMoreThan30Chars_False ()
		{
			var target = new DeveloperMustHaveValidUsernameSpecification ();
			var developer = new Developer () { Username = "0123456789012345012345678901234" };
			Assert.IsFalse (target.IsSatisfiedBy (developer));
			Assert.AreEqual (target.NotSatisfiedReason, "Username max length is 30 chars.");
		}

		[Test ()]
		public void IsSatisfiedBy_Valid_True ()
		{
			var target = new DeveloperMustHaveValidUsernameSpecification ();
			var developer = new Developer () { Username = "0" };
			Assert.IsTrue (target.IsSatisfiedBy (developer));

			developer.Username = "a";
			Assert.IsTrue (target.IsSatisfiedBy (developer));

			developer.Username = "_";
			Assert.IsTrue (target.IsSatisfiedBy (developer));

			developer.Username = "012345678901234012345678901234";
			Assert.IsTrue (target.IsSatisfiedBy (developer));

			developer.Username = "giacomelli";
			Assert.IsTrue (target.IsSatisfiedBy (developer));
		}

        [Test]
        public void RemoveUsernameInvalidChars_InvalidChars_CharsRemoved()
        {
             Assert.AreEqual("1234567890_asdfghjkl", DeveloperMustHaveValidUsernameSpecification.RemoveUsernameInvalidChars("1234567890-=!@#$%&*()_ asdfghjkl;'"));
        }
    }
}


text:
FROM ouspg/libfuzzer-base

# Enviroment variables used by the fuzzer

ENV TARGET "libxslt"
ENV LD_LIBRARY_PATH="/src/libxslt/libxslt/.libs/"

MAINTAINER https://github.com/ouspg/libfuzzerification

RUN apt-get update && apt-get install -y liblzma-dev
RUN apt-get build-dep libxslt -y
RUN cd /src && git clone git://git.gnome.org/libxslt

ADD libxslt-fuzzer.cc /src/libxslt/
#ADD xslt.dict /src/libxslt/

ADD samples.tar.gz /

ADD build.sh /src/scripts/
RUN mkdir -p /work/libxslt/
RUN bash /src/scripts/build.sh


text:
__version__ = '0.0.1-dev'

metadata = dict(
    name='nanoauto',
    version=__version__,
    description='Web-based editor',
    long_description="""\
nanoauto: write-only web editor
""",
    author='Moshe Zadka',
    author_email='zadka.moshe@gmail.com',
    license='MIT',
    copyright='2015',
)


text:
require 'unlocalize/localized_numeric_parser'

Numeric.class_eval do
  class << self
    def parse_localized(value)
      Unlocalize::LocalizedNumericParser.parse(value)
    end
  end
end


text:
package com.avairebot.contracts.database.seeder;

import com.avairebot.AvaIre;
import com.avairebot.contracts.reflection.Reflectionable;
import com.avairebot.database.query.QueryBuilder;

import java.sql.SQLException;

public abstract class Seeder extends Reflectionable {

    /**
     * Creates a new seeder class instance.
     *
     * @param avaire The main {@link AvaIre avaire} application instance.
     */
    public Seeder(AvaIre avaire) {
        super(avaire);
    }

    /**
     * Gets the channel that the {@link #createQuery() query builder}
     * should be created for.
     *
     * @return The table used by the seeder.
     */
    public abstract String table();

    /**
     * Attempts to seeder the database, this is automatically executed from the
     * {@link com.avairebot.database.seeder.SeederManager#run()} method.
     *
     * @return the result of the schematic instance call
     * @throws SQLException if a database access error occurs,
     *                      this method is called on a closed Statement, the given
     *                      SQL statement produces anything other than a single
     *                      ResultSet object, the method is called on a
     *                      PreparedStatement or CallableStatement
     */
    public abstract void run() throws SQLException;

    /**
     * Creates a new query builder for the table defined in
     * the {@link #table() table method}.
     *
     * @return A new query builder instance set to the table defined for the seeder.
     */
    protected QueryBuilder createQuery() {
        return avaire.getDatabase().newQueryBuilder(table());
    }

    /**
     * Checks if the table defined for the seeder has a record
     * that exists with the given column and value.
     *
     * @param column The column that should be checked
     * @param value  The value that should exist for the given column.
     * @return {@code True} if the colum exists, {@code False} otherwise.
     * @throws SQLException if a database access error occurs,
     *                      this method is called on a closed Statement, the given
     *                      SQL statement produces anything other than a single
     *                      ResultSet object, the method is called on a
     *                      PreparedStatement or CallableStatement
     */
    protected boolean tableHasValue(String column, Object value) throws SQLException {
        return !createQuery().where(column, value).get().isEmpty();
    }
}


text:
[Tiny]Printer is an (Electric Imp powered) Internet-connected printer!

## Required Hardware:
- [Electric Imp Card](http://www.adafruit.com/products/1129)
- [April Breakout Board](http://www.adafruit.com/products/1130)
- [Mini Thermal Receipt Printer Starter Pack](http://www.adafruit.com/products/600)

## Required Web Services:
- [Electric Imp](https://ide.electricimp.com)
- [OAuth.io](https://oauth.io)
- [Twitter](https://dev.twitter.com/)

## Hardware Setup:
- Follow the [Power](http://learn.adafruit.com/mini-thermal-receipt-printer/power) and [Microcontroller](http://learn.adafruit.com/mini-thermal-receipt-printer/microcontroller) steps in the [AdaFruit Guide](http://learn.adafruit.com/mini-thermal-receipt-printer).
  - Hook up the red wire from the DC power supply to the **Vin** pin on the April.
  - Hook up the black wire from the DC power supply to one of the **GND** pins on the April.
  - Hook up the green wire from the printer to **PIN7** on the April Board.
  - Hook up the yellow wire from the printer to **PIN5** on the April Board.
  - Hook up the black wire from the printer to the other **GND** pin on the April.

## Software:
You should be able to copy and paste (*almost*) the source code from the repository to get started.
- Copy tinyprinter.agent.nut to the Agent window and:
  - Insert your OAuth.io public key
  - Insert your Twitter app's Consumer Token and Consumer Token Secret.

## How it works:
This project is meant to demonstrate how you can use OAuth.io to secure your projects. The device is in an "open" state during the first minute after a cold boot. During this period, someone can log into their Twitter account (by browsing to the Agent URL and clicking the 'Sign in with Twitter' button).

Once a user has logged in, the device is tied to their account, and no one else can log into the device. While logged into the device, the user can select a search term.

Once a search term has been selected, the agent opens a connection to the Twitter Streaming API and prints any tweets that match the search criteria.

The user's credentials and the current search term persist over device and agent restarts (including a cold boot).

## //TODO:
- Ability to print Timeline, DM's, Interactions
- User should be able to select if they want the printer to have an open "question box" that anyone can submit text to to be printed.

## Contact
[Matt Haines](github.com/beardedinventor)

[@beardedinventor](http://twitter.com/beardedinventor)

## License
This project is released under the MIT Licence. For more information see the LICENSE file.


text:
require 'spec_helper'

feature 'Header' do
  before(:each) do
    visit(root_path)
  end

  scenario 'has a link to site root' do
    expect(header).to have_link(root_title, href: root_path)
  end

  MENU_LINKS.each do |description, name, href|
    scenario "has a link to #{description}" do
      expect(header).to have_link(name, href: href)
    end
  end

  context 'on a small screen', js: true do
    let(:screen) { Screen.new }

    before(:each) do
      screen.resize_to_small
    end

    scenario 'has a link to site root' do
      expect(header_small).to have_link(root_title, href: root_path)
    end
  end

  def header
    find('.header')
  end

  def header_small
    find('.header-small')
  end

  def root_title
    I18n.t('site.title')
  end
end


text:
package org.eclipse.php.internal.core.corext.util;

import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.eclipse.dltk.ast.ASTNode;
import org.eclipse.dltk.ast.declarations.ModuleDeclaration;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.Position;
import org.eclipse.php.core.compiler.ast.nodes.*;
import org.eclipse.php.core.compiler.ast.visitor.PHPASTVisitor;
import org.eclipse.php.internal.core.compiler.ast.parser.ASTUtils;

/**
 * @author Yannick de Lange <yannickl88@gmail.com>
 */
public class DocumentUtils {
	private static class NamespaceFinder extends PHPASTVisitor {
		Vector<NamespaceDeclaration> declarations = new Vector<NamespaceDeclaration>();

		public boolean visit(NamespaceDeclaration n) throws Exception {
			declarations.add(n);

			return super.visit(n);
		}

		public NamespaceDeclaration getNamespaceDeclarationFor(UseStatement statement) {
			for (NamespaceDeclaration n : declarations) {
				if (n.sourceStart() <= statement.sourceStart() && n.sourceEnd() >= statement.sourceEnd()) {
					return n;
				}
			}
			return null;
		}
	}

	private static class ReplaceAction {
		public List<UseStatement> statements;
		public int start, end;
		public String indent;

		public ReplaceAction(List<UseStatement> statements, int start, int end, String indent) {
			this.statements = statements;
			this.start = start;
			this.end = end;
			this.indent = indent;
		}
	}

	public static List<UseStatement> flatten(List<UseStatement> statements) {
		Vector<UseStatement> total = new Vector<UseStatement>();

		for (UseStatement statement : statements) {
			for (UsePart part : statement.getParts()) {
				Vector<UsePart> parts = new Vector<UsePart>();
				parts.add(part);

				total.add(new UseStatement(statement.start(), statement.end(), parts, statement.getStatementType()));
			}
		}

		return total;
	}

	/**
	 * Check if a classname is used in a string. The "excludePositions" list
	 * contains positions where we should NOT look if the classname is used
	 * (typically in comment sections). It is important that the
	 * "excludePositions" list is sorted by increasing position, or this method
	 * won't work correctly.
	 */
	public static boolean containsUseStatement(UsePart part, String contents, List<Position> excludePositions) {
		String className = null != part.getAlias() ? part.getAlias().toString()
				: (part.getNamespace() != null ? part.getNamespace().toString() : "");

		Pattern p = Pattern.compile("(?i)\\b(" + Pattern.quote(className) + ")\\b");
		Matcher m = p.matcher(contents);
		int restartPos = 0;
		while (m.find()) {
			// No exclusion list, so we're good
			if (excludePositions.isEmpty()) {
				return true;
			}
			for (int i = restartPos; i < excludePositions.size(); i++) {
				Position position = excludePositions.get(i);
				// If current exclusion is before current match,
				// we have to continue our checks
				if (position.getOffset() + position.getLength() <= m.start()) {
					// No further exclusions, we are good, current match is
					// pertinent
					if (i == excludePositions.size() - 1) {
						return true;
					}
					restartPos++;
					continue;
				}
				// Current exclusion is after current match, so we're also good
				if (position.getOffset() >= m.end()) {
					return true;
				}
				// Here we know that current exclusion overlaps current match,
				// so current match is non-pertinent, we have to continue with
				// next match.
				// Assert that current exclusion FULLY overlaps current match.
				assert position.getOffset() <= m.start() && m.end() <= position.getOffset() + position.getLength();
				break;
			}
		}
		// No pertinent match was found
		return false;
	}

	/**
	 * Returns the positions of a list of ASTNodes. It is important that the
	 * returned list is sorted by increasing position, or the other
	 * DocumentUtils methods (using this list) won't work correctly.
	 *
	 * @param nodes
	 *            Node positions to exclude
	 * @return sorted positions to exclude
	 */
	public static List<Position> getExcludeSortedAndFilteredPositions(ASTNode[] nodes) {
		List<Position> excludePositions = new ArrayList<Position>();
		for (ASTNode n : nodes) {
			if (n instanceof PHPDocBlock) {
				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=490434
				// Do not handle PHPDoc comments for now
				continue;
			}
			excludePositions.add(new Position(n.sourceStart(), n.sourceEnd() - n.sourceStart()));
		}
		return excludePositions;
	}

	/**
	 * Remove all the given use statements from a document. Be warned that the
	 * "excludePositions" list will be updated to match the content of the
	 * returned string. It is important that this list is sorted by increasing
	 * position and that the statement positions don't intersect with any of the
	 * exclude positions, or this method won't work correctly.
	 */
	public static String stripUseStatements(UseStatement[] statements, IDocument old_doc,
			List<Position> excludePositions) {
		return stripUseStatements(statements, old_doc, 0, old_doc.getLength(), excludePositions);
	}

	/**
	 * Remove all the given use statements from a document. Be warned that the
	 * "excludePositions" list will be updated to match the content of the
	 * returned string. It is important that this list is sorted by increasing
	 * position and that the statement positions don't intersect with any of the
	 * exclude positions, or this method won't work correctly.
	 */
	public static String stripUseStatements(UseStatement[] statements, IDocument old_doc, int start, int end,
			List<Position> excludePositions) {
		int removedLength = 0;
		IDocument doc = new Document(old_doc.get());

		for (UseStatement statement : statements) {
			if (statement.sourceStart() < start || statement.sourceEnd() > end) {
				continue;
			}
			int length = statement.sourceEnd() - statement.sourceStart();

			try {
				doc.replace(statement.sourceStart() - removedLength, length, "");
			} catch (BadLocationException e) {
			}

			for (int i = excludePositions.size() - 1; i >= 0; i--) {
				Position position = excludePositions.get(i);
				int offset = position.getOffset() + removedLength;
				if (offset >= statement.sourceEnd()) {
					position.setOffset(position.getOffset() - length);
				} else if (offset + position.getLength() > statement.sourceStart()) {
					// statement positions should never intersect with exclude
					// positions, so (for safety) remove them from the exclusion
					// list
					excludePositions.remove(i);
				} else {
					break;
				}
			}

			removedLength += length;
		}

		try {
			return doc.get(start, end - start - removedLength);
		} catch (BadLocationException e) {
			return doc.get();
		}
	}

	/**
	 * Create a string from the given UseStatements
	 */
	public static String createStringFromUseStatement(List<UseStatement> statements, String indent) {
		StringBuilder total = new StringBuilder();

		for (UseStatement statement : statements) {
			total.append(createStringFromUseStatement(statement, indent));
		}

		return total.toString().trim();
	}

	public static String createStringFromUseStatement(UseStatement statement) {
		return createStringFromUseStatement(statement, "");
	}

	public static String createStringFromUseStatement(UseStatement statement, boolean addIndentedUsePrefixAndNewline) {
		return createStringFromUseStatement(statement, "", addIndentedUsePrefixAndNewline);
	}

	public static String createStringFromUseStatement(UseStatement statement, String indent) {
		return createStringFromUseStatement(statement, indent, true);
	}

	/**
	 * Create a string from the given UseStatement
	 */
	public static String createStringFromUseStatement(UseStatement statement, String indent,
			boolean addIndentedUsePrefixAndNewline) {
		String use = "";
		if (addIndentedUsePrefixAndNewline) {
			use = indent + "use ";

			switch (statement.getStatementType()) {
			case UseStatement.T_NONE:
				break;
			case UseStatement.T_FUNCTION:
				use += "function ";
				break;
			case UseStatement.T_CONST:
				use += "const ";
				break;
			}
		}

		boolean first = true;
		for (UsePart part : statement.getParts()) {
			if (!first) {
				use += ", ";
			}
			use += part.getNamespace().getFullyQualifiedName();
			if (part.getAlias() != null) {
				use += " as " + part.getAlias().getName();
			}
			first = false;
		}

		if (addIndentedUsePrefixAndNewline) {
			return use + ";\n";
		}
		return use;
	}

	/**
	 * Filter and sort a list of Use statements from a document
	 */
	public static List<UseStatement> filterAndSort(UseStatement[] statements, IDocument doc,
			ModuleDeclaration moduleDeclaration) {
		Vector<UseStatement> total = new Vector<UseStatement>();

		NamespaceFinder visitor = new NamespaceFinder();
		try {
			moduleDeclaration.traverse(visitor);
		} catch (Exception e1) {
		}

		for (UseStatement statement : statements) {
			List<Position> excludePositions;
			if (moduleDeclaration instanceof PHPModuleDeclaration) {
				excludePositions = getExcludeSortedAndFilteredPositions(
						((PHPModuleDeclaration) moduleDeclaration).getCommentList().toArray(new ASTNode[0]));
			} else {
				excludePositions = new ArrayList<Position>();
			}
			String contents;
			NamespaceDeclaration currentNamespace = visitor.getNamespaceDeclarationFor(statement);
			if (currentNamespace != null && currentNamespace.isBracketed()) {
				contents = stripUseStatements(statements, doc, currentNamespace.sourceStart(),
						currentNamespace.sourceEnd(), excludePositions);
			} else {
				contents = stripUseStatements(statements, doc, excludePositions);
			}

			Vector<UsePart> parts = new Vector<UsePart>();
			for (UsePart part : statement.getParts()) {
				if (containsUseStatement(part, contents, excludePositions)) {
					parts.add(part);
				}
			}

			if (parts.size() > 0) {
				total.add(new UseStatement(statement.start(), statement.end(), parts, statement.getStatementType()));
			}
		}

		// sort and remove duplicate UseStatements
		Set<UseStatement> set = new TreeSet<>(new Comparator<UseStatement>() {
			@Override
			public int compare(UseStatement a, UseStatement b) {
				if (a == b) {
					return 0;
				}
				if (a.getStatementType() != b.getStatementType()) {
					return a.getStatementType() - b.getStatementType();
				}

				String partA = createStringFromUseStatement(a, false).toLowerCase();
				String partB = createStringFromUseStatement(b, false).toLowerCase();
				String[] partsA = partA.split("\\\\");
				String[] partsB = partB.split("\\\\");

				int checkLength = Math.min(partsA.length, partsB.length);
				for (int i = 0; i < checkLength; i++) {
					int comp = partsA[i].compareTo(partsB[i]);

					if (comp != 0) {
						return comp;
					}
				}

				return partsA.length - partsB.length;
			}
		});
		set.addAll(total);

		return new ArrayList<UseStatement>(set);
	}

	/**
	 * Sort the blocks of use statements from a document
	 */
	public static void sortUseStatements(ModuleDeclaration moduleDeclaration, IDocument doc) {
		UseStatement[] statements = ASTUtils.getUseStatements(moduleDeclaration, doc.getLength());

		int start = 0;
		Vector<ReplaceAction> queue = new Vector<ReplaceAction>();

		while (start < statements.length) {
			int last_item = statements.length - 1;

			for (int i = start; i < statements.length - 1; i++) {
				try {
					if (doc.getLineOfOffset(
							statements[i + 1].sourceStart()) > doc.getLineOfOffset(statements[i].sourceStart()) + 1) {
						last_item = i;
						break;
					}
				} catch (BadLocationException e) {
					last_item = i;
					break;
				}
			}

			String indent = "";
			try {
				int lineOffset = doc.getLineOffset(doc.getLineOfOffset(statements[start].sourceStart()));

				indent = doc.get(lineOffset, statements[start].sourceStart() - lineOffset);
			} catch (BadLocationException e1) {
				e1.printStackTrace();
			}

			queue.add(new ReplaceAction(
					filterAndSort(Arrays.copyOfRange(statements, start, last_item + 1), doc, moduleDeclaration),
					statements[start].sourceStart(), statements[last_item].sourceEnd(), indent));

			start = last_item + 1; // start at the next one
		}

		int offset = 0;
		for (ReplaceAction item : queue) {
			List<UseStatement> sorted = item.statements;
			int length = item.end - item.start;

			String newNamespaces = createStringFromUseStatement(sorted, item.indent);
			try {
				doc.replace(item.start - offset, length, newNamespaces);
			} catch (BadLocationException e) {
			}

			offset += length - newNamespaces.length();
		}
	}
}


text:
<?php
use Paliari\DateTime\TDateTime;

class TDateTimeTest extends \PHPUnit\Framework\TestCase
{
    /**
     * @var TDateTime
     */
    public $date;

    /**
     * @var TDateTime
     */
    public $dateTime;

    protected function setUp(): void
    {
        $this->date     = new TDateTime('2013-05-01');
        $this->dateTime = new TDateTime('2013-05-01 22:34:21');
    }

    /**
     * @group slow
     * Testa um intervalo de 15 anos se todos dias estão sendo gerados corretamente pelo DateBr
     */
    public function testContructDataUniversal()
    {
        $stop = date('Y', time()) + 5;
        $ano  = date('Y', time()) - 10;
        $mes  = 1;
        $dia  = 0;
        while ($ano <= $stop) {
            $timestamp = mktime(0, 0, 0, $mes, $dia + 1, $ano);
            $dia       = date('d', $timestamp);
            $mes       = date('m', $timestamp);
            $ano       = date('Y', $timestamp);
            $date_br   = new TDateTime("$ano-$mes-$dia");
            $this->assertEquals($timestamp, $date_br->timestamp);
        }
    }

    /**
     * @group slow
     * Testa o construtor do DateBr passando timestemp por 30 dias
     */
    public function testContructTimestamp()
    {
        $Y = date('Y', time());
        $m = date('m', time());;
        $d   = 0;
        $H   = 0;
        $i   = 0;
        $s   = 0;
        $stp = $d + 30;
        while ($d < $stp) {
            $tmstp  = mktime($H, $i, $s, $m, $d + 1, $Y);
            $d      = date('d', $tmstp);
            $m      = date('m', $tmstp);
            $Y      = date('Y', $tmstp);
            $H      = date('H', $tmstp);
            $i      = date('i', $tmstp);
            $s      = date('s', $tmstp);
            $dateBr = new TDateTime((int)$tmstp);
            $this->assertEquals($tmstp, $dateBr->timestamp);
            $dateBr = new TDateTime((string)$tmstp);
            $this->assertEquals($tmstp, $dateBr->timestamp);
        }
    }

    /**
     * Verifica se a difereca de dias entre as duas datas retornadas pela funcao esta correta
     */
    public function testIntervaloDias()
    {
        $date = new TDateTime('2013-10-01');
        $this->assertEquals(30, $date->intervalDays(new TDateTime('2013-10-31')));
        $date = new TDateTime('2013-09-01');
        $this->assertEquals(-7, $date->intervalDays(new TDateTime('2013-08-25')));
        $date = new TDateTime('2013-11-01');
        $this->assertEquals(30, $date->intervalDays(new TDateTime('2013-12-1')));
    }

    /**
     * Verifica o retorno de compareDate.
     */
    public function testCompareDate()
    {
        $date = new TDateTime('2013-10-01');
        $this->assertEquals(1, $date->compareDate(new TDateTime('2013-09-25')));
        $this->assertEquals(0, $date->compareDate(new TDateTime('2013-10-01')));
        $this->assertEquals(-1, $date->compareDate(new TDateTime('2013-10-25')));
    }

    /**
     * Verifica se o create date está funcionando normalmente
     */
    public function testCreateDate()
    {
        $this->assertEquals(date('Y-m-d H:i:s', time()), TDateTime::createDate('now'));
        $this->assertEquals('2013-11-07 00:00:00', TDateTime::createDate('2013-11-07')->toDateTimeString());
        $data = new TDateTime('2013-09-09');
        $this->assertEquals('2013-09-09', TDateTime::createDate($data)->toDateString());
        $this->assertEquals($data, new TDateTime($data));
        $date = date(DateTime::RSS);
        $this->assertEquals($date, TDateTime::createDate($date)->format(DateTime::RSS));
        $date = date(DateTime::W3C);
        $this->assertEquals($date, TDateTime::createDate($date)->format(DateTime::W3C));
        $date = date(DateTime::COOKIE);
        $this->assertEquals($date, TDateTime::createDate($date)->format(DateTime::COOKIE));
        $date = date(TDateTime::DATE_TIME_STR);
        $this->assertEquals($date, TDateTime::createDate($date)->format(TDateTime::DATE_TIME_STR));
        $date = date(DateTime::ATOM);
        $this->assertEquals($date, TDateTime::createDate($date)->format(DateTime::ATOM));
    }

    /**
     * Verifica se a funcao retorna null ou nao de acordo com o parametro passado
     */
    public function testNull()
    {
        $this->assertNull(TDateTime::createDate());
        $this->assertNotNull(TDateTime::createDate('now'));
    }

    /**
     * Verifica se parametro errado gera excecao
     */
    public function testException()
    {
        $this->expectException(DomainException::class);
        TDateTime::createDate('nogsgsw');
    }

    /**
     * Verifica se parametro errado gera excecao
     */
    public function testExceptionNew()
    {
        $this->expectException(DomainException::class);
        new TDateTime('nogsgsw');
    }

    /**
     * Testa se o isDate está validando o argumento corretamente
     */
    public function testIsDate()
    {
        $this->assertTrue(TDateTime::isDate(time()));
        $this->assertTrue(TDateTime::isDate('2013-11-15'));
        $this->assertTrue(TDateTime::isDate(date('Y-m-d')));
        $this->assertTrue(TDateTime::isDate(date(DateTime::RSS)));
        $this->assertTrue(TDateTime::isDate(date(DateTime::W3C)));
        $this->assertTrue(TDateTime::isDate(date(DateTime::COOKIE)));
        $this->assertTrue(TDateTime::isDate(date(TDateTime::DATE_TIME_STR)));
        $this->assertTrue(TDateTime::isDate(date(DateTime::ATOM)));
        $this->assertTrue(TDateTime::isDate('now'));
        $this->assertTrue(TDateTime::isDate('132'));
        $this->assertFalse(TDateTime::isDate('abc'));
    }

    /**
     * Verifica se a funcao esta adicionando o valor passado na propriedade
     */
    public function testAddYear()
    {
        $this->assertEquals('2015-05-01', $this->date->addYears(2)->toDateString());
    }

    /**
     * Verifica se a funcao esta subtraindo o valor passado na propriedade
     */
    public function testSubYear()
    {
        $this->assertEquals('2011-05-01', $this->date->subYears(2)->toDateString());
    }

    /**
     * Verifica se a funcao esta adicionando o valor passado na propriedade
     */
    public function testAddMonths()
    {
        $this->assertEquals('2013-07-01', $this->date->addMonths(2)->toDateString());
    }

    /**
     * Verifica se a funcao esta subtraindo o valor passado na propriedade
     */
    public function testSubMonth()
    {
        $this->assertEquals('2013-03-01', $this->date->subMonths(2)->toDateString());
    }

    /**
     * Verifica se a funcao esta adicionando o valor passado na propriedade
     */
    public function testAddDays()
    {
        $this->assertEquals('2013-05-03', $this->date->addDays(2)->toDateString());
    }

    /**
     * Verifica se a funcao esta subtraindo o valor passado na propriedade
     */
    public function testSubDays()
    {
        $this->assertEquals('2013-04-29', $this->date->subDays(2)->toDateString());
    }

    /**
     * Verifica se a funcao esta adicionando o valor passado na propriedade
     */
    public function testAddHour()
    {
        $this->assertEquals('2013-05-01 02:00:00', $this->date->addHours(2)->toDateTimeString());
    }

    /**
     * Verifica se a funcao esta subtraindo o valor passado na propriedade
     */
    public function testSubHour()
    {
        $this->assertEquals('2013-04-30 22:00:00', $this->date->subHours(2)->toDateTimeString());
    }

    /**
     * Verifica se a funcao esta adicionando o valor passado na propriedade
     */
    public function testAddMinute()
    {
        $this->assertEquals('2013-05-01 00:02:00', $this->date->addMinutes(2)->toDateTimeString());
    }

    /**
     * Verifica se a funcao esta subtraindo o valor passado na propriedade
     */
    public function testSubMinute()
    {
        $this->assertEquals('2013-04-30 23:58:00', $this->date->subMinutes(2)->toDateTimeString());
    }

    /**
     * Verifica se a funcao esta adicionando o valor passado na propriedade
     */
    public function testAddSecond()
    {
        $this->assertEquals('2013-05-01 00:00:02', $this->date->addSeconds(2)->toDateTimeString());
    }

    /**
     * Verifica se a funcao esta subtraindo o valor passado na propriedade
     */
    public function testSubSecond()
    {
        $this->assertEquals('2013-04-30 23:59:58', $this->date->subSeconds(2)->toDateTimeString());
    }

    /**
     * Verifica se a funcao get está retornando o valor correto.
     */
    public function testGetYear()
    {
        $this->assertEquals(2013, $this->dateTime->getYear());
    }

    /**
     * Verifica se a funcao get está retornando o valor correto.
     */
    public function testGetMonths()
    {
        $this->assertEquals(5, $this->dateTime->getMonth());
    }

    /**
     * Verifica se a funcao get está retornando o valor correto.
     */
    public function testGetDays()
    {
        $this->assertEquals(1, $this->dateTime->getDay());
    }

    /**
     * Verifica se a funcao get está retornando o valor correto.
     */
    public function testGetHour()
    {
        $this->assertEquals(22, $this->dateTime->getHour());
    }

    /**
     * Verifica se a funcao get está retornando o valor correto.
     */
    public function testGetMinute()
    {
        $this->assertEquals(34, $this->dateTime->getMinute());
    }

    /**
     * Verifica se a funcao get está retornando o valor correto.
     */
    public function testGetSecond()
    {
        $this->assertEquals(21, $this->dateTime->getSecond());
    }

    /**
     * Verifica se a propriedade está sendo setada corretamente
     */
    public function testSetYear()
    {
        $this->assertEquals(2015, $this->dateTime->setYear(2015)->format('Y'));
    }

    /**
     * Verifica se a propriedade está sendo setada corretamente
     */
    public function testSetMonths()
    {
        $this->assertEquals(10, $this->dateTime->setMonth(10)->format('m'));
    }

    /**
     * Verifica se a propriedade está sendo setada corretamente
     */
    public function testSetDays()
    {
        $this->assertEquals(6, $this->dateTime->setDay(6)->format('d'));
    }

    /**
     * Verifica se a propriedade está sendo setada corretamente
     */
    public function testSetHour()
    {
        $this->assertEquals(18, $this->dateTime->setHour(18)->format('H'));
    }

    /**
     * Verifica se a propriedade está sendo setada corretamente
     */
    public function testSetMinute()
    {
        $this->assertEquals(45, $this->dateTime->setMinute(45)->format('i'));
    }

    /**
     *
     * Verifica se a propriedade está sendo setada corretamente
     */
    public function testSetSecond()
    {
        $this->assertEquals(17, $this->dateTime->setSecond(17)->format('s'));
    }

    /**
     *
     * Verifica se isFutureDay está retornando o esperado.
     */
    public function testIsFutureDay()
    {
        $this->assertEquals(false, $this->dateTime->isFutureDayTo());
        $this->dateTime->setYear(5000);
        $this->assertEquals(true, $this->dateTime->isFutureDayTo());
    }

    /**
     *
     * Verifica se isFutureDay está retornando o esperado.
     */
    public function testIsPastDay()
    {
        $this->assertEquals(true, $this->dateTime->isPastDayTo());
        $this->dateTime->setYear(5000);
        $this->assertEquals(false, $this->dateTime->isPastDayTo());
    }
}


text:
//
//  DetailViewController.m
//  JHudViewDemo
//
//  Created by 晋先森 on 16/7/15.
//  Copyright © 2016年 晋先森. All rights reserved.
//

#import "DetailViewController.h"

#import "JHUD.h"

// 格式 0xff3737
#define JHUDRGBHexAlpha(rgbValue,a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:(a)]

#define JHUDRGBA(r,g,b,a)     [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a]

@interface DetailViewController ()

@property (nonatomic,strong) UIButton *rightButton;

@property (nonatomic) JHUD *hudView;

@property (nonatomic) CGRect orignalRect;

@end

@implementation DetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self createUI];
    [self addTopBarWithTitle:self.selName];
}

- (void)createUI
{
    [super createUI];

    self.contentView.backgroundColor = [UIColor whiteColor];
    // 建议基类中Lazy创建,进行二次封装,使用时直接调用,避免子类中频繁创建产生冗余代码的问题。
    self.hudView = [[JHUD alloc]initWithFrame:self.contentView.bounds];

    __weak typeof(self)  _self = self;
    [self.hudView setJHUDReloadButtonClickedBlock:^() {
        NSLog(@"refreshButton");
        [_self customAnimation];
    }];

    SEL sel = NSSelectorFromString(self.selName);
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
    [self performSelector:sel withObject:nil];
#pragma clang diagnostic pop

    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:self.rightButton];
}

- (void)rightButtonClick:(UIButton *)button
{
    button.selected = !button.selected;
    button.selected ? [self hide] : [self failure];
}

-(UIButton *)rightButton
{
    if (_rightButton) {
        return _rightButton;
    }
    self.rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.rightButton.frame = CGRectMake(0, 0,45, 35);
    [self.rightButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self.rightButton setTitle:@"Hide" forState:UIControlStateNormal];
    [self.rightButton setTitle:@"Show" forState:UIControlStateSelected];
    self.rightButton.titleLabel.font = [UIFont boldSystemFontOfSize:17];
    [self.rightButton addTarget:self action:@selector(rightButtonClick:) forControlEvents:UIControlEventTouchUpInside];

    return self.rightButton;
}

- (void)circleAnimation
{
    self.hudView.messageLabel.text = @"Hello ,this is a circle animation";
    self.hudView.indicatorBackGroundColor = [[UIColor darkGrayColor] colorWithAlphaComponent:0.1];
    self.hudView.indicatorForegroundColor = [UIColor lightGrayColor];
    [self.hudView showAtView:self.contentView hudType:JHUDLoadingTypeCircle];
}

- (void)circleJoinAnimation
{
    self.hudView.messageLabel.text = @"Hello ,this is a circleJoin animation";
    self.hudView.indicatorForegroundColor = JHUDRGBA(60, 139, 246, .5);
    self.hudView.indicatorBackGroundColor = JHUDRGBA(185, 186, 200, 0.3);
    [self.hudView showAtView:self.contentView hudType:JHUDLoadingTypeCircleJoin];
}

- (void)dotAnimation
{
    self.hudView.messageLabel.text = @"Hello ,this is a dot animation";
    self.hudView.indicatorBackGroundColor = [UIColor whiteColor];
    self.hudView.indicatorForegroundColor = [UIColor orangeColor];
    [self.hudView showAtView:self.contentView hudType:JHUDLoadingTypeDot];
}

- (void)customAnimation
{
    NSMutableArray * images = [NSMutableArray array];
    for (int index = 0; index<=19; index++) {
        NSString * imageName = [NSString stringWithFormat:@"%d.png",index];
        UIImage *image = [UIImage imageNamed:imageName];
        [images addObject:image];
    }

    self.hudView.indicatorViewSize = CGSizeMake(80, 80);
    self.hudView.customAnimationImages = images;
    self.hudView.messageLabel.text = @"无人问我粥可温\n无人与我共黄昏";
    [self.hudView showAtView:self.contentView hudType:JHUDLoadingTypeCustomAnimations];

    // Recommend two web sites
    // http://preloaders.net/en/people_and_animals
    // https://convertio.co/zh/gif-png/
    // http://spiffygif.com
}

- (void)gifAnimations
{
    NSString *path = [[NSBundle mainBundle] pathForResource:@"loadinggif3" ofType:@"gif"];
    NSData *data = [NSData dataWithContentsOfFile:path];

    self.hudView.gifImageData = data;
    self.hudView.indicatorViewSize = CGSizeMake(110, 110); // Maybe you can try to use (100,250);😂
    self.hudView.messageLabel.text = @"Hello ,this is a gif animation";
    [self.hudView showAtView:self.contentView hudType:JHUDLoadingTypeGifImage];
}

- (void)failure
{
    self.hudView.indicatorViewSize = CGSizeMake(100, 100);
    self.hudView.messageLabel.text = @"Can't get data, please make sure the interface is correct !";
    [self.hudView.refreshButton setTitle:@"Refresh" forState:UIControlStateNormal];
    self.hudView.customImage = [UIImage imageNamed:@"null"];

    [self.hudView showAtView:self.contentView hudType:JHUDLoadingTypeFailure];

}

- (void)failure2
{
    self.hudView.indicatorViewSize = CGSizeMake(150, 150);
    self.hudView.messageLabel.text = @"Failed to get data, please try again later";
    [self.hudView.refreshButton setTitle:@"Refresh ?" forState:UIControlStateNormal];
    self.hudView.customImage = [UIImage imageNamed:@"nullData"];

    [self.hudView showAtView:self.contentView hudType:JHUDLoadingTypeFailure];

}

- (void)classMethod
{
    self.rightButton.hidden = YES;

    [JHUD showAtView:self.contentView message:@"I'm a class method."];

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [JHUD hideForView:self.contentView];
    });

}

// 横竖屏适配的话,在此更新hudView的frame。
- (void)viewWillLayoutSubviews
{
    [super viewWillLayoutSubviews];
    CGFloat padding = 0;
    self.hudView.frame = CGRectMake(padding,
                                    padding,
                                    self.contentView.frame.size.width - padding*2,
                                    self.contentView.frame.size.height - padding*2);
}

- (void)hide
{
    [self.hudView hide];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end


text:
@implementation ETRStoryboardPopoverSegue

- (instancetype)initWithIdentifier:(NSString *)identifier
                            source:(UIViewController *)source
                       destination:(UIViewController *)destination
{
    destination = [ETRStoryboardSegue viewControllerFromLink:destination];
    return [super initWithIdentifier:identifier
                              source:source
                         destination:destination];
}

@end


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

namespace EpochServer
{
    class Program
    {
        static void Main(string[] args)
        {
            var server = new EpochServer();
            server.Start();
            Console.ReadLine();
        }
    }
}