text:
#pragma once

#ifndef __Sen_072_TextureArray__
#define __Sen_072_TextureArray__

#include "../Support/SLVK_AbstractGLFW.h"

class Sen_072_TextureArray :	public SLVK_AbstractGLFW
{
public:
	Sen_072_TextureArray();
	virtual ~Sen_072_TextureArray();

protected:
	void initVulkanApplication();
	void reCreateRenderTarget(); // for resize window
	void finalizeWidget();

	void updateUniformBuffer();
	void cleanUpDepthStencil() { ; }

private:
	void createTextureAppPipeline();
	void createTextureAppVertexBuffer();

	void initTex2DArrayImage();

	void createTextureAppDescriptorPool();
	void createTextureAppDescriptorSetLayout();
	void createTextureAppDescriptorSet();

	void createTex2DArrayCommandBuffers();

	VkPipelineLayout					textureAppPipelineLayout		= VK_NULL_HANDLE;
	VkPipeline							textureAppPipeline				= VK_NULL_HANDLE;

	/*****************************************************************************************************************/
	/*------------------------     For Resources Descrition       ---------------------------------------------------*/
	/*---------------------------------------------------------------------------------------------------------------*/
	/* uniform values need to be specified during pipeline creation by creating a VkPipelineLayout object */
	VkDescriptorPool					m_DescriptorPool					= VK_NULL_HANDLE;
	VkDescriptorSetLayout				m_Default_DSL						= VK_NULL_HANDLE;
	VkDescriptorSet						m_Default_DS						= VK_NULL_HANDLE;

	const int							m_COMB_IMA_SAMPLER_DS_BindingIndex	= 3;
	VkBuffer							textureAppVertexBuffer				= VK_NULL_HANDLE;
	VkDeviceMemory						textureAppVertexBufferMemory		= VK_NULL_HANDLE;

	int backgroundTextureWidth, backgroundTextureHeight;
	const char* backgroundTextureDiskAddress;
	VkImage backgroundTextureImage						= VK_NULL_HANDLE;
	VkDeviceMemory backgroundTextureImageDeviceMemory	= VK_NULL_HANDLE;
	VkImageView backgroundTextureImageView				= VK_NULL_HANDLE;

	VkSampler texture2DSampler							= VK_NULL_HANDLE;
};

#endif // !__Sen_07_Texture__


text:
package com.jcertif.offlinebox.web.crawling;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.fail;
import org.junit.Before;
import org.junit.Test;

/**
 *

 * Test class for {@link CrawlingStrategy}

 *
 * @author Martial SOMDA
 * @since 1.0
 */
public class CrawlingStrategyTest {

    private CrawlingStrategy strategy;

    @Before
    public void init() {
        List<URL> visitedUrls = new ArrayList<>();
        try {
            visitedUrls.add(new URL("http://jcertif.com/qui-sommes-nous/"));
            visitedUrls.add(new URL("http://jcertif.com/about/"));
            visitedUrls.add(new URL("http://jcertif.com/lab/teams/java-ee/"));
            visitedUrls.add(new URL("http://jcertif.com/lab/teams/members/martial-somda/"));
        } catch (MalformedURLException ex) {
            Logger.getLogger(CrawlingStrategyTest.class.getName()).log(Level.SEVERE, null, ex);
        }
        Map<String, Collection<String>> rootPermissions = new HashMap<>();
        Collection<String> permissions = new ArrayList<>();
        permissions.add("/search");
        permissions.add("/robot");
        permissions.add("/internal");
        rootPermissions.put("http://jcertif.com", permissions);
        strategy = new CrawlingStrategy(10, visitedUrls, rootPermissions);
    }

    @Test
    public void testIsCrawable() {
        try {
            URL url = new URL("http://jcertif.com/lab/2014/05/04/il-etait-une-fois-le-lab.html");
            assertTrue(strategy.isCrawable(url, 2));
        } catch (MalformedURLException ex) {
            Logger.getLogger(CrawlingStrategyTest.class.getName()).log(Level.SEVERE, null, ex);
            fail("Failed to instanciate the url tou test.");
        }
    }

    @Test
    public void testExceedDepthPagesNotCrawable() {
        try {
            URL url = new URL("http://jcertif.com/lab/2014/05/04/il-etait-une-fois-le-lab.html");
            assertFalse(strategy.isCrawable(url, 11));
        } catch (MalformedURLException ex) {
            Logger.getLogger(CrawlingStrategyTest.class.getName()).log(Level.SEVERE, null, ex);
            fail("Failed to instanciate the url tou test.");
        }
    }

    @Test
    public void testAlreadyVisitedPagesNotCrawable() {
        try {
            URL url = new URL("http://jcertif.com/qui-sommes-nous");
            assertTrue(strategy.isCrawable(url, 2));
        } catch (MalformedURLException ex) {
            Logger.getLogger(CrawlingStrategyTest.class.getName()).log(Level.SEVERE, null, ex);
            fail("Failed to instanciate the url tou test.");
        }
    }

    @Test
    public void testRobotExclusionsNotCrawable() {
        try {
            URL url = new URL("http://jcertif.com/search?q=test");
            assertFalse(strategy.isCrawable(url, 2));
        } catch (MalformedURLException ex) {
            Logger.getLogger(CrawlingStrategyTest.class.getName()).log(Level.SEVERE, null, ex);
            fail("Failed to instanciate the url tou test.");
        }
    }

}

redpajama_set_name: RedPajamaGithub


text:
package registry.exception;

/**
 * Created by anzhen on 2016/5/1.
 */
public class ValidateException extends RuntimeException {

    public ValidateException() {
    }

    public ValidateException(String message) {
        super(message);
    }

    public ValidateException(String message, Throwable cause) {
        super(message, cause);
    }

    public ValidateException(Throwable cause) {
        super(cause);
    }
}


text:
layout: default_docs
title: Connecting to the Database
header: Chapter 3. Initializing the Driver
resource: media
previoustitle: Loading the Driver
previous: load.html
nexttitle: Chapter 4. Using SSL
next: ssl.html
---

With JDBC, a database is represented by a URL (Uniform Resource Locator). With
PostgreSQL™, this takes one of the following forms:

* jdbc:postgresql:*`database`*
* jdbc:postgresql:/
* jdbc:postgresql://*`host/database`*
* jdbc:postgresql://*`host/`*
* jdbc:postgresql://*`host:port/database`*
* jdbc:postgresql://*`host:port/`*

The parameters have the following meanings:

* *`host`*

	The host name of the server. Defaults to `localhost`. To specify an IPv6
	address your must enclose the `host` parameter with square brackets, for
	example:

	jdbc:postgresql://[::1]:5740/accounting

* *`port`*

	The port number the server is listening on. Defaults to the PostgreSQL™
	standard port number (5432).

* *`database`*

	The database name. The default is to connect to a database with the same name
	as the user name.

To connect, you need to get a `Connection` instance from JDBC. To do this, you use
the `DriverManager.getConnection()` method:

`Connection db = DriverManager.getConnection(url, username, password)`;

## Connection Parameters

In addition to the standard connection parameters the driver supports a number
of additional properties which can be used to specify additional driver behaviour
specific to PostgreSQL™. These properties may be specified in either the connection
URL or an additional `Properties` object parameter to `DriverManager.getConnection`.
The following examples illustrate the use of both methods to establish a SSL
connection.

`String url = "jdbc:postgresql://localhost/test";`
`Properties props = new Properties();`
`props.setProperty("user","fred");`
`props.setProperty("password","secret");`
`props.setProperty("ssl","true");`
`Connection conn = DriverManager.getConnection(url, props);`

`String url = "jdbc:postgresql://localhost/test?user=fred&password=secret&ssl=true";`
`Connection conn = DriverManager.getConnection(url);`

* `user = String`

	The database user on whose behalf the connection is being made.

* `password = String`

	The database user's password.

* `ssl`

	Connect using SSL. The driver must have been compiled with SSL support.
	This property does not need a value associated with it. The mere presence
	of it specifies a SSL connection. However, for compatibility with future
	versions, the value "true" is preferred. For more information see [Chapter
	4, *Using SSL*](ssl.html).

* `sslfactory = String`

	The provided value is a class name to use as the `SSLSocketFactory` when
	establishing a SSL connection. For more information see the section
	called ["Custom SSLSocketFactory"](ssl-factory.html).

* `sslfactoryarg = String`

	This value is an optional argument to the constructor of the sslfactory
	class provided above. For more information see the section called ["Custom SSLSocketFactory"](ssl-factory.html).

* `socketFactory = String`
	Specify a socket factory for socket creation.

* `socketFactoryArg = String`
	Argument forwarded to constructor of SocketFactory class

* `compatible = String`

	Act like an older version of the driver to retain compatibility with older
	applications. At the moment this controls two driver behaviours: the
	handling of binary data fields, and the handling of parameters set via
	`setString()`.

	Older versions of the driver used this property to also control the
	protocol used to connect to the backend. This is now controlled by the
	`protocolVersion` property.

	Information on binary data handling is detailed in [Chapter 7, Storing Binary Data](binary-data.html).
	To force the use of Large Objects set the compatible property to 7.1.

	When `compatible` is set to 7.4 or below, the default for the `stringtype`
	parameter is changed to `unspecified`.

* `sendBufferSize = int`

	Sets SO_SNDBUF on the connection stream

* `recvBufferSize = int`

	Sets SO_RCVBUF on the connection stream

* `protocolVersion = String`

	The driver supports both the V2 and V3 frontend/backend protocols. The
	V3 protocol was introduced in 7.4 and the driver will by default try to
	connect using the V3 protocol, if that fails it will fall back to the V2
	protocol. If the protocolVersion property is specified, the driver will
	try only the specified protocol (which should be either "2" or "3").
	Setting protocolVersion to "2" may be used to avoid the failed attempt
	to use the V3 protocol when connecting to a version 7.3 or earlier server,
	or to force the driver to use the V2 protocol despite connecting to a 7.4
	or greater server.

* `loglevel = int`

	Set the amount of logging information printed to the DriverManager's
	current value for LogStream or LogWriter. It currently supports values
	of `org.postgresql.Driver.DEBUG` (2) and `org.postgresql.Driver.INFO` (1).
	`INFO` will log very little information while `DEBUG` will produce significant
	detail. This property is only really useful if you are a developer or
	are having problems with the driver.

* `charSet = String`

	The character set to use for data sent to the database or received from
	the database. This property is only relevant for server versions less
	than or equal to 7.2. The 7.3 release was the first with multibyte support
	compiled by default and the driver uses its character set translation
	facilities instead of trying to do it itself.

* `allowEncodingChanges = boolean`

	When using the V3 protocol the driver monitors changes in certain server
	configuration parameters that should not be touched by end users. The
	`client_encoding` setting is set by the driver and should not be altered.
	If the driver detects a change it will abort the connection. There is
	one legitimate exception to this behaviour though, using the `COPY` command
	on a file residing on the server's filesystem. The only means of specifying
	the encoding of this file is by altering the `client_encoding` setting.
	The JDBC team considers this a failing of the `COPY` command and hopes to
	provide an alternate means of specifying the encoding in the future, but
	for now there is this URL parameter. Enable this only if you need to
	override the client encoding when doing a copy.

* `logUnclosedConnections = boolean`

	Clients may leak `Connection` objects by failing to call its `close()`
	method. Eventually these objects will be garbage collected and the
	`finalize()` method will be called which will close the `Connection` if
	caller has neglected to do this himself. The usage of a finalizer is just
	a stopgap solution. To help developers detect and correct the source of
	these leaks the `logUnclosedConnections` URL parameter has been added.
	It captures a stacktrace at each `Connection` opening and if the `finalize()`
	method is reached without having been closed the stacktrace is printed
	to the log.

* `binaryTransferEnable = String`

	A comma separated list of types to enable binary transfer. Either OID numbers or names.

* `binaryTransferDisable = String`

	A comma separated list of types to disable binary transfer. Either OID numbers or names.
	Overrides values in the driver default set and values set with binaryTransferEnable.

* `prepareThreshold = int`

	Determine the number of `PreparedStatement` executions required before
	switching over to use server side prepared statements. The default is
	five, meaning start using server side prepared statements on the fifth
	execution of the same `PreparedStatement` object. More information on
	server side prepared statements is available in the section called
	["Server Prepared Statements"](server-prepare.html).

* `preparedStatementCacheQueries = int`

    Determine the number of queries that are cached in each connection.
    The default is 256, meaning if you use more than 256 different queries
    in prepareStatement() calls, the least recently used ones
    will be discarded. The cache allows application to benefit from
	["Server Prepared Statements"](server-prepare.html)
    prepareThreshold even if the prepared statement is
    closed after each execution. The value of 0 disables the cache.

	Each connection has its own statement cache.

* `preparedStatementCacheSizeMiB = int`

    Determine the maximum size (in mebibytes) of the prepared queries cache
    (see preparedStatementCacheQueries).
    The default is 5, meaning if you happen to cache more than 5 MiB of queries
    the least recently used ones will be discarded.
    The main aim of this setting is to prevent `OutOfMemoryError`.
    The value of 0 disables the cache.
    If a query would consume more than a half of `preparedStatementCacheSizeMiB`,
    then it is discarded immediately.

* `defaultRowFetchSize = int`

    Determine the number of rows fetched in `ResultSet`
 	by one fetch with trip to the database. Limiting the number of rows are fetch with
 	each trip to the database allow avoids unnecessary memory consumption
 	and as a consequence `OutOfMemoryException`
 	The default is zero, meaning that in `ResultSet`
 	will be fetch all rows at once. Negative number is not available.

* `reWriteBatchedInserts = bool`
	Enable optimization to rewrite and collapse compatible INSERT statements that are batched.
	If enabled, pgjdbc rewrites batch of `insert into ... values(?, ?)` into `insert into ... values(?, ?), (?, ?), ...`
	That reduces per-statement overhead. The drawback is if one of the statements fail, the whole batch fails.
	The default value is `false`. The option is avaliable since 9.4.1208

* `loginTimeout = int`

	Specify how long to wait for establishment of a database connection. The
	timeout is specified in seconds.

* `connectTimeout = int`

	The timeout value used for socket connect operations. If connecting to the server
	takes longer than this value, the connection is broken.
	The timeout is specified in seconds and a value of zero means that it is disabled.
	The default value is 0 (unlimited) up to 9.4.1208, and 10 seconds since 9.4.1209

* `cancelSignalTimeout = int` (since 9.4.1209)
	Cancel command is sent out of band over its own connection, so cancel message can itself get stuck.
	This property controls "connect timeout" and "socket timeout" used for cancel commands.
	The timeout is specified in seconds. Default value is 10 seconds.

* `socketTimeout = int`

	The timeout value used for socket read operations. If reading from the
	server takes longer than this value, the connection is closed. This can
	be used as both a brute force global query timeout and a method of
	detecting network problems. The timeout is specified in seconds and a
	value of zero means that it is disabled.

* `tcpKeepAlive = boolean`

	Enable or disable TCP keep-alive probe. The default is `false`.

* `unknownLength = int`

	Certain postgresql types such as `TEXT` do not have a well defined length.
	When returning meta-data about these types through functions like
	`ResultSetMetaData.getColumnDisplaySize` and `ResultSetMetaData.getPrecision`
	we must provide a value and various client tools have different ideas
	about what they would like to see. This parameter specifies the length
	to return for types of unknown length.

* `stringtype = String`

	Specify the type to use when binding `PreparedStatement` parameters set
	via `setString()`. If `stringtype` is set to `VARCHAR` (the default), such
	parameters will be sent to the server as varchar parameters. If `stringtype`
	is set to `unspecified`, parameters will be sent to the server as untyped
	values, and the server will attempt to infer an appropriate type. This
	is useful if you have an existing application that uses `setString()` to
	set parameters that are actually some other type, such as integers, and
	you are unable to change the application to use an appropriate method
	such as `setInt()`.

* `kerberosServerName = String`

	The Kerberos service name to use when authenticating with GSSAPI. This
	is equivalent to libpq's PGKRBSRVNAME environment variable and defaults
	to "postgres".

* `jaasApplicationName = String`

	Specifies the name of the JAAS system or application login configuration.

*	`ApplicationName = String`

	Specifies the name of the application that is using the connection.
	This allows a database administrator to see what applications are
	connected to the server and what resources they are using through views like pg_stat_activity.

*	`gsslib = String`

	Force either SSPI (Windows transparent single-sign-on) or GSSAPI (Kerberos, via JSSE)
	to be used when the server requests Kerberos or SSPI authentication.
	Permissible values are auto (default, see below), sspi (force SSPI) or gssapi (force GSSAPI-JSSE).

	If this parameter is auto, SSPI is attempted if the server requests SSPI authentication,
	the JDBC client is running on Windows, and the Waffle libraries required
	for SSPI are on the CLASSPATH. Otherwise Kerberos/GSSAPI via JSSE is used.
	Note that this behaviour does not exactly match that of libpq, which uses
	Windows' SSPI libraries for Kerberos (GSSAPI) requests by default when on Windows.

	gssapi mode forces JSSE's GSSAPI to be used even if SSPI is available, matching the pre-9.4 behaviour.

	On non-Windows platforms or where SSPI is unavailable, forcing sspi mode will fail with a PSQLException.

	Since: 9.4

*	`sspiServiceClass = String`

	Specifies the name of the Windows SSPI service class that forms the service
	class part of the SPN. The default, POSTGRES, is almost always correct.

	See: SSPI authentication (Pg docs) Service Principal Names (MSDN), DsMakeSpn (MSDN) Configuring SSPI (Pg wiki).

	This parameter is ignored on non-Windows platforms.

*	`useSpnego = boolean`

	Use SPNEGO in SSPI authentication requests

*	`sendBufferSize = int`

	Sets SO_SNDBUF on the connection stream

*	`receiveBufferSize = int`

	Sets SO_RCVBUF on the connection stream

*	`readOnly = boolean`

	Put the connection in read-only mode

*	`disableColumnSanitiser = boolean`

	Enable optimization that disables column name sanitiser.

*	`assumeMinServerVersion = String`

	Assume that the server is at least the given version,
	thus enabling to some optimization at connection time instead of trying to be version blind.

*	`currentSchema = String`

	Specify the schema to be set in the search-path.
	This schema will be used to resolve unqualified object names used in statements over this connection.

*	`targetServerType`

	Allows opening connections to only servers with required state,
	the allowed values are any, master, slave and preferSlave.
	The master/slave distinction is currently done by observing if the server allows writes.
	The value preferSlave tries to connect to slaves if any are available,
	otherwise allows falls back to connecting also to master.

*	`hostRecheckSeconds = int`

	Controls how long in seconds the knowledge about a host state
	is cached in JVM wide global cache. The default value is 10 seconds.

*	`loadBalanceHosts = boolean`

	In default mode (disabled) hosts are connected in the given order.
	If enabled hosts are chosen randomly from the set of suitable candidates.

	## Connection Fail-over

	To support simple connection fail-over it is possible to define multiple endpoints
	(host and port pairs) in the connection url separated by commas.
	The driver will try to once connect to each of them in order until the connection succeeds.
	If none succeed, a normal connection exception is thrown.

	The syntax for the connection url is:

	jdbc:postgresql://host1:port1,host2:port2/database

	The simple connection fail-over is useful when running against a high availability
	postgres installation that has identical data on each node.
	For example streaming replication postgres or postgres-xc cluster.

	For example an application can create two connection pools.
	One data source is for writes, another for reads. The write pool limits connections only to master node:

	jdbc:postgresql://node1,node2,node3/accounting?targetServerType=master
	. And read pool balances connections between slaves nodes, but allows connections also to master if no slaves are available:

	jdbc:postgresql://node1,node2,node3/accounting?targetServerType=preferSlave&loadBalanceHosts=true


text:
<link rel="import" href="../../../packages/polymer/polymer.html">

<polymer-element name="h-notification-bar">
  <template>
    <link rel="stylesheet" href="notification_bar.css">

    <div id="container" style="z-index:{{z}}">
      <content></content>
    </div>
  </template>

  <script type="application/dart" src="notification_bar.dart"></script>
</polymer-element>


text:
package egoscale

import (
	"testing"
)

func TestListAccounts(t *testing.T) {
	req := &ListAccounts{}
	_ = req.Response().(*ListAccountsResponse)
}


text:
module RuboCop
  module Server
    module ClientCommand
      # This class is a client command to show server process status.
      # @api private
      class Status < Base
        def run
          if Server.running?
            puts "RuboCop server (#{Cache.pid_path.read}) is running."
          else
            puts 'RuboCop server is not running.'
          end
        end
      end
    end
  end
end


text: export { default } from 'ilios-common/models/school-config';


text:
#ifdef HAVE_CONFIG_H
#include "../../ext_config.h"
#endif

#include <php.h>
#include "../../php_ext.h"
#include "../../ext.h"

#include <Zend/zend_operators.h>
#include <Zend/zend_exceptions.h>
#include <Zend/zend_interfaces.h>

#include "kernel/main.h"

/**
 * Phalcon\Security\Exception
 *
 * Exceptions thrown in Phalcon\Security will use this class
 */
ZEPHIR_INIT_CLASS(Phalcon_Security_Exception) {

	ZEPHIR_REGISTER_CLASS_EX(Phalcon\\Security, Exception, phalcon, security_exception, phalcon_exception_ce, NULL, 0);

	return SUCCESS;

}


text:
(async function() {
  TestRunner.addResult(`Tests sorting in Summary view of detailed heap snapshots.\n`);
  await TestRunner.loadTestModule('heap_profiler_test_runner');
  await TestRunner.showPanel('heap_profiler');

  var instanceCount = 10;
  function createHeapSnapshot() {
    return HeapProfilerTestRunner.createHeapSnapshot(instanceCount);
  }

  HeapProfilerTestRunner.runHeapSnapshotTestSuite([function testSorting(next) {
    HeapProfilerTestRunner.takeAndOpenSnapshot(createHeapSnapshot, step1);

    function step1() {
      HeapProfilerTestRunner.switchToView('Summary', step1a);
    }

    var columns;
    var currentColumn;
    var currentColumnOrder;
    var windowRow;

    function step1a() {
      var row = HeapProfilerTestRunner.findRow('Window');
      TestRunner.assertEquals(true, !!row, '"Window" class row');
      HeapProfilerTestRunner.expandRow(row, step1b);
    }

    function step1b(row) {
      TestRunner.assertEquals(1, row.children.length, 'single Window object');
      windowRow = row.children[0];
      TestRunner.assertEquals(true, !!windowRow, '"Window" instance row');
      HeapProfilerTestRunner.expandRow(windowRow, step2);
    }

    function step2() {
      columns = HeapProfilerTestRunner.viewColumns();
      currentColumn = 0;
      currentColumnOrder = false;
      step3();
    }

    function step3() {
      if (currentColumn >= columns.length) {
        setTimeout(next, 0);
        return;
      }
      HeapProfilerTestRunner.clickColumn(columns[currentColumn], step4);
    }

    function step4(newColumnState) {
      columns[currentColumn] = newColumnState;
      var columnName = columns[currentColumn].id;
      var contents = windowRow.children.map(function(obj) {
        return obj.element().children[currentColumn].textContent;
      });
      TestRunner.assertEquals(instanceCount, contents.length, 'column contents');
      var sortTypes = {object: 'text', distance: 'number', count: 'number', shallowSize: 'size', retainedSize: 'size'};
      TestRunner.assertEquals(true, !!sortTypes[columns[currentColumn].id], 'sort by id');
      HeapProfilerTestRunner.checkArrayIsSorted(
          contents, sortTypes[columns[currentColumn].id], columns[currentColumn].sort);

      if (!currentColumnOrder)
        currentColumnOrder = true;
      else {
        currentColumnOrder = false;
        ++currentColumn;
      }
      step3();
    }
  }]);
})();


text:
<?php

namespace App\Http\Controllers\Backend\Access\User;

use App\Http\Controllers\Controller;
use Yajra\Datatables\Facades\Datatables;
use App\Repositories\Backend\Access\User\UserRepository;
use App\Http\Requests\Backend\Access\User\ManageUserRequest;

/**
 * Class UserTableController.
 */
class UserTableController extends Controller
{
    /**
     * @var UserRepository
     */
    protected $users;

    /**
     * @param UserRepository $users
     */
    public function __construct(UserRepository $users)
    {
        $this->users = $users;
    }

    /**
     * @param ManageUserRequest $request
     *
     * @return mixed
     */
    public function __invoke(ManageUserRequest $request)
    {
        return Datatables::of($this->users->getForDataTable($request->get('status'), $request->get('trashed')))
        ->escapeColumns(['first_name', 'last_name', 'email'])
        ->editColumn('confirmed', function ($user) {
            return $user->confirmed_label;
        })
            ->addColumn('roles', function ($user) {
                return $user->roles->count() ?
                    implode('
', $user->roles->pluck('name')->toArray()) :
                    trans('labels.general.none');
            })
            ->addColumn('social', function ($user) {
                $accounts = [];

                // Note: If you have a provider that does not have a corresponding
                // font-awesome icon, you can override it here
                foreach ($user->providers as $social) {
                    $accounts[] = 'provider.'">';
                }

                return count($accounts) ? implode(' ', $accounts) : 'None';
            })
            ->addColumn('actions', function ($user) {
                return $user->action_buttons;
            })
            ->setRowClass(function ($user) {
                return ! $user->isConfirmed() && config('access.users.requires_approval') ? 'danger' : '';
            })
            ->withTrashed()
            ->make(true);
    }
}


text:
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
#include <io.h>
#include <fcntl.h>
#include <malloc.h>
#include <string.h>

#include "pcap-dos.h"
#include "pcap-int.h"
#include "msdos/ndis2.h"

#if defined(USE_NDIS2)

/*
 *  Packet buffer handling
 */
extern int     FreePktBuf  (PktBuf *buf);
extern int     EnquePktBuf (PktBuf *buf);
extern PktBuf* AllocPktBuf (void);

/*
 *  Various defines
 */
#define MAX_NUM_DEBUG_STRINGS 90
#define DEBUG_STRING_LENGTH   80
#define STACK_POOL_SIZE       6
#define STACK_SIZE            256

#define MEDIA_FDDI            1
#define MEDIA_ETHERNET        2
#define MEDIA_TOKEN           3

static int     startDebug     = 0;
static int     stopDebug      = 0;

static DWORD   droppedPackets = 0L;
static WORD    frameSize      = 0;
static WORD    headerSize     = 0;
static int     mediaType      = 0;
static char   *lastErr        = NULL;

static BYTE    debugStrings [MAX_NUM_DEBUG_STRINGS][DEBUG_STRING_LENGTH];
static BYTE   *freeStacks   [STACK_POOL_SIZE];
static int     freeStackPtr = STACK_POOL_SIZE - 1;

static ProtMan protManEntry = NULL;
static WORD    protManDS    = 0;
static volatile int xmitPending;

static struct _PktBuf        *txBufPending;
static struct _CardHandle    *handle;
static struct _CommonChars    common;
static struct _ProtocolChars  protChars;
static struct _ProtDispatch   lowerTable;

static struct _FailingModules failingModules;
static struct _BindingsList   bindings;

static struct {
         WORD  err_num;
         char *err_text;
       } ndis_errlist[] = {

  { ERR_SUCCESS,
    "The function completed successfully.\n"  },

  { ERR_WAIT_FOR_RELEASE,
    "The ReceiveChain completed successfully but the protocol has\n"
    "retained control of the buffer.\n"  },

  { ERR_REQUEST_QUEUED,
    "The current request has been queued.\n"  },

  { ERR_FRAME_NOT_RECOGNIZED,
    "Frame not recognized.\n"  },

  { ERR_FRAME_REJECTED,
    "Frame was discarded.\n"  },

  { ERR_FORWARD_FRAME,
    "Protocol wishes to forward frame to another protocol.\n"  },

  { ERR_OUT_OF_RESOURCE,
    "Out of resource.\n"  },

  { ERR_INVALID_PARAMETER,
    "Invalid parameter.\n"  },

  { ERR_INVALID_FUNCTION,
    "Invalid function.\n"  },

  { ERR_NOT_SUPPORTED,
    "Not supported.\n"  },

  { ERR_HARDWARE_ERROR,
    "Hardware error.\n"  },

  { ERR_TRANSMIT_ERROR,
    "The packet was not transmitted due to an error.\n"  },

  { ERR_NO_SUCH_DESTINATION,
    "Token ring packet was not recognized when transmitted.\n"  },

  { ERR_BUFFER_TOO_SMALL,
    "Provided buffer was too small.\n"  },

  { ERR_ALREADY_STARTED,
    "Network drivers already started.\n"  },

  { ERR_INCOMPLETE_BINDING,
    "Protocol driver could not complete its bindings.\n"  },

  { ERR_DRIVER_NOT_INITIALIZED,
    "MAC did not initialize properly.\n"  },

  { ERR_HARDWARE_NOT_FOUND,
    "Hardware not found.\n"  },

  { ERR_HARDWARE_FAILURE,
    "Hardware failure.\n"  },

  { ERR_CONFIGURATION_FAILURE,
    "Configuration failure.\n"  },

  { ERR_INTERRUPT_CONFLICT,
    "Interrupt conflict.\n"  },

  { ERR_INCOMPATIBLE_MAC,
    "The MAC is not compatible with the protocol.\n"  },

  { ERR_INITIALIZATION_FAILED,
    "Initialization failed.\n"  },

  { ERR_NO_BINDING,
    "Binding did not occur.\n"  },

  { ERR_NETWORK_MAY_NOT_BE_CONNECTED,
    "The network may not be connected to the adapter.\n"  },

  { ERR_INCOMPATIBLE_OS_VERSION,
    "The version of the operating system is incompatible with the protocol.\n"  },

  { ERR_ALREADY_REGISTERED,
    "The protocol is already registered.\n"  },

  { ERR_PATH_NOT_FOUND,
    "PROTMAN.EXE could not be found.\n"  },

  { ERR_INSUFFICIENT_MEMORY,
    "Insufficient memory.\n"  },

  { ERR_INFO_NOT_FOUND,
    "Protocol Mananger info structure is lost or corrupted.\n"  },

  { ERR_GENERAL_FAILURE,
    "General failure.\n"  }
};

/*
 *  Some handy macros
 */
#define PERROR(str)    printf("%s (%d): %s\n", __FILE__,__LINE__,str)
#define DEBUG_RING()   (debugStrings[stopDebug+1 == MAX_NUM_DEBUG_STRINGS ? \
                        stopDebug = 0 : ++stopDebug])

/*
 * needs rewrite for DOSX
 */
#define MAC_DISPATCH(hnd)  ((struct _MacUpperDispatch*)(hnd)->common->upperDispatchTable)
#define MAC_STATUS(hnd)    ((struct _MacStatusTable*)  (hnd)->common->serviceStatus)
#define MAC_CHAR(hnd)      ((struct _MacChars*)        (hnd)->common->serviceChars)

#ifdef NDIS_DEBUG
  #define DEBUG0(str)      printf (str)
  #define DEBUG1(fmt,a)    printf (fmt,a)
  #define DEBUG2(fmt,a,b)  printf (fmt,a,b)
  #define TRACE0(str)      sprintf (DEBUG_RING(),str)
  #define TRACE1(fmt,a)    sprintf (DEBUG_RING(),fmt,a)
#else
  #define DEBUG0(str)      ((void)0)
  #define DEBUG1(fmt,a)    ((void)0)
  #define DEBUG2(fmt,a,b)  ((void)0)
  #define TRACE0(str)      ((void)0)
  #define TRACE1(fmt,a)    ((void)0)
#endif

/*
 * This routine is called from both threads
 */
void NdisFreeStack (BYTE *aStack)
{
  GUARD();

  if (freeStackPtr == STACK_POOL_SIZE - 1)
     PERROR ("tried to free too many stacks");

  freeStacks[++freeStackPtr] = aStack;

  if (freeStackPtr == 0)
     TRACE0 ("freeStackPtr went positive\n");

  UNGUARD();
}

/*
 * This routine is called from callbacks to allocate local data
 */
BYTE *NdisAllocStack (void)
{
  BYTE *stack;

  GUARD();

  if (freeStackPtr < 0)
  {
    /* Ran out of stack buffers. Return NULL which will start
     * dropping packets
     */
    TRACE0 ("freeStackPtr went negative\n");
    stack = 0;
  }
  else
    stack = freeStacks[freeStackPtr--];

  UNGUARD();
  return (stack);
}

CALLBACK (NdisSystemRequest (DWORD param1, DWORD param2, WORD param3,
                             WORD opcode, WORD targetDS))
{
  static int            bindEntry = 0;
  struct _CommonChars  *macCommon;
  volatile WORD result;

  switch (opcode)
  {
    case REQ_INITIATE_BIND:
         macCommon = (struct _CommonChars*) param2;
         if (macCommon == NULL)
	 {
           printf ("There is an NDIS misconfiguration.\n");
           result = ERR_GENERAL_FAILURE;
	   break;
	 }
         DEBUG2 ("module name %s\n"
                 "module type %s\n",
                 macCommon->moduleName,
                 ((MacChars*) macCommon->serviceChars)->macName);

         /* Binding to the MAC */
         result = macCommon->systemRequest ((DWORD)&common, (DWORD)&macCommon,
                                            0, REQ_BIND,
                                            macCommon->moduleDS);

         if (!strcmp(bindings.moduleName[bindEntry], handle->moduleName))
              handle->common = macCommon;
         else PERROR ("unknown module");
         ++bindEntry;
	 break;

    case REQ_INITIATE_UNBIND:
         macCommon = (struct _CommonChars*) param2;
         result = macCommon->systemRequest ((DWORD)&common, 0,
                                            0, REQ_UNBIND,
                                            macCommon->moduleDS);
         break;

    default:
         result = ERR_GENERAL_FAILURE;
	 break;
  }
  ARGSUSED (param1);
  ARGSUSED (param3);
  ARGSUSED (targetDS);
  return (result);
}

CALLBACK (NdisRequestConfirm (WORD protId, WORD macId,   WORD reqHandle,
                              WORD status, WORD request, WORD protDS))
{
  ARGSUSED (protId);    ARGSUSED (macId);
  ARGSUSED (reqHandle); ARGSUSED (status);
  ARGSUSED (request);   ARGSUSED (protDS);
  return (ERR_SUCCESS);
}

CALLBACK (NdisTransmitConfirm (WORD protId, WORD macId, WORD reqHandle,
                               WORD status, WORD protDS))
{
  xmitPending--;
  FreePktBuf (txBufPending);  /* Add passed ECB back to the free list */

  ARGSUSED (reqHandle);
  ARGSUSED (status);
  ARGSUSED (protDS);
  return (ERR_SUCCESS);
}

/*
 * The primary function for receiving packets
 */
CALLBACK (NdisReceiveLookahead (WORD  macId,      WORD  frameSize,
                                WORD  bytesAvail, BYTE *buffer,
                                BYTE *indicate,   WORD  protDS))
{
  int     result;
  PktBuf *pktBuf;
  WORD    bytesCopied;
  struct _TDBufDescr tDBufDescr;

#if 0
  TRACE1 ("lookahead length = %d, ", bytesAvail);
  TRACE1 ("ecb = %08lX, ",          *ecb);
  TRACE1 ("count = %08lX\n",         count);
  TRACE1 ("offset = %08lX, ",        offset);
  TRACE1 ("timesAllowed = %d, ",     timesAllowed);
  TRACE1 ("packet size = %d\n",      look->dataLookAheadLen);
#endif

  /* Allocate a buffer for the packet
   */
  if ((pktBuf = AllocPktBuf()) == NULL)
  {
    droppedPackets++;
    return (ERR_FRAME_REJECTED);
  }

  /*
   * Now kludge things. Note we will have to undo this later. This will
   * make the packet contiguous after the MLID has done the requested copy.
   */

  tDBufDescr.tDDataCount = 1;
  tDBufDescr.tDBufDescrRec[0].tDPtrType = NDIS_PTR_PHYSICAL;
  tDBufDescr.tDBufDescrRec[0].tDDataPtr = pktBuf->buffer;
  tDBufDescr.tDBufDescrRec[0].tDDataLen = pktBuf->length;
  tDBufDescr.tDBufDescrRec[0].dummy     = 0;

  result = MAC_DISPATCH(handle)->transferData (&bytesCopied, 0, &tDBufDescr,
                                               handle->common->moduleDS);
  pktBuf->packetLength = bytesCopied;

  if (result == ERR_SUCCESS)
       EnquePktBuf(pktBuf);
  else FreePktBuf (pktBuf);

  ARGSUSED (frameSize);
  ARGSUSED (bytesAvail);
  ARGSUSED (indicate);
  ARGSUSED (protDS);

  return (ERR_SUCCESS);
}

CALLBACK (NdisIndicationComplete (WORD macId, WORD protDS))
{
  ARGSUSED (macId);
  ARGSUSED (protDS);

  /* We don't give a hoot about these. Just return
   */
  return (ERR_SUCCESS);
}

/*
 * This is the OTHER way we may receive packets
 */
CALLBACK (NdisReceiveChain (WORD macId, WORD frameSize, WORD reqHandle,
                            struct _RxBufDescr *rxBufDescr,
                            BYTE *indicate, WORD protDS))
{
  struct _PktBuf *pktBuf;
  int     i;

  /*
   * For now we copy the entire packet over to a PktBuf structure. This may be
   * a performance hit but this routine probably isn't called very much, and
   * it is a lot of work to do it otherwise. Also if it is a filter protocol
   * packet we could end up sucking up MAC buffes.
   */

  if ((pktBuf = AllocPktBuf()) == NULL)
  {
    droppedPackets++;
    return (ERR_FRAME_REJECTED);
  }
  pktBuf->packetLength = 0;

  /* Copy the packet to the buffer
   */
  for (i = 0; i < rxBufDescr->rxDataCount; ++i)
  {
    struct _RxBufDescrRec *rxDescr = &rxBufDescr->rxBufDescrRec[i];

    memcpy (pktBuf->buffer + pktBuf->packetLength,
            rxDescr->rxDataPtr, rxDescr->rxDataLen);
    pktBuf->packetLength += rxDescr->rxDataLen;
  }

  EnquePktBuf (pktBuf);

  ARGSUSED (frameSize);
  ARGSUSED (reqHandle);
  ARGSUSED (indicate);
  ARGSUSED (protDS);

  /* This frees up the buffer for the MAC to use
   */
  return (ERR_SUCCESS);
}

CALLBACK (NdisStatusProc (WORD macId,  WORD param1, BYTE *indicate,
                          WORD opcode, WORD protDS))
{
  switch (opcode)
  {
    case STATUS_RING_STATUS:
	 break;
    case STATUS_ADAPTER_CHECK:
	 break;
    case STATUS_START_RESET:
	 break;
    case STATUS_INTERRUPT:
	 break;
    case STATUS_END_RESET:
	 break;
    default:
	 break;
  }
  ARGSUSED (macId);
  ARGSUSED (param1);
  ARGSUSED (indicate);
  ARGSUSED (opcode);
  ARGSUSED (protDS);

  /* We don't need to do anything about this stuff yet
   */
  return (ERR_SUCCESS);
}

/*
 * Tell the NDIS driver to start the delivery of the packet
 */
int NdisSendPacket (struct _PktBuf *pktBuf, int macId)
{
  struct _TxBufDescr txBufDescr;
  int     result;

  xmitPending++;
  txBufPending = pktBuf;    /* we only have 1 pending Tx at a time */

  txBufDescr.txImmedLen  = 0;
  txBufDescr.txImmedPtr  = NULL;
  txBufDescr.txDataCount = 1;
  txBufDescr.txBufDescrRec[0].txPtrType = NDIS_PTR_PHYSICAL;
  txBufDescr.txBufDescrRec[0].dummy     = 0;
  txBufDescr.txBufDescrRec[0].txDataLen = pktBuf->packetLength;
  txBufDescr.txBufDescrRec[0].txDataPtr = pktBuf->buffer;

  result = MAC_DISPATCH(handle)->transmitChain (common.moduleId,
                                                pktBuf->handle,
                                                &txBufDescr,
                                                handle->common->moduleDS);
  switch (result)
  {
    case ERR_OUT_OF_RESOURCE:
         /* Note that this should not happen but if it does there is not
          * much we can do about it
          */
         printf ("ERROR: transmit queue overflowed\n");
         return (0);

    case ERR_SUCCESS:
         /* Everything was hunky dory and synchronous. Free up the
          * packet buffer
          */
         xmitPending--;
         FreePktBuf (pktBuf);
         return (1);

    case ERR_REQUEST_QUEUED:
         /* Everything was hunky dory and asynchronous. Do nothing
          */
         return (1);

    default:
         printf ("Tx fail, code = %04X\n", result);
         return (0);
  }
}

static int ndis_nerr = sizeof(ndis_errlist) / sizeof(ndis_errlist[0]);

static char *Ndis_strerror (WORD errorCode)
{
  static char buf[30];
  int    i;

  for (i = 0; i < ndis_nerr; i++)
      if (errorCode == ndis_errlist[i].err_num)
         return (ndis_errlist[i].err_text);

  sprintf (buf,"unknown error %d",errorCode);
  return (buf);
}

char *NdisLastError (void)
{
  char *errStr = lastErr;
  lastErr = NULL;
  return (errStr);
}

int NdisOpen (void)
{
  struct _ReqBlock reqBlock;
  int     result;
  int     ndisFd = open (NDIS_PATH, O_RDONLY);

  if (ndisFd < 0)
  {
    printf ("Could not open NDIS Protocol Manager device.\n");
    return (0);
  }

  memset (&reqBlock, 0, sizeof(ReqBlock));

  reqBlock.opcode = PM_GET_PROTOCOL_MANAGER_LINKAGE;

  result = NdisGetLinkage (ndisFd, (char*)&reqBlock, sizeof(ReqBlock));
  if (result != 0)
  {
    printf ("Could not get Protocol Manager linkage.\n");
    close (ndisFd);
    return (0);
  }

  close (ndisFd);
  protManEntry = (ProtMan) reqBlock.pointer1;
  protManDS    = reqBlock.word1;

  DEBUG2 ("Entry Point = %04X:%04X\n", FP_SEG(protManEntry),FP_OFF(protManEntry));
  DEBUG1 ("ProtMan DS  = %04X\n", protManDS);
  return (1);
}

int NdisRegisterAndBind (int promis)
{
  struct _ReqBlock reqBlock;
  WORD    result;

  memset (&common,0,sizeof(common));

  common.tableSize = sizeof (common);

  common.majorNdisVersion   = 2;
  common.minorNdisVersion   = 0;
  common.majorModuleVersion = 2;
  common.minorModuleVersion = 0;

  /* Indicates binding from below and dynamically loaded
   */
  common.moduleFlags = 0x00000006L;

  strcpy (common.moduleName, "PCAP");

  common.protocolLevelUpper = 0xFF;
  common.protocolLevelLower = 1;
  common.interfaceLower     = 1;
#ifdef __DJGPP__
  common.moduleDS           = _dos_ds; /* the callback data segment */
#else
  common.moduleDS           = _DS;
#endif

  common.systemRequest      = (SystemRequest) systemRequestGlue;
  common.serviceChars       = (BYTE*) &protChars;
  common.serviceStatus      = NULL;
  common.upperDispatchTable = NULL;
  common.lowerDispatchTable = (BYTE*) &lowerTable;

  protChars.length  = sizeof (protChars);
  protChars.name[0] = 0;
  protChars.type    = 0;

  lowerTable.backPointer        = &common;
  lowerTable.requestConfirm     = requestConfirmGlue;
  lowerTable.transmitConfirm    = transmitConfirmGlue;
  lowerTable.receiveLookahead   = receiveLookaheadGlue;
  lowerTable.indicationComplete = indicationCompleteGlue;
  lowerTable.receiveChain       = receiveChainGlue;
  lowerTable.status             = statusGlue;
  lowerTable.flags              = 3;
  if (promis)
     lowerTable.flags |= 4;   /* promiscous mode (receive everything) */

  bindings.numBindings = 1;
  strcpy (bindings.moduleName[0], handle->moduleName);

  /* Register ourselves with NDIS
   */
  reqBlock.opcode   = PM_REGISTER_MODULE;
  reqBlock.pointer1 = (BYTE FAR*) &common;
  reqBlock.pointer2 = (BYTE FAR*) &bindings;

  result = (*protManEntry) (&reqBlock, protManDS);
  if (result)
  {
    printf ("Protman registering failed: %s\n", Ndis_strerror(result));
    return (0);
  }

  /* Start the binding process
   */
  reqBlock.opcode   = PM_BIND_AND_START;
  reqBlock.pointer1 = (BYTE FAR*) &failingModules;

  result = (*protManEntry) (&reqBlock, protManDS);
  if (result)
  {
    printf ("Start binding failed: %s\n", Ndis_strerror(result));
    return (0);
  }
  return (1);
}

static int CheckMacFeatures (CardHandle *card)
{
  DWORD      serviceFlags;
  BYTE _far *mediaString;
  BYTE _far *mac_addr;

  DEBUG2 ("checking card features\n"
          "common table address = %08lX, macId = %d\n",
          card->common, card->common->moduleId);

  serviceFlags = MAC_CHAR (handle)->serviceFlags;

  if ((serviceFlags & SF_PROMISCUOUS) == 0)
  {
    printf ("The MAC %s does not support promiscuous mode.\n",
            card->moduleName);
    return (0);
  }

  mediaString = MAC_CHAR (handle)->macName;

  DEBUG1 ("media type = %s\n",mediaString);

  /* Get the media type. And set the header size
   */
  if (!strncmp(mediaString,"802.3",5) ||
      !strncmp(mediaString,"DIX",3)   ||
      !strncmp(mediaString,"DIX+802.3",9))
       headerSize = sizeof (EthernetIIHeader);

  else if (!strncmp(mediaString,"FDDI",4))
       headerSize = sizeof (FddiHeader) +
                    sizeof (Ieee802Dot2SnapHeader);
  else
  {
    printf ("Unsupported MAC type: `%s'\n", mediaString);
    return (0);
  }

  frameSize = MAC_CHAR (handle)->maxFrameSize;
  mac_addr  = MAC_CHAR (handle)->currentAddress;

  printf ("Hardware address: %02X:%02X:%02X:%02X:%02X:%02X\n",
          mac_addr[0], mac_addr[1], mac_addr[2],
          mac_addr[3], mac_addr[4], mac_addr[5]);
  return (1);
}

static int NdisStartMac (CardHandle *card)
{
  WORD result;

  /* Set the lookahead length
   */
  result = MAC_DISPATCH(handle)->request (common.moduleId, 0,
                                          headerSize, 0,
                                          REQ_SET_LOOKAHEAD,
                                          card->common->moduleDS);

  /* We assume that if we got INVALID PARAMETER then either this
   * is not supported or will work anyway. NE2000 does this.
   */
  if (result != ERR_SUCCESS && result != ERR_INVALID_PARAMETER)
  {
    DEBUG1 ("Set lookahead failed: %s\n", Ndis_strerror(result));
    return (0);
  }

  /* Set the packet filter. Note that for some medias and drivers we
   * must specify all three flags or the card(s) will not operate correctly.
   */
  result = MAC_DISPATCH(handle)->request (common.moduleId, 0,
                      /* all packets */   FILTER_PROMISCUOUS |
                      /* packets to us */ FILTER_DIRECTED    |
                      /* broadcasts */    FILTER_BROADCAST,
                                          0, REQ_SET_PACKET_FILTER,
                                          card->common->moduleDS);
  if (result != ERR_SUCCESS)
  {
    DEBUG1 ("Set packet filter failed: %s\n", Ndis_strerror(result));
    return (0);
  }

  /* If OPEN/CLOSE supported then open the adapter
   */
  if (MAC_CHAR(handle)->serviceFlags & SF_OPEN_CLOSE)
  {
    result = MAC_DISPATCH(handle)->request (common.moduleId, 0, 0, NULL,
                                            REQ_OPEN_ADAPTER,
                                            card->common->moduleDS);
    if (result != ERR_SUCCESS)
    {
      DEBUG1 ("Opening the MAC failed: %s\n", Ndis_strerror(result));
      return (0);
    }
  }
  return (1);
}

void NdisShutdown (void)
{
  struct _ReqBlock reqBlock;
  int     result, i;

  if (!handle)
     return;

  /* If the adapters support open and are open then close them
   */
  if ((MAC_CHAR(handle)->serviceFlags & SF_OPEN_CLOSE) &&
      (MAC_STATUS(handle)->macStatus & MAC_OPEN))
  {
    result = MAC_DISPATCH(handle)->request (common.moduleId, 0, 0, 0,
                                            REQ_CLOSE_ADAPTER,
                                            handle->common->moduleDS);
    if (result != ERR_SUCCESS)
    {
      printf ("Closing the MAC failed: %s\n", Ndis_strerror(result));
      return;
    }
  }

  /* Tell the Protocol Manager to unbind and stop
   */
  reqBlock.opcode   = PM_UNBIND_AND_STOP;
  reqBlock.pointer1 = (BYTE FAR*) &failingModules;
  reqBlock.pointer2 = NULL;

  result = (*protManEntry) (&reqBlock, protManDS);
  if (result)
     printf ("Unbind failed: %s\n",  Ndis_strerror(result));

  for (i = 0; i < STACK_POOL_SIZE; ++i)
     free (freeStacks[i] - STACK_SIZE);

  handle = NULL;
}

int NdisInit (int promis)
{
  int i, result;

  /* Allocate the real mode stacks used for NDIS callbacks
   */
  for (i = 0; i < STACK_POOL_SIZE; ++i)
  {
    freeStacks[i] = malloc (STACK_SIZE);
    if (!freeStacks[i])
       return (0);
    freeStacks[i] += STACK_SIZE;
  }

  if (!NdisOpen())
     return (0);

  if (!NdisRegisterAndBind(promis))
     return (0);

  DEBUG1 ("My module id: %d\n", common.moduleId);
  DEBUG1 ("Handle id;    %d\n", handle->common->moduleId);
  DEBUG1 ("MAC card:     %-16s - ", handle->moduleName);

  atexit (NdisShutdown);

  if (!CheckMacFeatures(&handle))
     return (0);

  switch (mediaType)
  {
    case MEDIA_FDDI:
         DEBUG0 ("Media type: FDDI");
	 break;
    case MEDIA_ETHERNET:
         DEBUG0 ("Media type: ETHERNET");
	 break;
    default:
         DEBUG0 ("Unsupported media.\n");
         return (0);
  }

  DEBUG1 (" - Frame size: %d\n", frameSize);

  if (!NdisStartMac(&handle))
     return (0);
  return (1);
}
#endif  /* USE_NDIS2 */


text:
package org.apache.wss4j.dom.saml;

import java.security.PrivateKey;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import javax.xml.namespace.QName;

import org.apache.wss4j.common.WSEncryptionPart;
import org.apache.wss4j.common.crypto.Crypto;
import org.apache.wss4j.common.crypto.CryptoFactory;
import org.apache.wss4j.common.crypto.CryptoType;
import org.apache.wss4j.common.ext.WSSecurityException;
import org.apache.wss4j.common.saml.SAMLCallback;
import org.apache.wss4j.common.saml.SAMLUtil;
import org.apache.wss4j.common.saml.SamlAssertionWrapper;
import org.apache.wss4j.common.saml.builder.SAML1Constants;
import org.apache.wss4j.common.saml.builder.SAML2Constants;
import org.apache.wss4j.common.util.XMLUtils;
import org.apache.wss4j.dom.WSConstants;
import org.apache.wss4j.dom.common.CustomHandler;
import org.apache.wss4j.dom.common.SAML1CallbackHandler;
import org.apache.wss4j.dom.common.SAML2CallbackHandler;
import org.apache.wss4j.dom.common.SOAPUtil;
import org.apache.wss4j.dom.common.SecurityTestUtil;
import org.apache.wss4j.dom.engine.WSSConfig;
import org.apache.wss4j.dom.engine.WSSecurityEngine;
import org.apache.wss4j.dom.handler.HandlerAction;
import org.apache.wss4j.dom.handler.RequestData;
import org.apache.wss4j.dom.handler.WSHandlerConstants;
import org.apache.wss4j.dom.handler.WSHandlerResult;
import org.apache.wss4j.dom.message.WSSecHeader;
import org.apache.wss4j.dom.message.WSSecSignature;
import org.apache.wss4j.dom.validate.SamlAssertionValidator;
import org.apache.wss4j.dom.validate.Validator;
import org.apache.xml.security.signature.XMLSignature;
import org.apache.xml.security.transforms.Transforms;
import org.apache.xml.security.transforms.params.XPath2FilterContainer;
import org.apache.xml.security.utils.Constants;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Test;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;

/**
 */
public class SamlTokenCustomSignatureTest {
    private static final org.slf4j.Logger LOG =
        org.slf4j.LoggerFactory.getLogger(SamlTokenCustomSignatureTest.class);

    private Crypto crypto;

    @AfterAll
    public static void cleanup() throws Exception {
        SecurityTestUtil.cleanup();
    }

    public SamlTokenCustomSignatureTest() throws Exception {
        WSSConfig.init();
        crypto = CryptoFactory.getInstance("crypto.properties");
    }

    /**
     * Test that creates, sends and processes a signed SAML 1.1 authentication assertion.
     */
    @Test
    public void testSAML1AuthnAssertion() throws Exception {
        SAML1CallbackHandler callbackHandler = new SAML1CallbackHandler();
        callbackHandler.setStatement(SAML1CallbackHandler.Statement.AUTHN);
        callbackHandler.setConfirmationMethod(SAML1Constants.CONF_BEARER);
        callbackHandler.setIssuer("www.example.com");

        SAMLCallback samlCallback = new SAMLCallback();
        SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
        SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);

        Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
        Element assertionElement = samlAssertion.toDOM(doc);

        WSSecHeader secHeader = new WSSecHeader(doc);
        secHeader.insertSecurityHeader();
        secHeader.getSecurityHeaderElement().appendChild(assertionElement);

        // Sign
        signAssertion(doc, assertionElement);

        if (LOG.isDebugEnabled()) {
            LOG.debug("SAML 1.1 Authn Assertion (Bearer):");
            String outputString = XMLUtils.prettyDocumentToString(doc);
            LOG.debug(outputString);
        }

        try {
            verify(doc);
            fail("Failure expected on a signature that doesn't conform with the signature profile");
        } catch (WSSecurityException ex) {
            assertTrue(ex.getErrorCode() == WSSecurityException.ErrorCode.FAILURE);
        }

        // This should pass as we are disabling signature profile validation in the Validator
        verifyWithoutProfile(doc);
    }

    @Test
    public void testSAML1AuthnAssertionValidatorMap() throws Exception {
        SAML1CallbackHandler callbackHandler = new SAML1CallbackHandler();
        callbackHandler.setStatement(SAML1CallbackHandler.Statement.AUTHN);
        callbackHandler.setConfirmationMethod(SAML1Constants.CONF_BEARER);
        callbackHandler.setIssuer("www.example.com");

        SAMLCallback samlCallback = new SAMLCallback();
        SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
        SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);

        Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
        Element assertionElement = samlAssertion.toDOM(doc);

        WSSecHeader secHeader = new WSSecHeader(doc);
        secHeader.insertSecurityHeader();
        secHeader.getSecurityHeaderElement().appendChild(assertionElement);

        // Sign
        signAssertion(doc, assertionElement);

        if (LOG.isDebugEnabled()) {
            LOG.debug("SAML 1.1 Authn Assertion (Bearer):");
            String outputString = XMLUtils.prettyDocumentToString(doc);
            LOG.debug(outputString);
        }

        try {
            verify(doc);
            fail("Failure expected on a signature that doesn't conform with the signature profile");
        } catch (WSSecurityException ex) {
            assertTrue(ex.getErrorCode() == WSSecurityException.ErrorCode.FAILURE);
        }

        // This should pass as we are disabling signature profile validation in the Validator,
        // which is configured via ConfigurationConstants.VALIDATOR_MAP

        SamlAssertionValidator validator = new SamlAssertionValidator();
        validator.setValidateSignatureAgainstProfile(false);
        Map<QName, Validator> validatorMap = new HashMap<>();
        validatorMap.put(WSConstants.SAML_TOKEN, validator);

        RequestData requestData = new RequestData();
        Map<String, Object> config = new TreeMap<>();
        config.put(WSHandlerConstants.SIG_VER_PROP_FILE, "crypto.properties");
        config.put(WSHandlerConstants.VALIDATOR_MAP, validatorMap);
        requestData.setMsgContext(config);
        requestData.setSigVerCrypto(crypto);

        CustomHandler handler = new CustomHandler();

        List<Integer> actions = new ArrayList<>();
        actions.add(WSConstants.ST_SIGNED);
        handler.receive(actions, requestData);

        WSSecurityEngine secEngine = new WSSecurityEngine();
        secEngine.processSecurityHeader(doc, requestData);

        String outputString = XMLUtils.prettyDocumentToString(doc);
        assertTrue(outputString.indexOf("counter_port_type") > 0 ? true : false);
    }

    /**
     * Test that creates, sends and processes a signed SAML 2.0 authentication assertion.
     */
    @Test
    public void testSAML2AuthnAssertion() throws Exception {
        SAML2CallbackHandler callbackHandler = new SAML2CallbackHandler();
        callbackHandler.setStatement(SAML2CallbackHandler.Statement.AUTHN);
        callbackHandler.setConfirmationMethod(SAML2Constants.CONF_BEARER);
        callbackHandler.setIssuer("www.example.com");

        SAMLCallback samlCallback = new SAMLCallback();
        SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
        SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);

        Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
        Element assertionElement = samlAssertion.toDOM(doc);

        WSSecHeader secHeader = new WSSecHeader(doc);
        secHeader.insertSecurityHeader();
        secHeader.getSecurityHeaderElement().appendChild(assertionElement);

        // Sign
        signAssertion(doc, assertionElement);

        if (LOG.isDebugEnabled()) {
            LOG.debug("SAML 2.0 Authn Assertion (Bearer):");
            String outputString = XMLUtils.prettyDocumentToString(doc);
            LOG.debug(outputString);
        }

        try {
            verify(doc);
            fail("Failure expected on a signature that doesn't conform with the signature profile");
        } catch (WSSecurityException ex) {
            assertTrue(ex.getErrorCode() == WSSecurityException.ErrorCode.FAILURE);
        }

        // This should pass as we are disabling signature profile validation in the Validator
        verifyWithoutProfile(doc);
    }

    @Test
    public void testAddSAML1AndSign() throws Exception {
        SAML1CallbackHandler callbackHandler = new SAML1CallbackHandler();
        callbackHandler.setStatement(SAML1CallbackHandler.Statement.AUTHN);
        callbackHandler.setConfirmationMethod(SAML1Constants.CONF_SENDER_VOUCHES);
        callbackHandler.setIssuer("www.example.com");

        SAMLCallback samlCallback = new SAMLCallback();
        SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
        SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);

        Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
        Element assertionElement = samlAssertion.toDOM(doc);

        WSSecHeader secHeader = new WSSecHeader(doc);
        secHeader.insertSecurityHeader();
        secHeader.getSecurityHeaderElement().appendChild(assertionElement);

        WSSecSignature sign = new WSSecSignature(secHeader);
        sign.setUserInfo("16c73ab6-b892-458f-abf5-2f875f74882e", "security");
        sign.setKeyIdentifierType(WSConstants.ISSUER_SERIAL);

        WSEncryptionPart encP =
            new WSEncryptionPart(
                "Assertion",
                "urn:oasis:names:tc:SAML:1.0:assertion",
                "Element");
        encP.setRequired(false);
        sign.getParts().add(encP);

        Document signedDoc = sign.build(crypto);

        if (LOG.isDebugEnabled()) {
            String outputString = XMLUtils.prettyDocumentToString(doc);
            LOG.debug(outputString);
        }

        verify(signedDoc);
    }

    @Test
    public void testAddSAML1AndSignAction() throws Exception {
        SAML1CallbackHandler callbackHandler = new SAML1CallbackHandler();
        callbackHandler.setStatement(SAML1CallbackHandler.Statement.AUTHN);
        callbackHandler.setConfirmationMethod(SAML1Constants.CONF_SENDER_VOUCHES);
        callbackHandler.setIssuer("www.example.com");

        final WSSConfig cfg = WSSConfig.getNewInstance();
        final RequestData reqData = new RequestData();
        reqData.setWssConfig(cfg);
        reqData.setUsername("16c73ab6-b892-458f-abf5-2f875f74882e");

        Map<String, Object> config = new TreeMap<>();
        config.put(WSHandlerConstants.SIG_PROP_FILE, "crypto.properties");
        config.put("password", "security");
        config.put(WSHandlerConstants.SIG_KEY_ID, "DirectReference");
        config.put(
            WSHandlerConstants.SIGNATURE_PARTS,
            "{Element}{urn:oasis:names:tc:SAML:1.0:assertion}Assertion"
        );
        config.put(WSHandlerConstants.SAML_CALLBACK_REF, callbackHandler);
        reqData.setMsgContext(config);

        final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
        CustomHandler handler = new CustomHandler();

        List<HandlerAction> actions = new ArrayList<>();
        HandlerAction action = new HandlerAction(WSConstants.ST_UNSIGNED);
        actions.add(action);
        action = new HandlerAction(WSConstants.SIGN);
        actions.add(action);

        handler.send(
            doc,
            reqData,
            actions,
            true
        );
        String outputString =
            XMLUtils.prettyDocumentToString(doc);
        if (LOG.isDebugEnabled()) {
            LOG.debug("Signed message:");
            LOG.debug(outputString);
        }

        verify(doc);
    }

    private void signAssertion(Document doc, Element assertionElement) throws Exception {
        XMLSignature sig =
            new XMLSignature(doc, null, XMLSignature.ALGO_ID_SIGNATURE_RSA);
        assertionElement.appendChild(sig.getElement());

        Transforms transforms = new Transforms(doc);
        String filter = "here()/ancestor::ds.Signature/parent::node()/descendant-or-self::*";
        XPath2FilterContainer xpathC = XPath2FilterContainer.newInstanceIntersect(doc, filter);
        xpathC.setXPathNamespaceContext("dsig-xpath", Transforms.TRANSFORM_XPATH2FILTER);

        Element node = xpathC.getElement();
        transforms.addTransform(Transforms.TRANSFORM_XPATH2FILTER, node);
        sig.addDocument("", transforms, Constants.ALGO_ID_DIGEST_SHA1);

        PrivateKey privateKey = crypto.getPrivateKey("16c73ab6-b892-458f-abf5-2f875f74882e", "security");

        sig.sign(privateKey);

        CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS);
        cryptoType.setAlias("16c73ab6-b892-458f-abf5-2f875f74882e");
        X509Certificate cert = crypto.getX509Certificates(cryptoType)[0];
        sig.addKeyInfo(cert);
        sig.checkSignatureValue(cert);
    }

    /**
     * Verifies the soap envelope
     *
     * @param doc
     * @throws Exception Thrown when there is a problem in verification
     */
    private WSHandlerResult verify(Document doc) throws Exception {
        WSSecurityEngine secEngine = new WSSecurityEngine();
        RequestData requestData = new RequestData();
        requestData.setDecCrypto(crypto);
        requestData.setSigVerCrypto(crypto);
        requestData.setValidateSamlSubjectConfirmation(false);

        WSHandlerResult results = secEngine.processSecurityHeader(doc, requestData);
        String outputString = XMLUtils.prettyDocumentToString(doc);
        assertTrue(outputString.indexOf("counter_port_type") > 0 ? true : false);
        return results;
    }

    private WSHandlerResult verifyWithoutProfile(Document doc) throws Exception {
        SamlAssertionValidator validator = new SamlAssertionValidator();
        validator.setValidateSignatureAgainstProfile(false);

        WSSecurityEngine secEngine = new WSSecurityEngine();
        WSSConfig config = secEngine.getWssConfig();
        config.setValidator(WSConstants.SAML_TOKEN, validator);
        config.setValidator(WSConstants.SAML2_TOKEN, validator);

        WSHandlerResult results =
            secEngine.processSecurityHeader(
                doc, null, null, crypto
            );
        String outputString = XMLUtils.prettyDocumentToString(doc);
        assertTrue(outputString.indexOf("counter_port_type") > 0 ? true : false);
        return results;
    }

}


text:
using System.Web.Mvc;
using System.Web.Routing;

namespace MVC5ChangeConnection
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.Add(ActiveDatabaseSoftware.ActiveQueryBuilder.Web.Mvc.Routing.GetRoute());
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}


text:
namespace google {
namespace cloud {
namespace batch {
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN

///
/// Google Batch Service.
/// The service manages user submitted batch jobs and allocates Google Compute
/// Engine VM instances to run the jobs.
///
/// @par Equality
///
/// Instances of this class created via copy-construction or copy-assignment
/// always compare equal. Instances created with equal
/// `std::shared_ptr<*Connection>` objects compare equal. Objects that compare
/// equal share the same underlying resources.
///
/// @par Performance
///
/// Creating a new instance of this class is a relatively expensive operation,
/// new objects establish new connections to the service. In contrast,
/// copy-construction, move-construction, and the corresponding assignment
/// operations are relatively efficient as the copies share all underlying
/// resources.
///
/// @par Thread Safety
///
/// Concurrent access to different instances of this class, even if they compare
/// equal, is guaranteed to work. Two or more threads operating on the same
/// instance of this class is not guaranteed to work. Since copy-construction
/// and move-construction is a relatively efficient operation, consider using
/// such a copy when using this class from multiple threads.
///
class BatchServiceClient {
 public:
  explicit BatchServiceClient(
      std::shared_ptr<BatchServiceConnection> connection, Options opts = {});
  ~BatchServiceClient();

  ///@{
  // @name Copy and move support
  BatchServiceClient(BatchServiceClient const&) = default;
  BatchServiceClient& operator=(BatchServiceClient const&) = default;
  BatchServiceClient(BatchServiceClient&&) = default;
  BatchServiceClient& operator=(BatchServiceClient&&) = default;
  ///@}

  ///@{
  // @name Equality
  friend bool operator==(BatchServiceClient const& a,
                         BatchServiceClient const& b) {
    return a.connection_ == b.connection_;
  }
  friend bool operator!=(BatchServiceClient const& a,
                         BatchServiceClient const& b) {
    return !(a == b);
  }
  ///@}

  ///
  /// Create a Job.
  ///
  /// @param parent  Required. The parent resource name where the Job will be
  /// created.
  ///  Pattern: "projects/{project}/locations/{location}"
  /// @param job  Required. The Job to create.
  /// @param job_id  ID used to uniquely identify the Job within its parent
  /// scope.
  ///  This field should contain at most 63 characters.
  ///  Only alphanumeric characters or '-' are accepted.
  ///  The '-' character cannot be the first or the last one.
  ///  A system generated ID will be used if the field is not set.
  ///  The job.name field in the request will be ignored and the created
  ///  resource name of the Job will be "{parent}/jobs/{job_id}".
  /// @param opts Optional. Override the class-level options, such as retry and
  ///     backoff policies.
  /// @return
  /// @googleapis_link{google::cloud::batch::v1::Job,google/cloud/batch/v1/job.proto#L35}
  ///
  /// [google.cloud.batch.v1.CreateJobRequest]:
  /// @googleapis_reference_link{google/cloud/batch/v1/batch.proto#L99}
  /// [google.cloud.batch.v1.Job]:
  /// @googleapis_reference_link{google/cloud/batch/v1/job.proto#L35}
  ///
  StatusOr<google::cloud::batch::v1::Job> CreateJob(
      std::string const& parent, google::cloud::batch::v1::Job const& job,
      std::string const& job_id, Options opts = {});

  ///
  /// Create a Job.
  ///
  /// @param request
  /// @googleapis_link{google::cloud::batch::v1::CreateJobRequest,google/cloud/batch/v1/batch.proto#L99}
  /// @param opts Optional. Override the class-level options, such as retry and
  ///     backoff policies.
  /// @return
  /// @googleapis_link{google::cloud::batch::v1::Job,google/cloud/batch/v1/job.proto#L35}
  ///
  /// [google.cloud.batch.v1.CreateJobRequest]:
  /// @googleapis_reference_link{google/cloud/batch/v1/batch.proto#L99}
  /// [google.cloud.batch.v1.Job]:
  /// @googleapis_reference_link{google/cloud/batch/v1/job.proto#L35}
  ///
  StatusOr<google::cloud::batch::v1::Job> CreateJob(
      google::cloud::batch::v1::CreateJobRequest const& request,
      Options opts = {});

  ///
  /// Get a Job specified by its resource name.
  ///
  /// @param name  Required. Job name.
  /// @param opts Optional. Override the class-level options, such as retry and
  ///     backoff policies.
  /// @return
  /// @googleapis_link{google::cloud::batch::v1::Job,google/cloud/batch/v1/job.proto#L35}
  ///
  /// [google.cloud.batch.v1.GetJobRequest]:
  /// @googleapis_reference_link{google/cloud/batch/v1/batch.proto#L139}
  /// [google.cloud.batch.v1.Job]:
  /// @googleapis_reference_link{google/cloud/batch/v1/job.proto#L35}
  ///
  StatusOr<google::cloud::batch::v1::Job> GetJob(std::string const& name,
                                                 Options opts = {});

  ///
  /// Get a Job specified by its resource name.
  ///
  /// @param request
  /// @googleapis_link{google::cloud::batch::v1::GetJobRequest,google/cloud/batch/v1/batch.proto#L139}
  /// @param opts Optional. Override the class-level options, such as retry and
  ///     backoff policies.
  /// @return
  /// @googleapis_link{google::cloud::batch::v1::Job,google/cloud/batch/v1/job.proto#L35}
  ///
  /// [google.cloud.batch.v1.GetJobRequest]:
  /// @googleapis_reference_link{google/cloud/batch/v1/batch.proto#L139}
  /// [google.cloud.batch.v1.Job]:
  /// @googleapis_reference_link{google/cloud/batch/v1/job.proto#L35}
  ///
  StatusOr<google::cloud::batch::v1::Job> GetJob(
      google::cloud::batch::v1::GetJobRequest const& request,
      Options opts = {});

  ///
  /// Delete a Job.
  ///
  /// @param name  Job name.
  /// @param opts Optional. Override the class-level options, such as retry and
  ///     backoff policies.
  /// @return
  /// @googleapis_link{google::cloud::batch::v1::OperationMetadata,google/cloud/batch/v1/batch.proto#L248}
  ///
  /// [google.cloud.batch.v1.DeleteJobRequest]:
  /// @googleapis_reference_link{google/cloud/batch/v1/batch.proto#L150}
  /// [google.cloud.batch.v1.OperationMetadata]:
  /// @googleapis_reference_link{google/cloud/batch/v1/batch.proto#L248}
  ///
  future<StatusOr<google::cloud::batch::v1::OperationMetadata>> DeleteJob(
      std::string const& name, Options opts = {});

  ///
  /// Delete a Job.
  ///
  /// @param request
  /// @googleapis_link{google::cloud::batch::v1::DeleteJobRequest,google/cloud/batch/v1/batch.proto#L150}
  /// @param opts Optional. Override the class-level options, such as retry and
  ///     backoff policies.
  /// @return
  /// @googleapis_link{google::cloud::batch::v1::OperationMetadata,google/cloud/batch/v1/batch.proto#L248}
  ///
  /// [google.cloud.batch.v1.DeleteJobRequest]:
  /// @googleapis_reference_link{google/cloud/batch/v1/batch.proto#L150}
  /// [google.cloud.batch.v1.OperationMetadata]:
  /// @googleapis_reference_link{google/cloud/batch/v1/batch.proto#L248}
  ///
  future<StatusOr<google::cloud::batch::v1::OperationMetadata>> DeleteJob(
      google::cloud::batch::v1::DeleteJobRequest const& request,
      Options opts = {});

  ///
  /// List all Jobs for a project within a region.
  ///
  /// @param parent  Parent path.
  /// @param opts Optional. Override the class-level options, such as retry and
  ///     backoff policies.
  /// @return
  /// @googleapis_link{google::cloud::batch::v1::Job,google/cloud/batch/v1/job.proto#L35}
  ///
  /// [google.cloud.batch.v1.ListJobsRequest]:
  /// @googleapis_reference_link{google/cloud/batch/v1/batch.proto#L174}
  /// [google.cloud.batch.v1.Job]:
  /// @googleapis_reference_link{google/cloud/batch/v1/job.proto#L35}
  ///
  StreamRange<google::cloud::batch::v1::Job> ListJobs(std::string const& parent,
                                                      Options opts = {});

  ///
  /// List all Jobs for a project within a region.
  ///
  /// @param request
  /// @googleapis_link{google::cloud::batch::v1::ListJobsRequest,google/cloud/batch/v1/batch.proto#L174}
  /// @param opts Optional. Override the class-level options, such as retry and
  ///     backoff policies.
  /// @return
  /// @googleapis_link{google::cloud::batch::v1::Job,google/cloud/batch/v1/job.proto#L35}
  ///
  /// [google.cloud.batch.v1.ListJobsRequest]:
  /// @googleapis_reference_link{google/cloud/batch/v1/batch.proto#L174}
  /// [google.cloud.batch.v1.Job]:
  /// @googleapis_reference_link{google/cloud/batch/v1/job.proto#L35}
  ///
  StreamRange<google::cloud::batch::v1::Job> ListJobs(
      google::cloud::batch::v1::ListJobsRequest request, Options opts = {});

  ///
  /// Return a single Task.
  ///
  /// @param name  Required. Task name.
  /// @param opts Optional. Override the class-level options, such as retry and
  ///     backoff policies.
  /// @return
  /// @googleapis_link{google::cloud::batch::v1::Task,google/cloud/batch/v1/task.proto#L276}
  ///
  /// [google.cloud.batch.v1.GetTaskRequest]:
  /// @googleapis_reference_link{google/cloud/batch/v1/batch.proto#L237}
  /// [google.cloud.batch.v1.Task]:
  /// @googleapis_reference_link{google/cloud/batch/v1/task.proto#L276}
  ///
  StatusOr<google::cloud::batch::v1::Task> GetTask(std::string const& name,
                                                   Options opts = {});

  ///
  /// Return a single Task.
  ///
  /// @param request
  /// @googleapis_link{google::cloud::batch::v1::GetTaskRequest,google/cloud/batch/v1/batch.proto#L237}
  /// @param opts Optional. Override the class-level options, such as retry and
  ///     backoff policies.
  /// @return
  /// @googleapis_link{google::cloud::batch::v1::Task,google/cloud/batch/v1/task.proto#L276}
  ///
  /// [google.cloud.batch.v1.GetTaskRequest]:
  /// @googleapis_reference_link{google/cloud/batch/v1/batch.proto#L237}
  /// [google.cloud.batch.v1.Task]:
  /// @googleapis_reference_link{google/cloud/batch/v1/task.proto#L276}
  ///
  StatusOr<google::cloud::batch::v1::Task> GetTask(
      google::cloud::batch::v1::GetTaskRequest const& request,
      Options opts = {});

  ///
  /// List Tasks associated with a job.
  ///
  /// @param parent  Required. Name of a TaskGroup from which Tasks are being
  /// requested.
  ///  Pattern:
  ///  "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}"
  /// @param opts Optional. Override the class-level options, such as retry and
  ///     backoff policies.
  /// @return
  /// @googleapis_link{google::cloud::batch::v1::Task,google/cloud/batch/v1/task.proto#L276}
  ///
  /// [google.cloud.batch.v1.ListTasksRequest]:
  /// @googleapis_reference_link{google/cloud/batch/v1/batch.proto#L201}
  /// [google.cloud.batch.v1.Task]:
  /// @googleapis_reference_link{google/cloud/batch/v1/task.proto#L276}
  ///
  StreamRange<google::cloud::batch::v1::Task> ListTasks(
      std::string const& parent, Options opts = {});

  ///
  /// List Tasks associated with a job.
  ///
  /// @param request
  /// @googleapis_link{google::cloud::batch::v1::ListTasksRequest,google/cloud/batch/v1/batch.proto#L201}
  /// @param opts Optional. Override the class-level options, such as retry and
  ///     backoff policies.
  /// @return
  /// @googleapis_link{google::cloud::batch::v1::Task,google/cloud/batch/v1/task.proto#L276}
  ///
  /// [google.cloud.batch.v1.ListTasksRequest]:
  /// @googleapis_reference_link{google/cloud/batch/v1/batch.proto#L201}
  /// [google.cloud.batch.v1.Task]:
  /// @googleapis_reference_link{google/cloud/batch/v1/task.proto#L276}
  ///
  StreamRange<google::cloud::batch::v1::Task> ListTasks(
      google::cloud::batch::v1::ListTasksRequest request, Options opts = {});

 private:
  std::shared_ptr<BatchServiceConnection> connection_;
  Options options_;
};

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
}  // namespace batch
}  // namespace cloud
}  // namespace google

#endif  // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_BATCH_CLIENT_H


text:
package sage.media.rss;

import java.util.*;

/**
 * Handler for doublin core information.
 *
 *

 * This module, both source code and documentation, is in the
 * Public Domain, and comes with NO WARRANTY.
 *

 *
 * Namespace Declarations

 *

 *
xmlns:dc="http://purl.org/dc/elements/1.1/"

 *

 *
Model

 *

 * <channel>, <item>, <image>, and <textinput> Elements:

 *

 *
<dc:title> ( #PCDATA )

 *
<dc:creator> ( #PCDATA )

 *
<dc:subject> ( #PCDATA )

 *
<dc:description> ( #PCDATA )

 *
<dc:publisher> ( #PCDATA )

 *
<dc:contributor> ( #PCDATA )

 *
<dc:date> ( #PCDATA ) [W3CDTF]

 *
<dc:type> ( #PCDATA )

 *
<dc:format> ( #PCDATA )

 *
<dc:identifier> ( #PCDATA )

 *
<dc:source> ( #PCDATA )

 *
<dc:language> ( #PCDATA )

 *
<dc:relation> ( #PCDATA )

 *
<dc:coverage> ( #PCDATA )

 *
<dc:rights> ( #PCDATA )

 *

 *
 *
 * @since RSSLIB4J 0.1
 * @author Francesco aka 'Stealthp' stealthp[@]stealthp.org
 * @version 0.2
 */

public class RSSDoublinCoreModule  implements java.io.Serializable{
  private String title;
  private String creator;
  private String subject;
  private String description;
  private String publisher;
  private String contributor;
  private String date;
  private String type;
  private String format;
  private String identifier;
  private String source;
  private String language;
  private String relation;
  private String coverage;
  private String rights;

  /**
   * Set the title
   * @param t title
   */
  public void setDcTitle(String t) {
    title = t;
  }

  /**
   * Set the creator
   * @param t creator
   */
  public void setDcCreator(String t) {
    creator = t;
  }

  /**
   * Set subject
   * @param t subject
   */
  public void setDcSubject(String t) {
    subject = t;
  }

  /**
   * Set the description
   * @param t description
   */
  public void setDcDescription(String t) {
    description = t;
  }

  /**
   * Set the publiscer
   * @param t publisher
   */
  public void setDcPublisher(String t) {
    publisher = t;
  }

  /**
   * Set the Contributor
   * @param t contributor
   */
  public void setDcContributor(String t) {
    contributor = t;
  }

  /**
   * Set the date
   * @param t date
   */
  public void setDcDate(String t) {
    date = t;
  }

  /**
   * Set the type
   * @param t typr
   */
  public void setDcType(String t) {
    type = t;
  }

  /**
   * Set the format
   * @param t format
   */
  public void setDcFormat(String t) {
    format = t;
  }

  /**
   * Set the identifier
   * @param t identifier
   */
  public void setDcIdentifier(String t) {
    identifier = t;
  }

  /**
   * Set the source
   * @param t source
   */
  public void setDcSource(String t) {
    source = t;
  }

  /**
   * Set the language
   * @param t language
   */
  public void setDcLanguage(String t) {
    language = t;
  }

  /**
   * Set declaration
   * @param t declaration
   */
  public void setDcRelation(String t) {
    relation = t;
  }

  /**
   * Set coverage
   * @param t coverage
   */
  public void setDcCoverage(String t) {
    coverage = t;
  }

  /**
   * Set copy rights
   * @param t rights
   */
  public void setDcRights(String t) {
    rights = t;
  }

  /**
   * Get the title
   * @return title
   */
  public String getDcTitle() {
    return title;
  }

  /**
   * Get the creator
   * @return creator
   */
  public String getDcCreator() {
    return creator;
  }

  /**
   * Get the subject
   * @return subject
   */
  public String getDcSubject() {
    return subject;
  }

  /**
   * Get description
   * @return description
   */
  public String getDcDescription() {
    return description;
  }

  /**
   * Get the publischer
   * @return the publischer
   */
  public String getDcPublisher() {
    return publisher;
  }

  /**
   * Get the contributor
   * @return contributor
   */
  public String getDcContributor() {
    return contributor;
  }

  /**
   * Get the date
   * @return date
   */
  public String getDcDate() {
    return date;
  }

  /**
   * Get the type
   * @return the type
   */
  public String getDcType() {
    return type;
  }

  /**
   * The format
   * @return format
   */
  public String getDcFormat() {
    return format;
  }

  /**
   * Get the identifier
   * @return the identifier
   */
  public String getDcIdentifier() {
    return identifier;
  }

  /**
   * Get the source
   * @return the source
   */
  public String getDcSource() {
    return source;
  }

  /**
   * Get the language
   * @return language
   */
  public String getDcLanguage() {
    return language;
  }

  /**
   * Get the declaration
   * @return declaration
   */
  public String getDcRelation() {
    return relation;
  }

  /**
   * Get the coverage
   * @return coverage
   */
  public String getDcCoverage() {
    return coverage;
  }

  /**
   * The Right
   * @return right
   */
  public String getDcRight() {
    return title;
  }

  /**
   * A poor informational string
   * @return info
   */
  public String toDebugString() {
    String info = "DC SUBJECT: " + subject + "\nDC CREATOR: " + creator;
    return info;
  }

  /**
   * Build a RSSDoublinCoreModule object from an Hashtable
   * @param t The Hashtable with key as dc tag and value as tag's value
   * @return the RSSDoublinCoreModule object
   */
  protected static RSSDoublinCoreModule buildDcModule(Hashtable t) {

    if (t == null || t.size() == 0)
      return null;

    RSSDoublinCoreModule dc = new RSSDoublinCoreModule();

    Hashtable tbl = t;

    Enumeration en = t.keys();

    while (en.hasMoreElements()) {

      String qName = (String) en.nextElement();
      String data = (String) tbl.get(qName);

      if (data == null)
        continue;

      if (RSSHandler.tagIsEqual(RSSHandler.DC_TITLE_TAG, qName))
        dc.setDcTitle(data);

      if (RSSHandler.tagIsEqual(RSSHandler.DC_CREATOR_TAG, qName))
        dc.setDcCreator(data);

      if (RSSHandler.tagIsEqual(RSSHandler.DC_SUBJECT_TAG, qName))
        dc.setDcSubject(data);

      if (RSSHandler.tagIsEqual(RSSHandler.DC_DESCRIPTION_TAG, qName))
        dc.setDcDescription(data);

      if (RSSHandler.tagIsEqual(RSSHandler.DC_PUBLISHER_TAG, qName))
        dc.setDcPublisher(data);

      if (RSSHandler.tagIsEqual(RSSHandler.DC_CONTRIBUTOR_TAG, qName))
        dc.setDcContributor(data);

      if (RSSHandler.tagIsEqual(RSSHandler.DC_DATE_TAG, qName))
        dc.setDcDate(data);

      if (RSSHandler.tagIsEqual(RSSHandler.DC_TYPE_TAG, qName))
        dc.setDcType(data);

      if (RSSHandler.tagIsEqual(RSSHandler.DC_FORMAT_TAG, qName))
        dc.setDcFormat(data);

      if (RSSHandler.tagIsEqual(RSSHandler.DC_IDENTIFIER_TAG, qName))
        dc.setDcIdentifier(data);

      if (RSSHandler.tagIsEqual(RSSHandler.DC_SOURCE_TAG, qName))
        dc.setDcSource(data);

      if (RSSHandler.tagIsEqual(RSSHandler.DC_LANGUAGE_TAG, qName))
        dc.setDcLanguage(data);

      if (RSSHandler.tagIsEqual(RSSHandler.DC_RELATION_TAG, qName))
        dc.setDcRelation(data);

      if (RSSHandler.tagIsEqual(RSSHandler.DC_COVERAGE_TAG, qName))
        dc.setDcCoverage(data);

      if (RSSHandler.tagIsEqual(RSSHandler.DC_RIGHTS_TAG, qName))
        dc.setDcRights(data);
    }

    return dc;
  }

}


text:
HRESULT STDMETHODCALLTYPE NoRegCoCreate(  const __wchar_t *dllName,
                        REFCLSID   rclsid,
                        REFIID     riid,
                        void     **ppv);

#ifndef _NATIVE_WCHAR_T_DEFINED
#ifdef __cplusplus

HRESULT STDMETHODCALLTYPE NoRegCoCreate(  const wchar_t *dllName,
                        REFCLSID   rclsid,
                        REFIID     riid,
                        void     **ppv)
{
    return NoRegCoCreate( (const __wchar_t *)dllName, rclsid, riid, ppv );
}

#endif
#endif

//
// Create a dia data source object from the dia dll (looks up the class id in the registry).
//
HRESULT STDMETHODCALLTYPE NoOleCoCreate(  REFCLSID   rclsid,
                        REFIID     riid,
                        void     **ppv);

#endif


text:
CELERY_URI = ''
MONGODB_URI = 'mongodb://localhost:27017/'
MONGODB = 'yoda'
DEBUG = False
HTML_REPORT = False
CLIENT_KEY = ''


text:
package ru.avhaliullin.whatever.semantic

/**
  * @author avhaliullin
  */
sealed trait VarId {
  def name: String
}

object VarId {

  case class MethodArg(name: String) extends VarId

  case class LocalVar(name: String, id: Int) extends VarId

  case class CompilerProduced(id: Int) extends VarId {
    val name = "$x" + id
  }

}


text:
package com.moilioncircle.redis.cluster.watchdog.state;

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

import static com.moilioncircle.redis.cluster.watchdog.ClusterConstants.CLUSTER_SLOTS_BYTES;

/**
 * @author Leon Chen
 * @since 1.0.0
 */
public class ClusterNode {
    public long failTime;
    public long pingTime;
    public long pongTime;
    public long votedTime;
    public long createTime;
    public long isolatedTime;
    public long configEpoch;
    public int assignedSlots;
    public byte[] slots = new byte[CLUSTER_SLOTS_BYTES];
    public List<ClusterNode> slaves = new ArrayList<>();
    public String ip;
    public int port;
    public int busPort;
    public int flags;
    public String name;
    public long offset;
    public ClusterNode master;
    public volatile ClusterLink link;
    public List<ClusterNodeFailReport> failReports = new ArrayList<>();

    public ClusterNode() {
        this.createTime = System.currentTimeMillis();
    }
}


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

package net.groboclown.p4.server.impl.values;

import com.perforce.p4java.client.IClientSummary;
import net.groboclown.p4.server.api.values.P4WorkspaceSummary;
import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class P4WorkspaceSummaryImpl implements P4WorkspaceSummary {
    private final String clientname;
    private final Date lastUpdate;
    private final Date lastAccess;
    private final String owner;
    private final String description;
    private final Map<ClientOption, Boolean> options;
    private final SubmitOption submitOption;
    private final LineEnding lineEnding;
    private final ClientType clientType;
    private final List<String> roots;
    private final String host;
    private final String serverId;
    private final String stream;
    private final int streamAtChange;

    public static class Builder {
        private String clientname;
        private Date lastUpdate;
        private Date lastAccess;
        private String owner;
        private String description;
        private Map<P4WorkspaceSummary.ClientOption, Boolean> options;
        private P4WorkspaceSummary.SubmitOption submitOption;
        private P4WorkspaceSummary.LineEnding lineEnding;
        private P4WorkspaceSummary.ClientType clientType;
        private List<String> roots;
        private String host;
        private String serverId;
        private String stream;
        private int streamAtChange;

        private Builder() {
            // Do nothing
        }

        public Builder setClientname(String clientname) {
            this.clientname = clientname;
            return this;
        }

        public Builder setLastUpdate(Date lastUpdate) {
            this.lastUpdate = lastUpdate;
            return this;
        }

        public Builder setLastAccess(Date lastAccess) {
            this.lastAccess = lastAccess;
            return this;
        }

        public Builder setOwner(String owner) {
            this.owner = owner;
            return this;
        }

        public Builder setDescription(String description) {
            this.description = description;
            return this;
        }

        public Builder setOptions(Map<P4WorkspaceSummary.ClientOption, Boolean> options) {
            this.options = options;
            return this;
        }

        public Builder setSubmitOption(P4WorkspaceSummary.SubmitOption submitOption) {
            this.submitOption = submitOption;
            return this;
        }

        public Builder setLineEnding(P4WorkspaceSummary.LineEnding lineEnding) {
            this.lineEnding = lineEnding;
            return this;
        }

        public Builder setClientType(P4WorkspaceSummary.ClientType clientType) {
            this.clientType = clientType;
            return this;
        }

        public Builder setRoots(List<String> roots) {
            this.roots = roots;
            return this;
        }

        public Builder setHost(String host) {
            this.host = host;
            return this;
        }

        public Builder setServerId(String serverId) {
            this.serverId = serverId;
            return this;
        }

        public Builder setStream(String stream) {
            this.stream = stream;
            return this;
        }

        public Builder setStreamAtChange(int streamAtChange) {
            this.streamAtChange = streamAtChange;
            return this;
        }

        public P4WorkspaceSummaryImpl createP4WorkspaceSummary() {
            return new P4WorkspaceSummaryImpl(clientname,
                    lastUpdate, lastAccess, owner, description, options, submitOption, lineEnding, clientType,
                    roots, host, serverId, stream, streamAtChange);
        }
    }

    public static Builder builder() {
        return new Builder();
    }

    public P4WorkspaceSummaryImpl(@NotNull IClientSummary client) {
        clientname = client.getName();
        lastUpdate = client.getUpdated();
        lastAccess = client.getAccessed();
        owner = client.getOwnerName();
        description = client.getDescription();
        options = convertOptions(client.getOptions());
        submitOption = convertSubmitOptions(client.getSubmitOptions());
        lineEnding = convertLineEnding(client.getLineEnd());
        clientType = convertClientType(client.getType());
        roots = convertRoots(client.getRoot(), client.getAlternateRoots());
        host = client.getHostName();
        serverId = client.getServerId();
        stream = client.getStream();
        streamAtChange = client.getStreamAtChange();
    }

    private P4WorkspaceSummaryImpl(String clientname, Date lastUpdate, Date lastAccess, String owner,
            String description, Map<ClientOption, Boolean> options, SubmitOption submitOption,
            LineEnding lineEnding, ClientType clientType, List<String> roots, String host,
            String serverId, String stream, int streamAtChange) {
        this.clientname = clientname;
        this.lastUpdate = lastUpdate;
        this.lastAccess = lastAccess;
        this.owner = owner;
        this.description = description;
        this.options = options;
        this.submitOption = submitOption;
        this.lineEnding = lineEnding;
        this.clientType = clientType;
        this.roots = roots;
        this.host = host;
        this.serverId = serverId;
        this.stream = stream;
        this.streamAtChange = streamAtChange;
    }

    @Override
    public String getClientName() {
        return clientname;
    }

    @Override
    public Date getLastUpdate() {
        return lastUpdate;
    }

    @Override
    public Date getLastAccess() {
        return lastAccess;
    }

    @Override
    public String getOwner() {
        return owner;
    }

    @Override
    public String getDescription() {
        return description;
    }

    @Override
    public Map<ClientOption, Boolean> getClientOptions() {
        return options;
    }

    @Override
    public SubmitOption getSubmitOption() {
        return submitOption;
    }

    @Override
    public LineEnding getLineEnding() {
        return lineEnding;
    }

    @Override
    public ClientType getClientType() {
        return clientType;
    }

    @Override
    public List<String> getRoots() {
        return roots;
    }

    @Override
    public String getHost() {
        return host;
    }

    @Override
    public String getServerId() {
        return serverId;
    }

    @Override
    public String getStream() {
        return stream;
    }

    @Override
    public int getStreamAtChange() {
        return streamAtChange;
    }

    private static SubmitOption convertSubmitOptions(IClientSummary.IClientSubmitOptions submitOptions) {
        if (submitOptions == null) {
            return SubmitOption.SUBMIT_UNCHANGED;
        }
        if (submitOptions.isLeaveunchangedReopen()) {
            return SubmitOption.LEAVE_UNCHANGED_REOPEN;
        }
        if (submitOptions.isLeaveunchanged()) {
            return SubmitOption.LEAVE_UNCHANGED;
        }
        if (submitOptions.isRevertunchangedReopen()) {
            return SubmitOption.REVERT_UNCHANGED_REOPEN;
        }
        if (submitOptions.isRevertunchanged()) {
            return SubmitOption.REVERT_UNCHANGED;
        }
        if (submitOptions.isSubmitunchangedReopen()) {
            return SubmitOption.SUBMIT_UNCHANGED_REOPEN;
        }
        if (submitOptions.isSubmitunchanged()) {
            return SubmitOption.SUBMIT_UNCHANGED;
        }
        return SubmitOption.SUBMIT_UNCHANGED;
    }

    private static LineEnding convertLineEnding(IClientSummary.ClientLineEnd lineEnd) {
        if (lineEnd != null) {
            switch (lineEnd) {
                case LOCAL:
                    return LineEnding.LOCAL;
                case UNIX:
                    return LineEnding.UNIX;
                case MAC:
                    return LineEnding.MAC;
                case WIN:
                    return LineEnding.WIN;
                case SHARE:
                    return LineEnding.SHARE;
            }
        }
        return LineEnding.LOCAL;
    }

    private static ClientType convertClientType(String type) {
        if (type != null && type.toLowerCase().contains("read")) {
            return ClientType.READONLY;
        }
        return ClientType.WRITABLE;
    }

    private static Map<ClientOption, Boolean> convertOptions(IClientSummary.IClientOptions options) {
        Map<ClientOption, Boolean> ret = new HashMap<>();
        ret.put(ClientOption.ALLWRITE, options.isAllWrite());
        ret.put(ClientOption.CLOBBER, options.isClobber());
        ret.put(ClientOption.COMPRESS, options.isCompress());
        ret.put(ClientOption.LOCKED, options.isLocked());
        ret.put(ClientOption.MODTIME, options.isModtime());
        ret.put(ClientOption.RMDIR, options.isRmdir());
        return Collections.unmodifiableMap(ret);
    }

    private static List<String> convertRoots(String root, List<String> alternateRoots) {
        List<String> ret = new ArrayList<>(alternateRoots.size() + 1);
        ret.add(root);
        for (String alternateRoot : alternateRoots) {
            if (alternateRoot != null) {
                ret.add(alternateRoot);
            }
        }
        return Collections.unmodifiableList(ret);
    }
}


text:
package org.apache.harmony.jndi.tests.javax.naming.ldap;

import javax.naming.event.NamingExceptionEvent;
import javax.naming.ldap.UnsolicitedNotificationEvent;
import javax.naming.ldap.UnsolicitedNotificationListener;

public class MockUnsolicitedNotificationListener implements
		UnsolicitedNotificationListener {

	/*
	 * (non-Javadoc)
	 *
	 * @see javax.naming.ldap.UnsolicitedNotificationListener#notificationReceived(javax.naming.ldap.UnsolicitedNotificationEvent)
	 */
	public void notificationReceived(UnsolicitedNotificationEvent e) {

	}

	/*
	 * (non-Javadoc)
	 *
	 * @see javax.naming.event.NamingListener#namingExceptionThrown(javax.naming.event.NamingExceptionEvent)
	 */
	public void namingExceptionThrown(NamingExceptionEvent namingexceptionevent) {

	}

}


text:
require 'chef/resource/package'

class Chef
  class Resource
    class PacmanPackage < Chef::Resource::Package

      def initialize(name, collection=nil, node=nil)
        super(name, collection, node)
        @resource_name = :pacman_package
        @provider = Chef::Provider::Package::Pacman
      end

    end
  end
end