text:
This document covers how to install Detectron, its dependencies (including Caffe2), and the COCO dataset.

- For general information about Detectron, please see [`README.md`](README.md).

**Requirements:**

- NVIDIA GPU, Linux, Python2
- Caffe2, various standard Python packages, and the COCO API; Instructions for installing these dependencies are found below

**Notes:**

- Detectron operators currently do not have CPU implementation; a GPU system is required.
- Detectron has been tested extensively with CUDA 8.0 and cuDNN 6.0.21.

## Caffe2

To install Caffe2 with CUDA support, follow the [installation instructions](https://caffe2.ai/docs/getting-started.html) from the [Caffe2 website](https://caffe2.ai/). **If you already have Caffe2 installed, make sure to update your Caffe2 to a version that includes the [Detectron module](https://github.com/pytorch/pytorch/tree/master/modules/detectron).**

Please ensure that your Caffe2 installation was successful before proceeding by running the following commands and checking their output as directed in the comments.

```
# To check if Caffe2 build was successful
python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"

# To check if Caffe2 GPU build was successful
# This must print a number > 0 in order to use Detectron
python -c 'from caffe2.python import workspace; print(workspace.NumCudaDevices())'
```

If the `caffe2` Python package is not found, you likely need to adjust your `PYTHONPATH` environment variable to include its location (`/path/to/caffe2/build`, where `build` is the Caffe2 CMake build directory).

## Other Dependencies

Install the [COCO API](https://github.com/cocodataset/cocoapi):

```
# COCOAPI=/path/to/clone/cocoapi
git clone https://github.com/cocodataset/cocoapi.git $COCOAPI
cd $COCOAPI/PythonAPI
# Install into global site-packages
make install
# Alternatively, if you do not have permissions or prefer
# not to install the COCO API into global site-packages
python setup.py install --user
```

Note that instructions like `# COCOAPI=/path/to/install/cocoapi` indicate that you should pick a path where you'd like to have the software cloned and then set an environment variable (`COCOAPI` in this case) accordingly.

## Detectron

Clone the Detectron repository:

```
# DETECTRON=/path/to/clone/detectron
git clone https://github.com/facebookresearch/detectron $DETECTRON
```

Install Python dependencies:

```
pip install -r $DETECTRON/requirements.txt
```

Set up Python modules:

```
cd $DETECTRON && make
```

Check that Detectron tests pass (e.g. for [`SpatialNarrowAsOp test`](detectron/tests/test_spatial_narrow_as_op.py)):

```
python $DETECTRON/detectron/tests/test_spatial_narrow_as_op.py
```

## That's All You Need for Inference

At this point, you can run inference using pretrained Detectron models. Take a look at our [inference tutorial](GETTING_STARTED.md) for an example. If you want to train models on the COCO dataset, then please continue with the installation instructions.

## Datasets

Detectron finds datasets via symlinks from `detectron/datasets/data` to the actual locations where the dataset images and annotations are stored. For instructions on how to create symlinks for COCO and other datasets, please see [`detectron/datasets/data/README.md`](detectron/datasets/data/README.md).

After symlinks have been created, that's all you need to start training models.

## Advanced Topic: Custom Operators for New Research Projects

Please read the custom operators section of the [`FAQ`](FAQ.md) first.

For convenience, we provide CMake support for building custom operators. All custom operators are built into a single library that can be loaded dynamically from Python.
Place your custom operator implementation under [`detectron/ops/`](detectron/ops/) and see [`detectron/tests/test_zero_even_op.py`](detectron/tests/test_zero_even_op.py) for an example of how to load custom operators from Python.

Build the custom operators library:

```
cd $DETECTRON && make ops
```

Check that the custom operator tests pass:

```
python $DETECTRON/detectron/tests/test_zero_even_op.py
```

## Docker Image

We provide a [`Dockerfile`](docker/Dockerfile) that you can use to build a Detectron image on top of a Caffe2 image that satisfies the requirements outlined at the top. If you would like to use a Caffe2 image different from the one we use by default, please make sure that it includes the [Detectron module](https://github.com/pytorch/pytorch/tree/master/modules/detectron).

Build the image:

```
cd $DETECTRON/docker
docker build -t detectron:c2-cuda9-cudnn7 .
```

Run the image (e.g. for [`BatchPermutationOp test`](detectron/tests/test_batch_permutation_op.py)):

```
nvidia-docker run --rm -it detectron:c2-cuda9-cudnn7 python detectron/tests/test_batch_permutation_op.py
```

## Troubleshooting

In case of Caffe2 installation problems, please read the troubleshooting section of the relevant Caffe2 [installation instructions](https://caffe2.ai/docs/getting-started.html) first. In the following, we provide additional troubleshooting tips for Caffe2 and Detectron.

### Caffe2 Operator Profiling

Caffe2 comes with performance [`profiling`](https://github.com/pytorch/pytorch/tree/master/caffe2/contrib/prof)
support which you may find useful for benchmarking or debugging your operators
(see [`BatchPermutationOp test`](detectron/tests/test_batch_permutation_op.py) for example usage).
Profiling support is not built by default and you can enable it by setting
the `-DUSE_PROF=ON` flag when running Caffe2 CMake.

### CMake Cannot Find CUDA and cuDNN

Sometimes CMake has trouble with finding CUDA and cuDNN dirs on your machine.

When building Caffe2, you can point CMake to CUDA and cuDNN dirs by running:

```
cmake .. \
  # insert your Caffe2 CMake flags here
  -DCUDA_TOOLKIT_ROOT_DIR=/path/to/cuda/toolkit/dir \
  -DCUDNN_ROOT_DIR=/path/to/cudnn/root/dir
```

Similarly, when building custom Detectron operators you can use:

```
cd $DETECTRON
mkdir -p build && cd build
cmake .. \
  -DCUDA_TOOLKIT_ROOT_DIR=/path/to/cuda/toolkit/dir \
  -DCUDNN_ROOT_DIR=/path/to/cudnn/root/dir
make
```

Note that you can use the same commands to get CMake to use specific versions of CUDA and cuDNN out of possibly multiple versions installed on your machine.

### Protobuf Errors

Caffe2 uses protobuf as its serialization format and requires version `3.2.0` or newer.
If your protobuf version is older, you can build protobuf from Caffe2 protobuf submodule and use that version instead.

To build Caffe2 protobuf submodule:

```
# CAFFE2=/path/to/caffe2
cd $CAFFE2/third_party/protobuf/cmake
mkdir -p build && cd build
cmake .. \
  -DCMAKE_INSTALL_PREFIX=$HOME/c2_tp_protobuf \
  -Dprotobuf_BUILD_TESTS=OFF \
  -DCMAKE_CXX_FLAGS="-fPIC"
make install
```

To point Caffe2 CMake to the newly built protobuf:

```
cmake .. \
  # insert your Caffe2 CMake flags here
  -DPROTOBUF_PROTOC_EXECUTABLE=$HOME/c2_tp_protobuf/bin/protoc \
  -DPROTOBUF_INCLUDE_DIR=$HOME/c2_tp_protobuf/include \
  -DPROTOBUF_LIBRARY=$HOME/c2_tp_protobuf/lib64/libprotobuf.a
```

You may also experience problems with protobuf if you have both system and anaconda packages installed.
This could lead to problems as the versions could be mixed at compile time or at runtime.
This issue can also be overcome by following the commands from above.

### Caffe2 Python Binaries

In case you experience issues with CMake being unable to find the required Python paths when
building Caffe2 Python binaries (e.g. in virtualenv), you can try pointing Caffe2 CMake to python
library and include dir by using:

```
cmake .. \
  # insert your Caffe2 CMake flags here
  -DPYTHON_LIBRARY=$(python -c "from distutils import sysconfig; print(sysconfig.get_python_lib())") \
  -DPYTHON_INCLUDE_DIR=$(python -c "from distutils import sysconfig; print(sysconfig.get_python_inc())")
```

### Caffe2 with NNPACK Build

Detectron does not require Caffe2 built with NNPACK support. If you face NNPACK related issues during Caffe2 installation, you can safely disable NNPACK by setting the `-DUSE_NNPACK=OFF` CMake flag.

### Caffe2 with OpenCV Build

Analogously to the NNPACK case above, you can disable OpenCV by setting the `-DUSE_OPENCV=OFF` CMake flag.

### COCO API Undefined Symbol Error

If you encounter a COCO API import error due to an undefined symbol, as reported [here](https://github.com/cocodataset/cocoapi/issues/35),
make sure that your python versions are not getting mixed. For instance, this issue may arise if you have
[both system and conda numpy installed](https://stackoverflow.com/questions/36190757/numpy-undefined-symbol-pyfpe-jbuf).

### CMake Cannot Find Caffe2

In case you experience issues with CMake being unable to find the Caffe2 package when building custom operators,
make sure you have run `make install` as part of your Caffe2 installation process.


text:
package org.ephman.junit.generated;

import org.ephman.abra.validation.*;
import java.util.Vector;
/**
* a Validator for XMLTest in DEFAULT-FORMAT format
 * @version Thu Jun 30 15:12:42 EDT 2005
 * @author generated by Dave Knull
 */

public class BaseXMLTestValidator extends ValidatorBase {

	public static ValidationResult validate (XMLTest xMLTest) {
		Vector errors_ = new Vector ();
		validate (xMLTest, "", errors_); // call with empty path
		return new ValidationResult (errors_);
	}

	public static void validate (XMLTest xMLTest, Vector errors_) {
		validate (xMLTest, "", errors_);
	}

	public static void validate (XMLTest xMLTest, String pathWay, Vector errors_) {
		if (xMLTest == null) return ;
		if (pathWay != null && pathWay.length () > 0)
			pathWay += ".";

	}

	public static org.apache.regexp.REProgram _IsbnProgram = getREProgram ("[0-9]*");

}

redpajama_set_name: RedPajamaGithub


text:
package ch.hoene.perzist.source.sql.query;

import ch.hoene.perzist.source.relational.Field;
import ch.hoene.perzist.source.relational.View;

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

public class Select implements Sql
{
    private final String sql;
    private WhereClause whereClause;
    private OrderClause orderClause;
    private Limit limit;

    public enum SelectMethod{
        NORMAL,
        COUNT,
        DISTINCT
    }

    public Select(View view)
    {
        this.sql = "SELECT * FROM " + getTableList(view);
    }

    public Select(View view, Field... fields)
    {
        this(view, SelectMethod.NORMAL, fields);
    }

    public Select(View view, SelectMethod selectMethod, Field... fields)
    {
        this.sql = "SELECT " +
                  getFieldsList(selectMethod, fields) +
                  " FROM " + getTableList(view);
    }

    private String getFieldsList(SelectMethod selectMethod, Field... fields)
    {
        switch (selectMethod)
        {
            case NORMAL:
                return new FieldsPart(Arrays.asList(fields)).toSql();
            case COUNT:
                return " COUNT(" + new FieldsPart(Arrays.asList(fields)).toSql() + ")";
            case DISTINCT:
                return " DISTINCT " + new FieldsPart(Arrays.asList(fields)).toSql() + " ";
            default:
                throw new RuntimeException("Implement SelectMethod " + selectMethod.name());
        }
    }

    private String getTableList(View view)
    {
        return new TablesPart(view.getTables()).toSql();
    }

    public String toSql()
    {
        return sql
                  + (whereClause != null ? " WHERE " + whereClause.toSql() : "")
                  + (orderClause != null ? " ORDER BY "  + orderClause.toSql() : "")
                  + (limit != null ? limit.toSql() : "");
    }

    public List<Object> getParams()
    {
        List<Object> params = new ArrayList<Object>();
        params.addAll(whereClause != null ? whereClause.getParams() : new ArrayList<Object>());
        return params;
    }

    public void setWhereClause(WhereClause whereClause)
    {
        this.whereClause = whereClause;
    }

    public void setOrderClause(OrderClause orderClause)
    {
        this.orderClause = orderClause;
    }

    public void setLimit(Limit limit){
        this.limit = limit;
    }
}


text:
>Copyright 2015 Hewlett Packard Enterprise Development Company, L.P.

> 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.

# Verigreen on Docker
=====================

## Usage

To run a **Verigreen Collector** container issue the following command from the command line:

```
docker run -it -v /path/to/ssh/assets:/root/.ssh -v /path/to/verigreen/config:/var/vg/config -p 8085:8080 verigreen/verigreen
```

Please note that the `-it` will run the container with an interactive shell, if you wish to run it as a daemon, replace the `-it` with `-d`.

Once the collector is up, you may access the collector web UI from your host at `localhost:8085`.

### Mapping an existing local git repository

The previous `docker run` command assumes that you are cloning a fresh local copy of the git remote repository within the container's file system. However, if you map an existing local git repository from the host, the setup script for the container will assume that you want to use that local repository (and the remote repository that should be configured with it) to perform all its commands. Here is an example that maps a local repository in the host where the container is running:

```
docker run -it -v /path/to/ssh/assets:/root/.ssh -v /path/to/verigreen/config:/var/vg/config -v /path/to/my/hosts/repo:/var/repo -p 8085:8080 verigreen/verigreen
```

##  Configuration
Mapping the `/root/.ssh` and `/var/vg/config` volumes **is required**. The minimal contents of those volumes are:

- `/var/vg/config` should have a `config.properties` file that `verigreen` will use as a configuration file (example [here](https://github.com/Verigreen/verigreen/blob/master/verigreen-collector-webapp/resources/config.properties)) and a `run.yml` file that is used during container setup that should look something like this:

```
# /var/vg/config/run.yml
repository:
  remote_url: "ssh://<domain>:<port>/path/to/repo.git"
```

- `/root/.ssh` should have the following files:

  - `/root/.ssh/id_rsa` which is the private key file for the *remote* repository you are trying to protect.

  - `/root/.ssh/id_rsa.pub` which is the public key for the *remote* repository you are trying to protect.

  - `/root/.ssh/config` file that configures `ssh` to use the above-mentioned keys when accessing the right domain. For example for domain `my.example.com` and user `myuser` you could have a `config` file that looks like this:

```
# /root/.ssh/config
Host my.example.com
User myuser
IdentityFile ~/.ssh/id_rsa
```

  - `/root/.ssh/known_hosts` (**optional**). When specified, it should contain the public key for the git server (e.g. Atlassian Stash) which hosts the git remote repository. When not specified, this container provides a `run.sh` script that will attempt to retrieve the key by using the value for `remote_url` in the `/var/vg/config/run.yml`.

- `/var/repo` (**optional**) is the location within the container that is expected, by convention, to hold the local git repository that will be used by Verigreen to perform its commands and verifications. If you map this as a volume on the host, the startup script will verify if there is a repository present, if not, it will perform the fresh `git clone` using the value of the `remote_url` in the `/var/vg/config/run.yml`.

## Known Issues

The current version of our docker image is supported **only** on linux environments running `docker`. We are working on supporting our docker image to run on `boot2docker` on Windows and Mac OS X in the near future.

If you experience *any issues* or have any suggestions feel free to contact us through the Verigreen [repository](https://github.com/verigreen/verigreen) on Github or our [IRC channel](https://webchat.freenode.net/)  `#verigreen`.

## Source Code

The Verigreen [source code](https://github.com/Verigreen/verigreen) is available on Github.

## Documentation

For more information on Verigreen, please visit its [official documentation](https://github.com/Verigreen/verigreen/wiki).

## License
This project is released under Apache v2.0 license
http://www.apache.org/licenses/LICENSE-2.0.html


text:
var PersistenceAdapter = require("../lib/persistence-adapter");

function TestPersistenceAdapter() {
}
TestPersistenceAdapter.prototype = Object.create(PersistenceAdapter.prototype);
TestPersistenceAdapter.prototype.constructor = TestPersistenceAdapter;

TestPersistenceAdapter.prototype.save = function (resource) {
    return resource; //TODO should return a promise
};

module.exports = new TestPersistenceAdapter();


text:
package tamaized.voidcraft.common.vademecum.contents.documentation;

import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import tamaized.voidcraft.VoidCraft;
import tamaized.voidcraft.client.gui.VadeMecumGUI;
import tamaized.voidcraft.common.vademecum.VadeMecumEntry;
import tamaized.voidcraft.proxy.ClientProxy;

public class VadeMecumDocumentationEntry extends VadeMecumEntry {

	public VadeMecumDocumentationEntry() {
		super("docsMainEntry", VoidCraft.modid + ".VadeMecum.title.docs", null, null);
	}

	@Override
	public void init(VadeMecumGUI gui) {
		clearButtons();
		addButton(gui, VadeMecumDocumentationEntryList.getEntryID(VadeMecumDocumentationEntryList.Entry.BLOCKS), VoidCraft.modid + ".VadeMecum.docs.title.blocks", new ItemStack(Item.getItemFromBlock(VoidCraft.blocks.blockVoidcrystal)));
		addButton(gui, VadeMecumDocumentationEntryList.getEntryID(VadeMecumDocumentationEntryList.Entry.MACHINES), VoidCraft.modid + ".VadeMecum.docs.title.machines", new ItemStack(Item.getItemFromBlock(VoidCraft.blocks.voidMacerator)));
		addButton(gui, VadeMecumDocumentationEntryList.getEntryID(VadeMecumDocumentationEntryList.Entry.ITEMS), VoidCraft.modid + ".VadeMecum.docs.title.items", new ItemStack(VoidCraft.items.voidcrystal));
		addButton(gui, VadeMecumDocumentationEntryList.getEntryID(VadeMecumDocumentationEntryList.Entry.TOOLS), VoidCraft.modid + ".VadeMecum.docs.title.tools", new ItemStack(VoidCraft.tools.voidPickaxe));
		addButton(gui, VadeMecumDocumentationEntryList.getEntryID(VadeMecumDocumentationEntryList.Entry.WEAPONS), VoidCraft.modid + ".VadeMecum.docs.title.weps", new ItemStack(VoidCraft.tools.demonSword));
		addButton(gui, VadeMecumDocumentationEntryList.getEntryID(VadeMecumDocumentationEntryList.Entry.ARMOR), VoidCraft.modid + ".VadeMecum.docs.title.armor", new ItemStack(VoidCraft.armors.voidChest));

		addButton(gui, VadeMecumDocumentationEntryList.getEntryID(VadeMecumDocumentationEntryList.Entry.ETHEREALFRUIT), VoidCraft.modid + ".VadeMecum.docs.title.fruit", new ItemStack(VoidCraft.items.etherealFruit));
		addButton(gui, VadeMecumDocumentationEntryList.getEntryID(VadeMecumDocumentationEntryList.Entry.MOBS), VoidCraft.modid + ".VadeMecum.docs.title.mobs", new ItemStack(Items.SKULL, 1, 1));
		addButton(gui, VadeMecumDocumentationEntryList.getEntryID(VadeMecumDocumentationEntryList.Entry.BOSSES), VoidCraft.modid + ".VadeMecum.docs.title.bosses", new ItemStack(VoidCraft.items.ChainedSkull));
		addButton(gui, VadeMecumDocumentationEntryList.getEntryID(VadeMecumDocumentationEntryList.Entry.VOID), VoidCraft.modid + ".VadeMecum.docs.title.theVoid", new ItemStack(Item.getItemFromBlock(VoidCraft.blocks.blockPortalVoid)));
		addButton(gui, VadeMecumDocumentationEntryList.getEntryID(VadeMecumDocumentationEntryList.Entry.VOIDICINFUSION), VoidCraft.modid + ".VadeMecum.docs.title.voidicInfusion", new ItemStack(VoidCraft.items.voidicSuppressor));
		addButton(gui, VadeMecumDocumentationEntryList.getEntryID(VadeMecumDocumentationEntryList.Entry.XIA), VoidCraft.modid + ".VadeMecum.docs.title.xia", new ItemStack(VoidCraft.blocks.blockPortalXia));

		addButton(gui, VadeMecumDocumentationEntryList.getEntryID(VadeMecumDocumentationEntryList.Entry.STARFORGE), VoidCraft.modid + ".VadeMecum.docs.title.starforge", new ItemStack(VoidCraft.blocks.starforgeStation));
		addButton(gui, VadeMecumDocumentationEntryList.getEntryID(VadeMecumDocumentationEntryList.Entry.QUORI), VoidCraft.modid + ".VadeMecum.docs.title.quori", new ItemStack(VoidCraft.items.dreamBed));
	}

	@Override
	protected void actionPerformed(VadeMecumGUI gui, int id, int mouseButton) {
		switch (VadeMecumDocumentationEntryList.getEntryFromID(id)) {
			case BLOCKS:
				gui.changeEntry(ClientProxy.vadeMecumEntryList.Docs.BLOCKS);
				break;
			case MACHINES:
				gui.changeEntry(ClientProxy.vadeMecumEntryList.Docs.MACHINES);
				break;
			case ITEMS:
				gui.changeEntry(ClientProxy.vadeMecumEntryList.Docs.ITEMS);
				break;
			case TOOLS:
				gui.changeEntry(ClientProxy.vadeMecumEntryList.Docs.TOOLS);
				break;
			case WEAPONS:
				gui.changeEntry(ClientProxy.vadeMecumEntryList.Docs.WEAPONS);
				break;
			case ARMOR:
				gui.changeEntry(ClientProxy.vadeMecumEntryList.Docs.ARMOR);
				break;
			case ETHEREALFRUIT:
				gui.changeEntry(ClientProxy.vadeMecumEntryList.Docs.ETHEREALFRUIT);
				break;
			case MOBS:
				gui.changeEntry(ClientProxy.vadeMecumEntryList.Docs.MOBS);
				break;
			case BOSSES:
				gui.changeEntry(ClientProxy.vadeMecumEntryList.Docs.BOSSES);
				break;
			case VOID:
				gui.changeEntry(ClientProxy.vadeMecumEntryList.Docs.VOID);
				break;
			case VOIDICINFUSION:
				gui.changeEntry(ClientProxy.vadeMecumEntryList.Docs.VOIDICINFUSION);
				break;
			case XIA:
				gui.changeEntry(ClientProxy.vadeMecumEntryList.Docs.XIA);
				break;
			case STARFORGE:
				gui.changeEntry(ClientProxy.vadeMecumEntryList.Docs.STARFORGE);
				break;
			case QUORI:
				gui.changeEntry(ClientProxy.vadeMecumEntryList.Docs.QUORI);
				break;
			default:
				gui.changeEntry(ClientProxy.vadeMecumEntryList.Docs.MAIN);
				break;
		}
	}

}


text:
using System;
using UnityEditor.Graphing;
using UnityEngine;

namespace UnityEditor.ShaderGraph
{
    class SamplerStateShaderProperty : AbstractShaderProperty<TextureSamplerState>
    {
        public SamplerStateShaderProperty()
        {
            displayName = "SamplerState";

            if(value == null)
                value = new TextureSamplerState();

            if(string.IsNullOrEmpty(overrideReferenceName))
                overrideReferenceName = string.Format("{0}_{1}_{2}_{3}"
                    , propertyType
                    , GuidEncoder.Encode(guid)
                    , value.filter
                    , value.wrap);
        }

        public override PropertyType propertyType
        {
            get { return PropertyType.SamplerState; }
        }

        public override Vector4 defaultValue
        {
            get { return new Vector4(); }
        }

        public override bool isBatchable
        {
            get { return false; }
        }

        public override bool isExposable
        {
            get { return false; }
        }

        public override bool isRenamable
        {
            get { return false; }
        }

        public override string GetPropertyBlockString()
        {
            return string.Empty;
        }

        public override string GetPropertyDeclarationString(string delimiter = ";")
        {
            return string.Format(@"SAMPLER({0}){1}", referenceName, delimiter);
        }

        public override string GetPropertyAsArgumentString()
        {
            return string.Format(@"SamplerState {0}", referenceName);
        }

        public override PreviewProperty GetPreviewMaterialProperty()
        {
            return default(PreviewProperty);
        }

        public override AbstractMaterialNode ToConcreteNode()
        {
            return new SamplerStateNode()
            {
                filter = value.filter,
                wrap = value.wrap
            };
        }

        public override AbstractShaderProperty Copy()
        {
            var copied = new SamplerStateShaderProperty();
            copied.displayName = displayName;
            copied.overrideReferenceName = overrideReferenceName;
            copied.value = value;
            return copied;
        }
    }
}


text:
package edu.uah.rsesc.agree.ge;

public class AgreeCategories {
	public static final String AGREE = "edu.uah.rsesc.agree.ge.categories.agree";
}


text:
package org.apache.activemq.bugs;

import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.JmsMultipleClientsTestSupport;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.region.policy.FilePendingQueueMessageStoragePolicy;
import org.apache.activemq.broker.region.policy.PolicyEntry;
import org.apache.activemq.broker.region.policy.PolicyMap;
import org.apache.activemq.command.ActiveMQQueue;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.BlockJUnit4ClassRunner;

import java.util.Vector;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

import static org.junit.Assert.assertTrue;

@RunWith(BlockJUnit4ClassRunner.class)
public class AMQ2910Test extends JmsMultipleClientsTestSupport {

    final int maxConcurrency = 60;
    final int msgCount = 200;
    final Vector<Throwable> exceptions = new Vector<Throwable>();

    @Override
    protected BrokerService createBroker() throws Exception {
        //persistent = true;
        BrokerService broker = new BrokerService();
        broker.setDeleteAllMessagesOnStartup(true);
        broker.addConnector("tcp://localhost:0");
        PolicyMap policyMap = new PolicyMap();
        PolicyEntry defaultEntry = new PolicyEntry();
        defaultEntry.setPendingQueuePolicy(new FilePendingQueueMessageStoragePolicy());
        defaultEntry.setCursorMemoryHighWaterMark(50);
        defaultEntry.setMemoryLimit(500*1024);
        defaultEntry.setProducerFlowControl(false);
        policyMap.setDefaultEntry(defaultEntry);
        broker.setDestinationPolicy(policyMap);

        broker.getSystemUsage().getMemoryUsage().setLimit(1000 * 1024);

        return broker;
    }

    @Test(timeout = 30 * 1000)
    public void testConcurrentSendToPendingCursor() throws Exception {
        final ActiveMQConnectionFactory factory =
                new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getConnectUri());
        factory.setCloseTimeout(30000);
        ExecutorService executor = Executors.newCachedThreadPool();
        for (int i=0; i<maxConcurrency; i++) {
            final ActiveMQQueue dest = new ActiveMQQueue("Queue-" + i);
            executor.execute(new Runnable() {
                @Override
                public void run() {
                    try {
                        sendMessages(factory.createConnection(), dest, msgCount);
                    } catch (Throwable t) {
                        exceptions.add(t);
                    }
                }
            });
        }

        executor.shutdown();

        assertTrue("send completed", executor.awaitTermination(60, TimeUnit.SECONDS));
        assertNoExceptions();

        executor = Executors.newCachedThreadPool();
        for (int i=0; i<maxConcurrency; i++) {
            final ActiveMQQueue dest = new ActiveMQQueue("Queue-" + i);
            executor.execute(new Runnable() {
                @Override
                public void run() {
                    try {
                        startConsumers(factory, dest);
                    } catch (Throwable t) {
                        exceptions.add(t);
                    }
                }
            });
        }

        executor.shutdown();
        assertTrue("consumers completed", executor.awaitTermination(60, TimeUnit.SECONDS));

        allMessagesList.setMaximumDuration(120*1000);
        final int numExpected = maxConcurrency * msgCount;
        allMessagesList.waitForMessagesToArrive(numExpected);

        if (allMessagesList.getMessageCount() != numExpected) {
            dumpAllThreads(getName());

        }
        allMessagesList.assertMessagesReceivedNoWait(numExpected);

        assertTrue("no exceptions: " + exceptions, exceptions.isEmpty());

    }

    private void assertNoExceptions() {
        if (!exceptions.isEmpty()) {
            for (Throwable t: exceptions) {
                t.printStackTrace();
            }
        }
        assertTrue("no exceptions: " + exceptions, exceptions.isEmpty());
    }
}


text:
#ifndef PT_T_H
#define PT_T_H

#include <pte_t.h>
#include <types.h>

#ifdef __cplusplus
extern "C"
{
#endif

#pragma pack(push, 1)

/** @brief defines total number of entries in the PT */
#define LOADER_NUM_PT_ENTRIES ((uint64_t)512)

    /**
     * <!-- description -->
     *   @brief Defines the layout of a page table (pt).
     */
    struct pt_t
    {
        /** @brief stores the entries for this page table */
        struct pte_t entires[LOADER_NUM_PT_ENTRIES];
    };

#pragma pack(pop)

#ifdef __cplusplus
}
#endif

#endif


text:
<!DOCTYPE html>

    <link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">

    <link href="<?php echo base_url();?>plugins/bootstrap/css/bootstrap.css" rel="stylesheet">

    <link href="<?php echo base_url();?>plugins/node-waves/waves.css" rel="stylesheet" />

    <link href="<?php echo base_url();?>plugins/animate-css/animate.css" rel="stylesheet" />

    <link href="<?php echo base_url();?>plugins/jquery-datatable/skin/bootstrap/css/dataTables.bootstrap.min.css" rel="stylesheet">

    <link href="<?php echo base_url(); ?>plugins/sweetalert/sweetalert.css" rel="stylesheet" />

    <link href="<?php echo base_url();?>css/style.css" rel="stylesheet">

    <link href="<?php echo base_url(); ?>css/themes/all-themes.css" rel="stylesheet" />

	<?php include 'navigasi.php'; ?>
	<?php include 'sidebar.php'; ?>

                                DATA DOKTER

                            <a href="<?php echo base_url('index.php/admin/form') ?>" class="btn bg-red  waves-effect pull-right">
                                add
                                Tambahkan

                                            ID DOKTER
                                            FOTO
                                            NAMA
                                            SPESIALISASI
                                            AKSI

                                        <?php
                                        $no = 1;
                                        foreach ($user as $u) { ?>

                                            <?php echo $no++; ?>
                                            no pict
                                            <?php echo $u->nama_dokter; ?>
                                            <?php echo $u->spesialisasi; ?>

                                                <a href="<?php echo base_url('index.php/poli/hapusdokter/').$u->id_dokter; ?>" class="btn btn-danger btn-circle waves-effect waves-circle waves-float confirmation " data-toggle="tooltip" data-placement="left" title="Hapus data" onClick="return ">
                                                delete

                                                create

                                        <?php } ?>


text:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

          <title>BetweennessCentrality - spark-betweenness-centrality 0.0.1-SNAPSHOT API - uni.big_data.spark.betweenness_centrality.BetweennessCentrality</title>
          <meta name="description" content="BetweennessCentrality - spark - betweenness - centrality 0.0.1 - SNAPSHOT API - uni.big data.spark.betweenness centrality.BetweennessCentrality" />
          <meta name="keywords" content="BetweennessCentrality spark betweenness centrality 0.0.1 SNAPSHOT API uni.big data.spark.betweenness centrality.BetweennessCentrality" />
          <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

      <link href="../../../../lib/template.css" media="screen" type="text/css" rel="stylesheet" />
      <link href="../../../../lib/diagrams.css" media="screen" type="text/css" rel="stylesheet" id="diagrams-css" />

uni.big_data.spark.betweenness_centrality

BetweennessCentrality

        object

        BetweennessCentrality

Implements an solution to calculate betweeness centrality values for a given graph.
[https://en.wikipedia.org/wiki/Betweenness_centrality]

Example:

Given a simple graph we can calculate the betwenness centrality values:

//Define Vertices
val vertices: RDD[(VertexId,Int)] = sc.parallelize(
   Array(
     (1L,0),
     (2L,0),
     (3L,0),
     (4L,0),
     (5L,0),
   )
)

//Define edges and edge weights
val relationships: RDD[Edge[Double]] = sc.parallelize(
  Array(
    Edge(1L, 2L, 1.0),
    Edge(1L, 3L, 1.0),
    Edge(3L, 4L, 1.0),
    Edge(2L, 4L, 1.0),
    Edge(3L, 5L, 1.0),
    Edge(4L, 5L, 2.0),
  )
)

// Generate a GraphX graph object
val graph = Graph(vertices, relationships)

// Run calculations
val centralityValues = BetweenessCentrality.run(graph)

println("ID \t Betweeness Centrality")
shortestPaths.vertices.collect.foreach( (data) => {
  println(s"${data._1} \t ${} \t ${data._2")
})

          Linear Supertypes

AnyRef, Any

<input id="mbrsel-input" type="text" accesskey="/" />

              Ordering

Alphabetic

By inheritance

                Inherited

BetweennessCentrality

AnyRef

Any

Hide All

Show all

            Learn more about member selection

            Visibility

Public

All

Value Members

        final
        def

        !=(arg0: AnyRef): Boolean

Definition Classes

AnyRef

        final
        def

        !=(arg0: Any): Boolean

Definition Classes

Any

        final
        def

        ##(): Int

Definition Classes

AnyRef → Any

        final
        def

        ==(arg0: AnyRef): Boolean

Definition Classes

AnyRef

        final
        def

        ==(arg0: Any): Boolean

Definition Classes

Any

        final
        def

        asInstanceOf[T0]: T0

Definition Classes

Any

        def

        clone(): AnyRef

Attributes

protected[java.lang]

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

        final
        def

        eq(arg0: AnyRef): Boolean

Definition Classes

AnyRef

        def

        equals(arg0: Any): Boolean

Definition Classes

AnyRef → Any

        def

        finalize(): Unit

Attributes

protected[java.lang]

Definition Classes

AnyRef

Annotations

                @throws(

      classOf[java.lang.Throwable]
    )

        final
        def

        getClass(): Class[_]

Definition Classes

AnyRef → Any

        def

        hashCode(): Int

Definition Classes

AnyRef → Any

        final
        def

        isInstanceOf[T0]: Boolean

Definition Classes

Any

        final
        def

        ne(arg0: AnyRef): Boolean

Definition Classes

AnyRef

        final
        def

        notify(): Unit

Definition Classes

AnyRef

        final
        def

        notifyAll(): Unit

Definition Classes

AnyRef

        def

        run[T](graph: Graph[T, Double]): Graph[Double, Double]

Given a weighted directed graph this calculates the betweenness centrality for every vertex in the graph.

Given a weighted directed graph this calculates the betweenness centrality for every vertex in the graph.
This value states the number of shortest paths for all vertices to all vertices that pass through that node
and can be used as a measurement for vertex importance.
The values are calculated using the following algorithm:

(1) For every vertex v in the graph
  (2) calculate the shortest path to all other vertices
  (3) traverse these shortest paths in opposite direction and increase the counter for every vertex on that path

T

the vertex data type

graph

the input graph, edge type must be Double (weight).

returns

the resulting graph with betweenness centrality values attached to each vertex

        final
        def

        synchronized[T0](arg0: ⇒ T0): T0

Definition Classes

AnyRef

        def

        toString(): String

Definition Classes

AnyRef → Any

        final
        def

        wait(): Unit

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

        final
        def

        wait(arg0: Long, arg1: Int): Unit

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

        final
        def

        wait(arg0: Long): Unit

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

Inherited from AnyRef

Inherited from Any

Ungrouped


text:
<?php
class Kwc_Blog_Directory_Component extends Kwc_Directories_ItemPage_Directory_Component
{
    public static function getSettings()
    {
        $ret = parent::getSettings();
        $ret['componentName'] = trlKwfStatic('Blog');
        $ret['componentIcon'] = 'newspaper';
        $ret['componentCategory'] = 'admin';
        $ret['childModel'] = 'Kwc_Blog_Directory_Model';
        $ret['ownModel'] = 'Kwf_Component_FieldModel';

        $ret['generators']['detail']['class'] = 'Kwc_Blog_Directory_Generator';
        $ret['generators']['detail']['component'] = 'Kwc_Blog_Detail_Component';
        $ret['generators']['detail']['nameColumn'] = 'title';
        $ret['generators']['detail']['dbIdShortcut'] = 'blog_';

        $ret['generators']['child']['component']['view'] = 'Kwc_Blog_List_View_Component';

        $ret['generators']['feed'] = array(
            'class' => 'Kwf_Component_Generator_Page_Static',
            'component' => 'Kwc_Blog_List_Feed_Component',
            'name' => trlKwfStatic('Feed')
        );
        $ret['generators']['categories'] = array(
            'class' => 'Kwf_Component_Generator_PseudoPage_Static',
            'component' => 'Kwc_Blog_Category_Directory_Component',
            'name' => trlKwfStatic('Categories'),
            'showInMenu' => false
        );
        $ret['assetsAdmin']['dep'][] = 'ExtFormDateField';

        $ret['menuConfig'] = 'Kwf_Component_Abstract_MenuConfig_SameClass';

        //darf im seitenbaum nicht berbeitet werden
        $ret['extConfig'] = 'Kwc_Blog_Directory_ExtConfig';

        //config fuer admin button oben
        $ret['extConfigControllerIndex'] = 'Kwc_Directories_Item_Directory_ExtConfigTabs';

        return $ret;
    }

    public static function getViewCacheLifetimeForView()
    {
        return mktime(0, 0, 0, date('m'), date('d')+1, date('Y')) - time();
    }
}


text:
<?php declare(strict_types=1);

namespace ApiClients\Client\Travis;

use ApiClients\Client\Travis\CommandBus\Command;
use ApiClients\Client\Travis\Resource\HookInterface;
use ApiClients\Foundation\ClientInterface;
use ApiClients\Foundation\Factory;
use ApiClients\Foundation\Resource\ResourceInterface;
use React\EventLoop\LoopInterface;
use React\Promise\CancellablePromiseInterface;
use React\Promise\PromiseInterface;
use Rx\Observable;
use Rx\React\Promise;
use function ApiClients\Tools\Rx\setAsyncScheduler;
use function ApiClients\Tools\Rx\unwrapObservableFromPromise;

final class AsyncClient implements AsyncClientInterface
{
    /**
     * @var ClientInterface
     */
    private $client;

    /**
     * @param ClientInterface $client
     */
    private function __construct(ClientInterface $client)
    {
        $this->client = $client;
    }

    /**
     * Create a new AsyncClient based on the loop and other options pass.
     *
     * @param  LoopInterface $loop
     * @param  string        $token   Instructions to fetch the token: https://blog.travis-ci.com/2013-01-28-token-token-token/
     * @param  array         $options
     * @return AsyncClient
     */
    public static function create(
        LoopInterface $loop,
        string $token = '',
        array $options = []
    ): self {
        setAsyncScheduler($loop);

        $options = ApiSettings::getOptions($token, 'Async', $options);
        $client = Factory::create($loop, $options);

        return new self($client);
    }

    public function hydrate(string $resource): CancellablePromiseInterface
    {
        return $this->client->hydrate($resource);
    }

    public function extract(ResourceInterface $resource): CancellablePromiseInterface
    {
        return $this->client->extract($resource);
    }

    /**
     * Create an AsyncClient from a ApiClients\Foundation\ClientInterface.
     * Be sure to pass in a client with the options from ApiSettings and the Async namespace suffix.
     *
     * @param  ClientInterface $client
     * @return AsyncClient
     */
    public static function createFromClient(ClientInterface $client): self
    {
        return new self($client);
    }

    /**
     * {@inheritdoc}
     */
    public function repository(string $repository): CancellablePromiseInterface
    {
        return $this->client->handle(new Command\RepositoryCommand($repository));
    }

    /**
     * Warning this a intensive operation as it has to make a call for each hook
     * to turn it into a Repository!!!
     *
     * Take a look at examples/repositories-async.php on how to limit the amount of
     * concurrent requests.
     *
     * {@inheritdoc}
     */
    public function repositories(callable $filter = null): Observable
    {
        if ($filter === null) {
            $filter = function () {
                return true;
            };
        }

        return $this->hooks()->filter(function ($hook) {
            return $hook->active();
        })->filter($filter)->flatMap(function (HookInterface $hook) {
            return Promise::toObservable($this->client->handle(
                new Command\RepositoryIdCommand($hook->id())
            ));
        });
    }

    /**
     * {@inheritdoc}
     */
    public function user(): PromiseInterface
    {
        return $this->client->handle(new Command\UserCommand());
    }

    /**
     * {@inheritdoc}
     */
    public function sshKey(int $id): PromiseInterface
    {
        return $this->client->handle(new Command\SSHKeyCommand($id));
    }

    /**
     * @return Observable
     */
    public function hooks(): Observable
    {
        return unwrapObservableFromPromise($this->client->handle(
            new Command\HooksCommand()
        ));
    }

    /**
     * {@inheritdoc}
     */
    public function accounts(): Observable
    {
        return unwrapObservableFromPromise($this->client->handle(
            new Command\AccountsCommand()
        ));
    }

    /**
     * {@inheritdoc}
     */
    public function broadcasts(): Observable
    {
        return unwrapObservableFromPromise($this->client->handle(
            new Command\BroadcastsCommand()
        ));
    }
}


text:
package com.tngtech.archunit.lang.syntax;

import java.lang.annotation.Annotation;
import java.util.function.Function;

import com.tngtech.archunit.base.DescribedPredicate;
import com.tngtech.archunit.core.domain.JavaAnnotation;
import com.tngtech.archunit.core.domain.JavaClass;
import com.tngtech.archunit.core.domain.JavaCodeUnit;
import com.tngtech.archunit.core.domain.JavaConstructor;
import com.tngtech.archunit.core.domain.JavaField;
import com.tngtech.archunit.core.domain.JavaMember;
import com.tngtech.archunit.core.domain.JavaMethod;
import com.tngtech.archunit.core.domain.JavaModifier;
import com.tngtech.archunit.core.domain.JavaStaticInitializer;
import com.tngtech.archunit.lang.syntax.elements.ClassesThat;
import com.tngtech.archunit.lang.syntax.elements.GivenMembersConjunction;

import static com.tngtech.archunit.base.DescribedPredicate.doNot;
import static com.tngtech.archunit.base.DescribedPredicate.not;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.ANNOTATIONS;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.ANONYMOUS_CLASSES;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.ENUMS;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.INNER_CLASSES;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.INTERFACES;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.LOCAL_CLASSES;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.MEMBER_CLASSES;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.NESTED_CLASSES;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.RECORDS;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.TOP_LEVEL_CLASSES;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.assignableFrom;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.assignableTo;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.simpleNameContaining;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.simpleNameEndingWith;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.simpleNameStartingWith;
import static com.tngtech.archunit.core.domain.properties.CanBeAnnotated.Predicates.annotatedWith;
import static com.tngtech.archunit.core.domain.properties.CanBeAnnotated.Predicates.metaAnnotatedWith;
import static com.tngtech.archunit.core.domain.properties.HasName.Predicates.nameMatching;
import static com.tngtech.archunit.lang.conditions.ArchPredicates.are;
import static com.tngtech.archunit.lang.conditions.ArchPredicates.have;

class MembersDeclaredInClassesThat<MEMBER extends JavaMember, CONJUNCTION extends GivenMembersConjunction<MEMBER>>
        implements ClassesThat<CONJUNCTION> {
    private final Function<DescribedPredicate<? super JavaClass>, CONJUNCTION> predicateAggregator;

    MembersDeclaredInClassesThat(Function<DescribedPredicate<? super JavaClass>, CONJUNCTION> predicateAggregator) {
        this.predicateAggregator = predicateAggregator;
    }

    @Override
    public CONJUNCTION haveFullyQualifiedName(String name) {
        return givenWith(SyntaxPredicates.haveFullyQualifiedName(name));
    }

    @Override
    public CONJUNCTION doNotHaveFullyQualifiedName(String name) {
        return givenWith(SyntaxPredicates.doNotHaveFullyQualifiedName(name));
    }

    @Override
    public CONJUNCTION haveSimpleName(String name) {
        return givenWith(SyntaxPredicates.haveSimpleName(name));
    }

    @Override
    public CONJUNCTION doNotHaveSimpleName(String name) {
        return givenWith(SyntaxPredicates.doNotHaveSimpleName(name));
    }

    @Override
    public CONJUNCTION haveNameMatching(String regex) {
        return givenWith(have(nameMatching(regex)));
    }

    @Override
    public CONJUNCTION haveNameNotMatching(String regex) {
        return givenWith(SyntaxPredicates.haveNameNotMatching(regex));
    }

    @Override
    public CONJUNCTION haveSimpleNameStartingWith(String prefix) {
        return givenWith(have(simpleNameStartingWith(prefix)));
    }

    @Override
    public CONJUNCTION haveSimpleNameNotStartingWith(String prefix) {
        return givenWith(SyntaxPredicates.haveSimpleNameNotStartingWith(prefix));
    }

    @Override
    public CONJUNCTION haveSimpleNameContaining(String infix) {
        return givenWith(have(simpleNameContaining(infix)));
    }

    @Override
    public CONJUNCTION haveSimpleNameNotContaining(String infix) {
        return givenWith(SyntaxPredicates.haveSimpleNameNotContaining(infix));
    }

    @Override
    public CONJUNCTION haveSimpleNameEndingWith(String suffix) {
        return givenWith(have(simpleNameEndingWith(suffix)));
    }

    @Override
    public CONJUNCTION haveSimpleNameNotEndingWith(String suffix) {
        return givenWith(SyntaxPredicates.haveSimpleNameNotEndingWith(suffix));
    }

    @Override
    public CONJUNCTION resideInAPackage(String packageIdentifier) {
        return givenWith(JavaClass.Predicates.resideInAPackage(packageIdentifier));
    }

    @Override
    public CONJUNCTION resideInAnyPackage(String... packageIdentifiers) {
        return givenWith(JavaClass.Predicates.resideInAnyPackage(packageIdentifiers));
    }

    @Override
    public CONJUNCTION resideOutsideOfPackage(String packageIdentifier) {
        return givenWith(JavaClass.Predicates.resideOutsideOfPackage(packageIdentifier));
    }

    @Override
    public CONJUNCTION resideOutsideOfPackages(String... packageIdentifiers) {
        return givenWith(JavaClass.Predicates.resideOutsideOfPackages(packageIdentifiers));
    }

    @Override
    public CONJUNCTION arePublic() {
        return givenWith(SyntaxPredicates.arePublic());
    }

    @Override
    public CONJUNCTION areNotPublic() {
        return givenWith(SyntaxPredicates.areNotPublic());
    }

    @Override
    public CONJUNCTION areProtected() {
        return givenWith(SyntaxPredicates.areProtected());
    }

    @Override
    public CONJUNCTION areNotProtected() {
        return givenWith(SyntaxPredicates.areNotProtected());
    }

    @Override
    public CONJUNCTION arePackagePrivate() {
        return givenWith(SyntaxPredicates.arePackagePrivate());
    }

    @Override
    public CONJUNCTION areNotPackagePrivate() {
        return givenWith(SyntaxPredicates.areNotPackagePrivate());
    }

    @Override
    public CONJUNCTION arePrivate() {
        return givenWith(SyntaxPredicates.arePrivate());
    }

    @Override
    public CONJUNCTION areNotPrivate() {
        return givenWith(SyntaxPredicates.areNotPrivate());
    }

    @Override
    public CONJUNCTION haveModifier(JavaModifier modifier) {
        return givenWith(SyntaxPredicates.haveModifier(modifier));
    }

    @Override
    public CONJUNCTION doNotHaveModifier(JavaModifier modifier) {
        return givenWith(SyntaxPredicates.doNotHaveModifier(modifier));
    }

    @Override
    public CONJUNCTION areAnnotatedWith(Class<? extends Annotation> annotationType) {
        return givenWith(are(annotatedWith(annotationType)));
    }

    @Override
    public CONJUNCTION areNotAnnotatedWith(Class<? extends Annotation> annotationType) {
        return givenWith(are(not(annotatedWith(annotationType))));
    }

    @Override
    public CONJUNCTION areAnnotatedWith(String annotationTypeName) {
        return givenWith(are(annotatedWith(annotationTypeName)));
    }

    @Override
    public CONJUNCTION areNotAnnotatedWith(String annotationTypeName) {
        return givenWith(are(not(annotatedWith(annotationTypeName))));
    }

    @Override
    public CONJUNCTION areAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate) {
        return givenWith(are(annotatedWith(predicate)));
    }

    @Override
    public CONJUNCTION areNotAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate) {
        return givenWith(are(not(annotatedWith(predicate))));
    }

    @Override
    public CONJUNCTION areMetaAnnotatedWith(Class<? extends Annotation> annotationType) {
        return givenWith(are(metaAnnotatedWith(annotationType)));
    }

    @Override
    public CONJUNCTION areNotMetaAnnotatedWith(Class<? extends Annotation> annotationType) {
        return givenWith(are(not(metaAnnotatedWith(annotationType))));
    }

    @Override
    public CONJUNCTION areMetaAnnotatedWith(String annotationTypeName) {
        return givenWith(are(metaAnnotatedWith(annotationTypeName)));
    }

    @Override
    public CONJUNCTION areNotMetaAnnotatedWith(String annotationTypeName) {
        return givenWith(are(not(metaAnnotatedWith(annotationTypeName))));
    }

    @Override
    public CONJUNCTION areMetaAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate) {
        return givenWith(are(metaAnnotatedWith(predicate)));
    }

    @Override
    public CONJUNCTION areNotMetaAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate) {
        return givenWith(are(not(metaAnnotatedWith(predicate))));
    }

    @Override
    public CONJUNCTION implement(Class<?> type) {
        return givenWith(JavaClass.Predicates.implement(type));
    }

    @Override
    public CONJUNCTION doNotImplement(Class<?> type) {
        return givenWith(doNot(JavaClass.Predicates.implement(type)));
    }

    @Override
    public CONJUNCTION implement(String typeName) {
        return givenWith(JavaClass.Predicates.implement(typeName));
    }

    @Override
    public CONJUNCTION doNotImplement(String typeName) {
        return givenWith(doNot(JavaClass.Predicates.implement(typeName)));
    }

    @Override
    public CONJUNCTION implement(DescribedPredicate<? super JavaClass> predicate) {
        return givenWith(JavaClass.Predicates.implement(predicate));
    }

    @Override
    public CONJUNCTION doNotImplement(DescribedPredicate<? super JavaClass> predicate) {
        return givenWith(doNot(JavaClass.Predicates.implement(predicate)));
    }

    @Override
    public CONJUNCTION areAssignableTo(Class<?> type) {
        return givenWith(are(assignableTo(type)));
    }

    @Override
    public CONJUNCTION areNotAssignableTo(Class<?> type) {
        return givenWith(are(not(assignableTo(type))));
    }

    @Override
    public CONJUNCTION areAssignableTo(String typeName) {
        return givenWith(are(assignableTo(typeName)));
    }

    @Override
    public CONJUNCTION areNotAssignableTo(String typeName) {
        return givenWith(are(not(assignableTo(typeName))));
    }

    @Override
    public CONJUNCTION areAssignableTo(DescribedPredicate<? super JavaClass> predicate) {
        return givenWith(are(assignableTo(predicate)));
    }

    @Override
    public CONJUNCTION areNotAssignableTo(DescribedPredicate<? super JavaClass> predicate) {
        return givenWith(are(not(assignableTo(predicate))));
    }

    @Override
    public CONJUNCTION areAssignableFrom(Class<?> type) {
        return givenWith(are(assignableFrom(type)));
    }

    @Override
    public CONJUNCTION areNotAssignableFrom(Class<?> type) {
        return givenWith(are(not(assignableFrom(type))));
    }

    @Override
    public CONJUNCTION areAssignableFrom(String typeName) {
        return givenWith(are(assignableFrom(typeName)));
    }

    @Override
    public CONJUNCTION areNotAssignableFrom(String typeName) {
        return givenWith(are(not(assignableFrom(typeName))));
    }

    @Override
    public CONJUNCTION areAssignableFrom(DescribedPredicate<? super JavaClass> predicate) {
        return givenWith(are(assignableFrom(predicate)));
    }

    @Override
    public CONJUNCTION areNotAssignableFrom(DescribedPredicate<? super JavaClass> predicate) {
        return givenWith(are(not(assignableFrom(predicate))));
    }

    @Override
    public CONJUNCTION areInterfaces() {
        return givenWith(are(INTERFACES));
    }

    @Override
    public CONJUNCTION areNotInterfaces() {
        return givenWith(are(not(INTERFACES)));
    }

    @Override
    public CONJUNCTION areEnums() {
        return givenWith(are(ENUMS));
    }

    @Override
    public CONJUNCTION areNotEnums() {
        return givenWith(are(not(ENUMS)));
    }

    @Override
    public CONJUNCTION areAnnotations() {
        return givenWith(are(ANNOTATIONS));
    }

    @Override
    public CONJUNCTION areNotAnnotations() {
        return givenWith(are(not(ANNOTATIONS)));
    }

    @Override
    public CONJUNCTION areRecords() {
        return givenWith(are(RECORDS));
    }

    @Override
    public CONJUNCTION areNotRecords() {
        return givenWith(are(not(RECORDS)));
    }

    @Override
    public CONJUNCTION areTopLevelClasses() {
        return givenWith(are(TOP_LEVEL_CLASSES));
    }

    @Override
    public CONJUNCTION areNotTopLevelClasses() {
        return givenWith(are(not(TOP_LEVEL_CLASSES)));
    }

    @Override
    public CONJUNCTION areNestedClasses() {
        return givenWith(are(NESTED_CLASSES));
    }

    @Override
    public CONJUNCTION areNotNestedClasses() {
        return givenWith(are(not(NESTED_CLASSES)));
    }

    @Override
    public CONJUNCTION areMemberClasses() {
        return givenWith(are(MEMBER_CLASSES));
    }

    @Override
    public CONJUNCTION areNotMemberClasses() {
        return givenWith(are(not(MEMBER_CLASSES)));
    }

    @Override
    public CONJUNCTION areInnerClasses() {
        return givenWith(are(INNER_CLASSES));
    }

    @Override
    public CONJUNCTION areNotInnerClasses() {
        return givenWith(are(not(INNER_CLASSES)));
    }

    @Override
    public CONJUNCTION areAnonymousClasses() {
        return givenWith(are(ANONYMOUS_CLASSES));
    }

    @Override
    public CONJUNCTION areNotAnonymousClasses() {
        return givenWith(are(not(ANONYMOUS_CLASSES)));
    }

    @Override
    public CONJUNCTION areLocalClasses() {
        return givenWith(are(LOCAL_CLASSES));
    }

    @Override
    public CONJUNCTION areNotLocalClasses() {
        return givenWith(are(not(LOCAL_CLASSES)));
    }

    @Override
    public CONJUNCTION belongToAnyOf(Class<?>... classes) {
        return givenWith(JavaClass.Predicates.belongToAnyOf(classes));
    }

    @Override
    public CONJUNCTION doNotBelongToAnyOf(Class<?>... classes) {
        return givenWith(doNot(JavaClass.Predicates.belongToAnyOf(classes)));
    }

    @Override
    public CONJUNCTION containAnyMembersThat(DescribedPredicate<? super JavaMember> predicate) {
        return givenWith(JavaClass.Predicates.containAnyMembersThat(predicate));
    }

    @Override
    public CONJUNCTION containAnyFieldsThat(DescribedPredicate<? super JavaField> predicate) {
        return givenWith(JavaClass.Predicates.containAnyFieldsThat(predicate));
    }

    @Override
    public CONJUNCTION containAnyCodeUnitsThat(DescribedPredicate<? super JavaCodeUnit> predicate) {
        return givenWith(JavaClass.Predicates.containAnyCodeUnitsThat(predicate));
    }

    @Override
    public CONJUNCTION containAnyMethodsThat(DescribedPredicate<? super JavaMethod> predicate) {
        return givenWith(JavaClass.Predicates.containAnyMethodsThat(predicate));
    }

    @Override
    public CONJUNCTION containAnyConstructorsThat(DescribedPredicate<? super JavaConstructor> predicate) {
        return givenWith(JavaClass.Predicates.containAnyConstructorsThat(predicate));
    }

    @Override
    public CONJUNCTION containAnyStaticInitializersThat(DescribedPredicate<? super JavaStaticInitializer> predicate) {
        return givenWith(JavaClass.Predicates.containAnyStaticInitializersThat(predicate));
    }

    private CONJUNCTION givenWith(DescribedPredicate<? super JavaClass> predicate) {
        return predicateAggregator.apply(predicate);
    }
}


text:
<resources>
    <string name="app_name">Jav-utils</string>
</resources>


text:
package org.apache.camel.component.jms;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

import javax.jms.ConnectionFactory;

import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.apache.camel.util.StopWatch;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknowledge;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class JmsRequestReplyExclusiveReplyToConcurrentTest extends CamelTestSupport {

    private static final Logger LOG = LoggerFactory.getLogger(JmsRequestReplyExclusiveReplyToConcurrentTest.class);

    private final int size = 100;
    private final CountDownLatch latch = new CountDownLatch(size);

    @Test
    public void testJmsRequestReplyExclusiveFixedReplyTo() throws Exception {
        StopWatch watch = new StopWatch();
        ExecutorService executor = Executors.newFixedThreadPool(10);
        for (int i = 0; i < size; i++) {
            final Integer num = i;
            executor.submit(() -> {
                String reply = template.requestBody("direct:start", "" + num, String.class);
                LOG.info("Sent {} expecting reply 'Hello {}' got --> {}", num, num, reply);
                assertNotNull(reply);
                assertEquals("Hello " + num, reply);
                latch.countDown();
            });
        }

        LOG.info("Waiting to process {} messages...", size);

        // if any of the assertions above fails then the latch will not get decremented
        assertTrue(latch.await(3, TimeUnit.SECONDS), "All assertions outside the main thread above should have passed");

        long delta = watch.taken();
        LOG.info("Took {} millis", delta);

        // just sleep a bit before shutting down
        Thread.sleep(1000);

        executor.shutdownNow();
    }

    @Override
    protected CamelContext createCamelContext() throws Exception {
        CamelContext camelContext = super.createCamelContext();
        ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
        camelContext.addComponent("activemq", jmsComponentAutoAcknowledge(connectionFactory));
        return camelContext;
    }

    @Override
    protected RouteBuilder createRouteBuilder() {
        return new RouteBuilder() {
            @Override
            public void configure() {
                from("direct:start")
                        .to("activemq:queue:foo?replyTo=bar&replyToType=Exclusive&concurrentConsumers=5&maxConcurrentConsumers=10&maxMessagesPerTask=100")
                        .to("log:reply")
                        .to("mock:reply");

                from("activemq:queue:foo?concurrentConsumers=5&maxConcurrentConsumers=10&maxMessagesPerTask=100")
                        .transform(body().prepend("Hello "));
            }
        };
    }
}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Need to be note page'd Level 54</title>
		<link>http://bvs.wikidot.com/forum/t-96150/need-to-be-note-page-d-level-54</link>
		<description>Posts in the discussion thread "Need to be note page'd Level 54" - Hattake of Champions Village</description>
				<copyright></copyright>
		<lastBuildDate>Sun, 10 Jul 2022 05:17:46 +0000</lastBuildDate>

					<item>
				<guid>http://bvs.wikidot.com/forum/t-96150#post-281688</guid>
				<title>Re: Need to be note page'd Level 54</title>
				<link>http://bvs.wikidot.com/forum/t-96150/need-to-be-note-page-d-level-54#post-281688</link>
				<description></description>
				<pubDate>Sun, 12 Oct 2008 20:59:38 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[

still looking

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-96150#post-280577</guid>
				<title>Need to be note page'd Level 54</title>
				<link>http://bvs.wikidot.com/forum/t-96150/need-to-be-note-page-d-level-54#post-280577</link>
				<description></description>
				<pubDate>Fri, 10 Oct 2008 20:16:15 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[

Hattake in Champions Village

i can note you back if you want

				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>


text:
function FileData_Pairs(x)
{
x.t("describes","rembrandt");
x.t("launching","genepattern");
x.t("comparisons","hierarchical");
x.t("hierarchical","clustering");
x.t("overview","performing");
x.t("high","order");
x.t("component","analyses");
x.t("component","analysis");
x.t("comparison","performing");
x.t("section","describes");
x.t("section","include");
x.t("rembrandt","run");
x.t("analyses","topics");
x.t("analyses","including");
x.t("clustering","principal");
x.t("clustering","analysis");
x.t("performing","hierarchical");
x.t("performing","principal");
x.t("performing","genepattern");
x.t("performing","class");
x.t("principal","component");
x.t("include","high");
x.t("topics","section");
x.t("order","analyses");
x.t("order","analysis");
x.t("run","higher");
x.t("genepattern","analysis");
x.t("class","comparisons");
x.t("class","comparison");
x.t("analysis","launching");
x.t("analysis","overview");
x.t("analysis","high");
x.t("analysis","section");
x.t("analysis","performing");
x.t("including","class");
x.t("higher","order");
}


text:
<?xml version="1.0"?>
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.sakaiproject.userauditservice</groupId>
        <artifactId>userauditservice-deploy</artifactId>
        <version>11-SNAPSHOT</version>
    </parent>

    <name>Sakai userauditservice Shared Deploy</name>
    <groupId>org.sakaiproject.userauditservice</groupId>
    <artifactId>userauditservice-shared</artifactId>
    <packaging>pom</packaging>

    <description>userauditservice shared deploy POM.</description>

    <organization>
        <name>Sakai Project</name>
        <url>http://sakaiproject.org/</url>
    </organization>
    <inceptionYear>2013</inceptionYear>

     <properties>
        <deploy.target>shared</deploy.target>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.simpleframework</groupId>
            <artifactId>simple-xml</artifactId>
        </dependency>
    </dependencies>
</project>


text:
package common.util;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.concurrent.*;

/**
 * @author heyunxia.
 * @Description
 * @time 2015/5/15 14:44
 */
public class ConcurrencyUtils {

    ////////////////////////////////////////字典缓存////////////////////////////////////////////////////////////////

    public interface IClientDictionary<A, V> {
        V getDic(A groupName) throws InterruptedException;

        /**
         * 刷新缓存
         * @param key
         * @throws InterruptedException
         */
        void refresh(A key) throws InterruptedException;

        void refreshAll() throws InterruptedException;
    }

    public static class ClientDictionary<A, V> implements IClientDictionary<A, V> {

        private final ConcurrentMap<A, Future<V>> cache = new ConcurrentHashMap<>();
        private final IClientDictionary<A, V> d;

        public ClientDictionary(IClientDictionary<A, V> d) {
            this.d = d;
        }

        @Override
        public V getDic(final A groupName) throws InterruptedException {
            while (true) {

                Future<V> f = cache.get(groupName);
                try {
                    if (f == null) {
                        Callable<V> eval = new Callable<V>() {
                            @Override
                            public V call() throws Exception {
                                return d.getDic(groupName);
                            }
                        };

                        FutureTask<V> futureTask = new FutureTask<>(eval);
                        f = cache.putIfAbsent(groupName, futureTask);
                        if (f == null) {
                            f = futureTask;
                            futureTask.run();
                        }
                    }
                    return f.get();
                } catch (CancellationException e) {
                    cache.remove(groupName, f);
                } catch (ExecutionException e) {
                    f.cancel(true);
                    cache.remove(groupName);
                    //e.printStackTrace();
                }
            }
        }

        @Override
        public void refresh(A key) throws InterruptedException {
            cache.remove(key);
        }

        @Override
        public void refreshAll() throws InterruptedException {
            Set<A> set  = cache.keySet();
            for(A key: set) {
                cache.remove(key);
            }
        }
    }

    private static final IClientDictionary<String, List<Dictionary>> dic = new IClientDictionary<String, List<Dictionary>>() {
        @Override
        public List<Dictionary> getDic(String groupName) throws InterruptedException {
            try {
                List<Dictionary> list = null;//load data from db, filter by groupName..;
                return list;
            } catch (Exception e) {
                return new ArrayList<Dictionary>();
            }
        }

        @Override
        public void refresh(String key) throws InterruptedException {

        }

        @Override
        public void refreshAll() throws InterruptedException {

        }
    };

    private static final IClientDictionary<String, List<Dictionary>> cacheDictionary = new ClientDictionary<>(dic);

    public static List<Dictionary> getDictionary(String groupName) {

        try {
            List<Dictionary> list = cacheDictionary.getDic(groupName);
            if (list.size() == 0){
                cacheDictionary.refresh(groupName);
            }
            return list;
        } catch (InterruptedException e) {
            e.printStackTrace();
            return new ArrayList<Dictionary>();
        }
    }

    /**
     * 根据指定的groupName查询 对应key的value
     * @param groupName     字典名称
     * @param key            字典key
     * @return
     */
    public static Dictionary getDictionaryByKey(String groupName, String key) {
        Dictionary dict = null;

        List<Dictionary> list = getDictionary(groupName);
        for (Dictionary dictonary : list) {
            if (dictonary.getDictKey().equals(key)) {
                dict = dictonary;
                break;
            }
        }
        if (dict == null) {
            dict = new Dictionary();
        }
        return dict;
    }
}


text:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>File</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Beast">
<link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="FieldsWriter.html" title="FieldsWriter">
<link rel="next" href="RatePolicy.html" title="RatePolicy">

Home
Libraries
People
FAQ
More

File

        The File concept abstracts access to files
        in the underlying file system. To support other platform interfaces, users
        may author their own File types which meet
        these requirements.

        Associated
        Types

            file_mode

            is_file

        Requirements

        In this table:

            F is a File
            type

            f is an instance of
            F

            p is a value of type
            char const* which points to a null terminated utf-8
            encoded string.

            m is an instance of
            file_mode

            n is a number of bytes,
            convertible to std::size_t

            o is a byte offset in
            the file, convertible to std::uint64_t

            b is any non-const pointer
            to memory

            c is any possibly-const
            pointer to memory

            ec is a reference of
            type error_code

Table 1.43. Valid expressions

<colgroup>
<col>
<col>
<col>
</colgroup>

                  Expression

                  Type

                  Semantics, Pre/Post-conditions

                  Operation

                  Return Type

                  Semantics, Pre/Post-conditions

                  F()

                  Default constructable

                  f.~F()

                  Destructible. If f
                  refers to an open file, it is first closed as if by a call to
                  close with the
                  error ignored.

                  f.is_open()

                  bool

                  Returns true if f refers to an open file, false otherwise.

                  f.close(ec)

                  If f refers to
                  an open file, this function attempts to close the file. Regardless
                  of whether an error occurs or not, a subsequent call to f.is_open()
                  will return false.
                  The function will ensure that !ec is true
                  if there was no error or set to the appropriate error code if an
                  error occurred.

                  f.open(p,m,ec)

                  Attempts to open the file at the path specified by p with the mode specified by
                  m. Upon success,
                  a subsequent call to f.is_open() will return true.
                  If f refers to
                  an open file, it is first closed as if by a call to close with the error ignored.
                  The function will ensure that !ec is true
                  if there was no error or set to the appropriate error code if an
                  error occurred.

                  f.size(ec)

                  std::uint64_t

                  If f refers to
                  an open file, this function attempts to determine the file size
                  and return its value. If f
                  does not refer to an open file, the function will set ec to errc::invalid_argument
                  and return 0. The function will ensure that !ec is true
                  if there was no error or set to the appropriate error code if an
                  error occurred.

                  f.pos(ec)

                  std::uint64_t

                  If f refers to
                  an open file, this function attempts to determine the current file
                  offset and return it. If f
                  does not refer to an open file, the function will set ec to errc::invalid_argument
                  and return 0. The function will ensure that !ec is true
                  if there was no error or set to the appropriate error code if an
                  error occurred.

                  f.seek(o,ec)

                  Attempts to reposition the current file offset to the value o, which represents a byte offset
                  relative to the beginning of the file. If f
                  does not refer to an open file, the function will set ec to errc::invalid_argument
                  and return immediately. The function will ensure that !ec
                  is true if there was
                  no error or set to the appropriate error code if an error occurred.

                  f.read(b,n,ec)

                  std::size_t

                  Attempts to read n
                  bytes starting at the current file offset from the open file referred
                  to by f. Bytes
                  read are stored in the memory buffer at address b
                  which must be at least n
                  bytes in size. The function advances the file offset by the amount
                  read, and returns the number of bytes actually read, which may
                  be less than n.
                  If f does not refer
                  to an open file, the function will set ec
                  to errc::invalid_argument and return immediately.
                  The function will ensure that !ec is true
                  if there was no error or set to the appropriate error code if an
                  error occurred. If an end-of-file condition is detected prior to
                  reading any bytes, the function will ensure that !ec
                  is true and the return
                  value shall be 0.

                  f.write(c,n,ec)

                  std::size_t

                  Attempts to write n
                  bytes from the buffer pointed to by c
                  to the current file offset of the open file referred to by f. The memory buffer at c must point to storage of at
                  least n bytes meant
                  to be copied to the file. The function advances the file offset
                  by the amount written, and returns the number of bytes actually
                  written, which may be less than n.
                  If f does not refer
                  to an open file, the function will set ec
                  to errc::invalid_argument and return immediately.
                  The function will ensure that !ec is true
                  if there was no error or set to the appropriate error code if an
                  error occurred.

        Exemplar

struct File
{
    /** Default constructor

        There is no open file initially.
    */
    File();

    /** Destructor

        If the file is open it is first closed.
    */
    ~File();

    /// Returns `true` if the file is open
    bool
    is_open() const;

    /// Close the file if open
    void
    close(error_code& ec);

    /// Open a file at the given path with the specified mode
    void
    open(char const* path, file_mode mode, error_code& ec);

    /// Return the size of the open file
    std::uint64_t
    size(error_code& ec) const;

    /// Return the current position in the open file
    std::uint64_t
    pos(error_code& ec) const;

    /// Adjust the current position in the open file
    void
    seek(std::uint64_t offset, error_code& ec);

    /// Read from the open file
    std::size_t
    read(void* buffer, std::size_t n, error_code& ec) const;

    /// Write to the open file
    std::size_t
    write(void const* buffer, std::size_t n, error_code& ec);
};

        Models

            file_posix

            file_stdio

            file_win32

Copyright © 2016-2019 Vinnie
      Falco

        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


text:
using System;
using FluentAssertions.Common;

namespace FluentAssertions.Primitives
{
    internal class StringEqualityValidator : StringValidator
    {
        private readonly StringComparison comparisonMode;

        public StringEqualityValidator(string subject, string expected, StringComparison comparisonMode, string because,
            object[] becauseArgs) :
                base(subject, expected, because, becauseArgs)
        {
            this.comparisonMode = comparisonMode;
        }

        protected override bool ValidateAgainstSuperfluousWhitespace()
        {
            return assertion
                .ForCondition(!((expected.Length > subject.Length) && expected.TrimEnd().Equals(subject, comparisonMode)))
                .FailWith(ExpectationDescription + "{0}{reason}, but it misses some extra whitespace at the end.", expected)
                .Then
                .ForCondition(!((subject.Length > expected.Length) && subject.TrimEnd().Equals(expected, comparisonMode)))
                .FailWith(ExpectationDescription + "{0}{reason}, but it has unexpected whitespace at the end.", expected)
                .SourceSucceeded;
        }

        protected override bool ValidateAgainstLengthDifferences()
        {
            return assertion
                .ForCondition(subject.Length == expected.Length)
                .FailWith(
                    ExpectationDescription + "{0} with a length of {1}{reason}, but {2} has a length of {3}.",
                    expected, expected.Length, subject, subject.Length)
                .SourceSucceeded;

        }

        protected override void ValidateAgainstMismatch()
        {
            int indexOfMismatch = subject.IndexOfFirstMismatch(expected, comparisonMode);
            if (indexOfMismatch != -1)
            {
                assertion.FailWith(
                    ExpectationDescription + "{0}{reason}, but {1} differs near " + subject.IndexedSegmentAt(indexOfMismatch) + ".",
                    expected, subject);
            }
        }

        protected override string ExpectationDescription
        {
            get
            {
                string predicateDescription = IgnoreCase ? "be equivalent to" : "be";
                return "Expected {context:string} to " + predicateDescription + " ";
            }
        }

        private bool IgnoreCase
        {
            get
            {
                return (comparisonMode == StringComparison.CurrentCultureIgnoreCase) ||
                    (comparisonMode == StringComparison.OrdinalIgnoreCase);
            }
        }
    }
}


text:
package cpp.android.obfuscatedkeyprovider;

public class NativeKeyProvider implements KeyProvider {

    static {
        System.loadLibrary("app");
    }

    @Override
    public native String provide();
}