text:
NCM\::Component\::dcache - schema
#################################

Types
-----

 - **/software/components/dcache/structure_dcache_unit_units**
    - */software/components/dcache/structure_dcache_unit_units/cond*
        - Required
        - Type: string
    - */software/components/dcache/structure_dcache_unit_units/ugroup*
        - Required
        - Type: string
 - **/software/components/dcache/structure_dcache_unit**
    - */software/components/dcache/structure_dcache_unit/units*
        - Required
        - Type: structure_dcache_unit_units
    - */software/components/dcache/structure_dcache_unit/ignore_ugroup*
        - Optional
        - Type: string
 - **/software/components/dcache/structure_dcache_link_preference**
    - */software/components/dcache/structure_dcache_link_preference/read*
        - Optional
        - Type: long
    - */software/components/dcache/structure_dcache_link_preference/write*
        - Optional
        - Type: long
    - */software/components/dcache/structure_dcache_link_preference/cache*
        - Optional
        - Type: long
    - */software/components/dcache/structure_dcache_link_preference/p2p*
        - Optional
        - Type: long
 - **/software/components/dcache/structure_dcache_link_default_preference**
    - */software/components/dcache/structure_dcache_link_default_preference/default*
        - Optional
        - Type: long
 - **/software/components/dcache/structure_dcache_link_policy**
    - */software/components/dcache/structure_dcache_link_policy/nearline*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_link_policy/online*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_link_policy/custodial*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_link_policy/output*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_link_policy/replica*
        - Optional
        - Type: boolean
 - **/software/components/dcache/structure_dcache_link_default_policy**
    - */software/components/dcache/structure_dcache_link_default_policy/default*
        - Optional
        - Type: boolean
 - **/software/components/dcache/structure_dcache_link_linkgroups**
    - */software/components/dcache/structure_dcache_link_linkgroups/links*
        - Optional
        - Type: string
 - **/software/components/dcache/structure_dcache_link_links**
    - */software/components/dcache/structure_dcache_link_links/ugroup*
        - Required
        - Type: string
    - */software/components/dcache/structure_dcache_link_links/pgroup*
        - Required
        - Type: string
    - */software/components/dcache/structure_dcache_link_links/lgroup*
        - Optional
        - Type: string
 - **/software/components/dcache/structure_dcache_link**
    - */software/components/dcache/structure_dcache_link/links*
        - Required
        - Type: structure_dcache_link_links
    - */software/components/dcache/structure_dcache_link/ignore_link*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_link/def_preference*
        - Optional
        - Type: structure_dcache_link_default_preference
    - */software/components/dcache/structure_dcache_link/def_policy*
        - Optional
        - Type: structure_dcache_link_default_policy
    - */software/components/dcache/structure_dcache_link/ignore_linkgroup*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_link/linkgroups*
        - Optional
        - Type: structure_dcache_link_linkgroups
 - **/software/components/dcache/structure_dcache_pool_pools**
    - */software/components/dcache/structure_dcache_pool_pools/path*
        - Required
        - Type: string
    - */software/components/dcache/structure_dcache_pool_pools/size*
        - Optional
        - Type: long
    - */software/components/dcache/structure_dcache_pool_pools/opt*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_pool_pools/pgroup*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_pool_pools/mover_max*
        - Optional
        - Type: long
    - */software/components/dcache/structure_dcache_pool_pools/ulimit_n*
        - Optional
        - Type: long
 - **/software/components/dcache/structure_dcache_pool**
    - */software/components/dcache/structure_dcache_pool/pools*
        - Optional
        - Type: structure_dcache_pool_pools
    - */software/components/dcache/structure_dcache_pool/ignore_pgroup*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_pool/default_mover_max*
        - Optional
        - Type: long
    - */software/components/dcache/structure_dcache_pool/default_ulimit_n*
        - Optional
        - Type: long
    - */software/components/dcache/structure_dcache_pool/max_true_pool_size_prom*
        - Optional
        - Type: long
 - **/software/components/dcache/structure_dcache_dcachesetup**
    - */software/components/dcache/structure_dcache_dcachesetup/serviceLocatorHost*
        - Required
        - Type: type_fqdn
    - */software/components/dcache/structure_dcache_dcachesetup/cacheInfo*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_dcachesetup/java*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_dcachesetup/pnfs*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_dcachesetup/ftpBase*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_dcachesetup/portBase*
        - Optional
        - Type: long
    - */software/components/dcache/structure_dcache_dcachesetup/logArea*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_dcachesetup/parallelStreams*
        - Optional
        - Type: long
    - */software/components/dcache/structure_dcache_dcachesetup/bufferSize*
        - Optional
        - Type: long
    - */software/components/dcache/structure_dcache_dcachesetup/tcpBufferSize*
        - Optional
        - Type: long
    - */software/components/dcache/structure_dcache_dcachesetup/billingToDb*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_dcachesetup/infoProviderStaticFile*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_dcachesetup/metaDataRepository*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_dcachesetup/metaDataRepositoryImport*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_dcachesetup/PermissionHandlerDataSource*
        - Optional
        - Type: string
 - **/software/components/dcache/structure_dcache_node_config**
    - */software/components/dcache/structure_dcache_node_config/node_type*
        - Required
        - Type: string
    - */software/components/dcache/structure_dcache_node_config/dcache_home*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_node_config/pnfs_root*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_node_config/pnfs_install_dir*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_node_config/pnfs_start*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/pnfs_overwrite*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/pool_path*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_node_config/number_of_movers*
        - Optional
        - Type: long
    - */software/components/dcache/structure_dcache_node_config/server_id*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_node_config/admin_node*
        - Optional
        - Type: type_fqdn
    - */software/components/dcache/structure_dcache_node_config/gsidcap*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/gridftp*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/srm*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/xrootd*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/dcap*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/replicaManager*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/pnfsManager*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/lmDomain*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/httpDomain*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/adminDoor*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/poolManager*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/utilityDomain*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/dirDomain*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/gPlazmaService*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/infoProvider*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_node_config/namespace*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_node_config/namespace_node*
        - Optional
        - Type: string
 - **/software/components/dcache/structure_dcache_pnfs_setup**
    - */software/components/dcache/structure_dcache_pnfs_setup/shmservers*
        - Optional
        - Type: long
 - **/software/components/dcache/structure_dcache_pnfs_config**
    - */software/components/dcache/structure_dcache_pnfs_config/pnfs_install_dir*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_pnfs_config/pnfs_root*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_pnfs_config/pnfs_db*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_pnfs_config/pnfs_log*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_pnfs_config/pnfs_overwrite*
        - Optional
        - Type: boolean
    - */software/components/dcache/structure_dcache_pnfs_config/pnfs_psql_user*
        - Optional
        - Type: string
 - **/software/components/dcache/structure_dcache_pnfs_db**
    - */software/components/dcache/structure_dcache_pnfs_db/path*
        - Required
        - Type: string
    - */software/components/dcache/structure_dcache_pnfs_db/name*
        - Required
        - Type: string
    - */software/components/dcache/structure_dcache_pnfs_db/user*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_pnfs_db/group*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_pnfs_db/perm*
        - Optional
        - Type: string
 - **/software/components/dcache/structure_dcache_pnfs_exports_rule**
    - */software/components/dcache/structure_dcache_pnfs_exports_rule/mount*
        - Required
        - Type: string
    - */software/components/dcache/structure_dcache_pnfs_exports_rule/path*
        - Required
        - Type: string
    - */software/components/dcache/structure_dcache_pnfs_exports_rule/perm*
        - Required
        - Type: string
    - */software/components/dcache/structure_dcache_pnfs_exports_rule/opt*
        - Optional
        - Type: string
 - **/software/components/dcache/structure_dcache_pnfs_exports**
    - */software/components/dcache/structure_dcache_pnfs_exports/ip*
        - Required
        - Type: type_ip
    - */software/components/dcache/structure_dcache_pnfs_exports/netmask*
        - Optional
        - Type: type_ip
    - */software/components/dcache/structure_dcache_pnfs_exports/rule*
        - Required
        - Type: structure_dcache_pnfs_exports_rule
 - **/software/components/dcache/structure_dcache_pnfs**
    - */software/components/dcache/structure_dcache_pnfs/pnfs_config*
        - Optional
        - Type: structure_dcache_pnfs_config
    - */software/components/dcache/structure_dcache_pnfs/pnfs_config_def*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_pnfs/databases*
        - Optional
        - Type: structure_dcache_pnfs_db
    - */software/components/dcache/structure_dcache_pnfs/exports*
        - Required
        - Type: structure_dcache_pnfs_exports
    - */software/components/dcache/structure_dcache_pnfs/pnfs_setup*
        - Optional
        - Type: structure_dcache_pnfs_setup
    - */software/components/dcache/structure_dcache_pnfs/pnfs_setup_def*
        - Optional
        - Type: string
 - **/software/components/dcache/structure_dcache_create**
    - */software/components/dcache/structure_dcache_create/batchname*
        - Required
        - Type: string
    - */software/components/dcache/structure_dcache_create/name*
        - Required
        - Type: string
    - */software/components/dcache/structure_dcache_create/cell*
        - Required
        - Type: string
    - */software/components/dcache/structure_dcache_create/context*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_create/opt*
        - Optional
        - Type: string
 - **/software/components/dcache/structure_dcache_batch**
    - */software/components/dcache/structure_dcache_batch/create*
        - Required
        - Type: structure_dcache_create
    - */software/components/dcache/structure_dcache_batch/batch_read*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_batch/batch_write*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_batch/batch_template*
        - Optional
        - Type: boolean
 - **/software/components/dcache/structure_dcache_config**
    - */software/components/dcache/structure_dcache_config/dc_dir*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_config/node_config_def*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_config/node_config*
        - Required
        - Type: structure_dcache_node_config
    - */software/components/dcache/structure_dcache_config/dCacheSetup_def*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_config/dCacheSetup*
        - Required
        - Type: structure_dcache_dcachesetup
    - */software/components/dcache/structure_dcache_config/admin_passwd*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_config/debug_print*
        - Optional
        - Type: long
    - */software/components/dcache/structure_dcache_config/jythonjavahome*
        - Required
        - Type: string
 - **/software/components/dcache/structure_dcache_chimera**
    - */software/components/dcache/structure_dcache_chimera/paths*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_chimera/exports*
        - Optional
        - Type: string
    - */software/components/dcache/structure_dcache_chimera/default_dcap*
        - Optional
        - Type: string
 - **/software/components/dcache/dcache_component**
    - */software/components/dcache/dcache_component/pool*
        - Optional
        - Type: structure_dcache_pool
    - */software/components/dcache/dcache_component/config*
        - Required
        - Type: structure_dcache_config
    - */software/components/dcache/dcache_component/pnfs*
        - Optional
        - Type: structure_dcache_pnfs
    - */software/components/dcache/dcache_component/chimera*
        - Optional
        - Type: structure_dcache_chimera
    - */software/components/dcache/dcache_component/unit*
        - Optional
        - Type: structure_dcache_unit
    - */software/components/dcache/dcache_component/link*
        - Optional
        - Type: structure_dcache_link
    - */software/components/dcache/dcache_component/batch*
        - Optional
        - Type: structure_dcache_batch
    - */software/components/dcache/dcache_component/postgresql*
        - Optional
        - Type: string


text:
{% load i18n %}
{% with chartdiv|default:"pieplaceholder" as chartdiv %}
    {% with hoverdiv|default:"piehoverplaceholder" as hoverdiv %}

            {% if chart_data %}{% trans "Hover over a slice below for more information." %}{% else %}{% trans "No data is available. Please submit more forms!" %}{% endif %}

    {% endwith %}
{% endwith %}

redpajama_set_name: RedPajamaGithub


text:
<!doctype html>

    <meta charset='utf-8'>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="Content/semantic.min.css" rel="stylesheet" type="text/css">
    <link href="Content/web.css" rel="stylesheet" type="text/css">


text:
Download a proper version from https://github.com/chrislusf/seaweedfs/releases.

Decompress the downloaded file. You will only find one executable file, either "weed" on most systems or "weed.exe" on windows.

Put the file "weed" to all related computers, in any folder you want. Use

```bash
./weed -h # to check available options
```

### Set up Weed Master

```bash
./weed master -h # to check available options
```

If no replication is required, this will be enough. The "mdir" option is to configure a folder where the generated sequence file ids are saved.

```bash
./weed master -mdir="."
./weed master -mdir="." -ip=xxx.xxx.xxx.xxx # usually set the ip instead the default "localhost"
```

### Set up Weed Volume Server

```bash
./weed volume -h # to check available options
```

Usually volume servers are spread on different computers. They can have different disk space, or even different operating system.

Usually you would need to specify the available disk space, the Weed Master location, and the storage folder.

```bash
./weed volume -max=100 -mserver="localhost:9333" -dir="./data"
```

### Cheat Sheet: Setup One Master Server and One Volume Server

Actually, forget about previous commands. You can setup one master server and one volume server in one shot:

```bash
./weed server -dir="./data"
# same, just specifying the default values
# use "weed server -h" to find out more
./weed server -master.port=9333 -volume.port=8080 -dir="./data"
```

## Testing SeaweedFS

With the master and volume server up, now what? Let's pump in a lot of files into the system!

```bash
./weed upload -dir="/some/big/folder"
```

This command would recursively upload all files. Or you can specify what files you want to include.

```bash
./weed upload -dir="/some/big/folder" -include=*.txt
```

Then, you can simply check "du -m -s /some/big/folder" to see the actual disk usage by OS, and compare it with the file size under "/data". Usually if you are uploading a lot of textual files, the consumed disk size would be much smaller since textual files are gzipped automatically.

Now you can use your tools to hit SeaweedFS as hard as you can.

## Running with Docker ##

Use with docker is easy as run locally, you can pass all args like above. But you don't need to worry about "-ip". It'll be treated by the entrypoint script.

```
docker run -p 9333:9333 --name master chrislusf/seaweedfs master
```
```
docker run -p 8080:8080 --name volume --link master chrislusf/seaweedfs volume -max=5 -mserver="master:9333" -port=8080
```
#### With Compose ####
But with Compose it's easiest.
To startup just run:
```
docker-compose -f docker/docker-compose.yml up
```
And to scale:
```
docker-compose -f docker/docker-compose.yml scale volume=2
```
Remember that if multiple containers for volume are created on a single host, the port will clash.

## Using SeaweedFS in docker

You can use image "cydev/weed" or build your own with [dockerfile][] in the root of repo.

[dockerfile]: https://github.com/chrislusf/seaweedfs/blob/master/Dockerfile

### Using pre-built Docker image

```bash
docker run --name weed cydev/weed server
```

And in another terminal

```bash
IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' weed)
curl "http://$IP:9333/cluster/status?pretty=y"
{
  "IsLeader": true,
  "Leader": "localhost:9333"
}
# use $IP as host for api queries
```

### Building image from dockerfile

Make a local copy of seaweedfs from github

```bash
git clone https://github.com/chrislusf/seaweedfs.git
```

Minimal Image (~19.6 MB)

```bash
docker build --no-cache -t 'cydev/weed' .
```

Go-Build Docker Image (~764 MB)

```bash
mv Dockerfile Dockerfile.minimal
mv Dockerfile.go_build Dockerfile
docker build --no-cache -t 'cydev/weed' .
```

### In production

To gain persistency you can use docker volumes.

```bash
# start our weed server daemonized
docker run --name weed -d -p 9333:9333 -p 8080:8080 \
  -v /opt/weedfs/data:/data cydev/weed server -dir="/data" \
  -publicIp="$(curl -s cydev.ru/ip)"
```

Now our SeaweedFS server will be persistent and accessible by localhost:9333 and :8080 on host machine.
Dont forget to specify "-publicIp" for correct connectivity.


text:
FirstViz::FirstViz(QWidget *parent) :
    VizWidget(parent)
{
}


text:
import { AbstractOneDataSystemAppender, IAppInsightsCore } from 'vs/platform/telemetry/common/1dsAppender';

export class OneDataSystemWebAppender extends AbstractOneDataSystemAppender {
	constructor(
		isInternalTelemetry: boolean,
		eventPrefix: string,
		defaultData: { [key: string]: any } | null,
		iKeyOrClientFactory: string | (() => IAppInsightsCore), // allow factory function for testing
	) {
		super(isInternalTelemetry, eventPrefix, defaultData, iKeyOrClientFactory);

		// If we cannot fetch the endpoint it means it is down and we should not send any telemetry.
		// This is most likely due to ad blockers
		fetch(this.endPointUrl, { method: 'POST' }).catch(err => {
			this._aiCoreOrKey = undefined;
		});
	}
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Caeoma thalictri Sommerf.

### Remarks
null


text:
<?php

namespace AppBundle\Controller\Admin;

use AppBundle\Controller\DefaultController;
use AppBundle\Entity\Invoice;
use AppBundle\Entity\Receipt;
use AppBundle\Enum\StudentPaymentEnum;
use AppBundle\Form\Model\GenerateReceiptModel;
use AppBundle\Form\Type\GenerateReceiptType;
use AppBundle\Form\Type\GenerateReceiptYearMonthChooserType;
use AppBundle\Manager\GenerateReceiptFormManager;
use AppBundle\Pdf\ReceiptReminderBuilderPdf;
use AppBundle\Service\NotificationService;
use AppBundle\Pdf\ReceiptBuilderPdf;
use AppBundle\Service\XmlSepaBuilderService;
use Doctrine\ORM\NonUniqueResultException;
use Sonata\AdminBundle\Datagrid\ProxyQueryInterface;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Bundle\FrameworkBundle\Translation\Translator;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

/**
 * Class ReceiptAdminController.
 *
 * @category Controller
 */
class ReceiptAdminController extends BaseAdminController
{
    /**
     * Generate receipt action.
     *
     * @param Request $request
     *
     * @return Response|RedirectResponse
     *
     * @throws NotFoundHttpException    If the object does not exist
     * @throws AccessDeniedException    If access is not granted
     * @throws NonUniqueResultException If problem with unique entities
     */
    public function generateAction(Request $request)
    {
        /** @var GenerateReceiptFormManager $grfm */
        $grfm = $this->container->get('app.generate_receipt_form_manager');

        // year & month chooser form
        $generateReceiptYearMonthChooser = new GenerateReceiptModel();
        /** @var Controller $this */
        $yearMonthForm = $this->createForm(GenerateReceiptYearMonthChooserType::class, $generateReceiptYearMonthChooser);
        $yearMonthForm->handleRequest($request);

        // build items form
        $generateReceipt = new GenerateReceiptModel();
        /** @var Controller $this */
        $form = $this->createForm(GenerateReceiptType::class, $generateReceipt);
        $form->handleRequest($request);

        if ($yearMonthForm->isSubmitted() && $yearMonthForm->isValid()) {
            $year = $generateReceiptYearMonthChooser->getYear();
            $month = $generateReceiptYearMonthChooser->getMonth();
            // build preview view
            $generateReceipt = $grfm->buildFullModelForm($year, $month);
            /** @var Controller $this */
            $form = $this->createForm(GenerateReceiptType::class, $generateReceipt);
        }

        return $this->renderWithExtraParams(
            '::Admin/Receipt/generate_receipt_form.html.twig',
            array(
                'action' => 'generate',
                'year_month_form' => $yearMonthForm->createView(),
                'form' => $form->createView(),
            )
        );
    }

    /**
     * Creator receipt action.
     *
     * @param Request $request
     *
     * @return RedirectResponse
     *
     * @throws NotFoundHttpException                 If the object does not exist
     * @throws AccessDeniedException                 If access is not granted
     * @throws NonUniqueResultException
     * @throws \Doctrine\ORM\OptimisticLockException
     */
    public function creatorAction(Request $request)
    {
        /** @var Translator $translator */
        $translator = $this->container->get('translator.default');
        /** @var GenerateReceiptFormManager $grfm */
        $grfm = $this->container->get('app.generate_receipt_form_manager');
        $generateReceipt = $grfm->transformRequestArrayToModel($request->get('generate_receipt'));

        if (array_key_exists('generate_and_send', $request->get(GenerateReceiptType::NAME))) {
            // generate receipts and send it by email
            $recordsParsed = $grfm->persistAndDeliverFullModelForm($generateReceipt);
        } else {
            // only generate receipts
            $recordsParsed = $grfm->persistFullModelForm($generateReceipt);
        }

        if (0 === $recordsParsed) {
            $this->addFlash('danger', $translator->trans('backend.admin.receipt.generator.no_records_presisted'));
        } else {
            $this->addFlash('success', $translator->trans('backend.admin.receipt.generator.flash_success', array('%amount%' => $recordsParsed), 'messages'));
        }

        return $this->redirectToList();
    }

    /**
     * Create an Invoice from a Receipt action.
     *
     * @param Request $request
     *
     * @return Response
     *
     * @throws NotFoundHttpException If the object does not exist
     * @throws AccessDeniedException If access is not granted
     * @throws \Exception
     */
    public function createInvoiceAction(Request $request)
    {
        $request = $this->resolveRequest($request);
        $id = $request->get($this->admin->getIdParameter());

        /** @var Receipt $object */
        $object = $this->admin->getObject($id);
        if (!$object) {
            throw $this->createNotFoundException(sprintf('unable to find the object with id: %s', $id));
        }
        /** @var Invoice $invoice */
        $invoice = $this->container->get('app.receipt_manager')->createInvoiceFromReceipt($object);

        $em = $this->container->get('doctrine')->getManager();
        $em->persist($invoice);
        $em->flush();

        $this->addFlash('success', 'S\'ha generat la factura núm. '.$invoice->getInvoiceNumber());

        return $this->redirectToList();
    }

    /**
     * Generate PDF reminder receipt action.
     *
     * @param Request $request
     *
     * @return Response
     *
     * @throws NotFoundHttpException If the object does not exist
     * @throws AccessDeniedException If access is not granted
     */
    public function reminderAction(Request $request)
    {
        $request = $this->resolveRequest($request);
        $id = $request->get($this->admin->getIdParameter());

        /** @var Receipt $object */
        $object = $this->admin->getObject($id);
        if (!$object) {
            throw $this->createNotFoundException(sprintf('unable to find the object with id: %s', $id));
        }
        if (StudentPaymentEnum::BANK_ACCOUNT_NUMBER == $object->getMainSubject()->getPayment()) {
            throw $this->createNotFoundException(sprintf('invalid payment type for object with id: %s', $id));
        }

        /** @var ReceiptBuilderPdf $rps */
        $rps = $this->container->get('app.receipt_reminder_pdf_builder');
        $pdf = $rps->build($object);

        return new Response($pdf->Output('box_idiomes_receipt_reminder_'.$object->getSluggedReceiptNumber().'.pdf', 'I'), 200, array('Content-type' => 'application/pdf'));
    }

    /**
     * Send PDF reminder receipt action.
     *
     * @param Request $request
     *
     * @return RedirectResponse
     *
     * @throws NotFoundHttpException If the object does not exist
     * @throws \Twig_Error_Loader
     * @throws \Twig_Error_Runtime
     * @throws \Twig_Error_Syntax
     */
    public function sendReminderAction(Request $request)
    {
        $request = $this->resolveRequest($request);
        $id = $request->get($this->admin->getIdParameter());

        /** @var Receipt $object */
        $object = $this->admin->getObject($id);
        if (!$object) {
            throw $this->createNotFoundException(sprintf('unable to find the object with id: %s', $id));
        }
        if (StudentPaymentEnum::BANK_ACCOUNT_NUMBER == $object->getMainSubject()->getPayment()) {
            throw $this->createNotFoundException(sprintf('invalid payment type for object with id: %s', $id));
        }

        /** @var ReceiptBuilderPdf $rps */
        $rps = $this->container->get('app.receipt_reminder_pdf_builder');
        $pdf = $rps->build($object);

        /** @var NotificationService $messenger */
        $messenger = $this->container->get('app.notification');
        $result = $messenger->sendReceiptReminderPdfNotification($object, $pdf);

        if (0 === $result) {
            /* @var Controller $this */
            $this->addFlash('danger', 'S\'ha produït un error durant l\'enviament del recordatori de pagament del rebut núm. '.$object->getReceiptNumber().'. La persona '.$object->getMainEmailName().' no ha rebut cap missatge a la seva bústia.');
        } else {
            /* @var Controller $this */
            $this->addFlash('success', 'S\'ha enviat el recordatori de pagament del rebut núm. '.$object->getReceiptNumber().' amb PDF a la bústia '.$object->getMainEmail());
        }

        return $this->redirectToList();
    }

    /**
     * Generate PDF receipt action.
     *
     * @param Request $request
     *
     * @return Response
     *
     * @throws NotFoundHttpException If the object does not exist
     * @throws AccessDeniedException If access is not granted
     */
    public function pdfAction(Request $request)
    {
        $request = $this->resolveRequest($request);
        $id = $request->get($this->admin->getIdParameter());

        /** @var Receipt $object */
        $object = $this->admin->getObject($id);
        if (!$object) {
            throw $this->createNotFoundException(sprintf('unable to find the object with id: %s', $id));
        }

        /** @var ReceiptBuilderPdf $rps */
        $rps = $this->container->get('app.receipt_pdf_builder');
        $pdf = $rps->build($object);

        return new Response($pdf->Output('box_idiomes_receipt_'.$object->getSluggedReceiptNumber().'.pdf', 'I'), 200, array('Content-type' => 'application/pdf'));
    }

    /**
     * Send PDF receipt action.
     *
     * @param Request $request
     *
     * @return RedirectResponse
     *
     * @throws NotFoundHttpException If the object does not exist
     * @throws \Twig_Error_Loader
     * @throws \Twig_Error_Runtime
     * @throws \Twig_Error_Syntax
     */
    public function sendAction(Request $request)
    {
        $request = $this->resolveRequest($request);
        $id = $request->get($this->admin->getIdParameter());

        /** @var Receipt $object */
        $object = $this->admin->getObject($id);
        if (!$object) {
            throw $this->createNotFoundException(sprintf('unable to find the object with id: %s', $id));
        }

        $object
            ->setIsSended(true)
            ->setSendDate(new \DateTime())
        ;
        $em = $this->container->get('doctrine')->getManager();
        $em->flush();

        /** @var ReceiptBuilderPdf $rps */
        $rps = $this->container->get('app.receipt_pdf_builder');
        $pdf = $rps->build($object);

        /** @var NotificationService $messenger */
        $messenger = $this->container->get('app.notification');
        $result = $messenger->sendReceiptPdfNotification($object, $pdf);

        if (0 === $result) {
            /* @var Controller $this */
            $this->addFlash('danger', 'S\'ha produït un error durant l\'enviament del rebut núm. '.$object->getReceiptNumber().'. La persona '.$object->getMainEmailName().' no ha rebut cap missatge a la seva bústia.');
        } else {
            /* @var Controller $this */
            $this->addFlash('success', 'S\'ha enviat el rebut núm. '.$object->getReceiptNumber().' amb PDF a la bústia '.$object->getMainEmail());
        }

        return $this->redirectToList();
    }

    /**
     * Generate SEPA direct debit XML action.
     *
     * @param Request $request
     *
     * @return Response|BinaryFileResponse
     *
     * @throws \Digitick\Sepa\Exception\InvalidArgumentException
     * @throws \Digitick\Sepa\Exception\InvalidPaymentMethodException
     */
    public function generateDirectDebitAction(Request $request)
    {
        $request = $this->resolveRequest($request);
        $id = $request->get($this->admin->getIdParameter());

        /** @var Receipt $object */
        $object = $this->admin->getObject($id);
        if (!$object) {
            throw $this->createNotFoundException(sprintf('unable to find the object with id : %s', $id));
        }

        /** @var XmlSepaBuilderService $xsbs */
        $xsbs = $this->container->get('app.xml_sepa_builder');
        $paymentUniqueId = uniqid();
        $xml = $xsbs->buildDirectDebitSingleReceiptXml($paymentUniqueId, new \DateTime('now + 3 days'), $object);

        $object
            ->setIsSepaXmlGenerated(true)
            ->setSepaXmlGeneratedDate(new \DateTime())
        ;
        $em = $this->container->get('doctrine')->getManager();
        $em->flush();

        if (DefaultController::ENV_DEV == $this->getParameter('kernel.environment')) {
            return new Response($xml, 200, array('Content-type' => 'application/xml'));
        }

        $now = new \DateTime();
        $fileSystem = new Filesystem();
        $fileNamePath = sys_get_temp_dir().DIRECTORY_SEPARATOR.'SEPA_receipt_'.$now->format('Y-m-d_H-i').'.xml';
        $fileSystem->touch($fileNamePath);
        $fileSystem->dumpFile($fileNamePath, $xml);

        $response = new BinaryFileResponse($fileNamePath, 200, array('Content-type' => 'application/xml'));
        $response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT);

        return $response;
    }

    /**
     * @param ProxyQueryInterface $selectedModelQuery
     *
     * @return Response|RedirectResponse
     */
    public function batchActionGeneratereminderspdf(ProxyQueryInterface $selectedModelQuery)
    {
        $this->admin->checkAccess('edit');
        $selectedModels = $selectedModelQuery->execute();

        try {
            /** @var ReceiptReminderBuilderPdf $rps */
            $rrps = $this->container->get('app.receipt_reminder_pdf_builder');
            $pdf = $rrps->buildBatchReminder();

            /** @var Receipt $selectedModel */
            foreach ($selectedModels as $selectedModel) {
                if (StudentPaymentEnum::BANK_ACCOUNT_NUMBER != $selectedModel->getMainSubject()->getPayment() && !$selectedModel->getStudent()->getIsPaymentExempt()) {
                    // add page
                    $pdf->AddPage('L', 'A5', true, true);
                    $rrps->buildReceiptRemainderPageForItem($pdf, $selectedModel);
                }
            }

            return new Response($pdf->Output('box_idiomes_receipt_reminders.pdf', 'I'), 200, array('Content-type' => 'application/pdf'));
        } catch (\Exception $e) {
            $this->addFlash('error', 'S\'ha produït un error al generar l\'arxiu de recordatoris de pagaments de rebut amb format PDF. Revisa els rebuts seleccionats.');
            $this->addFlash('error', $e->getMessage());

            return new RedirectResponse(
                $this->admin->generateUrl('list', [
                    'filter' => $this->admin->getFilterParameters(),
                ])
            );
        }
    }

    /**
     * @param ProxyQueryInterface $selectedModelQuery
     *
     * @return Response|RedirectResponse
     */
    public function batchActionGeneratesepaxmls(ProxyQueryInterface $selectedModelQuery)
    {
        $this->admin->checkAccess('edit');
        $em = $this->container->get('doctrine')->getManager();
        $selectedModels = $selectedModelQuery->execute();

        try {
            /** @var XmlSepaBuilderService $xsbs */
            $xsbs = $this->container->get('app.xml_sepa_builder');
            $paymentUniqueId = uniqid();
            $xmls = $xsbs->buildDirectDebitReceiptsXml($paymentUniqueId, new \DateTime('now + 3 days'), $selectedModels);

            /** @var Receipt $selectedModel */
            foreach ($selectedModels as $selectedModel) {
                if (StudentPaymentEnum::BANK_ACCOUNT_NUMBER == $selectedModel->getMainSubject()->getPayment() && !$selectedModel->getStudent()->getIsPaymentExempt()) {
                    $selectedModel
                        ->setIsSepaXmlGenerated(true)
                        ->setSepaXmlGeneratedDate(new \DateTime())
                    ;
                }
            }
            $em->flush();

            if (DefaultController::ENV_DEV == $this->getParameter('kernel.environment')) {
                return new Response($xmls, 200, array('Content-type' => 'application/xml'));
            }

            $now = new \DateTime();
            $fileSystem = new Filesystem();
            $fileNamePath = sys_get_temp_dir().DIRECTORY_SEPARATOR.'SEPA_receipts_'.$now->format('Y-m-d_H-i').'.xml';
            $fileSystem->touch($fileNamePath);
            $fileSystem->dumpFile($fileNamePath, $xmls);

            $response = new BinaryFileResponse($fileNamePath, 200, array('Content-type' => 'application/xml'));
            $response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT);

            return $response;
        } catch (\Exception $e) {
            $this->addFlash('error', 'S\'ha produït un error al generar l\'arxiu SEPA amb format XML. Revisa els rebuts seleccionats.');
            $this->addFlash('error', $e->getMessage());

            return new RedirectResponse(
                $this->admin->generateUrl('list', [
                    'filter' => $this->admin->getFilterParameters(),
                ])
            );
        }
    }
}


text:
namespace SIM.Adapters.WebServer
{
  #region

  using System;
  using System.Collections.Generic;
  using System.Data.SqlClient;
  using System.IO;
  using System.Linq;
  using System.Xml;
  using SIM.Adapters.MongoDb;
  using SIM.Adapters.SqlServer;
  using SIM.Properties;
  using Sitecore.Diagnostics.Base;
  using JetBrains.Annotations;
  using Sitecore.Diagnostics.Logging;
  using SIM.Extensions;

  #endregion

  public static class WebConfig
  {
    #region Constants

    public const string ConfigSourceAttributeName = "configSource";

    public const string ConfigurationXPath = "/configuration";

    private const string SettingXPath = ConfigurationXPath + "/sitecore/settings/setting[@name='{0}']";

    #endregion

    #region Public Methods

    [NotNull]
    public static ICollection<Database> GetDatabases([NotNull] string webRootPath, XmlDocument webConfigDocument = null)
    {
      Assert.ArgumentNotNullOrEmpty(webRootPath, nameof(webRootPath));

      using (new ProfileSection("Get databases from web.config"))
      {
        ProfileSection.Argument("webRootPath", webRootPath);
        ProfileSection.Argument("webConfigDocument", webConfigDocument);

        List<Database> databases = new List<Database>();
        webConfigDocument = webConfigDocument ?? GetWebConfig(webRootPath);
        XmlElement connectionStringsNode = webConfigDocument.SelectSingleNode("/configuration/connectionStrings") as XmlElement;
        if (connectionStringsNode != null)
        {
          Log.Debug($"WebConfig:GetDatabases(...)#connectionStringsNode: {connectionStringsNode.OuterXml}");
          AddDatabases(connectionStringsNode, databases);
          var configSourceValue = connectionStringsNode.GetAttribute("configSource");
          Log.Debug($"WebConfig:GetDatabases(...)#configSourceValue: {configSourceValue}");
          if (string.IsNullOrEmpty(configSourceValue))
          {
            return databases;
          }

          var filePath = Path.Combine(webRootPath, configSourceValue);
          Log.Debug($"WebConfig:GetDatabases(...)#filePath: {filePath}");
          if (!FileSystem.FileSystem.Local.File.Exists(filePath))
          {
            return databases;
          }

          XmlDocumentEx document = XmlDocumentEx.LoadFile(filePath);
          XmlElement root = document.DocumentElement;
          if (root != null)
          {
            AddDatabases(root, databases);
          }
        }

        return ProfileSection.Result(databases);
      }
    }

    [NotNull]
    public static ICollection<MongoDbDatabase> GetMongoDatabases([NotNull] string webRootPath, XmlDocument webConfigDocument = null)
    {
      Assert.ArgumentNotNullOrEmpty(webRootPath, nameof(webRootPath));

      using (new ProfileSection("Get mongo databases from web.config"))
      {
        ProfileSection.Argument("webRootPath", webRootPath);
        ProfileSection.Argument("webConfigDocument", webConfigDocument);

        var databases = new List<MongoDbDatabase>();
        webConfigDocument = webConfigDocument ?? GetWebConfig(webRootPath);
        XmlElement connectionStringsNode = webConfigDocument.SelectSingleNode("/configuration/connectionStrings") as XmlElement;
        if (connectionStringsNode != null)
        {
          Log.Debug($"WebConfig:GetDatabases(...)#connectionStringsNode: {connectionStringsNode.OuterXml}");
          AddMongoDatabases(connectionStringsNode, databases);
          var configSourceValue = connectionStringsNode.GetAttribute("configSource");
          Log.Debug($"WebConfig:GetDatabases(...)#configSourceValue: {configSourceValue}");
          if (string.IsNullOrEmpty(configSourceValue))
          {
            return databases;
          }

          var filePath = Path.Combine(webRootPath, configSourceValue);
          Log.Debug($"WebConfig:GetDatabases(...)#filePath: {filePath}");
          if (!FileSystem.FileSystem.Local.File.Exists(filePath))
          {
            return databases;
          }

          XmlDocumentEx document = XmlDocumentEx.LoadFile(filePath);
          XmlElement root = document.DocumentElement;
          if (root != null)
          {
            AddMongoDatabases(root, databases);
          }
        }

        return ProfileSection.Result(databases);
      }
    }

    [CanBeNull]
    public static string GetScVariable([NotNull] XmlDocument webConfig, [NotNull] string variableName)
    {
      Assert.ArgumentNotNull(webConfig, nameof(webConfig));
      Assert.ArgumentNotNull(variableName, nameof(variableName));

      using (new ProfileSection("Get Sitecore variable"))
      {
        ProfileSection.Argument("webConfig", webConfig);
        ProfileSection.Argument("variableName", variableName);

        try
        {
          XmlElement dataFolderNode = GetScVariableElement(webConfig, variableName);
          if (dataFolderNode != null)
          {
            XmlAttribute valueAttr = dataFolderNode.Attributes["value"];
            if (valueAttr != null)
            {
              var result = valueAttr.Value;

              return ProfileSection.Result(result);
            }
          }
        }
        catch (Exception ex)
        {
          Log.Warn(ex, $"Cannot get sc variable {variableName}");
        }

        return ProfileSection.Result<string>(null);
      }
    }

    [CanBeNull]
    public static XmlElement GetScVariableElement([NotNull] XmlDocument webConfig, [NotNull] string elementName)
    {
      Assert.ArgumentNotNull(webConfig, nameof(webConfig));
      Assert.ArgumentNotNull(elementName, nameof(elementName));

      return webConfig.SelectSingleNode(ConfigurationXPath + $"/sitecore/sc.variable[@name='{elementName}']") as XmlElement;
    }

    [NotNull]
    public static XmlDocumentEx GetWebConfig([NotNull] string webRootPath)
    {
      Assert.ArgumentNotNull(webRootPath, nameof(webRootPath));
      var path = GetWebConfigPath(webRootPath);
      FileSystem.FileSystem.Local.File.AssertExists(path, BResources.FileIsMissing.FormatWith(path));

      try
      {
        return XmlDocumentEx.LoadFile(path);
      }
      catch (Exception ex)
      {
        throw new InvalidOperationException(BResources.XmlFileIsCorrupted.FormatWith(path), ex);
      }
    }

    #endregion

    #region Methods

    #region Public methods

    public static void AddDatabases([NotNull] XmlElement connectionStringsNode, [NotNull] List<Database> databases)
    {
      Assert.ArgumentNotNull(connectionStringsNode, nameof(connectionStringsNode));
      Assert.ArgumentNotNull(databases, nameof(databases));

      using (new ProfileSection("Add databases to web.config"))
      {
        ProfileSection.Argument("connectionStringsNode", connectionStringsNode);
        ProfileSection.Argument("databases", databases);

        XmlNodeList nodes = connectionStringsNode.SelectNodes("add");
        if (nodes != null && nodes.Count > 0)
        {
          var elements = nodes.OfType<XmlElement>().ToArray();
          Log.Debug($"WebConfig:AddDatabases(...)#elements.Length: {elements.Length}");
          foreach (XmlElement node in elements)
          {
            var value = node.GetAttribute("connectionString");
            Log.Debug($"WebConfig:AddDatabases(...)#value: {value}");

            if (!SqlServerManager.Instance.IsSqlConnectionString(value))
            {
              continue;
            }

            var name = node.GetAttribute("name");
            Log.Debug($"WebConfig:AddDatabases(...)#name: {name}");

            if (!string.IsNullOrEmpty(value))
            {
              SqlConnectionStringBuilder connectionString = new SqlConnectionStringBuilder(value);
              var realName = GetDatabaseName(connectionString);
              Log.Debug($"WebConfig:AddDatabases(...)#realName: {realName}");
              if (!string.IsNullOrEmpty(realName))
              {
                if (!string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(realName))
                {
                  Database database = new Database
                  {
                    Name = name,
                    RealName = realName,
                    ConnectionString = connectionString
                  };

                  databases.Add(database);
                }
              }
            }
          }
        }
      }
    }

    public static void AddMongoDatabases([NotNull] XmlElement connectionStringsNode, [NotNull] List<MongoDbDatabase> databases)
    {
      Assert.ArgumentNotNull(connectionStringsNode, nameof(connectionStringsNode));
      Assert.ArgumentNotNull(databases, nameof(databases));

      using (new ProfileSection("Add mongo databases to web.config"))
      {
        ProfileSection.Argument("connectionStringsNode", connectionStringsNode);
        ProfileSection.Argument("databases", databases);

        XmlNodeList nodes = connectionStringsNode.SelectNodes("add");
        if (nodes != null && nodes.Count > 0)
        {
          var elements = nodes.OfType<XmlElement>().ToArray();
          Log.Debug($"WebConfig:AddMongoDatabases(...)#elements.Length: {elements.Length}");
          foreach (XmlElement node in elements)
          {
            var value = node.GetAttribute("connectionString");
            Log.Debug($"WebConfig:AddMongoDatabases(...)#value: {value}");

            if (SqlServerManager.Instance.IsSqlConnectionString(value))
            {
              continue;
            }

            var name = node.GetAttribute("name");
            Log.Debug($"WebConfig:AddMongoDatabases(...)#name: {name}");

            databases.Add(new MongoDbDatabase(name, value));
          }
        }
      }
    }

    [NotNull]
    public static string GetWebConfigPath([NotNull] string webRootPath)
    {
      Assert.ArgumentNotNull(webRootPath, nameof(webRootPath));

      return Path.Combine(webRootPath, "web.config");
    }

    #endregion

    #region Private methods

    [CanBeNull]
    private static string GetDatabaseName([NotNull] SqlConnectionStringBuilder connectionString)
    {
      Assert.ArgumentNotNull(connectionString, nameof(connectionString));

      return connectionString.InitialCatalog;
    }

    #endregion

    #endregion

    #region Public methods

    public static string GetSitecoreSetting(string name, XmlDocument webConfigResult)
    {
      Assert.ArgumentNotNull(webConfigResult, nameof(webConfigResult));

      XmlElement element = webConfigResult.SelectSingleNode(string.Format(SettingXPath, name)) as XmlElement;
      Assert.IsNotNull(element, $"The \"{name}\" setting is missing in the instance configuration files");
      XmlAttribute value = element.Attributes["value"];
      Assert.IsNotNull(value, $"The value attribute of the \"{name}\" setting is missing in the instance configuration files");
      var settingValue = value.Value;
      Assert.IsNotNullOrEmpty(settingValue, nameof(settingValue));
      return settingValue;
    }

    #endregion
  }
}


text:
package org.mifos.test.acceptance.loan;

import org.joda.time.DateTime;
import org.mifos.test.acceptance.admin.FeeTestHelper;
import org.mifos.test.acceptance.framework.MifosPage;
import org.mifos.test.acceptance.framework.UiTestCaseBase;
import org.mifos.test.acceptance.framework.admin.FeesCreatePage;
import org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters;
import org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper;
import org.mifos.test.acceptance.framework.testhelpers.NavigationHelper;
import org.mifos.test.acceptance.util.ApplicationDatabaseOperation;
import org.mifos.test.acceptance.util.TestDataSetup;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

@ContextConfiguration(locations = {"classpath:ui-test-context.xml"})
@Test(singleThreaded = true, groups = {"loanproduct", "acceptance", "ui", "no_db_unit"})
public class VariableInstalmentLoanTest extends UiTestCaseBase {

    @Autowired
    private ApplicationDatabaseOperation applicationDatabaseOperation;
    private static final String clientName = "Client WeeklyTue";
    private static final String loanProductName = "WeeklyClientVariableInstallmentsLoan";
    private LoanTestHelper loanTestHelper;
    private DateTime systemDateTime;
    private NavigationHelper navigationHelper;
    private FeeTestHelper feeTestHelper;

    @SuppressWarnings("PMD.SignatureDeclareThrowsException")
    // one of the dependent methods throws Exception
    @AfterMethod
    public void logOut() throws Exception{
    	applicationDatabaseOperation.updateLSIM(0);
        (new MifosPage(selenium)).logout();
    }

    @Override
    @SuppressWarnings("PMD.SignatureDeclareThrowsException")
    // one of the dependent methods throws Exception
    @BeforeMethod
    public void setUp() throws Exception {
        super.setUp();
        navigationHelper = new NavigationHelper(selenium);
        systemDateTime = new DateTime(2010, 10, 11, 10, 0, 0, 0);
        loanTestHelper = new LoanTestHelper(selenium);
        loanTestHelper.setApplicationTime(systemDateTime);
        TestDataSetup dataSetup = new TestDataSetup(selenium, applicationDatabaseOperation);
        feeTestHelper = new FeeTestHelper(dataSetup, new NavigationHelper(selenium));
        applicationDatabaseOperation.updateLSIM(1);
    }

    @SuppressWarnings("PMD.SignatureDeclareThrowsException")
    // one of the dependent methods throws Exception
    @Test(enabled = true)
    public void verifyRepaymentScheduleField() throws Exception {
        int noOfInstallments = 5;
        int maxGap = 10;
        int minGap = 1;
        int minInstalmentAmount = 100;
        DateTime disbursalDate = systemDateTime.plusDays(1);
        navigationHelper.navigateToHomePage();
        loanTestHelper.
                navigateToCreateLoanAccountEntryPageWithoutLogout(setLoanSearchParameters()).
                setDisbursalDate(disbursalDate).
                clickContinue().
                validateRepaymentScheduleFieldDefault(noOfInstallments).
                validateDateFieldValidations(disbursalDate, minGap, maxGap, noOfInstallments).
                verifyInstallmentTotalValidations(noOfInstallments, minInstalmentAmount, disbursalDate, minGap).
                verifyValidData(noOfInstallments, minGap, minInstalmentAmount, disbursalDate, maxGap).
                clickPreviewAndGoToReviewLoanAccountPage().
                verifyEditSchedule().
                verifySchedulePersistOnEdit(noOfInstallments, minGap, minInstalmentAmount, disbursalDate, maxGap);

    }

    @SuppressWarnings("PMD.SignatureDeclareThrowsException")
    // one of the dependent methods throws Exception
    @Test(enabled = true)
    public void verifyInvalidFees() throws Exception {
        DateTime disbursalDate = systemDateTime.plusDays(1);
        String periodicFees = feeTestHelper.createPeriodicFee("loanWeeklyFee", FeesCreatePage.SubmitFormParameters.LOAN, FeesCreatePage.SubmitFormParameters.WEEKLY_FEE_RECURRENCE, 1, 100);
        String fixedFeePerAmountAndInterest = feeTestHelper.createFixedFee("fixedFeePerAmountAndInterest", FeesCreatePage.SubmitFormParameters.LOAN, "Upfront", 100, "Loan Amount+Interest");
        String fixedFeePerInterest = feeTestHelper.createFixedFee("fixedFeePerInterest", FeesCreatePage.SubmitFormParameters.LOAN, "Upfront", 20, "Interest");
        String[] blockedInterest = {periodicFees, fixedFeePerAmountAndInterest, fixedFeePerInterest};
        navigationHelper.navigateToHomePage();
        loanTestHelper.
                navigateToCreateLoanAccountEntryPageWithoutLogout(setLoanSearchParameters()).
                setDisbursalDate(disbursalDate).
                verifyInvalidFeeBlocked(blockedInterest);
    }

    private CreateLoanAccountSearchParameters setLoanSearchParameters() {
        CreateLoanAccountSearchParameters accountSearchParameters = new CreateLoanAccountSearchParameters();
        accountSearchParameters.setSearchString(clientName);
        accountSearchParameters.setLoanProduct(loanProductName);
        return accountSearchParameters;
    }
}


text:
package es.deusto.deustotech.dynamicui.modules;

import java.io.BufferedReader;
import java.io.InputStreamReader;

import android.content.Context;
import android.graphics.Color;
import android.util.Log;

import com.hp.hpl.jena.ontology.Individual;
import com.hp.hpl.jena.ontology.OntClass;
import com.hp.hpl.jena.ontology.OntModel;
import com.hp.hpl.jena.ontology.OntModelSpec;
import com.hp.hpl.jena.rdf.model.InfModel;
import com.hp.hpl.jena.rdf.model.Literal;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.Property;
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.rdf.model.Statement;
import com.hp.hpl.jena.reasoner.Reasoner;
import com.hp.hpl.jena.reasoner.rulesys.BuiltinRegistry;
import com.hp.hpl.jena.reasoner.rulesys.GenericRuleReasoner;
import com.hp.hpl.jena.reasoner.rulesys.Rule;

import es.deusto.deustotech.dynamicui.R;
import es.deusto.deustotech.dynamicui.components.UIConfiguration;
import es.deusto.deustotech.dynamicui.model.ICapability;
import es.deusto.deustotech.utils.jena.ListContainsValueBuiltin;
import es.deusto.deustotech.utils.jena.ListNotContainsValueBuiltin;

public class UIReasoner {

	private ICapability user, device, context;

	private UIConfiguration finalConfiguration;

//	private UIConfiguration currentUI;
	private HistoryManager historyManager;
	private Context appContext;

	private boolean adapt;

    public static final String NS = "http://www.deustotech.es/adaptation.owl#";
    public OntModel ontModel = null;
    public OntClass ontUserClass = null;
    public OntClass ontDeviceClass = null;
    public OntClass ontContextClass = null;
    public OntClass ontFinalConfClass = null;

    public Reasoner reasoner;
    public InfModel infModel;

//    private static final float MAX_BRIGHTNESS = 1.0F;

	public UIReasoner(){
		super();
	}

	public UIReasoner(ICapability user, ICapability device,
			ICapability context, Context appContext) {
		super();

		this.user 		= user;
		this.device 	= device;
		this.context    = context;

		this.appContext	    = appContext;
		this.historyManager = new HistoryManager(this.appContext, this.user);
//		this.currentUI 	    = currentUI;
		this.adapt 			= true;

		UserCapabilitiesUpdater userUpdater = new UserCapabilitiesUpdater(this.user, this.context, this.appContext);
		this.user = userUpdater.update();

		if (this.user != null){
			if (!isAdaptationHistoryEmpty()){
				if (historyManager.checkConfiguration(this.user)){
					this.adapt = false;
					finalConfiguration = historyManager.getLastKnownUI(this.user);

					Log.d(UIReasoner.class.getSimpleName(), "No need of executing rules");
				}
			}

			if (this.adapt){
				//Adding the custom Builtins to the BuiltinRegistry
				BuiltinRegistry.theRegistry.register(new ListContainsValueBuiltin());
				BuiltinRegistry.theRegistry.register(new ListNotContainsValueBuiltin());

				Rule.Parser ruleParser = Rule.rulesParserFromReader(new BufferedReader(
						new InputStreamReader(appContext.getResources().openRawResource(R.raw.action_rules))));
				reasoner = new GenericRuleReasoner(Rule.parseRules(ruleParser));

				executeRules(generateModel());

				finalConfiguration = parseConfiguration();

				Log.d(UIReasoner.class.getSimpleName(), "Rules ended");
			}
		}
	}

    private Model generateModel() {
        this.ontModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
        this.ontModel.setNsPrefix("adaptation", NS);

        this.ontUserClass 	 	= ontModel.createClass(NS + "User");
        this.ontDeviceClass  	= ontModel.createClass(NS + "Device");
        this.ontContextClass 	= ontModel.createClass(NS + "Context");
        this.ontFinalConfClass 	= ontModel.createClass(NS + "FinalUIConfiguration");

        addInstancesWithJena("user", "device", "context", "final_conf");

        this.ontModel.write(System.out);

        return this.ontModel;
    }

    /**
     * This method adds the corresponding classes to the model
     *
     * @param userId
     * @param deviceId
     * @param contextId
     * @param finalUIConf
     */
    private void addInstancesWithJena(final String userId, final String deviceId, final String contextId, final String finalUIConf){
    	addUserInstance(userId);
    	addDeviceInstance(deviceId);
    	addContextInstance(contextId);
    }

    private Individual addUserInstance(String id) {
        Individual individual = this.ontUserClass.createIndividual(NS + id);

        Property viewSize = this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.VIEW_SIZE));
        Literal literal = this.ontModel.createTypedLiteral(this.user.getCapabilityValue(ICapability.CAPABILITY.VIEW_SIZE));
        individual.setPropertyValue(viewSize, literal);

        Property viewColor = this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.VIEW_COLOR));
        literal = this.ontModel.createTypedLiteral(this.user.getCapabilityValue(ICapability.CAPABILITY.VIEW_COLOR));
        individual.setPropertyValue(viewColor, literal);

        Property textSize = this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.TEXT_SIZE));
        literal = this.ontModel.createTypedLiteral(this.user.getCapabilityValue(ICapability.CAPABILITY.TEXT_SIZE));
        individual.setPropertyValue(textSize, literal);

        Property textColor = this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.TEXT_COLOR));
        literal = this.ontModel.createTypedLiteral(this.user.getCapabilityValue(ICapability.CAPABILITY.TEXT_COLOR));
        individual.setPropertyValue(textColor, literal);

        Property input = this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.INPUT));
        literal = this.ontModel.createTypedLiteral(this.user.getCapabilityValue(ICapability.CAPABILITY.INPUT));
        individual.setPropertyValue(input, literal);

        Property brightness = this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.BRIGHTNESS));
        literal = this.ontModel.createTypedLiteral(this.user.getCapabilityValue(ICapability.CAPABILITY.BRIGHTNESS));
        individual.setPropertyValue(brightness, literal);

        return individual;
    }

    private Individual addDeviceInstance(String id) {
        Individual individual = this.ontDeviceClass.createIndividual(NS + id);

        Property viewSize = this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.VIEW_SIZE));
        Literal literal = this.ontModel.createTypedLiteral(this.device.getCapabilityValue(ICapability.CAPABILITY.VIEW_SIZE));
        individual.setPropertyValue(viewSize, literal);

        Property input = this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.INPUT));
        literal = this.ontModel.createTypedLiteral(this.device.getCapabilityValue(ICapability.CAPABILITY.INPUT));
        individual.setPropertyValue(input, literal);

        Property brightness = this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.BRIGHTNESS));
        literal = this.ontModel.createTypedLiteral(this.device.getCapabilityValue(ICapability.CAPABILITY.BRIGHTNESS));
        individual.setPropertyValue(brightness, literal);

        Property orientation = this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.ORIENTATION));
        literal = this.ontModel.createTypedLiteral(this.device.getCapabilityValue(ICapability.CAPABILITY.ORIENTATION));
        individual.setPropertyValue(orientation, literal);

        Property acceleration = this.ontModel.getProperty(NS + "ACCELERATION");
        literal = this.ontModel.createTypedLiteral(this.device.getCapabilityValue(ICapability.CAPABILITY.ACCELERATION));
        individual.setPropertyValue(acceleration, literal);

        return individual;
    }

    private Individual addContextInstance(String id) {
        Individual individual = this.ontContextClass.createIndividual(NS + id);

        Property temperature = this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.TEMPERATURE));
        Literal literal = this.ontModel.createTypedLiteral(this.context.getCapabilityValue(ICapability.CAPABILITY.TEMPERATURE));
        individual.setPropertyValue(temperature, literal);

        Property brightness = this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.BRIGHTNESS));
        literal = this.ontModel.createTypedLiteral(this.context.getCapabilityValue(ICapability.CAPABILITY.BRIGHTNESS));
        individual.setPropertyValue(brightness, literal);

        return individual;
    }

    private void executeRules(Model dataModel) {
        infModel = ModelFactory.createInfModel(reasoner, dataModel);
        infModel.prepare();

//        for (Statement st : infModel.listStatements().toList()){
//            Log.d("InfModel", st.toString());
//        }
    }

    /**
     * This method extracts the FinalUIConfiguration from the model
     * to create the corresponding Java Object
     *
     * @return The Java Object corresponding to the same FinalUIConfiguration semantic model
     */
    private UIConfiguration parseConfiguration(){
    	final Resource resource = infModel.getResource("http://www.deustotech.es/adaptation.owl#FinalUIConfigurationInstance");

    	final Statement viewSizeStmt 	= resource.getProperty(this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.VIEW_SIZE)));
    	final Statement viewColorStmt 	= resource.getProperty(this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.VIEW_COLOR)));
    	final Statement textSizeStmt 	= resource.getProperty(this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.TEXT_SIZE)));
    	final Statement textColorStmt 	= resource.getProperty(this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.TEXT_COLOR)));
    	final Statement brightnessStmt 	= resource.getProperty(this.ontModel.getProperty(NS + String.valueOf(ICapability.CAPABILITY.BRIGHTNESS)));

    	if (viewSizeStmt != null){
    		final ICapability.VIEW_SIZE viewSize 	= ICapability.VIEW_SIZE.valueOf(viewSizeStmt.getObject().toString());
    		final ICapability.TEXT_SIZE textSize 	= ICapability.TEXT_SIZE.valueOf(textSizeStmt.getObject().toString());
    		final ICapability.BRIGHTNESS brightness = ICapability.BRIGHTNESS.valueOf(brightnessStmt.getObject().toString());
    		final int viewColor = Color.parseColor(viewColorStmt.getObject().toString());
    		final int textColor = Color.parseColor(textColorStmt.getObject().toString());

    		return new UIConfiguration(viewSize, textSize, brightness, viewColor, textColor);
    	}

//    	return this.currentUI;
    	return null;
    }

    public UIConfiguration getAdaptedConfiguration(){
    	return this.finalConfiguration;
    }

	/**
	 * This method takes the updated user, the current device's capabilities
	 * and the current configuration and returns the best suitable UI
	 * for this situation.
	 *
	 * @return a new UI configuration (FinalUIConfiguration) to be displayed in the device
	 */
//	public FinalUIConfiguration getAdaptedConfiguration() {
//		//TODO:
//		//1. Check if there is a previous configuration for this situation
//		if (checkAdaptationHistory()){
//			return historyManager.getAdaptedConfiguration();
//		} else {
//			//2. Else, generate a new one
//			//2.1 First, from a standard one
//			StandardUIManager standardUIManager 	= new StandardUIManager();
//			FinalUIConfiguration standardConfiguration 	= standardUIManager.getStandardConfiguration(user);
//
//			if (StandardUIManager.isSufficient(standardConfiguration)){
//				return standardConfiguration;
//			} else {
//				//2.2 If it is not sufficient, a new one
//				//TODO: How do we determine if an adaptation is sufficient enough?
//				return adaptConfiguration(this.user.getAllCapabilities(), this.device.getAllCapabilities(), this.context.getAllCapabilities());
//			}
//		}
//	}
//
	private boolean isAdaptationHistoryEmpty() {
		return historyManager.isEmpty();
	}

    public ICapability getUser() {
		return this.user;
	}

	public ICapability getDevice() {
		return this.device;
	}
}


text:
from utils import weighted_random_subreddit

subreddit = weighted_random_subreddit({
    'CoolGithubProjects': 1,
    'coolcstechtalks': 1
})
t_channel = '@r_CoolGithubProjects'

def send_post(submission, r2t):
    return r2t.send_simple(submission)


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.apimanagement.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.apimanagement.fluent.models.OpenidConnectProviderUpdateContractProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Parameters supplied to the Update OpenID Connect Provider operation. */
@Fluent
public final class OpenidConnectProviderUpdateContract {
    /*
     * OpenId Connect Provider Update contract properties.
     */
    @JsonProperty(value = "properties")
    private OpenidConnectProviderUpdateContractProperties innerProperties;

    /**
     * Get the innerProperties property: OpenId Connect Provider Update contract properties.
     *
     * @return the innerProperties value.
     */
    private OpenidConnectProviderUpdateContractProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the displayName property: User-friendly OpenID Connect Provider name.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.innerProperties() == null ? null : this.innerProperties().displayName();
    }

    /**
     * Set the displayName property: User-friendly OpenID Connect Provider name.
     *
     * @param displayName the displayName value to set.
     * @return the OpenidConnectProviderUpdateContract object itself.
     */
    public OpenidConnectProviderUpdateContract withDisplayName(String displayName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OpenidConnectProviderUpdateContractProperties();
        }
        this.innerProperties().withDisplayName(displayName);
        return this;
    }

    /**
     * Get the description property: User-friendly description of OpenID Connect Provider.
     *
     * @return the description value.
     */
    public String description() {
        return this.innerProperties() == null ? null : this.innerProperties().description();
    }

    /**
     * Set the description property: User-friendly description of OpenID Connect Provider.
     *
     * @param description the description value to set.
     * @return the OpenidConnectProviderUpdateContract object itself.
     */
    public OpenidConnectProviderUpdateContract withDescription(String description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OpenidConnectProviderUpdateContractProperties();
        }
        this.innerProperties().withDescription(description);
        return this;
    }

    /**
     * Get the metadataEndpoint property: Metadata endpoint URI.
     *
     * @return the metadataEndpoint value.
     */
    public String metadataEndpoint() {
        return this.innerProperties() == null ? null : this.innerProperties().metadataEndpoint();
    }

    /**
     * Set the metadataEndpoint property: Metadata endpoint URI.
     *
     * @param metadataEndpoint the metadataEndpoint value to set.
     * @return the OpenidConnectProviderUpdateContract object itself.
     */
    public OpenidConnectProviderUpdateContract withMetadataEndpoint(String metadataEndpoint) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OpenidConnectProviderUpdateContractProperties();
        }
        this.innerProperties().withMetadataEndpoint(metadataEndpoint);
        return this;
    }

    /**
     * Get the clientId property: Client ID of developer console which is the client application.
     *
     * @return the clientId value.
     */
    public String clientId() {
        return this.innerProperties() == null ? null : this.innerProperties().clientId();
    }

    /**
     * Set the clientId property: Client ID of developer console which is the client application.
     *
     * @param clientId the clientId value to set.
     * @return the OpenidConnectProviderUpdateContract object itself.
     */
    public OpenidConnectProviderUpdateContract withClientId(String clientId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OpenidConnectProviderUpdateContractProperties();
        }
        this.innerProperties().withClientId(clientId);
        return this;
    }

    /**
     * Get the clientSecret property: Client Secret of developer console which is the client application.
     *
     * @return the clientSecret value.
     */
    public String clientSecret() {
        return this.innerProperties() == null ? null : this.innerProperties().clientSecret();
    }

    /**
     * Set the clientSecret property: Client Secret of developer console which is the client application.
     *
     * @param clientSecret the clientSecret value to set.
     * @return the OpenidConnectProviderUpdateContract object itself.
     */
    public OpenidConnectProviderUpdateContract withClientSecret(String clientSecret) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OpenidConnectProviderUpdateContractProperties();
        }
        this.innerProperties().withClientSecret(clientSecret);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (innerProperties() != null) {
            innerProperties().validate();
        }
    }
}


text:
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
# here : /branch/tests/Poshbox.Test
. "$here\..\TestCommon.ps1"

Describe 'ItIs-Any' {
    It 'returns Aether.Class.Mock.Expression' {
        $actualResult = ItIs-Any ([object])
        (ObjectIs-PSClassInstance $actualResult -PSClassName 'Aether.Class.Mock.Expression') | Should Be $true
    }

    It 'has accurate representation of provided expression when ToString()' {
        $actualResult = ItIs-Any ([object])
        $actualResult.ToString() | Should Be 'ItIs-Any{Type=System.Object}'
    }

    It 'can determine if inputobject is assignable from expected type' {
        $a = (new-object system.collections.arraylist)
        $actualResult = ItIs-Any ([System.Collections.IEnumerable])
        $actualResult.Predicate.Invoke($a) | Should Be $true
    }

    It 'can determine if unexpected inputobject is assignable from expected type' {
        $a = (new-object system.collections.arraylist)
        $actualResult = ItIs-Any ([string])
        $actualResult.Predicate.Invoke($a) | Should Be $false
    }
}


text:
package jp.gr.java_conf.daisy.ajax_mutator.mutation_viewer;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

/**
 * Viewer for mutatnts generated by AjaxMutator.
 */
public class MutationViewer extends Application {
    private static final String WINDOW_TITLE = "AjaxMutator - MutationViewer";
    private static final String BASE_DIRECTORY_KEY = "base_dir";
    private static final String MUTANTS_DIRECTORY_KEY = "mutants_dir";

    @Override
    public void start(Stage stage) throws Exception{
        checkArgs();
        FXMLLoader loader = new FXMLLoader(getClass().getResource("/mutation_viewer/mutation_viewer.fxml"));
        loader.setController(new MutationViewerController(
                getParameters().getNamed().get(MUTANTS_DIRECTORY_KEY),
                getParameters().getNamed().get(BASE_DIRECTORY_KEY)));
        Parent root = (Parent) loader.load();
        stage.setTitle(WINDOW_TITLE);
        stage.setScene(new Scene(root));
        stage.show();
    }

    private void checkArgs() throws IllegalArgumentException {
        if (!getParameters().getNamed().containsKey(MUTANTS_DIRECTORY_KEY)) {
            throw new IllegalArgumentException("You must specify the directory of mutants as following parameter\n" +
                    "'--" + MUTANTS_DIRECTORY_KEY + "=(path)");
        }
        if (!getParameters().getNamed().containsKey(BASE_DIRECTORY_KEY)) {
            throw new IllegalArgumentException("You must specify base directory as following parameter\n" +
                    "'--" + BASE_DIRECTORY_KEY + "=(path)");
        }
    }

    public static void main(String[] args) {
        launch(args);
    }
}


text:
package fr.ourten.teabeans.property.handle;

import fr.ourten.teabeans.property.PropertyBase;

import java.util.function.Supplier;

public class PropertyHandle<T>
{
    private final   PropertyBase<T> property;
    protected final Supplier<T>     getter;

    public PropertyHandle(PropertyBase<T> property, Supplier<T> getter)
    {
        this.property = property;
        this.getter = getter;
    }

    public PropertyBase<T> getProperty()
    {
        return property;
    }

    public void update()
    {
        property.setValue(getter.get());
    }
}


text:
package gwt.material.design.demo.client.application.addins.scrollfire;

import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Widget;
import com.gwtplatform.mvp.client.ViewImpl;
import gwt.material.design.addins.client.scrollfire.MaterialScrollfire;
import gwt.material.design.client.ui.MaterialImage;
import gwt.material.design.client.ui.MaterialPanel;
import gwt.material.design.client.ui.MaterialToast;
import gwt.material.design.client.ui.animate.MaterialAnimation;
import gwt.material.design.client.ui.animate.Transition;
import gwt.material.design.client.ui.html.UnorderedList;

import javax.inject.Inject;

public class ScrollFireView extends ViewImpl implements ScrollFirePresenter.MyView {
    interface Binder extends UiBinder<Widget, ScrollFireView> {
    }

    @UiField
    MaterialPanel panel;

    @UiField
    UnorderedList listContainer;

    @UiField
    MaterialImage image;

    @Inject
    ScrollFireView(Binder uiBinder) {
        initWidget(uiBinder.createAndBindUi(this));

        MaterialScrollfire.apply(panel.getElement(), () -> {
            MaterialToast.fireToast("Toasted");
        });
        MaterialScrollfire.apply(listContainer.getElement(), () -> new MaterialAnimation().transition(Transition.SHOW_STAGGERED_LIST).animate(listContainer));
        MaterialScrollfire.apply(image.getElement(), () -> new MaterialAnimation().transition(Transition.FADE_IN_IMAGE).animate(image));

    }
}


text:
<?php

namespace backend\controllers;

use Yii;
use common\models\Charan;
use common\models\CharanSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use common\components\CommonHelper;

/**
 * CharanController implements the CRUD actions for Charan model.
 */
class CharanController extends Controller
{
    /**
     * @inheritdoc
     */
    public function behaviors()
    {
        return [
            'verbs' => [
                'class' => VerbFilter::className(),
                'actions' => [
                    'delete' => ['POST'],
                ],
            ],
            'access' => [
                'class' => \yii\filters\AccessControl::className(),
                'only' => ['index', 'create', 'update', 'view', 'delete'],
                'rules' => [
                    // allow authenticated users
                    [
                        'allow' => true,
                        'roles' => ['@'],
                    ],
                    // everything else is denied
                ],
            ],
        ]; #Only Access By Admin login.
    }

    /**
     * Lists all Charan models.
     * @return mixed
     */
    public function actionIndex()
    {
        $searchModel = new CharanSearch();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

        return $this->render('index', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }

    /**
     * Displays a single Charan model.
     * @param integer $id
     * @return mixed
     */
    public function actionView($id)
    {
        return $this->render('view', [
            'model' => $this->findModel($id),
        ]);
    }

    /**
     * Finds the Charan model based on its primary key value.
     * If the model is not found, a 404 HTTP exception will be thrown.
     * @param integer $id
     * @return Charan the loaded model
     * @throws NotFoundHttpException if the model cannot be found
     */
    protected function findModel($id)
    {
        if (($model = Charan::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }

    /**
     * Creates a new Charan model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     * @return mixed
     */
    public function actionCreate()
    {
        $model = new Charan();

        $model->scenario = Charan::SCENARIO_ADD;
        if ($model->load(Yii::$app->request->post())) {
            $DATETIME = CommonHelper::getTime();
            $model->created_on = $DATETIME;
            $model->modified_on = $DATETIME;
            if ($model->save()) {
                return $this->redirect(['view', 'id' => $model->ID]);
            }

        } else {
            return $this->render('create', [
                'model' => $model,
            ]);
        }
    }

    /**
     * Updates an existing Charan model.
     * If update is successful, the browser will be redirected to the 'view' page.
     * @param integer $id
     * @return mixed
     */
    public function actionUpdate($id)
    {
        $model = $this->findModel($id);
        $model->scenario = Charan::SCENARIO_UPDATE;
        if ($model->load(Yii::$app->request->post())) {
            $DATETIME = CommonHelper::getTime();
            $model->modified_on = $DATETIME;
            if ($model->save()) {
                return $this->redirect(['view', 'id' => $model->ID]);
            }

        } else {
            return $this->render('update', [
                'model' => $model,
            ]);
        }
    }

    /**
     * Deletes an existing Charan model.
     * If deletion is successful, the browser will be redirected to the 'index' page.
     * @param integer $id
     * @return mixed
     */
    public function actionDelete($id)
    {
        $this->findModel($id)->delete();

        return $this->redirect(['index']);
    }
}


text:
                Renan
                Taranto

        {% assign home_description = site.home_description[site.active_lang] %}
        {% if home_description == nil %}
            {% assign home_description = site.description %}
        {% endif %}

                    {% include card-icon-primary.html %}
                    {% include card-icon-primary.html %}
                    {% include card-icon-github.html %}

{{ home_description }}

                    {% include card-icon-linkedin.html %}
                    {% include card-icon-rss.html %}

                    {% include card-icon-primary.html %}
                    {% include card-icon-primary.html %}
                    {% include card-icon-github.html %}

{{ home_description }}

                    {% include card-icon-linkedin.html %}
                    {% include card-icon-rss.html %}


text:
<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>25.0</apiVersion>
    <label>PiratizerConfigure</label>
</ApexPage>


text:
'use strict';

import React from 'react/addons';
import BreadCrumb from '../UI/BreadCrumb';
import Footer from '../UI/Footer';
import Loading from '../UI/Loading';
import FormPeticiones from '../Peticiones/FormPeticiones';
import FormModificarPeticiones from '../Peticiones/FormModificarPeticiones';
import { State, Navigation, TransitionHook } from 'react-router';

var centro = "";

let ModificarPeticion = React.createClass({
  mixins: [ Navigation, TransitionHook, State ],
    getInitialState(){
      return {
        centro: '',
        pacientes: '',
        medicos: '',
        form: ''
      };
    },
    componentWillMount(){
      var medicos = '';
      var pacientes = '';
      this.props.flux.getActions('login').getCentro().then((res)=> {
        //console.log('res bread', res);
        centro = res[0].Procedencia;
        var id = this.getParams().id;
        this.setState({
          centro: centro,
          id: id
        });
      });
      this.props.flux.getActions('peticiones').fetchMedicos().then((res)=> {
        //console.log('res medicos', res);
        medicos = res;
        this.setState({
          medicos: res
        });
      });
      this.props.flux.getActions('peticiones').fetchPacientes().then((res)=> {
        //console.log('res pacientes', res);
        pacientes = res;

        this.setState({
          pacientes: res
        });
      });

    },
    render() {
        var texto = "Inicio > Modificar Petición "+this.state.id;
        if(this.state.pacientes === '' || this.state.medicos === ''){
          return (<Loading/>);
        } else {
          return (
            <div>
              <BreadCrumb centro={centro} texto={texto}/>
              <FormModificarPeticiones flux={this.props.flux} medicos={this.state.medicos} pacientes={this.state.pacientes} analiticas={this.state.analiticas} form={this.state.form}/>
              <Footer/>
            </div>
            )

        }

    }
});

module.exports = ModificarPeticion;


text:
layout : post
title : The Big Three-O
description: A special birthday
comments: true
keywords: "30, birthday"
---

Today, I am 30 years old. One of my friends said that it's a milestone. She got me thinking.

This is a really confusing time in my life.

I am really nostalgic about the past. I feel like going back in time and reliving my childhood. Those memories are so vivid and uncomplicated.

In rare moments, I want to stay right here in time. My relationship with my family and my friends have never been better. There are so many moments, I wish I could freeze and relive all over again. Maybe I will be able to do that in the future.

Then there is the technical side of mine. The side that really wants to see what our collective consciousness will create in the future.

Thinking about my accomplishments, there are none to be really proud of. I was lost without a purpose for sometime. The work I was doing was becoming non challenging and routine and I was starting to get bored of it.

But the last six months were different. I finally found a home for my mind, where it can be constantly challenged. I don't know how big a contribution I can make in this field but I am really having fun learning it.

My thirst for knowledge has only increased over the years and I am thankful that it did.

I am also thankful to my family and my friends for supporting me during the worst of times and I promise you that the best of times are coming.


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "http://www.netbeans.org/dtds/sessionsettings-1_0.dtd">
<settings version="1.0">
    <module name="com.jme3.gde.scenecomposer" spec="0.1"/>
    <instanceof class="org.openide.windows.TopComponent"/>
    <instanceof class="com.jme3.gde.scenecomposer.SceneComposerTopComponent"/>
    <instance class="com.jme3.gde.scenecomposer.SceneComposerTopComponent" method="getDefault"/>
</settings>


text:
<!DOCTYPE html>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta charset="utf-8">
<title>phpDocumentor » RestPHP\Request</title>
<meta name="author" content="Mike van Riel">
<meta name="description" content="">
<link href="../css/template.css" rel="stylesheet" media="all">
<link rel="shortcut icon" href="../img/favicon.ico">
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">

phpDocumentor

                                    API Documentation

Namespaces

 RestPHP

 default

Packages

 Default

 RestPHP

                                    Charts

 Class hierarchy diagram

                                    Reports

 Errors
                154

 Markers

todo
                2

 Deprecated elements
                0

Back to top

                            Javascript is disabled; several features are only available
                            if Javascript is enabled.

<button class="btn details" title="Show descriptions and method names"></button><button class="btn simple" title="Show only method names"></button>

 Namespaces

Request

Header

Unmarshaller

\

RestPHP

\
Request

 Classes and interfaces

Request¶

Request

« More »

\

RestPHP

\
Request

\
Header

 Classes and interfaces

IHeader¶

Header - Interface for all request headers listed in rfc 2616 sec 14

« More »

Accept¶

HTTP Request header containing a list of all Content-Types that are
acceptable

« More »

AcceptCharset¶

HTTP Request header containing a list of all Character Sets that are
acceptable similar to Accept header

« More »

AcceptEncoding¶

HTTP Request header containing a list of all content-codings that are
acceptable similar to Accept header

« More »

AcceptLanguage¶

HTTP Request header containing a list of all languages the user-agent accepts

« More »

Authorization¶

HTTP Request header containing authorization details

« More »

CacheControl¶

HTTP Request header containing authorization details

« More »

Connection¶

HTTP Connection Request header

« More »

ContentLength¶

HTTP Content-Length Request header

« More »

ContentMd5¶

HTTP Content-MD5 Request header

« More »

ContentType¶

HTTP Content-Type Request header

« More »

Cookie¶

HTTP Cookie Request header

« More »

Date¶

HTTP Date Request header

« More »

Expect¶

HTTP Expect Request header

« More »

From¶

HTTP From Request header

« More »

Header¶

Abstract Header implementation for default toString() implementation

« More »

HeaderFactory¶

HeaderFactory - Request header factory

« More »

Host¶

HTTP Host Request header

« More »

IfMatch¶

HTTP If-Match Request header

« More »

IfModifiedSince¶

HTTP If-Modified-Since Request header

« More »

IfNoneMatch¶

HTTP If-None-Match Request header

« More »

IfRange¶

HTTP If-Range Request header

« More »

IfUnmodifiedSince¶

HTTP If-Unmodified-Since Request header

« More »

MaxForwards¶

HTTP Max-Forwards Request header

« More »

Pragma¶

HTTP Pragma Request header

« More »

ProxyAuthorization¶

HTTP Proxy-Authorization Request header

« More »

Range¶

HTTP Range Request header

« More »

Referer¶

HTTP Referer Request header

« More »

Te¶

HTTP TE Request header

« More »

Upgrade¶

HTTP Upgrade Request header

« More »

UserAgent¶

HTTP User-Agent Request header

« More »

Via¶

HTTP Via Request header

« More »

Warning¶

HTTP Warning Request header

« More »

XHeader¶

HTTP non-standard X-Headers

« More »

\

RestPHP

\
Request

\
Unmarshaller

 Classes and interfaces

IUnmarshaller¶

« More »

Json¶

« More »

NoValidUnmarshallerException¶

« More »

UnmarshallerFactory¶

« More »

Xml¶

« More »

            Template is built using Twitter Bootstrap 2 and icons provided by Glyphicons.

            Documentation is powered by phpDocumentor 2.0.0a2 and

            generated on 2012-05-09T11:09:48-04:00.


text:
describe 'Constraints - priority lookup' do

  it 'should return 1000' do
    MotionKit::Constraint.priority_lookup(:required).should == 1000
    MotionKit::Constraint.priority_lookup(1000).should == 1000
  end

  it 'should return 250' do
    MotionKit::Constraint.priority_lookup(:low).should == 250
    MotionKit::Constraint.priority_lookup(250).should == 250
  end

  it 'should raise InvalidPriorityError' do
    -> do
      MotionKit::Constraint.priority_lookup(:foo)
    end.should.raise(MotionKit::InvalidPriorityError)
  end

end


text:
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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.
// ----------------------------------------------------------------------------------

using System;
using System.Linq;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet;
using Microsoft.WindowsAzure.Commands.Storage.Common;
using Xunit;

namespace Microsoft.WindowsAzure.Commands.Storage.Test.Blob
{
    /// <summary>
    /// unit test for RemoveAzureStorageContainer
    /// </summary>
    public class RemoveAzureStorageContainerTest : StorageBlobTestBase
    {
        /// <summary>
        /// faked remove azure container command
        /// </summary>
        internal RemoveAzureStorageContainerCommand command = null;

        public RemoveAzureStorageContainerTest()
        {
            command = new RemoveAzureStorageContainerCommand(BlobMock)
            {
                CommandRuntime = MockCmdRunTime
            };
            CurrentBlobCmd = command;
        }

        [Fact]
        [Trait(Category.AcceptanceType, Category.CheckIn)]
        public void CleanCommand()
        {
            command = null;
        }

        [Fact]
        [Trait(Category.AcceptanceType, Category.CheckIn)]
        public void RemoveContainerWithInvalidContainerNameTest()
        {
            string name = "a*b";
            AssertThrowsAsync<ArgumentException>(() => command.RemoveAzureContainer(InitTaskId, BlobMock, name),
                String.Format(Resources.InvalidContainerName, name));
        }

        [Fact]
        [Trait(Category.AcceptanceType, Category.CheckIn)]
        public void RemoveContainerForNotExistsContainerTest()
        {
            string name = "test";
            AssertThrowsAsync<ResourceNotFoundException>(() => command.RemoveAzureContainer(InitTaskId, BlobMock, name),
                String.Format(Resources.ContainerNotFound, name));
        }

        [Fact]
        [Trait(Category.AcceptanceType, Category.CheckIn)]
        public void RemoveContainerCancelledTest()
        {
            AddTestContainers();

            string name = "test";
            MockCmdRunTime.ResetPipelines();
            command.Name = name;
            this.Confirmed = false;
            RunAsyncCommand(() => command.ExecuteCmdlet());
            string result = (string)MockCmdRunTime.VerboseStream.FirstOrDefault();
            Assert.Equal(String.Format(Resources.RemoveContainerCancelled, name), result);
        }

        [Fact]
        [Trait(Category.AcceptanceType, Category.CheckIn)]
        public void RemoveContainerSuccessfullyTest()
        {
            AddTestContainers();

            string name = "test";

            MockCmdRunTime.ResetPipelines();
            command.Name = name;
            this.Confirmed = true;
            RunAsyncCommand(() => command.ExecuteCmdlet());
            string result = (string)MockCmdRunTime.VerboseStream.FirstOrDefault();
            Assert.Equal(String.Format(Resources.RemoveContainerSuccessfully, name), result);

            MockCmdRunTime.ResetPipelines();
            name = "text";
            command.Name = name;
            command.Force = true;
            RunAsyncCommand(() => command.ExecuteCmdlet());
            result = (string)MockCmdRunTime.VerboseStream.FirstOrDefault();
            Assert.Equal(String.Format(Resources.RemoveContainerSuccessfully, name), result);
        }

        [Fact]
        [Trait(Category.AcceptanceType, Category.CheckIn)]
        public void ExecuteCommandRemoveContainer()
        {
            string name = "test";
            command.Name = name;
            RunAsyncCommand(() => command.ExecuteCmdlet());
            Assert.Equal(String.Format(Resources.ContainerNotFound, name), MockCmdRunTime.ErrorStream[0].Exception.Message);
        }
    }
}


text:
package org.hoteia.qalingo.core.comparator;

import java.util.Comparator;
import java.util.Date;

import org.hoteia.qalingo.core.domain.CmsContent;

public class CmsContentComparator implements Comparator<CmsContent> {

    public int compare(CmsContent o1, CmsContent o2) {
        if (o1 != null && o2 != null) {
            return ((Date)o2.getDateCreate()).compareTo(((Date)o1.getDateCreate()));
        }
        return 0;
    }

}