text:
package com.iced.alexwang.views.main;

import android.content.Context;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.RelativeLayout;

import com.iced.alexwang.activities.R;

public class ViewHelper {
    public static DrawerLayout getDrawerLayout(Context context, int resourceId, RecyclerView.Adapter adapter) {
        return getDrawerLayout(context, LayoutInflater.from(context).inflate(resourceId, null), adapter);
    }
    public static DrawerLayout getDrawerLayout(Context context, View main, RecyclerView.Adapter adapter) {
        DrawerLayout layout = (DrawerLayout) LayoutInflater.from(context).inflate(R.layout.layout_drawer, null);
        RecyclerView recyclerView = (RecyclerView) layout.findViewById(R.id.main_left_drawer);
        final LinearLayoutManager layoutManager = new LinearLayoutManager(context);
        layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
        recyclerView.setLayoutManager(layoutManager);

        RelativeLayout relativeLayout = (RelativeLayout) layout.findViewById(R.id.content_layout);
        relativeLayout.addView(main, new WindowManager.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
        recyclerView.setAdapter(adapter);
        return layout;
    }
}

redpajama_set_name: RedPajamaGithub


text:
/**
 * Created by Andrew on 10/9/2015.
 * These versions are for internal and not actual versions for major release
 */
var versionChecker = {
    version: 0.11,
    api: "https://aurous.me/api/version/",
    checkForUpdate: function() {
        $.getJSON(versionChecker.api, function(data) {
            if (data != null) {
              if (versionChecker.version < data.version) {
                  // confirm dialog
                  alertify.confirm("Update Alert
A new version of Aurous is available.", function (e) {
                      if (e) {
                          if (typeof openUrl == 'function') {
                              openUrl(data.moreInfo);
                          }
                      } else {

                      }
                  });
              } else {
                  console.log("up-to-date");
              }
            }
        });
    }
};


text:
from jrunner.common.amqpclient.client import Consume
from jrunner.jobworker.dispatch import dispatch
from jrunner.common import has_gevent_enabled
from jrunner.openstack.common import log as logging
from jrunner.jobworker.workers import *

from oslo.config import cfg

logging.setup('jrunner')

opts = [
    cfg.StrOpt(
        'queue',
        default='worker',
        help='Worker queue'),
]
CONF = cfg.CONF
CONF.register_opts(opts, 'jobworker')

LOG = logging.getLogger(__name__)

if has_gevent_enabled():
    import gevent
    sleep = gevent.sleep
else:
    import time
    sleep = time.sleep

def main():
    while True:
        try:
            c = Consume(BROKER_EXCHANGE, CONF.jobworker.queue)
            c.consume(dispatch)
        except Exception as err:
            LOG.exception(err)
        finally:
            sleep(3)


text:
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
  <string name="app_name">c:geo - contactes (complement)</string>
  <string name="contact_not_found">El contacte amb àlies %s no s\'ha trobat. Primer afegiu-lo a la vostra aplicació de contactes.</string>
  <string name="multiple_matches">Hi ha múltiples coincidències</string>
</resources>


text:
  Grevilly est
       un village
       situé dans le département de Saône-et-Loire en Bourgogne. Elle comptait 36 habitants en 2008.

Le parc d'habitations, à Grevilly, était réparti en 2011 en un appartements et 40 maisons soit
 un marché relativement équilibré.

Si vous pensez demenager à Grevilly, vous pourrez aisément trouver une maison à acheter.

À coté de Grevilly sont situées les communes de
Plottes à 4 km, 583 habitants,
La Chapelle-sous-Brancion à 4 km, 127 habitants,
Chardonnay localisée à 3 km, 168 habitants,
Bissy-la-Mâconnaise à 4 km, 168 habitants,
Lugny à 4 km, 888 habitants,
Royer située à 4 km, 126 habitants,
 entre autres. De plus, Grevilly est située à seulement 22 km de Mâcon.


text:
package com.puresoltechnologies.ductiledb.core.graph.schema;

import java.io.Serializable;
import java.util.HashSet;
import java.util.NavigableMap;
import java.util.Set;

import com.puresoltechnologies.ductiledb.bigtable.BigTable;
import com.puresoltechnologies.ductiledb.bigtable.Delete;
import com.puresoltechnologies.ductiledb.bigtable.Get;
import com.puresoltechnologies.ductiledb.bigtable.Put;
import com.puresoltechnologies.ductiledb.bigtable.Result;
import com.puresoltechnologies.ductiledb.bigtable.ResultScanner;
import com.puresoltechnologies.ductiledb.bigtable.Scan;
import com.puresoltechnologies.ductiledb.columnfamily.ColumnValue;
import com.puresoltechnologies.ductiledb.core.graph.ElementType;
import com.puresoltechnologies.ductiledb.core.graph.GraphStoreImpl;
import com.puresoltechnologies.ductiledb.core.graph.manager.DuctileDBGraphManagerException;
import com.puresoltechnologies.ductiledb.core.graph.manager.DuctileDBSchemaManagerException;
import com.puresoltechnologies.ductiledb.engine.DatabaseEngine;
import com.puresoltechnologies.ductiledb.engine.Namespace;
import com.puresoltechnologies.ductiledb.logstore.Key;
import com.puresoltechnologies.ductiledb.storage.api.StorageException;

public class DuctileDBSchemaManagerImpl implements DuctileDBSchemaManager {

    private final GraphStoreImpl graph;
    private final Namespace namespace;
    private final BigTable propertyDefinitionsTable;

    public DuctileDBSchemaManagerImpl(GraphStoreImpl graph) {
	super();
	this.graph = graph;
	DatabaseEngine storageEngine = graph.getStorageEngine();
	namespace = storageEngine.getNamespace(graph.getConfiguration().getNamespace());
	propertyDefinitionsTable = namespace.getTable(DatabaseTable.PROPERTY_DEFINITIONS.getName());
    }

    @Override
    public Iterable<String> getDefinedProperties() {
	BigTable table = namespace.getTable(DatabaseTable.PROPERTY_DEFINITIONS.getName());
	ResultScanner scanner = table.getScanner(new Scan());
	Set<String> propertyNames = new HashSet<>();
	scanner.forEach((result) -> propertyNames.add(result.getRowKey().toStringValue()));
	return propertyNames;
    }

    @Override
    public <T extends Serializable> void defineProperty(PropertyDefinition<T> definition) {
	if (definition == null) {
	    throw new IllegalArgumentException("definition must no be null.");
	}
	if (getPropertyDefinition(definition.getElementType(), definition.getPropertyKey()) != null) {
	    throw new DuctileDBPropertyAlreadyDefinedException(definition);
	}

	BigTable table = namespace.getTable(DatabaseTable.PROPERTY_DEFINITIONS.getName());
	Put put = new Put(Key.of(definition.getPropertyKey()));
	switch (definition.getElementType()) {
	case VERTEX:
	    put.addColumn(DatabaseColumnFamily.VERTEX_DEFINITION.getKey(), GraphSchema.PROPERTY_TYPE_KEY,
		    ColumnValue.of(definition.getPropertyType().getName()));
	    put.addColumn(DatabaseColumnFamily.VERTEX_DEFINITION.getKey(), GraphSchema.ELEMENT_TYPE_COLUMN_KEY,
		    ColumnValue.of(definition.getElementType().name()));
	    put.addColumn(DatabaseColumnFamily.VERTEX_DEFINITION.getKey(), GraphSchema.UNIQUENESS_COLUMN_KEY,
		    ColumnValue.of(definition.getUniqueConstraint().name()));
	    break;
	case EDGE:
	    put.addColumn(DatabaseColumnFamily.EDGE_DEFINITION.getKey(), GraphSchema.PROPERTY_TYPE_KEY,
		    ColumnValue.of(definition.getPropertyType().getName()));
	    put.addColumn(DatabaseColumnFamily.EDGE_DEFINITION.getKey(), GraphSchema.ELEMENT_TYPE_COLUMN_KEY,
		    ColumnValue.of(definition.getElementType().name()));
	    put.addColumn(DatabaseColumnFamily.EDGE_DEFINITION.getKey(), GraphSchema.UNIQUENESS_COLUMN_KEY,
		    ColumnValue.of(definition.getUniqueConstraint().name()));
	    break;
	default:
	    throw new DuctileDBSchemaManagerException(
		    "Cannot define property for element '" + definition.getElementType() + "'.");
	}
	try {
	    table.put(put);
	} catch (StorageException e) {
	    throw new DuctileDBGraphManagerException("Could not define property.", e);
	}
	graph.getSchema().defineProperty(definition);
    }

    @Override
    public <T extends Serializable> PropertyDefinition<T> getPropertyDefinition(ElementType elementType,
	    String propertyKey) {
	try {
	    BigTable table = namespace.getTable(DatabaseTable.PROPERTY_DEFINITIONS.getName());
	    Get get = new Get(Key.of(propertyKey));
	    Key columnFamily = null;
	    switch (elementType) {
	    case VERTEX:
		columnFamily = DatabaseColumnFamily.VERTEX_DEFINITION.getKey();
		break;
	    case EDGE:
		columnFamily = DatabaseColumnFamily.EDGE_DEFINITION.getKey();
		break;
	    default:
		throw new DuctileDBSchemaManagerException("Cannot read property for element '" + elementType + "'.");
	    }
	    get.addFamily(columnFamily);
	    Result result = table.get(get);
	    if (result == null) {
		return null;
	    }
	    NavigableMap<Key, ColumnValue> familyMap = result.getFamilyMap(columnFamily);
	    if (familyMap == null) {
		return null;
	    }
	    @SuppressWarnings("unchecked")
	    Class<T> type = (Class<T>) Class.forName(familyMap.get(GraphSchema.PROPERTY_TYPE_KEY).toString());
	    UniqueConstraint unique = UniqueConstraint
		    .valueOf(familyMap.get(GraphSchema.UNIQUENESS_COLUMN_KEY).toString());
	    PropertyDefinition<T> definition = new PropertyDefinition<>(elementType, propertyKey, type, unique);
	    return definition;
	} catch (ClassNotFoundException e) {
	    throw new DuctileDBSchemaManagerException("Could not read property names.", e);
	} catch (StorageException e) {
	    throw new DuctileDBGraphManagerException("Could not read property definition.", e);
	}
    }

    @Override
    public void removePropertyDefinition(ElementType elementType, String propertyKey) {
	BigTable table = namespace.getTable(DatabaseTable.PROPERTY_DEFINITIONS.getName());
	Delete delete = new Delete(Key.of(propertyKey));
	switch (elementType) {
	case VERTEX:
	    delete.addFamily(DatabaseColumnFamily.VERTEX_DEFINITION.getKey());
	    break;
	case EDGE:
	    delete.addFamily(DatabaseColumnFamily.EDGE_DEFINITION.getKey());
	    break;
	default:
	    throw new DuctileDBSchemaManagerException(
		    "Could not delete property definition for element '" + elementType + "'.");
	}
	try {
	    table.delete(delete);
	} catch (StorageException e) {
	    throw new DuctileDBGraphManagerException("Could not remove property.", e);
	}
	graph.getSchema().removeProperty(elementType, propertyKey);
    }

    @Override
    public Iterable<String> getDefinedTypes() {
	BigTable table = namespace.getTable(DatabaseTable.TYPE_DEFINITIONS.getName());
	ResultScanner scanner = table.getScanner(new Scan());
	Set<String> typeNames = new HashSet<>();
	scanner.forEach((result) -> typeNames.add(result.getRowKey().toStringValue()));
	return typeNames;
    }

    @Override
    public void defineType(ElementType elementType, String typeName, Set<String> propertyKeys) {
	if (elementType == null) {
	    throw new IllegalArgumentException("elementType must not be null.");
	}
	if ((typeName == null) || (typeName.isEmpty())) {
	    throw new IllegalArgumentException("typeName must not be null or empty.");
	}
	if ((propertyKeys == null) || (propertyKeys.isEmpty())) {
	    throw new IllegalArgumentException("propertyKeys must not be null or empty.");
	}
	if (getTypeDefinition(elementType, typeName) != null) {
	    throw new DuctileDBTypeAlreadyDefinedException(typeName);
	}
	for (String propertyKey : propertyKeys) {
	    if (getPropertyDefinition(elementType, propertyKey) == null) {
		throw new DuctileDBSchemaException("Cannot define type '" + typeName
			+ "' with unknown property definition for key  '" + propertyKey + "'.");
	    }
	}
	BigTable table = namespace.getTable(DatabaseTable.TYPE_DEFINITIONS.getName());
	Put put = new Put(Key.of(typeName));
	switch (elementType) {
	case VERTEX:
	    for (String propertyKey : propertyKeys) {
		put.addColumn(DatabaseColumnFamily.VERTEX_DEFINITION.getKey(), Key.of(propertyKey),
			ColumnValue.empty());
	    }
	    break;
	case EDGE:
	    for (String propertyKey : propertyKeys) {
		put.addColumn(DatabaseColumnFamily.EDGE_DEFINITION.getKey(), Key.of(propertyKey), ColumnValue.empty());
	    }
	    break;
	default:
	    throw new DuctileDBSchemaManagerException("Cannot define type for element '" + elementType + "'.");
	}
	try {
	    table.put(put);
	} catch (StorageException e) {
	    throw new DuctileDBGraphManagerException("Could not define type.", e);
	}
	graph.getSchema().defineType(elementType, typeName, propertyKeys);
    }

    @Override
    public Set<String> getTypeDefinition(ElementType elementType, String typeName) {
	BigTable table = namespace.getTable(DatabaseTable.TYPE_DEFINITIONS.getName());
	Get get = new Get(Key.of(typeName));
	Key columnFamily = null;
	switch (elementType) {
	case VERTEX:
	    columnFamily = DatabaseColumnFamily.VERTEX_DEFINITION.getKey();
	    break;
	case EDGE:
	    columnFamily = DatabaseColumnFamily.EDGE_DEFINITION.getKey();
	    break;
	default:
	    throw new DuctileDBSchemaManagerException("Cannot read type for element '" + elementType + "'.");
	}
	get.addFamily(columnFamily);
	Result result;
	try {
	    result = table.get(get);
	} catch (StorageException e) {
	    throw new DuctileDBGraphManagerException("Could not read type definition.", e);
	}
	if (result == null) {
	    return null;
	}
	NavigableMap<Key, ColumnValue> familyMap = result.getFamilyMap(columnFamily);
	if (familyMap == null) {
	    return null;
	}
	Set<String> propertyKeys = new HashSet<>();
	for (Key propertyKey : familyMap.keySet()) {
	    propertyKeys.add(propertyKey.toStringValue());
	}
	return propertyKeys;
    }

    @Override
    public void removeTypeDefinition(ElementType elementType, String typeName) {
	BigTable table = namespace.getTable(DatabaseTable.TYPE_DEFINITIONS.getName());
	Delete delete = new Delete(Key.of(typeName));
	switch (elementType) {
	case VERTEX:
	    delete.addFamily(DatabaseColumnFamily.VERTEX_DEFINITION.getKey());
	    break;
	case EDGE:
	    delete.addFamily(DatabaseColumnFamily.EDGE_DEFINITION.getKey());
	    break;
	default:
	    throw new DuctileDBSchemaManagerException(
		    "Could not delete type definition for element '" + elementType + "'.");
	}
	try {
	    table.delete(delete);
	} catch (StorageException e) {
	    throw new DuctileDBGraphManagerException("Could not remove type definition.", e);
	}
	graph.getSchema().removeType(elementType, typeName);
    }

}


text:
using System;
using System.IO;
using Stratageme15.Core.JavascriptCodeDom;

namespace Stratageme15.Core.Compiler.DefaultNodeCompilers
{
    public class FactParameterListNodeCompiler : NodeCompilerBase<FactParameterList>
    {
        protected override void DoCompile(TextWriter output, FactParameterList node)
        {
            output.Write("(");
            if (node != null)
            {
                for (int index = 0; index < node.Arguments.Count; index++)
                {
                    var expression = node.Arguments[index];
                    CompileChild(output, expression);
                    if (index < node.Arguments.Count - 1) output.Write(", ");
                }
            }
            output.Write(")");
        }
    }
}


text:
====
TODO
====

Note: this is quite obsolete.

TODO:

    - add 2to3 command
    - think about integration with sphinx for doc
    - test command support
    - specify hook mechanism
    - add proper egg support
    - namespace packages: how to deal with them (file description and runtime
      support) ?
    - port stdeb to bento
    - handle reliable install/uninstall
    - fix messy lexer/parser code

Not well thought out yet:
    - supporting everything that pkg_resources does (namespace
      package), except multiple-version installs.

Syntax and features of the package description file
===================================================

The parser and lexer need to be seriously cleaned-up.

Missing features:

    - Format-Versioning
    - Options declaration besides boolean ?
    - Unicode support

Install-Reinstall-Rebuild-Clean problem
=======================================

Reliable install/reinstall
--------------------------

InstalledPkgInfo should be enough to install/uninstall things, so including it
in installers should be sufficient to get all the data, although it may not be
very efficient.

Fundamental problem: bento vs native packages. Possible solutions:

    1 create a new local site-packages specific to bento, and only use
      bento-enabled package for dependencies:

        - advantages: reliable, relatively simple
        - disadvantages: invasive, requires all dependencies to be
          under bento (in particular numpy/scipy/matplotlib)

    2 try to cope with existing, already installed packages.

        - advantages: no barrier of entry, gradual migration
        - disadvantages: how to do it ?

Scipi
=====

Pypi does not work for the scientific community, so we need to replace it with
our own stack. The goal is something like CRAN:

    - publish a package from sdist with a cabal-like file to scipi
    - the package would be automatically checked for metadata consistency,
      built (included documentation)
    - if the package builds correctly, the package will be available on the
      given platform(s)
    - scipi would have a simple web interface ala CRAN

Technical issues:

    - Simple server for published files (mirrored through rsync). Ideally,
      pure http-based file serving is enough
    - Simple WEB-API to get metadata + files
    - Look at HackageDB in details


text:
import {userTypes} from '../../mutation-types'

export default {
  initUserAPI ({commit}) {
    commit(userTypes.SET_API)
  },
  createUser ({commit, state, dispatch}, creds) {
    dispatch('initUserAPI')
    commit(userTypes.CREATE_USER) // show spinner

    state
      .userAPI
      .create(creds)
      .then((response) => {
        if (response) {
          localStorage.setItem('token', 'JWT')
          commit(userTypes.CREATE_USER_SUCCESS)
        }
      })
  }
}


text:
          Bootstrap Dropdowns

              docs

            <button dropdownToggle type="button" class="btn btn-primary dropdown-toggle">
              Button dropdown
            </button>

Action

Another action

Something else here

Separated link

          Dropdowns
          trigger by <a>

        Click me for a dropdown, yo!

              {{choice}}

          Dropdowns
          split button

            <button type="button" class="btn btn-danger">Action</button>
            <button type="button" dropdownToggle class="btn btn-danger dropdown-toggle dropdown-toggle-split">

              Split button!
            </button>

Action

Another action

Something else
                here

Separated link

          Dropdowns
          manual triggers

            <button dropdownToggle type="button" class="btn btn-primary dropdown-toggle">
              Button dropdown
            </button>

Action

Another action

Something else
                here

Separated link

          <button type="button" class="btn btn-primary" (click)="toggleDropdown($event)">Toggle</button>

          Dropdowns
          disabled menu

            <button dropdownToggle type="button" class="btn btn-primary dropdownToggle">
              Button dropdown
            </button>

Action

Another action

Something else
                here

Separated link

          <button type="button" class="btn btn-warning" (click)="disabled = !disabled">
            Enable/Disable
          </button>

          Dropdowns
          menu alignment

            <button dropdownToggle type="button" class="btn btn-primary dropdown-toggle">
              This menu is right-aligned
            </button>

Action

Another action

Something else here

Separated link

          Dropdowns
          dropup variation

            <button dropdownToggle type="button" class="btn btn-primary dropdown-toggle">
              Dropup
            </button>

Action

Another action

Something else
                here

Separated link

              <input type="checkbox" value="true" [(ngModel)]="isDropup"
                     style="display: inline-block;">
              {{ isDropup ? 'Is dropup' : 'Is dropdown' }}

          Dropdowns
           with autoClose

            <button dropdownToggle type="button" class="btn btn-primary dropdown-toggle">
              Button dropdown
            </button>

Action

Another action

Something else
                here


text:
import { Configuration, buildConfiguration, TokenValidationConfiguration } from "../../src/config/Configuration";
import { HttpClient } from "../../src/network/HttpClient";
import { TEST_CONSTANTS } from "../utils/TestConstants";
import { LogLevel, NetworkRequestOptions, ProtocolMode } from "@azure/msal-common";
import 'regenerator-runtime';

describe("Configuration", () => {
    it("builds configuration and assigns default functions", () => {
        const config: TokenValidationConfiguration = buildConfiguration();

        // network options
        expect(config.system!.networkClient).toBeDefined();
        expect(config.system!.networkClient).toBeInstanceOf(HttpClient);
        expect(config.system!.networkClient!.sendGetRequestAsync).toBeDefined();
        expect(
            config.system!.networkClient!.sendPostRequestAsync
        ).toBeDefined();

        // logger options checks
        console.error = jest.fn();
        console.info = jest.fn();
        console.debug = jest.fn();
        console.warn = jest.fn();

        expect(config.system!.loggerOptions).toBeDefined();
        expect(config.system!.loggerOptions!.piiLoggingEnabled).toBe(false);

        config.system!.loggerOptions!.loggerCallback!(
            LogLevel.Error,
            'error',
            false
        );
        config.system!.loggerOptions!.loggerCallback!(
            LogLevel.Info,
            'info',
            false
        );
        config.system!.loggerOptions!.loggerCallback!(
            LogLevel.Verbose,
            'verbose',
            false
        );
        config.system!.loggerOptions!.loggerCallback!(
            LogLevel.Warning,
            'warning',
            false
        );
        config.system!.loggerOptions!.loggerCallback!(
            LogLevel.Warning,
            'warning',
            true
        );

        // auth options
        expect(config.auth.authority).toEqual(TEST_CONSTANTS.DEFAULT_AUTHORITY);
        expect(config.auth.clockSkew).toEqual(TEST_CONSTANTS.DEFAULT_CLOCK_SKEW);
        expect(config.auth.knownAuthorities).toEqual([]);
        expect(config.auth.protocolMode).toEqual(ProtocolMode.OIDC);

    });

    it('builds configuration and assigns default functions', () => {
        const testNetworkResult = {
            testParam: 'testValue',
        };

        const config: Configuration = {
            auth: {
                authority: TEST_CONSTANTS.AUTHORITY
            },
            system: {
                networkClient: {
                    sendGetRequestAsync: async (
                        url: string,
                        options?: NetworkRequestOptions
                    ): Promise<any> => {
                        if (url && options) {
                            return testNetworkResult;
                        }
                    },
                    sendPostRequestAsync: async (
                        url: string,
                        options?: NetworkRequestOptions
                    ): Promise<any> => {
                        if (url && options) {
                            return testNetworkResult;
                        }
                    },
                },
                loggerOptions: {
                    loggerCallback: (
                        level: LogLevel,
                        message: string,
                        containsPii: boolean
                    ): void => {
                        if (containsPii) {
                            console.log(
                                `Log level: ${level} Message: ${message}`
                            );
                        }
                    },
                    piiLoggingEnabled: true,
                },
            },
        };

        const testNetworkOptions: NetworkRequestOptions = {
            headers: {},
            body: '',
        };

        const builtConfig: TokenValidationConfiguration = buildConfiguration(config);

        // network options
        expect(
            builtConfig.system.networkClient!.sendGetRequestAsync(
                TEST_CONSTANTS.DEFAULT_JWKS_URI_OIDC,
                testNetworkOptions
            )
        ).resolves.toEqual(testNetworkResult);
        expect(
            builtConfig.system.networkClient!.sendPostRequestAsync(
                TEST_CONSTANTS.DEFAULT_JWKS_URI_OIDC,
                testNetworkOptions
            )
        ).resolves.toEqual(testNetworkResult);

        // Logger options checks
        expect(config.system!.loggerOptions).toBeDefined();
        expect(config.system!.loggerOptions!.piiLoggingEnabled).toBe(true);

        // auth options
        expect(config.auth!.authority).toEqual(TEST_CONSTANTS.AUTHORITY);
    });
});


text:
package armdatafactory_test

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v3"
)

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_ListByFactory.json
func ExamplePipelinesClient_NewListByFactoryPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatafactory.NewPipelinesClient("12345678-1234-1234-1234-12345678abc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByFactoryPager("exampleResourceGroup", "exampleFactoryName", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Create.json
func ExamplePipelinesClient_CreateOrUpdate_pipelinesCreate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatafactory.NewPipelinesClient("12345678-1234-1234-1234-12345678abc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "examplePipeline", armdatafactory.PipelineResource{
		Properties: &armdatafactory.Pipeline{
			Activities: []armdatafactory.ActivityClassification{
				&armdatafactory.ForEachActivity{
					Name: to.Ptr("ExampleForeachActivity"),
					Type: to.Ptr("ForEach"),
					TypeProperties: &armdatafactory.ForEachActivityTypeProperties{
						Activities: []armdatafactory.ActivityClassification{
							&armdatafactory.CopyActivity{
								Name: to.Ptr("ExampleCopyActivity"),
								Type: to.Ptr("Copy"),
								Inputs: []*armdatafactory.DatasetReference{
									{
										Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference),
										Parameters: map[string]interface{}{
											"MyFileName":   "examplecontainer.csv",
											"MyFolderPath": "examplecontainer",
										},
										ReferenceName: to.Ptr("exampleDataset"),
									}},
								Outputs: []*armdatafactory.DatasetReference{
									{
										Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference),
										Parameters: map[string]interface{}{
											"MyFileName": map[string]interface{}{
												"type":  "Expression",
												"value": "@item()",
											},
											"MyFolderPath": "examplecontainer",
										},
										ReferenceName: to.Ptr("exampleDataset"),
									}},
								TypeProperties: &armdatafactory.CopyActivityTypeProperties{
									DataIntegrationUnits: float64(32),
									Sink: &armdatafactory.BlobSink{
										Type: to.Ptr("BlobSink"),
									},
									Source: &armdatafactory.BlobSource{
										Type: to.Ptr("BlobSource"),
									},
								},
							}},
						IsSequential: to.Ptr(true),
						Items: &armdatafactory.Expression{
							Type:  to.Ptr(armdatafactory.ExpressionTypeExpression),
							Value: to.Ptr("@pipeline().parameters.OutputBlobNameList"),
						},
					},
				}},
			Parameters: map[string]*armdatafactory.ParameterSpecification{
				"JobId": {
					Type: to.Ptr(armdatafactory.ParameterTypeString),
				},
				"OutputBlobNameList": {
					Type: to.Ptr(armdatafactory.ParameterTypeArray),
				},
			},
			Policy: &armdatafactory.PipelinePolicy{
				ElapsedTimeMetric: &armdatafactory.PipelineElapsedTimeMetricPolicy{
					Duration: "0.00:10:00",
				},
			},
			RunDimensions: map[string]interface{}{
				"JobId": map[string]interface{}{
					"type":  "Expression",
					"value": "@pipeline().parameters.JobId",
				},
			},
			Variables: map[string]*armdatafactory.VariableSpecification{
				"TestVariableArray": {
					Type: to.Ptr(armdatafactory.VariableTypeArray),
				},
			},
		},
	}, &armdatafactory.PipelinesClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Update.json
func ExamplePipelinesClient_CreateOrUpdate_pipelinesUpdate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatafactory.NewPipelinesClient("12345678-1234-1234-1234-12345678abc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "examplePipeline", armdatafactory.PipelineResource{
		Properties: &armdatafactory.Pipeline{
			Description: to.Ptr("Example description"),
			Activities: []armdatafactory.ActivityClassification{
				&armdatafactory.ForEachActivity{
					Name: to.Ptr("ExampleForeachActivity"),
					Type: to.Ptr("ForEach"),
					TypeProperties: &armdatafactory.ForEachActivityTypeProperties{
						Activities: []armdatafactory.ActivityClassification{
							&armdatafactory.CopyActivity{
								Name: to.Ptr("ExampleCopyActivity"),
								Type: to.Ptr("Copy"),
								Inputs: []*armdatafactory.DatasetReference{
									{
										Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference),
										Parameters: map[string]interface{}{
											"MyFileName":   "examplecontainer.csv",
											"MyFolderPath": "examplecontainer",
										},
										ReferenceName: to.Ptr("exampleDataset"),
									}},
								Outputs: []*armdatafactory.DatasetReference{
									{
										Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference),
										Parameters: map[string]interface{}{
											"MyFileName": map[string]interface{}{
												"type":  "Expression",
												"value": "@item()",
											},
											"MyFolderPath": "examplecontainer",
										},
										ReferenceName: to.Ptr("exampleDataset"),
									}},
								TypeProperties: &armdatafactory.CopyActivityTypeProperties{
									DataIntegrationUnits: float64(32),
									Sink: &armdatafactory.BlobSink{
										Type: to.Ptr("BlobSink"),
									},
									Source: &armdatafactory.BlobSource{
										Type: to.Ptr("BlobSource"),
									},
								},
							}},
						IsSequential: to.Ptr(true),
						Items: &armdatafactory.Expression{
							Type:  to.Ptr(armdatafactory.ExpressionTypeExpression),
							Value: to.Ptr("@pipeline().parameters.OutputBlobNameList"),
						},
					},
				}},
			Parameters: map[string]*armdatafactory.ParameterSpecification{
				"OutputBlobNameList": {
					Type: to.Ptr(armdatafactory.ParameterTypeArray),
				},
			},
			Policy: &armdatafactory.PipelinePolicy{
				ElapsedTimeMetric: &armdatafactory.PipelineElapsedTimeMetricPolicy{
					Duration: "0.00:10:00",
				},
			},
		},
	}, &armdatafactory.PipelinesClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Get.json
func ExamplePipelinesClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatafactory.NewPipelinesClient("12345678-1234-1234-1234-12345678abc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "exampleResourceGroup", "exampleFactoryName", "examplePipeline", &armdatafactory.PipelinesClientGetOptions{IfNoneMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Delete.json
func ExamplePipelinesClient_Delete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatafactory.NewPipelinesClient("12345678-1234-1234-1234-12345678abc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "exampleResourceGroup", "exampleFactoryName", "examplePipeline", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_CreateRun.json
func ExamplePipelinesClient_CreateRun() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatafactory.NewPipelinesClient("12345678-1234-1234-1234-12345678abc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateRun(ctx, "exampleResourceGroup", "exampleFactoryName", "examplePipeline", &armdatafactory.PipelinesClientCreateRunOptions{ReferencePipelineRunID: nil,
		IsRecovery:        nil,
		StartActivityName: nil,
		StartFromFailure:  nil,
		Parameters: map[string]interface{}{
			"OutputBlobNameList": []interface{}{
				"exampleoutput.csv",
			},
		},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}


text:
package com.thinkgem.jeesite.modules.mms.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.mms.entity.NameToRiskMaterial;
import com.thinkgem.jeesite.modules.mms.dao.NameToRiskMaterialDao;

/**
 * 标准中文名对应的风险物质Service
 * @author jiang
 * @version 2017-02-26
 */
@Service
@Transactional(readOnly = true)
public class NameToRiskMaterialService extends CrudService<NameToRiskMaterialDao, NameToRiskMaterial> {

	@Autowired
	private NameToRiskMaterialDao nameToRiskMaterialDao;

	public NameToRiskMaterial get(String id) {
		return super.get(id);
	}

	public List<NameToRiskMaterial> findList(NameToRiskMaterial nameToRiskMaterial) {
		return super.findList(nameToRiskMaterial);
	}

	public Page<NameToRiskMaterial> findPage(Page<NameToRiskMaterial> page, NameToRiskMaterial nameToRiskMaterial) {
		return super.findPage(page, nameToRiskMaterial);
	}

	@Transactional(readOnly = false)
	public void save(NameToRiskMaterial nameToRiskMaterial) {
		super.save(nameToRiskMaterial);
	}

	@Transactional(readOnly = false)
	public void delete(NameToRiskMaterial nameToRiskMaterial) {
		super.delete(nameToRiskMaterial);
	}
	/**
	 * 查询所有模糊转换的信息,并按照优先级别进行排序
	 * @return List<NameToRiskMaterial>
	 */
	public  List<NameToRiskMaterial> selectAllLevelOther(){
		return nameToRiskMaterialDao.selectAllLevelOther();
	}

}


text:
namespace {

// The number of remote mouse events to record for the purpose of eliminating
// "echoes" detected by the local input detector. The value should be large
// enough to cope with the fact that multiple events might be injected before
// any echoes are detected.
const unsigned int kNumRemoteMousePositions = 50;

// The number of milliseconds for which to block remote input when local input
// is received.
const int64 kRemoteBlockTimeoutMillis = 2000;

} // namespace

namespace remoting {

RemoteInputFilter::RemoteInputFilter(protocol::InputEventTracker* event_tracker)
    : event_tracker_(event_tracker),
      expect_local_echo_(true) {
}

RemoteInputFilter::~RemoteInputFilter() {
}

void RemoteInputFilter::LocalMouseMoved(
    const webrtc::DesktopVector& mouse_pos) {
  // If this is a genuine local input event (rather than an echo of a remote
  // input event that we've just injected), then ignore remote inputs for a
  // short time.
  if (expect_local_echo_) {
    std::list<webrtc::DesktopVector>::iterator found_position =
        injected_mouse_positions_.begin();
    while (found_position != injected_mouse_positions_.end() &&
           !mouse_pos.equals(*found_position)) {
      ++found_position;
    }
    if (found_position != injected_mouse_positions_.end()) {
      // Remove it from the list, and any positions that were added before it,
      // if any.  This is because the local input monitor is assumed to receive
      // injected mouse position events in the order in which they were injected
      // (if at all).  If the position is found somewhere other than the front
      // of the queue, this would be because the earlier positions weren't
      // successfully injected (or the local input monitor might have skipped
      // over some positions), and not because the events were out-of-sequence.
      // These spurious positions should therefore be discarded.
      injected_mouse_positions_.erase(injected_mouse_positions_.begin(),
                                      ++found_position);
      return;
    }
  }

  // Release all pressed buttons or keys, disable inputs, and note the time.
  event_tracker_->ReleaseAll();
  latest_local_input_time_ = base::TimeTicks::Now();
}

void RemoteInputFilter::SetExpectLocalEcho(bool expect_local_echo) {
  expect_local_echo_ = expect_local_echo;
  if (!expect_local_echo_)
    injected_mouse_positions_.clear();
}

void RemoteInputFilter::InjectKeyEvent(const protocol::KeyEvent& event) {
  if (ShouldIgnoreInput())
    return;
  event_tracker_->InjectKeyEvent(event);
}

void RemoteInputFilter::InjectTextEvent(const protocol::TextEvent& event) {
  if (ShouldIgnoreInput())
    return;
  event_tracker_->InjectTextEvent(event);
}

void RemoteInputFilter::InjectMouseEvent(const protocol::MouseEvent& event) {
  if (ShouldIgnoreInput())
    return;
  if (expect_local_echo_ && event.has_x() && event.has_y()) {
    injected_mouse_positions_.push_back(
        webrtc::DesktopVector(event.x(), event.y()));
    if (injected_mouse_positions_.size() > kNumRemoteMousePositions) {
      VLOG(1) << "Injected mouse positions queue full.";
      injected_mouse_positions_.pop_front();
    }
  }
  event_tracker_->InjectMouseEvent(event);
}

bool RemoteInputFilter::ShouldIgnoreInput() const {
  // Ignore remote events if the local mouse moved recently.
  int64 millis =
      (base::TimeTicks::Now() - latest_local_input_time_).InMilliseconds();
  if (millis < kRemoteBlockTimeoutMillis)
    return true;
  return false;
}

}  // namespace remoting


text:
<?php

namespace deasilworks\API;

/**
 * Class ControllerAction.
 *
 * Responsible for taking a class based oject and
 * calling it's setters with matching params from a
 * standard object.
 *
 * The purpose of the hydrator is setting properties
 * of models with setters. Model setters should only
 * contain one parameter.
 *
 * Model setters can accept a scaler or type hinted
 * class. Values for setters without type hints are passed
 * as compound types or scalers.
 */
class Hydrator
{
    /**
     * Hydrating a class object from a hashed array
     * uses an **Adder**. addSomething().
     */
    const PREFIX_ADDER = 'add';

    /**
     * Hydrating a class object from standard object
     * calls a **Setter** for each of it's properties.
     * setSomething().
     */
    const PREFIX_SETTER = 'set';

    /**
     * Hydrate Object.
     *
     * Takes an object and tries to hydrate it with another.
     *
     * Uses methods prefixed with "set" to set values.
     *
     * If the payload is an array (hash) it will call a method
     * prefixed with "add". This is required in order to find
     * the type hint.
     *
     * @param object       $targetObject
     * @param object|array $payload
     *
     * @return object
     */
    public function hydrateObject($targetObject, $payload)
    {
        if (!$payload) {
            return $targetObject;
        }

        if (is_object($payload) || is_array($payload)) {
            foreach ($payload as $param => $value) {
                if (is_int($param)) {
                    foreach ($value as $par => $val) {
                        $setter = $this->prefixer(self::PREFIX_ADDER, $par);
                        $this->hydrateMethod($targetObject, $setter, $val);
                    }
                    continue;
                }

                $setter = $this->prefixer(self::PREFIX_SETTER, $param);

                $this->hydrateMethod($targetObject, $setter, $value);
            }
        }

        return $targetObject;
    }

    /**
     * Hydrate Collection.
     *
     * Hydrates a an array or hash with objects of a given type.
     *
     * This class expects $dryObject to have the following methods:
     *
     *   - setCollection (to pass and array of object)
     *   - getValueClass (the type of object to create)
     *
     * @param $object
     * @param $valueArray
     *
     * @return object $object
     */
    protected function hydrateCollection($object, $valueArray)
    {
        if (!method_exists($object, 'getValueClass') ||
            !method_exists($object, 'setCollection')) {
            return $object;
        }

        $collection = [];

        $class = $object->getValueClass();
        if (class_exists($class)) {
            foreach ($valueArray as $key => $value) {
                $dryItem = new $class();
                $item = $this->hydrateObject($dryItem, $value);
                $collection[$key] = $item;
            }
        }

        $object->setCollection($collection);

        return $object;
    }

    /**
     * Hydrate Method.
     *
     * Checks the method signature for a type hint, if
     * one is found hydrate is called and the result is
     * sent to the method.
     *
     * If there is no type hint in the method signature
     * the value is used without attempting hydration.
     *
     * @param $targetObject
     * @param $method
     * @param $value
     */
    protected function hydrateMethod($targetObject, $method, $value)
    {
        if (method_exists($targetObject, $method)) {
            $dryObject = $this->getParameterClassObject($targetObject, $method);

            if ($dryObject && is_object($dryObject)) {
                $hydratedObject = null;

                // does the dry object have a setCollection method?
                //
                if (method_exists($dryObject, 'setCollection') && method_exists($dryObject, 'getValueClass')) {
                    $hydratedObject = $this->hydrateCollection($dryObject, $value);
                }

                if (!$hydratedObject) {
                    $hydratedObject = $this->hydrateObject($dryObject, $value);
                }

                $targetObject->$method($hydratedObject);

                return;
            }

            if ($value && is_object($value)) {
                $value = (array) $value;
            }

            $targetObject->$method($value);
        }
    }

    /**
     * Get Parameter Class Object.
     *
     * Get the Class of object a method requires.
     *
     * @param $object
     * @param $method
     *
     * @return mixed
     */
    public function getParameterClassObject($object, $method)
    {
        $reflectionClass = new \ReflectionClass(get_class($object));
        $parameters = $reflectionClass->getMethod($method)->getParameters();

        if ($parameters && isset($parameters[0])) {
            $refClass = $parameters[0]->getClass();

            if ($refClass) {
                $class = $refClass->getName();

                return new $class();
            }
        }
    }

    /**
     * Snake to Pascal.
     *
     * Converts a_snake_case_string to aPascalCaseString.
     *
     * @param $input
     *
     * @return string
     */
    public function snakeToPascal($input)
    {
        return str_replace('_', '', ucwords($input, '_'));
    }

    /**
     * Prefixer.
     *
     * @param $prefix
     * @param $method
     *
     * @return string
     */
    private function prefixer($prefix, $method)
    {
        return $prefix.$this->snakeToPascal($method);
    }
}


text:
extern crate byteorder;
#[macro_use] extern crate futures;
extern crate rand;
#[macro_use] extern crate tokio_core;

pub mod bits;
pub mod iana;
pub mod master;
pub mod rdata;
pub mod utils;
pub mod resolv;


text:
#ifndef TIACTOR_BASIC_STATIC_LINK_H
#define TIACTOR_BASIC_STATIC_LINK_H

#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif

#if defined(_WIN64) || defined(WIN64)
#  if defined(_DEBUG) && !defined(NDEBUG)
#    pragma comment(lib, "libTiActor-x64-Debug.lib")
#  else
#    pragma comment(lib, "libTiActor-x64-Release.lib")
#  endif
#elif defined(_WIN32) || defined(WIN32) || defined(_WINDOWS)
#  if defined(_DEBUG) && !defined(NDEBUG)
#    pragma comment(lib, "libTiActor-x86-Debug.lib")
#  else
#    pragma comment(lib, "libTiActor-x86-Release.lib")
#  endif
#else
// Linux or another OS
// Do nothing!!
#endif

#endif  /* TIACTOR_BASIC_STATIC_LINK_H */


text:
package model.tool.maxflow;

import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Vector;

import util.FileOrganizer;
import util.Log;

/**
 * The Class GraphUtil.
 */
public class GraphUtil {

	/**
	 * Total flow.
	 *
	 * @param arcs the arcs
	 * @param flow the flow
	 * @return the double
	 */
	public static double totalFlow(Collection<Arc> arcs, HashMap<Arc, Double> flow) {
		double sum = 0.0;
		for (Arc a : arcs) {
			Double f = flow.get(a);
			if (null == f) {
				Log.w("Null preflow.. " + a.toString());
				continue;
			}
			sum += f;
		}
		return sum;
	}

	/**
	 * Write output file.
	 *
	 * @param outputFileName the output file name
	 * @param graph the graph
	 * @param flow the flow
	 */
	public static void writeOutputFile(String outputFileName, Graph graph, HashMap<Arc, Double> flow) {
		String content = "# Node u, Node v, Flow on arc uv, Capacity of arc uv\n";
		for (Arc arc : graph.getAllArcs()) {
			Double f = flow.get(arc);
			if (null == f) {
				Log.e("Cannot find flow value for arc " + arc.getName());
				f = 0.0;
			}
			Vertex u = arc.getStartVertex();
			Vertex v = arc.getEndVertex();
			content += String.format("%s, %s, %.3f, %.3f\n", u.getName(), v.getName(), f, arc.getCapacity());
		}
		FileOrganizer.writeFile(outputFileName, content);
	}

	/**
	 * Write the input file for push relabel algo.
	 *
	 * @param fileName the file name
	 * @param graph the graph
	 * @param source the source
	 * @param sink the sink
	 */
	public static void writeInputFileForPushRelabelAlgo(String fileName, Graph graph, Vertex source, Vertex sink) {
		String content = "# Node u, Node v, Capacity of uv, Name of uv\n";
		String format = "%3s, %3s, %12.5f, %s\n";
		for (Arc a : source.getOutgoingArcs()) {
			Vertex v = a.getEndVertex();
			if (v.equals(sink)) {
				// avoid double print (should print this later as ingoing arc to sink)
				continue;
			}
			content += String.format(format, source.getName(), v.getName(), a.getCapacity(), a.getName());
		}
		for (Arc a : graph.getAllArcs()) {
			Vertex u = a.getStartVertex();
			Vertex v = a.getEndVertex();
			if (u.equals(source) || v.equals(sink)) {
				continue;
			}
			content += String.format(format, u.getName(), v.getName(), a.getCapacity(), a.getName());
		}
		for (Arc a : sink.getIngoingArcs()) {
			Vertex u = a.getStartVertex();
			content += String.format(format, u.getName(), sink.getName(), a.getCapacity(), a.getName());
		}
		FileOrganizer.writeFile(fileName, content);
	}

	/**
	 * Gets the outgoing arcs.
	 *
	 * @param graph the graph
	 * @param set the set
	 * @return the outgoing arcs
	 */
	public static Collection<Arc> getOutgoingArcs(Graph graph, HashSet<String> set) {
		Vector<Arc> cut = new Vector<Arc>();
		for (String un : set) {
			Vertex u = graph.getVertex(un);
			for (Arc a : u.getOutgoingArcs()) {
				Vertex v = a.getEndVertex();
				if (!set.contains(v.getName())) {
					cut.add(a);
				}
			}
		}
		return cut;
	}

	/**
	 * Gets the ingoing arcs.
	 *
	 * @param graph the graph
	 * @param set the set
	 * @return the ingoing arcs
	 */
	public static Collection<Arc> getIngoingArcs(Graph graph, HashSet<String> set) {
		Vector<Arc> cut = new Vector<Arc>();
		for (String un : set) {
			Vertex v = graph.getVertex(un);
			for (Arc a : v.getIngoingArcs()) {
				Vertex u = a.getStartVertex();
				if (!set.contains(u.getName())) {
					cut.add(a);
				}
			}
		}
		return cut;
	}

	/**
	 * Gets the connecting arcs.
	 *
	 * @param graph the graph
	 * @param sourceSet the source set
	 * @param sinkSet the sink set
	 * @return the connecting arcs
	 */
	public static Collection<Arc> getConnectingArcs(Graph graph, HashSet<String> sourceSet, HashSet<String> sinkSet) {
		Vector<Arc> cut = new Vector<Arc>();
		for (String un : sourceSet) {
			Vertex u = graph.getVertex(un);
			for (Arc a : u.getOutgoingArcs()) {
				Vertex v = a.getEndVertex();
				if (sinkSet.contains(v.getName())) {
					cut.add(a);
				}
			}
		}
		return cut;
	}

	/**
	 * Find cut set.
	 *
	 * @param graph the graph
	 * @param flow the flow
	 * @param source the source
	 * @param sink the sink
	 * @return the collection
	 */
	public static Collection<Arc> findCutSet(Graph graph, HashMap<Arc, Double> flow, Vertex source, Vertex sink) {
		HashSet<String> setFromSource = findCutVerticesSetClosestToSource(graph, flow, source);
		HashSet<String> setFromSink = findCutVerticesSetClosestToSink(graph, flow, sink);
		return getConnectingArcs(graph, setFromSource, setFromSink);
	}

	/**
	 * Find cut vertices set closest to source.
	 *
	 * @param graph the graph
	 * @param flow the flow
	 * @param source the source
	 * @return the collection
	 */
	public static HashSet<String> findCutVerticesSetClosestToSource(Graph graph, HashMap<Arc, Double> flow, Vertex source) {
		Graph rg = graph.createResidualGraph("RES", flow);
		LinkedList<Vertex> queue = new LinkedList<Vertex>();
		queue.add(rg.getVertex(source.getName()));
		HashSet<String> observedVertices = new HashSet<String>();
		while (!queue.isEmpty()) {
			Vertex u = queue.pop();
			observedVertices.add(u.getName());
			for (Arc uv : u.getOutgoingArcs()) {
				Vertex v = uv.getEndVertex();
				if (!observedVertices.contains(v.getName())) {
					queue.push(v);
				}
			}
		}
		return observedVertices;
	}

	/**
	 * Find cut vertices set closest to sink.
	 *
	 * @param graph the graph
	 * @param flow the flow
	 * @param sink the sink
	 * @return the hash set
	 */
	public static HashSet<String> findCutVerticesSetClosestToSink(Graph graph, HashMap<Arc, Double> flow, Vertex sink) {
		Graph rg = graph.createResidualGraph("RES", flow);
		LinkedList<Vertex> queue = new LinkedList<Vertex>();
		queue.add(rg.getVertex(sink.getName()));
		HashSet<String> observedVertices = new HashSet<String>();
		while (!queue.isEmpty()) {
			Vertex v = queue.pop();
			observedVertices.add(v.getName());
			for (Arc uv : v.getIngoingArcs()) {
				Vertex u = uv.getStartVertex();
				if (!observedVertices.contains(u.getName())) {
					queue.push(u);
				}
			}
		}
		return observedVertices;
	}

}


text:
namespace llvm {

class TGError {
  SmallVector<SMLoc, 4> Locs;
  std::string Message;
public:
  TGError(ArrayRef<SMLoc> locs, const std::string &message)
    : Locs(locs.begin(), locs.end()), Message(message) {}

  ArrayRef<SMLoc> getLoc() const { return Locs; }
  const std::string &getMessage() const { return Message; }
};

void PrintWarning(ArrayRef<SMLoc> WarningLoc, const Twine &Msg);
void PrintWarning(const char *Loc, const Twine &Msg);
void PrintWarning(const Twine &Msg);
void PrintWarning(const TGError &Warning);

void PrintError(ArrayRef<SMLoc> ErrorLoc, const Twine &Msg);
void PrintError(const char *Loc, const Twine &Msg);
void PrintError(const Twine &Msg);
void PrintError(const TGError &Error);

extern SourceMgr SrcMgr;

} // end namespace "llvm"

#endif


text:
Jira-issue - An example of a CLI node.js App

Install
-------

npm i -g .

Set The following env vars

#Jira server
JIRA_HOST=

#Name of Jira user
JIRA_USER=

# Password for user
JIRA_PASSWORD=

Run

    jira-issue <KEY>


text:
using System.Reflection;
using Abp.Modules;

namespace isriding
{
    public class isridingCoreModule : AbpModule
    {
        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
        }
    }
}


text:
/**
 * \file fp_t.h
 * Contains the classes \ref fp_t, which is not yet completed, since it has no calculation operators yet.
 *
 * \author Klemens D. Morgenstern
 *
 */

#ifndef fp_t_H_
#define fp_t_H_

#include <cmath>
#include <iostream>
#include <istream>
#include <type_traits>
#include "TypeHelper.h"
#include "Rounding.h"
#include "Convert.h"

namespace fixed_point {

enum class narrow
{
	delete_all,	//<delete all conversions exlicitly
	delete_narrow, ///<delete only the narrowing but implement the others
	imp_none,	  ///<implement none, which causes the compiler to use the int or float conversion. this one will produce a lot of nonsense
	imp_only_not, ///<implement only not narrowing conversions. also not recommended since this can also use several ways for conversions
	imp_all,	  ///<implement all conversions, even the narrowing ones. doesn't make much sense for the int types...
};

template<	long wl, long fl, typename _sign_t = signed, rounding_mode r_mode = rounding_mode::trunc, narrow fp_convs = narrow::imp_all,
				bool sign_change = false, narrow flt_convs = narrow::imp_only_not, narrow int_convs = narrow::delete_all>
struct fp_t;

///Construct a Mask for getting the right value
inline constexpr unsigned long ConstructMask(unsigned long long i) {return (i>=1L) ? (ConstructMask(i-1)|(unsigned long)(1<<i)) : true;};

template<typename si1, typename si2>
struct sel_sign
{
	typedef signed type;
};
template<>
struct sel_sign<unsigned, unsigned>
{
	typedef unsigned type;
};

constexpr long bigger(long val1, long val2) {return val1>val2 ? val1 : val2;};

///Template for conversion of signed (two's complement) fixed-points. WordLength == full word length
/** This class allows you to store a fp_t value and convert them to double. For later use it will be
 * enhanced with mathematical operator, but since this application doesn't need them, they are not yet implemented.
 * If you cast this class to a double (can be don implicitly) you will automaticly get the converted value as floating point.
 * If you cast to long (also usigned, and implicit) you will get the digit. It works the other way round for the assignment or constructors.
 */
template<long wl, long fl, typename _sign_t = signed, rounding_mode r_mode = rounding_mode::trunc>
struct fp_base_t
{
	typedef typename int_type<wl, _sign_t>::type type;
	typedef typename int_type<wl, _sign_t>::min_float_t min_float_t;
	typedef _sign_t sign_t;
	constexpr static bool is_signed = std::is_signed<sign_t>::value;
	constexpr static long word_length 	  = wl;
	constexpr static long fraction_length = fl;
	constexpr static rounding_mode round_mode = r_mode;
	constexpr static type mask = ConstructMask(wl);
	constexpr static type sign_pos = is_signed ? (1<<(wl-1)) : 0;

private:
	///The factor is the one in the fixed-point notation
	static constexpr min_float_t _factor = (1<<fl);
	///Value stored
    type _value;
    typedef fp_base_t<wl, fl, sign_t, r_mode> my_type;
public:
    constexpr static type max_i = std::is_signed<_sign_t>::value ? (ConstructMask(wl-2)) : mask;
	constexpr static type min_i = std::is_signed<_sign_t>::value ? (~ConstructMask(wl-2)) : 0;

	constexpr static fp_base_t max = fp_base_t(max_i);
	constexpr static fp_base_t min = fp_base_t(min_i);

	constexpr static min_float_t max_f = (min_float_t)max_i / (min_float_t)_factor;
	constexpr static min_float_t min_f = (min_float_t)min_i / (min_float_t)_factor;

    template<typename T = min_float_t>
    constexpr T get_floating(T = min_float_t()) const {return (T)_value / (T)_factor;}

    template<typename T = type>
    constexpr T get_integral(T = type()) const {return (T)_value;};

    template<typename FP = fp_base_t>
    constexpr FP get_fp(FP) const
    {
    	return FP(rounding_delegate<FP::fraction_length, FP::round_mode>::round_fp((typename FP::type)_value, fl));
    };

    template<typename T>
    void _assign(const T & rhs, std::true_type is_int, std::false_type is_flt)
    {
    	_value = rhs & mask;
    }

    template<typename T>
    void _assign(const T & rhs, std::false_type is_int, std::true_type is_flt)
    {
    	_value = round(rhs*_factor);
    }

    template<typename T>
    fp_base_t& operator=(const T & rhs) {_assign(rhs,
    									typename std::is_integral<T>::type(),
    									typename std::is_floating_point<T>::type()); return *this;};

	///Construct from two longs
	constexpr fp_base_t(unsigned long Word, unsigned long Frac) : _value((Word<<fl | Frac)&mask) {};

	template<typename T>
	constexpr type sign_it(T value)
	{
		return (value > sign_pos) ? ((value & ~sign_pos) - sign_pos) : value;
	}

	///Construct from one long
	explicit constexpr fp_base_t(uint64_t Value) : _value(Value&mask) {};
	///Construct from one long
	explicit constexpr fp_base_t(uint32_t Value) : _value(Value&mask) {};
	///Construct from one long
	explicit constexpr fp_base_t(uint16_t Value) : _value(Value&mask) {};
	///Construct from one long
	explicit constexpr fp_base_t(uint8_t Value)  : _value(Value&mask) {};
	///Construct from one long
	explicit constexpr fp_base_t(int64_t Value)  : _value(Value) {};
	///Construct from one long
	explicit constexpr fp_base_t(int32_t Value)  : _value(Value) {};
	///Construct from one long
	explicit constexpr fp_base_t(int16_t Value)  : _value(Value) {}; //sign_it(Value&mask)
	///Construct from one long
	explicit constexpr fp_base_t(int8_t Value)   : _value(Value) {};

	///construct from underlying type
	//explicit constexpr fp_base_t(type Value) : _value(Value&mask) {};

	///Construct from double
	explicit constexpr fp_base_t(long double Value)	: _value(round(Value*_factor)) {};
	///Construct from double
	explicit constexpr fp_base_t(double Value)		: _value(round(Value*_factor)) {};
	///Construct from double
	explicit constexpr fp_base_t(float Value)		: _value(round(Value*_factor)) {};
	///Copy Constructor
	constexpr fp_base_t(const fp_base_t& rhs) : _value(rhs._value) {};

	///Construct empty value, will be 0
	explicit constexpr fp_base_t() : fp_base_t(0,0) {};

	template<long size_wl, long size_fl, typename __sign_t = signed, rounding_mode _r_mode = rounding_mode::trunc>
	constexpr operator fp_base_t<size_wl, size_fl, __sign_t, _r_mode>()
	{
		using fp_ret_t = fp_base_t<size_wl, size_fl, __sign_t, _r_mode>;
		return fp_ret_t(	(wl > size_wl) ? (_value<<(wl-size_wl)) : (_value>>(size_wl-wl)) );
	};

	constexpr operator double()
	{
		return (double)_value/(double)_factor;
	};

	constexpr fp_base_t operator>>(unsigned char shift)	{return fp_base_t(_value>>shift);}
	constexpr fp_base_t operator<<(unsigned char shift)	{return fp_base_t(_value<<shift);}

	constexpr fp_base_t& operator>>=(unsigned char shift)	{_value >> shift; return *this;}
	constexpr fp_base_t& operator<<=(unsigned char shift)	{_value << shift; return *this;}

	template<long wl1, long fl1, typename sign_t1, rounding_mode r_mode1, long wl2, long fl2, typename sign_t2, rounding_mode r_mode2> //long wl1, long fl1, typename sign_t, rounding_mode r_mode,
	constexpr friend fp_t<wl1+wl2, fl1+fl2, typename sel_sign<sign_t1, sign_t2>::type, r_mode1> operator* (const fp_base_t<wl1, fl1, sign_t1, r_mode1>&, const fp_base_t<wl2, fl2, sign_t2, r_mode2>&);

	template<long wl1, long fl1, typename sign_t1, rounding_mode r_mode1, long wl2, long fl2, typename sign_t2, rounding_mode r_mode2> //long wl1, long fl1, typename sign_t, rounding_mode r_mode,
	constexpr friend fp_t<wl1+wl2, fl1+fl2, typename sel_sign<sign_t1, sign_t2>::type, r_mode1> operator/ (const fp_base_t<wl1, fl1, sign_t1, r_mode1>&, const fp_base_t<wl2, fl2, sign_t2, r_mode2>&);

	template<long wl1, long fl1, typename sign_t1, rounding_mode r_mode1, long wl2, long fl2, typename sign_t2, rounding_mode r_mode2> //long wl1, long fl1, typename sign_t, rounding_mode r_mode,
	friend constexpr fp_t<bigger(wl1,wl2), bigger(fl1,fl2), typename sel_sign<sign_t1, sign_t2>::type, r_mode1> operator+ (const fp_base_t<wl1, fl1, sign_t1, r_mode1>&, const fp_base_t<wl2, fl2, sign_t2, r_mode2>&);

	template<long wl1, long fl1, typename sign_t1, rounding_mode r_mode1, long wl2, long fl2, typename sign_t2, rounding_mode r_mode2> //long wl1, long fl1, typename sign_t, rounding_mode r_mode,
	friend constexpr fp_t<bigger(wl1,wl2), bigger(fl1,fl2), typename sel_sign<sign_t1, sign_t2>::type, r_mode1> operator- (const fp_base_t<wl1, fl1, sign_t1, r_mode1>&, const fp_base_t<wl2, fl2, sign_t2, r_mode2>&);

	constexpr fp_base_t operator<<=(int shift) {_value<<=shift; return *this;}
	constexpr fp_base_t operator>>=(int shift) {_value>>=shift; return *this;}

	template<long wl1, long fl1, typename sign_t1, rounding_mode r_mode1>
	 fp_base_t &operator+=(fp_base_t<wl1, fl1, sign_t1, r_mode1> fp)
	{
		using int_t = typename fp_base_t<wl1, fl1, sign_t1, r_mode1>::type;
		_value += fp.get_fp(*this).get_integral();

		return *this;
	}
	template<long wl1, long fl1, typename sign_t1, rounding_mode r_mode1>
	fp_base_t &operator-=(fp_base_t<wl1, fl1, sign_t1, r_mode1> fp)
	{
		using int_t = typename fp_base_t<wl1, fl1, sign_t1, r_mode1>::type;
		_value += fp.get_fp(*this).get_integral();

		return *this;
	}

	template<long wl1, long fl1, typename sign_t1, rounding_mode r_mode1>
	fp_base_t &operator*=(fp_base_t<wl1, fl1, sign_t1, r_mode1> fp)
	{
		using int_t = typename int_type<wl+wl1, sign_t>::type;
		_value = ((int_t)fp._value * (int_t)_value)>>fl1; //if int_t == this::type it is assumed for the compiler to optimize it.
		return *this;
	}

	template<long wl1, long fl1, typename sign_t1, rounding_mode r_mode1>
	fp_base_t &operator/=(fp_base_t<wl1, fl1, sign_t1, r_mode1> fp)
	{
		using int_t = typename int_type<wl+wl1, sign_t>::type;
		_value = (((int_t)_value)<<fl1) / (int_t)fp._value; //if int_t == this::type it is assumed for the compiler to optimize it.
		return *this;
	}

	///That one is unclean, but hey...
	template<long wl1, long fl1, typename sign_t1, rounding_mode r_mode1>
	friend struct fp_base_t;

};

template<long wl, long fl, typename sign_t = signed, rounding_mode r_mode, long wl2, long fl2, typename sign_t2, rounding_mode r_mode2> //long wl1, long fl1, typename sign_t, rounding_mode r_mode,
constexpr fp_t<wl+wl2, fl+fl2, typename sel_sign<sign_t, sign_t2>::type, r_mode> operator* (const fp_base_t<wl, fl, sign_t, r_mode>& lhs, const fp_base_t<wl2, fl2, sign_t2, r_mode2>& rhs)
{
	using fp_type = fp_t<wl+wl2, fl+fl2, typename sel_sign<sign_t, sign_t2>::type, r_mode>;
	using int_t = typename fp_type::type;
	return fp_type(((int_t)lhs._value)*((int_t)rhs._value));
}

template<long wl, long fl, typename sign_t = signed, rounding_mode r_mode, long wl2, long fl2, typename sign_t2, rounding_mode r_mode2> //long wl1, long fl1, typename sign_t, rounding_mode r_mode,
constexpr fp_t<wl+wl2, fl+fl2, typename sel_sign<sign_t, sign_t2>::type, r_mode> operator/ (const fp_base_t<wl, fl, sign_t, r_mode>& lhs, const fp_base_t<wl2, fl2, sign_t2, r_mode2>& rhs)
{
	using fp_type = fp_t<wl+wl2, fl+fl2, typename sel_sign<sign_t, sign_t2>::type, r_mode>;
	using int_t1 = typename fp_base_t<wl+wl2+wl2, fl+fl2+fl2, typename sel_sign<sign_t, sign_t2>::type, r_mode>::type;
	return fp_type(((int_t1)lhs._value << (fl2+fl2))/((int_t1)rhs._value));

}

template<long wl1, long fl1, typename sign_t1, rounding_mode r_mode1, long wl2, long fl2, typename sign_t2, rounding_mode r_mode2> //long wl1, long fl1, typename sign_t, rounding_mode r_mode,
constexpr fp_t<bigger(wl1,wl2), bigger(fl1,fl2), typename sel_sign<sign_t1, sign_t2>::type, r_mode1> operator+ (const fp_base_t<wl1, fl1, sign_t1, r_mode1>& lhs, const fp_base_t<wl2, fl2, sign_t2, r_mode2>& rhs)
{
	using fp_type = fp_t<bigger(wl1,wl2), bigger(fl1,fl2) , typename sel_sign<sign_t1, sign_t2>::type, r_mode1>;
	using int_t1 = typename fp_base_t<wl1, fl1, sign_t1, r_mode1>::type;
	using int_t2 = typename fp_base_t<wl2, fl2, sign_t2, r_mode2>::type;
	using int_t = typename fp_type::type;

	return fp_type( ((typename fp_type::type)lhs._value<< (fp_type::fraction_length - fl1))
				+ 	((typename fp_type::type)rhs._value<< (fp_type::fraction_length - fl2)));

}

template<long wl1, long fl1, typename sign_t1, rounding_mode r_mode1, long wl2, long fl2, typename sign_t2, rounding_mode r_mode2> //long wl1, long fl1, typename sign_t, rounding_mode r_mode,
constexpr fp_t<bigger(wl1,wl2), bigger(fl1,fl2), typename sel_sign<sign_t1, sign_t2>::type, r_mode1> operator- (const fp_base_t<wl1, fl1, sign_t1, r_mode1>& lhs, const fp_base_t<wl2, fl2, sign_t2, r_mode2>& rhs)
{
	//static constexpr long wl = bigger(wl1,wl2);
	//static constexpr long fl = bigger(fl1,fl2); //bigger(fl1,fl2)
	using fp_type = fp_t<bigger(wl1,wl2), bigger(fl1,fl2) , typename sel_sign<sign_t1, sign_t2>::type, r_mode1>;
	using int_t1 = typename fp_base_t<wl1, fl1, sign_t1, r_mode1>::type;
	using int_t2 = typename fp_base_t<wl2, fl2, sign_t2, r_mode2>::type;
	using int_t = typename fp_type::type;

	return fp_type(((int_t)lhs._value<< (fp_type::fraction_length - fl1))
			-	   ((int_t)rhs._value<< (fp_type::fraction_length - fl2)));

}

template<long wl, long fl, typename _sign_t = signed, rounding_mode r_mode = rounding_mode::trunc>
inline std::ostream &operator<<(std::ostream& ostr, const fp_base_t<wl,fl,_sign_t, r_mode>& fp)
{
	ostr << fp.get_floating();
	return ostr;
}

template<long wl, long fl, typename _sign_t = signed, rounding_mode r_mode = rounding_mode::trunc>
inline std::istream &operator>>(std::istream& istr, fp_base_t<wl,fl,_sign_t, r_mode>& fp)
{
	typename decltype(fp)::min_float_t flt;
	istr >> flt;
	fp = flt;
	return istr;
}

}
#endif /* fp_t_H_ */


text:
cask "syncovery" do
  version "9.38c"

  if Hardware::CPU.intel?
    sha256 "37772687b155b440dd469565b6a3082da71fbdafd8c59e5e5754b78db2facc55"

    url "https://www.syncovery.com/release/SyncoveryMac#{version}.dmg"
  else
    sha256 "6f25e37017311a6a7a9dfd915eb400de782a8ddac8cc14a26a80224543172afd"

    url "https://www.syncovery.com/release/SyncoveryMac#{version}-Apple.dmg"
  end

  name "Syncovery"
  desc "File synchronization and backup software"
  homepage "https://www.syncovery.com/"

  livecheck do
    url "https://www.syncovery.com/download/mac/"
    regex(%r{href=.*?/SyncoveryMac(\d+(?:\.\d+)*[a-z]?)\.dmg}i)
  end

  pkg "SyncoveryMac (double-click to install).pkg"

  uninstall pkgutil: "com.company.Syncovery*"

  zap trash: "~/Library/Preferences/Syncovery.ini",
      rmdir: [
        "~/Library/Application Support/Syncovery",
        "~/Saved Application State/com.company.Syncovery.savedState",
        "~/Library/Preferences/Syncovery",
        "~/Library/Logs/Syncovery",
      ]
end


text:
namespace NLog.Targets.Wrappers
{
    using System;
    using System.Collections.Generic;
    using Common;

    /// <summary>
    /// Asynchronous request queue.
    /// </summary>
	internal class AsyncRequestQueue
    {
        private readonly Queue<AsyncLogEventInfo> _logEventInfoQueue = new Queue<AsyncLogEventInfo>();

        /// <summary>
        /// Initializes a new instance of the AsyncRequestQueue class.
        /// </summary>
        /// <param name="requestLimit">Request limit.</param>
        /// <param name="overflowAction">The overflow action.</param>
        public AsyncRequestQueue(int requestLimit, AsyncTargetWrapperOverflowAction overflowAction)
        {
            RequestLimit = requestLimit;
            OnOverflow = overflowAction;
        }

        /// <summary>
        /// Gets or sets the request limit.
        /// </summary>
        public int RequestLimit { get; set; }

        /// <summary>
        /// Gets or sets the action to be taken when there's no more room in
        /// the queue and another request is enqueued.
        /// </summary>
        public AsyncTargetWrapperOverflowAction OnOverflow { get; set; }

        /// <summary>
        /// Gets the number of requests currently in the queue.
        /// </summary>
        public int RequestCount
        {
            get
            {
                lock (this)
                {
                    return _logEventInfoQueue.Count;
                }
            }
        }

        /// <summary>
        /// Enqueues another item. If the queue is overflown the appropriate
        /// action is taken as specified by <see cref="OnOverflow"/>.
        /// </summary>
        /// <param name="logEventInfo">The log event info.</param>
        /// <returns>Queue was empty before enqueue</returns>
        public bool Enqueue(AsyncLogEventInfo logEventInfo)
        {
            lock (this)
            {
                if (_logEventInfoQueue.Count >= RequestLimit)
                {
                    InternalLogger.Debug("Async queue is full");
                    switch (OnOverflow)
                    {
                        case AsyncTargetWrapperOverflowAction.Discard:
                            InternalLogger.Debug("Discarding one element from queue");
                            _logEventInfoQueue.Dequeue();
                            break;

                        case AsyncTargetWrapperOverflowAction.Grow:
                            InternalLogger.Debug("The overflow action is Grow, adding element anyway");
                            break;

                        case AsyncTargetWrapperOverflowAction.Block:
                            while (_logEventInfoQueue.Count >= RequestLimit)
                            {
                                InternalLogger.Debug("Blocking because the overflow action is Block...");
                                System.Threading.Monitor.Wait(this);
                                InternalLogger.Trace("Entered critical section.");
                            }

                            InternalLogger.Trace("Limit ok.");
                            break;
                    }
                }

                _logEventInfoQueue.Enqueue(logEventInfo);
                return _logEventInfoQueue.Count == 1;
            }
        }

        /// <summary>
        /// Dequeues a maximum of <c>count</c> items from the queue
        /// and adds returns the list containing them.
        /// </summary>
        /// <param name="count">Maximum number of items to be dequeued (-1 means everything).</param>
        /// <returns>The array of log events.</returns>
        public AsyncLogEventInfo[] DequeueBatch(int count)
        {
            AsyncLogEventInfo[] resultEvents;

            lock (this)
            {
                if (_logEventInfoQueue.Count < count)
                    count = _logEventInfoQueue.Count;

                if (count == 0)
                    return Internal.ArrayHelper.Empty<AsyncLogEventInfo>();

                resultEvents = new AsyncLogEventInfo[count];
                for (int i = 0; i < count; ++i)
                {
                    resultEvents[i] = _logEventInfoQueue.Dequeue();
                }

                if (OnOverflow == AsyncTargetWrapperOverflowAction.Block)
                {
                    System.Threading.Monitor.PulseAll(this);
                }
            }

            return resultEvents;
        }

        /// <summary>
        /// Dequeues into a preallocated array, instead of allocating a new one
        /// </summary>
        /// <param name="count">Maximum number of items to be dequeued</param>
        /// <param name="result">Preallocated list</param>
        public void DequeueBatch(int count, IList<AsyncLogEventInfo> result)
        {
            lock (this)
            {
                if (_logEventInfoQueue.Count < count)
                    count = _logEventInfoQueue.Count;
                for (int i = 0; i < count; ++i)
                    result.Add(_logEventInfoQueue.Dequeue());
                if (OnOverflow == AsyncTargetWrapperOverflowAction.Block)
                {
                    System.Threading.Monitor.PulseAll(this);
                }
            }
        }

        /// <summary>
        /// Clears the queue.
        /// </summary>
        public void Clear()
        {
            lock (this)
            {
                _logEventInfoQueue.Clear();
            }
        }
    }
}


text:
using System;
using System.Web.UI;
using NUnit.Framework.Interfaces;

namespace NUnit.Framework.Internal
{
    /// <summary>
    /// TestProgressReporter translates ITestListener events into
    /// the async callbacks that are used to inform the client
    /// software about the progress of a test run.
    /// </summary>
    public class TestProgressReporter : ITestListener
    {
        static readonly Logger log = InternalTrace.GetLogger("TestProgressReporter");

        private readonly ICallbackEventHandler handler;

        /// <summary>
        /// Initializes a new instance of the <see cref="TestProgressReporter"/> class.
        /// </summary>
        /// <param name="handler">The callback handler to be used for reporting progress.</param>
        public TestProgressReporter(ICallbackEventHandler handler)
        {
            this.handler = handler;
        }

        #region ITestListener Members

        /// <summary>
        /// Called when a test has just started
        /// </summary>
        /// <param name="test">The test that is starting</param>
        public void TestStarted(ITest test)
        {
            string startElement = test is TestSuite
                ? "start-suite"
                : "start-test";

            var parent = GetParent(test);
            try
            {
                string report = string.Format(
                    "<{0} id=\"{1}\" parentId=\"{2}\" name=\"{3}\" fullname=\"{4}\" type=\"{5}\"/>",
                    startElement,
                    test.Id,
                    parent != null ? parent.Id : string.Empty,
                    FormatAttributeValue(test.Name),
                    FormatAttributeValue(test.FullName),
                    test.TestType);

                handler.RaiseCallbackEvent(report);
            }
            catch (Exception ex)
            {
                log.Error("Exception processing " + test.FullName + Environment.NewLine + ex.ToString());
            }
        }

        /// <summary>
        /// Called when a test has finished. Sends a result summary to the callback.
        /// to
        /// </summary>
        /// <param name="result">The result of the test</param>
        public void TestFinished(ITestResult result)
        {
            try
            {
                var node = result.ToXml(false);
                var parent = GetParent(result.Test);
                node.Attributes.Add("parentId", parent != null ? parent.Id : string.Empty);
                handler.RaiseCallbackEvent(node.OuterXml);
            }
            catch (Exception ex)
            {
                log.Error("Exception processing " + result.FullName + Environment.NewLine + ex.ToString());
            }
        }

        /// <summary>
        /// Called when a test produces output for immediate display
        /// </summary>
        /// <param name="output">A TestOutput object containing the text to display</param>
        public void TestOutput(TestOutput output)
        {
            try
            {
                handler.RaiseCallbackEvent(output.ToXml());
            }
            catch (Exception ex)
            {
                log.Error("Exception processing TestOutput event" + Environment.NewLine + ex.ToString());
            }
        }

        /// <summary>
        /// Called when a test produces a message to be sent to listeners
        /// </summary>
        /// <param name="message">A <see cref="TestMessage"/> object containing the text to send</param>
        public void SendMessage(TestMessage message)
        {
            try
            {
                handler.RaiseCallbackEvent(message.ToXml());
            }
            catch (Exception ex)
            {
                log.Error("Exception processing SendMessage event" + Environment.NewLine + ex.ToString());
            }
        }

        #endregion

        #region Helper Methods

        /// <summary>
        /// Returns the parent test item for the target test item if it exists
        /// </summary>
        /// <param name="test"></param>
        /// <returns>parent test item</returns>
        private static ITest GetParent(ITest test)
        {
            if (test == null || test.Parent == null)
            {
                return null;
            }

            return test.Parent.IsSuite ? test.Parent : GetParent(test.Parent);
        }

        /// <summary>
        /// Makes a string safe for use as an attribute, replacing
        /// characters that can't be used with their
        /// corresponding XML representations.
        /// </summary>
        /// <param name="original">The string to be used</param>
        /// <returns>A new string with the values replaced</returns>
        private static string FormatAttributeValue(string original)
        {
            return original
                .Replace("&", "&")
                .Replace("\"", """)
                .Replace("'", "'")
                .Replace("<", "<")
                .Replace(">", ">");
        }

        #endregion
    }
}


text:
package edu.gemini.spModel.gemini.altair.test;

import edu.gemini.spModel.gemini.altair.AltairParams.ADC;
import edu.gemini.spModel.gemini.altair.AltairParams.Wavelength;
import edu.gemini.spModel.gemini.altair.InstAltair;
import static edu.gemini.spModel.test.TestFile.ser;

import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;

/**
 * Class InstAltairTest tests the InstAltair class.
 */
public final class InstAltairCase {
    private InstAltair _alt1;

    @Before
    public void setUp() throws Exception {
        _alt1 = new InstAltair();
    }

    // Setup some test objects.
    @Test
    public void testInitial() {
        assertTrue(_alt1.getWavelength() == Wavelength.DEFAULT);
        assertTrue(_alt1.getAdc() == ADC.DEFAULT);
    }

    /**
     * Test getters and setters
     */
    @Test
    public void testGettersAndSetters() {
        InstAltair altOrig = _alt1;
        assertNotNull(altOrig);

        // setTitle is defined in a superclasses of InstPhoenix
        String title = "An Instance of Altair";
        altOrig.setTitle(title);
        assertTrue(altOrig.getTitle().equals(title));

        // defined in InstAltair
        altOrig.setWavelength(Wavelength.WAVELENGTH_B);
        assertTrue(altOrig.getWavelength() == Wavelength.WAVELENGTH_B);
        altOrig.setAdc(ADC.ON);
        assertTrue(altOrig.getAdc() == ADC.ON);
        altOrig.setAdc(ADC.OFF);
        assertTrue(altOrig.getAdc() == ADC.OFF);

    }

    /**
     * Test cloneable
     */
    @Test
    public void testCloneable() {
        // Give the data object a title
        String title1 = "Initial Altair";
        InstAltair altOrig = _alt1;
        assertNotNull(altOrig);
        altOrig.setTitle(title1);
    }

    @Test
    public void testSerialization() throws Exception {
        final InstAltair outObject = new InstAltair();

        // Create change
        outObject.setAdc(ADC.ON);
        outObject.setWavelength(Wavelength.WAVELENGTH_B);

        final InstAltair inObject = ser(outObject);
        assertSame("ADC", ADC.ON, inObject.getAdc());
        assertSame("Wavelength", Wavelength.WAVELENGTH_B, inObject.getWavelength());
    }
}


text:
package edu.sampleu.krad.screenelement;

import org.junit.Test;
import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
import org.kuali.rice.testtools.selenium.WebDriverUtils;

/**
 * @author Kuali Rice Team (rice.collab@kuali.org)
 */
public class ReadOnlyFieldsDemoAft extends WebDriverLegacyITBase {

    /**
     * /kr-krad/uicomponents?viewId=Demo-ReadOnlyTestView&methodToCall=start
     */
    public static final String BOOKMARK_URL ="/kr-krad/uicomponents?viewId=Demo-ReadOnlyTestView&methodToCall=start";

    @Override
    protected String getBookmarkUrl() {
        return BOOKMARK_URL;
    }

    @Override
    protected void navigate() throws InterruptedException {
        waitAndClickKRAD();
        waitAndClickByLinkText("ReadOnly fields Demo");
        switchToWindow("Kuali :: ReadOnly Test");
    }

    private void testReadOnlyFieldsDemo() throws Exception{
        waitAndTypeByName("field2","Hi");
        waitAndTypeByName("field3","KualiRice!");
        selectByName("field4","Option 1");
        waitAndClickByName("field117","2");
        waitAndClickByName("field115","3");
        waitAndTypeByName("date1","02/17/2014");
        selectByName("field116","Option 3");
        waitAndClickButtonByText("Make ReadOnly");
        String [] assertText = {"Hi","KualiRice!","Option 1","02/17/2014","Option 3"};
        assertTextPresent(assertText);
    }

    @Test
    public void testReadOnlyFieldsDemoBookmark() throws Exception {
        testReadOnlyFieldsDemo();
        passed();
    }

    @Test
    public void testReadOnlyFieldsDemoNav() throws Exception {
        testReadOnlyFieldsDemo();
        passed();
    }

}


text:
package org.uma.jmetal.problem.impl;

import org.uma.jmetal.problem.DoubleProblem;
import org.uma.jmetal.solution.DoubleSolution;
import org.uma.jmetal.solution.impl.DefaultDoubleSolution;

import java.util.List;

@SuppressWarnings("serial")
public abstract class AbstractDoubleProblem extends AbstractGenericProblem<DoubleSolution>
  implements DoubleProblem {

  private List<Double> lowerLimit ;
  private List<Double> upperLimit ;

  /* Getters */
	@Override
	public Double getUpperBound(int index) {
		return upperLimit.get(index);
	}

	@Override
	public Double getLowerBound(int index) {
		return lowerLimit.get(index);
	}

  /* Setters */
  protected void setLowerLimit(List<Double> lowerLimit) {
    this.lowerLimit = lowerLimit;
  }

  protected void setUpperLimit(List<Double> upperLimit) {
    this.upperLimit = upperLimit;
  }

  @Override
  public DoubleSolution createSolution() {
    return new DefaultDoubleSolution(this)  ;
  }
}


text:
module.exports = function (sequelize, DataTypes) {
  var Relevamiento = sequelize.define(
    'Relevamiento',
    {
      /*
      id: {
        type: DataTypes.BIGINT(11),
        primaryKey: true,
        autoIncrement: true,
        comment: 'ID relevamiento',
        validate: {
          isNumeric:true,
          notNull: true
        }
      },
      */
      fechaRelev: {
        type: DataTypes.DATE,
        allowNull: true,
        defaultValue: null,
        comment: 'Fecha del Relevamiento'
      },
      fechaCatalog: {
        type: DataTypes.DATE,
        allowNull: true,
        defaultValue: null,
        comment: 'Fecha de Catalogación'
      },
      fechaRevision: {
        type: DataTypes.DATE,
        allowNull: true,
        defaultValue: null,
        comment: 'Fecha de Revisión del Relevamiento'
      },
      quienRelevo: {
        type: DataTypes.STRING(50),
        allowNull: true,
        defaultValue: null,
        comment: 'Nombre de la persona que Relevo'
      },
      quienCatalogo: {
        type: DataTypes.STRING(50),
        allowNull: true,
        defaultValue: null,
        comment: 'Nombre de la persona que Catalogo'
      },
      quienReviso: {
        type: DataTypes.STRING(50),
        allowNull: true,
        defaultValue: null,
        comment: 'Nombre de la persona que Reviso'
      },
      observaciones: {
        type: DataTypes.TEXT,
        allowNull: true,
        defaultValue: null,
        comment: 'Epoca'
      }
    },
    {
      instanceMethods: {
        retrieveAll: function (onSuccess, onError) {
          Relevamiento.findAll( { } )
          .then(onSuccess).catch(onError);
        },
        retrieveById: function (relevamientoId, onSuccess, onError) {
          Relevamiento.find( { where: { id: relevamientoId } }, { raw: true })
          .then(onSuccess).catch(onError);
        },
        retrievePag: function (initial, offsetPage, limitPage, currentPage, onSuccess, onError) {
          Relevamiento.findAndCountAll( {
            offset: initial,
            limit: offsetPage
           } )
          .then(onSuccess).catch(onError);
        },
        add: function (onSuccess, onError) {
          var fechaRelev = this.fechaRelev;
          var fechaCatalog = this.fechaCatalog;
          var fechaRevision = this.fechaRevision;
          var quienRelevo = this.quienRelevo;
          var quienCatalogo = this.quienCatalogo;
          var quienReviso = this.quienReviso;
          var observaciones = this.observaciones;

          Relevamiento.build({
            fechaRelev: fechaRelev, fechaCatalog: fechaCatalog,
            fechaRevision: fechaRevision, quienRelevo: quienRelevo,
            quienCatalogo: quienCatalogo, quienReviso: quienReviso,
            observaciones: observaciones
          })
          .save().then(onSuccess).catch(onError);
        },
        updateById: function (relevamientoId, onSuccess, onError) {
          var id = relevamientoId;
          var fechaRelev = this.fechaRelev;
          var fechaCatalog = this.fechaCatalog;
          var fechaRevision = this.fechaRevision;
          var quienRelevo = this.quienRelevo;
          var quienCatalogo = this.quienCatalogo;
          var quienReviso = this.quienReviso;
          var observaciones = this.observaciones;

          Relevamiento.update({
            fechaRelev: fechaRelev, fechaCatalog: fechaCatalog,
            fechaRevision: fechaRevision, quienRelevo: quienRelevo,
            quienCatalogo: quienCatalogo, quienReviso: quienReviso,
            observaciones: observaciones
          },{ where: { id: id } })
          .then(onSuccess).catch(onError);
        },
        removeById: function ( onSuccess, onError) {
          Relevamiento.destroy({ where: { id: this.id }})
          .then(onSuccess).catch(onError);
        }
      },
      timestamps: true,
      paranoid: true,
      createdAt: 'fechaCrea',
      updatedAt: 'fechaModifica',
      deletedAt: 'fechaBorra',
      underscore: false,
      freezeTableName:true,
      tableName: 'Relevamientos',
      comment: 'Relevamientos registradas',
      indexes: [
        {
          name: 'idxFechaRelevamiento',
          method: 'BTREE',
          unique: false,
          fields: ['fechaRelev']
        },
        {
          name: 'idxFechaCatalog',
          method: 'BTREE',
          unique: false,
          fields: ['fechaCatalog']
        },
        {
          name: 'idxFechaRevision',
          method: 'BTREE',
          unique: false,
          fields: ['fechaRevision']
        }
      ]
    }
  );
  return Relevamiento;
};


text:
/**
 * @author Toru Nagashima
 * See LICENSE file in root directory for full license.
 */
'use strict'

// ------------------------------------------------------------------------------
// Requirements
// ------------------------------------------------------------------------------

const indentCommon = require('../utils/indent-common')

// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------

module.exports = {
  meta: {
    type: 'layout',
    docs: {
      description: 'enforce consistent indentation in `<script>`',
      category: undefined,
      url: 'https://eslint.vuejs.org/rules/script-indent.html'
    },
    fixable: 'whitespace',
    schema: [
      {
        anyOf: [
          { type: 'integer', minimum: 1 },
          { enum: ['tab'] }
        ]
      },
      {
        type: 'object',
        properties: {
          'baseIndent': { type: 'integer', minimum: 0 },
          'switchCase': { type: 'integer', minimum: 0 },
          'ignores': {
            type: 'array',
            items: {
              allOf: [
                { type: 'string' },
                { not: { type: 'string', pattern: ':exit$' }},
                { not: { type: 'string', pattern: '^\\s*$' }}
              ]
            },
            uniqueItems: true,
            additionalItems: false
          }
        },
        additionalProperties: false
      }
    ]
  },
  create (context) {
    return indentCommon.defineVisitor(context, context.getSourceCode(), {})
  }
}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>de.bwaldvogel</groupId>
	<artifactId>liblinear</artifactId>
	<packaging>jar</packaging>
	<name>liblinear</name>
	<version>1.94</version>
	<description>Java port of Liblinear</description>
	<url>http://www.bwaldvogel.de/liblinear-java/</url>

	<licenses>
		<license>
			<name>The BSD License</name>
			<url>http://www.opensource.org/licenses/bsd-license.php</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>6</version>
	</parent>

	<scm>
		<connection>scm:git:git@github.com:bwaldvogel/liblinear-java.git</connection>
		<developerConnection>scm:git:git@github.com:bwaldvogel/liblinear-java.git</developerConnection>
		<url>git@github.com:bwaldvogel/liblinear-java.git</url>
	</scm>

	<developers>
		<developer>
			<id>bwaldvogel</id>
			<name>Benedikt Waldvogel</name>
			<email>mail at bwaldvogel.de</email>
		</developer>
	</developers>

	<build>
		<finalName>liblinear-${project.version}</finalName>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<configuration>
					<keyname>D2250F35</keyname>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<powermock.version>1.4.8</powermock.version>
	</properties>

	<dependencies>
		<!-- dependencies for unit testing -->
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-module-junit4</artifactId>
			<version>${powermock.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-io</artifactId>
			<version>1.3.2</version>
		</dependency>
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-api-mockito</artifactId>
			<version>${powermock.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.easytesting</groupId>
			<artifactId>fest-assert</artifactId>
			<version>1.4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.1</version>
		</dependency>
	</dependencies>
</project>


text:
@interface TLPUmbrellaCharacter : TLPCharacter

- (id)initAtPosition:(CGPoint)position;

@end


text:
title: "openSUSE and the ways of a11y"
date: 2010-05-07
topics:
  - openSUSE
categories:
  - openSUSE
tags:
  - a11y
  - Accessibility
  - GNOME
  - KDE
  - XFCE
---
So further to my post on [a11y in openSUSE][1], I was asked how one would enable Accessibility.  Now to be honest I only *kind of* know how to do it in GNOME, so I set off on a little exploration of the other desktop environments.

 [1]: /post/2010-05-06-getting-opensuse-from-a-to-y "Getting openSUSE from A to Y"

It may seem strange that I'm trying to champion a subject that I don't really know, but that's part of the reason **why** I'm doing so.  Accessibility isn't supposed to a buzzword, it is meant to be a usable function for all.  Hopefully I can learn a bit along the way and get the message out there – oh and if you could do the same that would just be spiffy ;-)

I present what I have found so far below in a simple little pictorial guide of how to get to the general a11y settings.  I have tried four desktops – GNOME, KDE, XFCE and LXDE, I couldn't find anything in LXDE so I'll try and revisit it later once I've had more time.

For **GNOME:**

1. In the main menu select "Control Center"

![Step 1 to enable a11y on GNOME][3]

 [3]: ../../../images/a11y/EnableGNOMEa11y-1.png

2. Then under the "Personal" section, select "Assistive Technologies"

![Step 2 to enable a11y on GNOME][4]

 [4]: ../../../images/a11y/EnableGNOMEa11y-2.5.png

3. Select "Enable assitive technologies"

![Step 3 to enable a11y on GNOME][5]

 [5]: ../../../images/a11y/EnableGNOMEa11y-3.png

4. When you enable assitive technologies you need to restart your session for the changes to take effect.  You can easily do this by selecting the "Close and Log Out" button at the bottom of the window

![Step 4 to enable a11y on GNOME][6]

 [6]: ../../../images/a11y/EnableGNOMEa11y-4.png

For **KDE:**

1. In the Kicker menu select "Applications" then "System Settings"

![Step 1 to enable a11y on KDE][7]

 [7]: ../../../images/a11y/EnableKDEa11y-1.png

2. In the "Personal" section select "Accessibility"

![Step 2 to enable a11y on KDE][8]

 [8]: ../../../images/a11y/EnableKDEa11y-2.5.png

For **XFCE**:

1. From the menu select "Settings" then "Accessibility"

![Step 1 to enable a11y on XFCE][9]

 [9]: ../../../images/a11y/EnableXFCEa11y-1.5.png

Like I said this is just a very quick guide on how to do it.  I'm very sure there are more settings to deal with, especially in KDE but I don't know them (yet).  If you do then please shout out and help.

One of the next things I need to learn is what applications are there specifically for a11y.  I know of a few but never used them (at least I dont think I have), and I'm sure I only know of a small number.


text:
%LAPLACE_MIN_DGG   Laplace - Dgg
%  For two-dimensional images, this is equivalent to the second order
%  derivative in the direction perpendicular to the gradient direction.
%
% SYNOPSIS:
%  image_out = laplace_min_dgg(image_in,sigma,method,boundary_condition,dim,truncation)
%
%  IMAGE_IN is a scalar image with N dimensions.
%  IMAGE_OUT is a scalar image.
%
%  DIM determines along which dimensions to take the derivative.
%  It must be an array of integers in the range 1 to NDIMS(IMAGE_IN).
%  The empty array indicates that all dimensions should be processed.
%
%  See DERIVATIVE for a description of the parameters and the defaults.
%
% DIPlib:
%  This function calls the DIPlib function dip::LaplaceMinusDgg.

% (c)2018, Cris Luengo.
% Based on original DIPlib code: (c)1995-2014, Delft University of Technology.
% Based on original DIPimage code: (c)1999-2014, Delft University of Technology.
%
% 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.

function out = laplace_min_dgg(varargin)
out = dip_filtering('laplace_min_dgg',varargin{:});