text:
import React from 'react';
import { mock } from 'angular';
import { mount } from 'enzyme';

import { AuthenticationService } from 'core/authentication';
import { REACT_MODULE } from 'core/reactShims';
import {
  IPermissions,
  IPermissionsConfigurerProps,
  PermissionsConfigurer,
} from 'core/application/modal/PermissionsConfigurer';

describe('PermissionsConfigurer', () => {
  const createComponent = (props: IPermissionsConfigurerProps) => {
    return mount(<PermissionsConfigurer {...props} />).instance() as PermissionsConfigurer;
  };

  beforeEach(mock.module(REACT_MODULE));

  beforeEach(
    mock.inject(() => {
      spyOn(AuthenticationService, 'getAuthenticatedUser').and.callFake(() => {
        return { roles: ['groupA', 'groupB', 'groupC'] };
      });
    }),
  );

  it('converts legacy requiredGroupMembership list to permissions object', () => {
    let permissions: IPermissions;
    createComponent({
      permissions: null,
      requiredGroupMembership: ['groupA', 'groupB'],
      onPermissionsChange: (p: IPermissions) => {
        permissions = p;
      },
    });

    expect(permissions).toEqual({
      READ: ['groupA', 'groupB'],
      EXECUTE: ['groupA', 'groupB'],
      WRITE: ['groupA', 'groupB'],
    });
  });

  it(`populates the 'roleOptions' list with a user's roles minus the roles already used in the permissions object`, () => {
    const component = createComponent({
      permissions: { READ: ['groupA', 'groupB'], EXECUTE: ['groupB'], WRITE: ['groupB'] },
      requiredGroupMembership: null,
      onPermissionsChange: () => null,
    });

    expect(component.state.roleOptions.map((option) => option.value)).toEqual(['groupC']);
  });
});

redpajama_set_name: RedPajamaGithub


text:
package ca.uhn.fhir.rest.client;

import java.util.List;
import java.util.Map;

import org.hl7.fhir.instance.model.api.IBaseResource;

import ca.uhn.fhir.model.api.Bundle;
import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.base.resource.BaseConformance;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.model.primitive.UriDt;
import ca.uhn.fhir.rest.api.MethodOutcome;
import ca.uhn.fhir.rest.client.api.IRestfulClient;
import ca.uhn.fhir.rest.client.exceptions.FhirClientConnectionException;
import ca.uhn.fhir.rest.client.exceptions.FhirClientInappropriateForServerException;
import ca.uhn.fhir.rest.gclient.ICreate;
import ca.uhn.fhir.rest.gclient.IDelete;
import ca.uhn.fhir.rest.gclient.IFetchConformanceUntyped;
import ca.uhn.fhir.rest.gclient.IGetPage;
import ca.uhn.fhir.rest.gclient.IGetTags;
import ca.uhn.fhir.rest.gclient.IHistory;
import ca.uhn.fhir.rest.gclient.IMeta;
import ca.uhn.fhir.rest.gclient.IOperation;
import ca.uhn.fhir.rest.gclient.IRead;
import ca.uhn.fhir.rest.gclient.ITransaction;
import ca.uhn.fhir.rest.gclient.IUntypedQuery;
import ca.uhn.fhir.rest.gclient.IUpdate;
import ca.uhn.fhir.rest.gclient.IValidate;

public interface IGenericClient extends IRestfulClient {

	/**
	 * Retrieves and returns the server conformance statement
	 *
	 * @deprecated Use {@link #fetchConformance()} instead
	 */
	@Deprecated
	BaseConformance conformance();

	/**
	 * Retrieves the server's conformance statement
	 */
	IFetchConformanceUntyped fetchConformance();

	/**
	 * Fluent method for the "create" operation, which creates a new resource instance on the server
	 */
	ICreate create();

	/**
	 * Fluent method for the "meta" operations, which can be used to get, add and remove tags and other
	 * Meta elements from a resource or across the server.
	 *
	 * @since 1.1
	 */
	IMeta meta();

	/**
	 * Implementation of the "type create" method.
	 *
	 * @param theResource
	 *            The resource to create
	 * @return An outcome
	 * @deprecated Use {@link #create() fluent method instead}. This method will be removed.
	 *
	 */
	@Deprecated
	MethodOutcome create(IResource theResource);

	/**
	 * Fluent method for the "delete" operation, which performs a logical delete on a server resource
	 */
	IDelete delete();

	/**
	 * Implementation of the "delete instance" method.
	 *
	 * @param theType
	 *            The type of resource to delete
	 * @param theId
	 *            the ID of the resource to delete
	 * @return An outcome
	 * @deprecated Use {@link #delete()} instead
	 */
	@Deprecated
	MethodOutcome delete(Class<? extends IResource> theType, IdDt theId);

	/**
	 * Implementation of the "delete instance" method.
	 *
	 * @param theType
	 *            The type of resource to delete
	 * @param theId
	 *            the ID of the resource to delete
	 * @return An outcome
	 * @deprecated Use {@link #delete()} instead
	 */
	@Deprecated
	MethodOutcome delete(Class<? extends IResource> theType, String theId);

	/**
	 * Force the client to fetch the server's conformance statement and validate that it is appropriate for this client.
	 *
	 * @throws FhirClientConnectionException
	 *             if the conformance statement cannot be read, or if the client
	 * @throws FhirClientInappropriateForServerException
	 *             If the conformance statement indicates that the server is inappropriate for this client (e.g. it implements the wrong version of FHIR)
	 */
	void forceConformanceCheck() throws FhirClientConnectionException;

	/**
	 * Fluent method for the "get tags" operation
	 */
	IGetTags getTags();

	/**
	 * Implementation of the "history" method
	 */
	IHistory history();

	/**
	 * Implementation of the "history instance" method.
	 *
	 * @param theType
	 *            The type of resource to return the history for, or null to search for history across all resources
	 * @param theId
	 *            The ID of the resource to return the history for, or null to search for all resource instances. Note that if this param is not null, theType must also not
	 *            be null
	 * @param theSince
	 *            If not null, request that the server only return resources updated since this time
	 * @param theLimit
	 *            If not null, request that the server return no more than this number of resources. Note that the server may return less even if more are available, but should not return more
	 *            according to the FHIR specification.
	 * @return A bundle containing returned resources
	 * @deprecated As of 0.9, use the fluent {@link #history()} method instead
	 */
	@Deprecated
	<T extends IResource> Bundle history(Class<T> theType, IdDt theId, DateTimeDt theSince, Integer theLimit);

	/**
	 * Implementation of the "history instance" method.
	 *
	 * @param theType
	 *            The type of resource to return the history for, or null to search for history across all resources
	 * @param theId
	 *            The ID of the resource to return the history for, or null to search for all resource instances. Note that if this param is not null, theType must also not
	 *            be null
	 * @param theSince
	 *            If not null, request that the server only return resources updated since this time
	 * @param theLimit
	 *            If not null, request that the server return no more than this number of resources. Note that the server may return less even if more are available, but should not return more
	 *            according to the FHIR specification.
	 * @return A bundle containing returned resources
	 * @deprecated As of 0.9, use the fluent {@link #history()} method instead
	 */
	@Deprecated
	<T extends IResource> Bundle history(Class<T> theType, String theId, DateTimeDt theSince, Integer theLimit);

	// /**
	// * Implementation of the "instance read" method. This method will only ever do a "read" for the latest version of a
	// * given resource instance, even if the ID passed in contains a version. If you wish to request a specific version
	// * of a resource (the "vread" operation), use {@link #vread(Class, IdDt)} instead.
	// *

	// * Note that if an absolute resource ID is passed in (i.e. a URL containing a protocol and host as well as the
	// * resource type and ID) the server base for the client will be ignored, and the URL passed in will be queried.
	// *

	// *
	// * @param theType
	// * The type of resource to load
	// * @param theId
	// * The ID to load, including the resource ID and the resource version ID. Valid values include
	// * "Patient/123/_history/222", or "http://example.com/fhir/Patient/123/_history/222"
	// * @return The resource
	// */
	// <T extends IBaseResource> T read(Class<T> theType, IdDt theId);

	/**
	 * Loads the previous/next bundle of resources from a paged set, using the link specified in the "link type=next" tag within the atom bundle.
	 *
	 * @see Bundle#getLinkNext()
	 */
	IGetPage loadPage();

	/**
	 * Implementation of the FHIR "extended operations" action
	 */
	IOperation operation();

	/**
	 * Fluent method for "read" and "vread" methods.
	 */
	IRead read();

	/**
	 * Implementation of the "instance read" method.
	 *
	 * @param theType
	 *            The type of resource to load
	 * @param theId
	 *            The ID to load
	 * @return The resource
	 */
	<T extends IBaseResource> T read(Class<T> theType, String theId);

	/**
	 * Perform the "read" operation (retrieve the latest version of a resource instance by ID) using an absolute URL.
	 *
	 * @param theType
	 *            The resource type that is being retrieved
	 * @param theUrl
	 *            The absolute URL, e.g. "http://example.com/fhir/Patient/123"
	 * @return The returned resource from the server
	 */
	<T extends IBaseResource> T read(Class<T> theType, UriDt theUrl);

	/**
	 * Perform the "read" operation (retrieve the latest version of a resource instance by ID) using an absolute URL.
	 *
	 * @param theUrl
	 *            The absolute URL, e.g. "http://example.com/fhir/Patient/123"
	 * @return The returned resource from the server
	 */
	IBaseResource read(UriDt theUrl);

	/**
	 * Register a new interceptor for this client. An interceptor can be used to add additional logging, or add security headers, or pre-process responses, etc.
	 */
	@Override
	void registerInterceptor(IClientInterceptor theInterceptor);

	IUntypedQuery search();

	/**
	 * Implementation of the "instance search" method.
	 *
	 * @param theType
	 *            The type of resource to load
	 * @param theParams
	 */
	<T extends IBaseResource> Bundle search(Class<T> theType, Map<String, List<IQueryParameterType>> theParams);

	/**
	 * Perform the "search" operation using an absolute URL.
	 *
	 * @param theType
	 *            The primary resource type that is being retrieved
	 * @param theUrl
	 *            The absolute URL, e.g. "http://example.com/fhir/Patient/123"
	 * @return The returned bundle from the server
	 */
	<T extends IBaseResource> Bundle search(Class<T> theType, UriDt theUrl);

	Bundle search(UriDt theUrl);

	/**
	 * If set to true, the client will log all requests and all responses. This is probably not a good production setting since it will result in a lot of extra logging, but it can be
	 * useful for troubleshooting.
	 *
	 * @param theLogRequestAndResponse
	 *            Should requests and responses be logged
	 */
	void setLogRequestAndResponse(boolean theLogRequestAndResponse);

	/**
	 * Send a transaction (collection of resources) to the server to be executed as a single unit
	 */
	ITransaction transaction();

	/**
	 * Validate a resource
	 */
	IValidate validate();

	/**
	 * Implementation of the "transaction" method.
	 *
	 * @param theResources
	 *            The resources to create/update in a single transaction
	 * @return A list of resource stubs (these will not be fully populated) containing IDs and other {@link IResource#getResourceMetadata() metadata}
	 * @deprecated Use {@link #transaction()}
	 *
	 */
	@Deprecated
	List<IBaseResource> transaction(List<IBaseResource> theResources);

	/**
	 * Remove an intercaptor that was previously registered using {@link IRestfulClient#registerInterceptor(IClientInterceptor)}
	 */
	@Override
	void unregisterInterceptor(IClientInterceptor theInterceptor);

	/**
	 * Fluent method for the "update" operation, which performs a logical delete on a server resource
	 */
	IUpdate update();

	/**
	 * Implementation of the "instance update" method.
	 *
	 * @param theId
	 *            The ID to update
	 * @param theResource
	 *            The new resource body
	 * @return An outcome containing the results and possibly the new version ID
	 */
	MethodOutcome update(IdDt theId, IResource theResource);

	/**
	 * Implementation of the "instance update" method.
	 *
	 * @param theId
	 *            The ID to update
	 * @param theResource
	 *            The new resource body
	 * @return An outcome containing the results and possibly the new version ID
	 */
	MethodOutcome update(String theId, IResource theResource);

	/**
	 * Implementation of the "type validate" method.
	 *
	 * @param theResource
	 *            The resource to validate
	 * @return An outcome containing any validation issues
	 */
	MethodOutcome validate(IResource theResource);

	/**
	 * Implementation of the "instance vread" method. Note that this method expects theId to contain a resource ID as well as a version ID, and will fail if it does not.
	 *

	 * Note that if an absolute resource ID is passed in (i.e. a URL containing a protocol and host as well as the resource type and ID) the server base for the client will be ignored, and the URL
	 * passed in will be queried.
	 *

	 *
	 * @param theType
	 *            The type of resource to load
	 * @param theId
	 *            The ID to load, including the resource ID and the resource version ID. Valid values include "Patient/123/_history/222", or "http://example.com/fhir/Patient/123/_history/222"
	 * @return The resource
	 */
	<T extends IBaseResource> T vread(Class<T> theType, IdDt theId);

	/**
	 * Implementation of the "instance vread" method.
	 *
	 * @param theType
	 *            The type of resource to load
	 * @param theId
	 *            The ID to load
	 * @param theVersionId
	 *            The version ID
	 * @return The resource
	 * @deprecated Deprecated in 0.7 - IdDt can contain an ID and a version, so this class doesn't make a lot of sense
	 */
	@Deprecated
	<T extends IResource> T vread(Class<T> theType, IdDt theId, IdDt theVersionId);

	/**
	 * Implementation of the "instance vread" method.
	 *
	 * @param theType
	 *            The type of resource to load
	 * @param theId
	 *            The ID to load
	 * @param theVersionId
	 *            The version ID
	 * @return The resource
	 */
	<T extends IBaseResource> T vread(Class<T> theType, String theId, String theVersionId);

}


text:
"""
Need to hack to make work for internal modules and reload subs properly

Regen Command:
    cd /home/joncrall/code/utool/utool/_internal
    makeinit.py -x win32_send_keys
"""
# autogenerated __init__.py for: '/home/joncrall/code/utool/utool/_internal'


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

namespace Cake\Test\TestCase\Error;

use Cake\Controller\Controller;
use Cake\Core\Configure;
use Cake\Error\Debug\ConsoleFormatter;
use Cake\Error\Debug\HtmlFormatter;
use Cake\Error\Debug\NodeInterface;
use Cake\Error\Debug\ScalarNode;
use Cake\Error\Debug\SpecialNode;
use Cake\Error\Debug\TextFormatter;
use Cake\Error\Debugger;
use Cake\Form\Form;
use Cake\Log\Log;
use Cake\TestSuite\TestCase;
use InvalidArgumentException;
use MyClass;
use RuntimeException;
use SplFixedArray;
use stdClass;
use TestApp\Error\TestDebugger;
use TestApp\Error\Thing\DebuggableThing;
use TestApp\Error\Thing\SecurityThing;
use TestApp\Utility\ThrowsDebugInfo;

/**
 * DebuggerTest class
 *
 * !!! Be careful with changing code below as it may
 * !!! change line numbers which are used in the tests
 */
class DebuggerTest extends TestCase
{
    /**
     * @var bool
     */
    protected $restoreError = false;

    /**
     * setUp method
     */
    public function setUp(): void
    {
        parent::setUp();
        Configure::write('debug', true);
        Log::drop('stderr');
        Log::drop('stdout');
        Debugger::configInstance('exportFormatter', TextFormatter::class);
    }

    /**
     * tearDown method
     */
    public function tearDown(): void
    {
        parent::tearDown();
        if ($this->restoreError) {
            restore_error_handler();
        }
    }

    /**
     * testDocRef method
     */
    public function testDocRef(): void
    {
        ini_set('docref_root', '');
        $this->assertEquals(ini_get('docref_root'), '');
        // Force a new instance.
        Debugger::getInstance(TestDebugger::class);
        Debugger::getInstance(Debugger::class);

        $this->assertEquals(ini_get('docref_root'), 'https://secure.php.net/');
    }

    /**
     * test Excerpt writing
     */
    public function testExcerpt(): void
    {
        $result = Debugger::excerpt(__FILE__, __LINE__ - 1, 2);
        $this->assertIsArray($result);
        $this->assertCount(5, $result);
        $this->assertMatchesRegularExpression('/function(.+)testExcerpt/', $result[1]);

        $result = Debugger::excerpt(__FILE__, 2, 2);
        $this->assertIsArray($result);
        $this->assertCount(4, $result);

        $this->skipIf(defined('HHVM_VERSION'), 'HHVM does not highlight php code');
        $pattern = '/.*?.*?<\?php/';
        $this->assertMatchesRegularExpression($pattern, $result[0]);

        $result = Debugger::excerpt(__FILE__, 11, 2);
        $this->assertCount(5, $result);

        $pattern = '/.*?<\/span>/';
        $this->assertMatchesRegularExpression($pattern, $result[0]);

        $return = Debugger::excerpt('[internal]', 2, 2);
        $this->assertEmpty($return);

        $result = Debugger::excerpt(__FILE__, __LINE__, 5);
        $this->assertCount(11, $result);
        $this->assertStringContainsString('Debugger', $result[5]);
        $this->assertStringContainsString('excerpt', $result[5]);
        $this->assertStringContainsString('__FILE__', $result[5]);

        $result = Debugger::excerpt(__FILE__, 1, 2);
        $this->assertCount(3, $result);

        $lastLine = count(explode("\n", file_get_contents(__FILE__)));
        $result = Debugger::excerpt(__FILE__, $lastLine, 2);
        $this->assertCount(3, $result);
    }

    /**
     * Test that setOutputFormat works.
     */
    public function testSetOutputFormat(): void
    {
        Debugger::setOutputFormat('html');
        $this->assertSame('html', Debugger::getOutputFormat());
    }

    /**
     * Test that getOutputFormat/setOutputFormat works.
     */
    public function testGetSetOutputFormat(): void
    {
        Debugger::setOutputFormat('html');
        $this->assertSame('html', Debugger::getOutputFormat());
    }

    /**
     * Test that choosing a nonexistent format causes an exception
     */
    public function testSetOutputAsException(): void
    {
        $this->expectException(InvalidArgumentException::class);
        Debugger::setOutputFormat('Invalid junk');
    }

    /**
     * Test outputError with description encoding
     */
    public function testOutputErrorDescriptionEncoding(): void
    {
        Debugger::setOutputFormat('html');

        ob_start();
        $debugger = Debugger::getInstance();
        $debugger->outputError([
            'error' => 'Notice',
            'code' => E_NOTICE,
            'level' => E_NOTICE,
            'description' => 'Undefined index ',
            'file' => __FILE__,
            'line' => __LINE__,
        ]);
        $result = ob_get_clean();
        $this->assertStringContainsString('<script>', $result);
        $this->assertStringNotContainsString('\nmore");
        $this->assertSame(
            "Some code to <script>alert("test")</script>
\nmore",
            $output
        );
    }

    /**
     * test adding invalid editor
     */
    public function testAddEditorInvalid(): void
    {
        $this->expectException(RuntimeException::class);
        Debugger::addEditor('nope', ['invalid']);
    }

    /**
     * test choosing an unknown editor
     */
    public function testSetEditorInvalid(): void
    {
        $this->expectException(RuntimeException::class);
        Debugger::setEditor('nope');
    }

    /**
     * test choosing a default editor
     */
    public function testSetEditorPredefined(): void
    {
        Debugger::setEditor('phpstorm');
        Debugger::setEditor('macvim');
        Debugger::setEditor('sublime');
        Debugger::setEditor('emacs');
        // No exceptions raised.
        $this->assertTrue(true);
    }

    /**
     * Test configure based editor setup
     */
    public function testConfigureEditor(): void
    {
        Configure::write('Debugger.editor', 'emacs');
        Debugger::getInstance(TestDebugger::class);
        Debugger::getInstance(Debugger::class);

        $result = Debugger::editorUrl('file.php', 123);
        $this->assertStringContainsString('emacs://', $result);
    }

    /**
     * test using a valid editor.
     */
    public function testEditorUrlValid(): void
    {
        Debugger::addEditor('open', 'open://{file}:{line}');
        Debugger::setEditor('open');
        $this->assertSame('open://test.php:123', Debugger::editorUrl('test.php', 123));
    }

    /**
     * test using a valid editor.
     */
    public function testEditorUrlClosure(): void
    {
        Debugger::addEditor('open', function (string $file, int $line) {
            return "${file}/${line}";
        });
        Debugger::setEditor('open');
        $this->assertSame('test.php/123', Debugger::editorUrl('test.php', 123));
    }
}


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

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>LocationInfoTest xref</title>
<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" />

View Javadoc

1
17  package org.apache.log4j.spi;
18
19  import junit.framework.TestCase;
20
21  /***
22   * Tests for LocationInfo.
23   */
24  public class LocationInfoTest extends TestCase {
25
26      /***
27       * Tests four parameter constructor.
28       */
29      public void testFourParamConstructor() {
30          final String className = LocationInfoTest.class.getName();
31          final String methodName = "testFourParamConstructor";
32          final String fileName = "LocationInfoTest.java";
33          final String lineNumber = "41";
34          LocationInfo li = new LocationInfo(fileName,
35                  className, methodName, lineNumber);
36          assertEquals(className, li.getClassName());
37          assertEquals(methodName, li.getMethodName());
38          assertEquals(fileName, li.getFileName());
39          assertEquals(lineNumber, li.getLineNumber());
40          assertEquals(className + "."  + methodName
41                  + "(" + fileName + ":" + lineNumber + ")",
42                  li.fullInfo);
43      }
44
45  }

This page was automatically generated by Maven


text:
using System.Xml.Serialization;

namespace GeckoUBL.Ubl21.Udt
{
	[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.33440")]
	[System.SerializableAttribute]
	[System.Diagnostics.DebuggerStepThroughAttribute]
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	[XmlType(Namespace = "urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2")]
	public class PictureType : BinaryObjectType
	{
	}
}


text:
package gov.hhs.fha.nhinc.hiem._20.unsubscribe.passthru;

import javax.xml.ws.WebServiceContext;

import org.apache.log4j.Logger;
import org.oasis_open.docs.wsn.b_2.Unsubscribe;
import org.oasis_open.docs.wsn.b_2.UnsubscribeResponse;
import org.w3c.dom.Element;

import gov.hhs.fha.nhinc.common.nhinccommon.AssertionType;
import gov.hhs.fha.nhinc.common.nhinccommon.NhinTargetSystemType;
import gov.hhs.fha.nhinc.cxf.extraction.SAML2AssertionExtractor;
import gov.hhs.fha.nhinc.hiem.consumerreference.SoapHeaderHelper;
import gov.hhs.fha.nhinc.hiem.consumerreference.SoapMessageElements;
import gov.hhs.fha.nhinc.nhinclib.NullChecker;
import gov.hhs.fha.nhinc.nhincproxysubscriptionmanagement.UnableToDestroySubscriptionFault;
import gov.hhs.fha.nhinc.unsubscribe.nhin.proxy.NhinHiemUnsubscribeProxy;
import gov.hhs.fha.nhinc.unsubscribe.nhin.proxy.NhinHiemUnsubscribeProxyObjectFactory;

public class ProxyHiemUnsubscribeImpl {

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

    public UnsubscribeResponse unsubscribe(
            gov.hhs.fha.nhinc.common.nhinccommonproxy.UnsubscribeRequestType unsubscribeRequest,
            WebServiceContext context) throws Exception {
        UnsubscribeResponse response = null;
        LOG.debug("Entering ProxyHiemUnsubscribeImpl.unsubscribe...");

        Unsubscribe unsubscribe = unsubscribeRequest.getUnsubscribe();
        NhinTargetSystemType target = unsubscribeRequest.getNhinTargetSystem();
        AssertionType assertion = unsubscribeRequest.getAssertion();

        SoapMessageElements soapHeaderElements = new SoapHeaderHelper().getSoapHeaderElements(context);

        NhinHiemUnsubscribeProxyObjectFactory factory = new NhinHiemUnsubscribeProxyObjectFactory();
        NhinHiemUnsubscribeProxy proxy = factory.getNhinHiemUnsubscribeProxy();
        try {
            response = proxy
                    .unsubscribe(unsubscribe, soapHeaderElements, assertion, target, getSubscriptionId(context));
        } catch (UnableToDestroySubscriptionFault ex) {
            LOG.error("error occurred", ex);
            response = new UnsubscribeResponse();
            response.getAny().add(ex);
        }
        LOG.debug("Exiting ProxyHiemUnsubscribeImpl.unsubscribe...");
        return response;
    }

    public UnsubscribeResponse unsubscribe(
            gov.hhs.fha.nhinc.common.nhinccommonproxy.UnsubscribeRequestSecuredType unsubscribeRequest,
            WebServiceContext context) throws UnableToDestroySubscriptionFault {
        UnsubscribeResponse response = null;
        LOG.debug("Entering ProxyHiemUnsubscribeImpl.unsubscribe...");
        Unsubscribe unsubscribe = unsubscribeRequest.getUnsubscribe();
        NhinTargetSystemType target = unsubscribeRequest.getNhinTargetSystem();
        AssertionType assertion = SAML2AssertionExtractor.getInstance().extractSamlAssertion(context);

        SoapMessageElements soapHeaderElements = new SoapHeaderHelper().getSoapHeaderElements(context);

        NhinHiemUnsubscribeProxyObjectFactory factory = new NhinHiemUnsubscribeProxyObjectFactory();
        NhinHiemUnsubscribeProxy proxy = factory.getNhinHiemUnsubscribeProxy();
        try {
            response = proxy
                    .unsubscribe(unsubscribe, soapHeaderElements, assertion, target, getSubscriptionId(context));
        } catch (UnableToDestroySubscriptionFault e) {
            LOG.error("error occurred", e);
            response = new UnsubscribeResponse();
            response.getAny().add(e);
        } catch (Exception e) {
            LOG.error("exception occured: " + e.getMessage());
            response.getAny().add(e);
        }
        LOG.debug("Exiting ProxyHiemUnsubscribeImpl.unsubscribe...");
        return response;
    }

    private String getSubscriptionId(WebServiceContext context) {
        SoapMessageElements soapHeaderElements = new SoapHeaderHelper().getSoapHeaderElements(context);

        String subscriptionId = null;
        for (Element soapHeaderElement : soapHeaderElements.getElements()) {
            String nodeName = soapHeaderElement.getLocalName();
            if (nodeName.equals("SubscriptionId")) {
                String nodeValue = soapHeaderElement.getNodeValue();
                if (NullChecker.isNullish(nodeValue) && soapHeaderElement.getFirstChild() != null) {
                    nodeValue = soapHeaderElement.getFirstChild().getNodeValue();
                }
                return nodeValue;
            }
        }

        return subscriptionId;
    }

}


text:
local mod	= DBM:NewMod(1211, "DBM-Draenor", nil, 557)
local L		= mod:GetLocalizedStrings()

mod:SetRevision(("$Revision: 14030 $"):sub(12, -3))
mod:SetCreatureID(81535)
mod:SetEncounterID(1770)
mod:SetReCombatTime(20)
mod:SetZone()
mod:SetMinSyncRevision(11969)

mod:RegisterCombat("combat")--no yell

mod:RegisterEventsInCombat(
	"SPELL_CAST_START 175973 175979",
	"SPELL_CAST_SUCCESS 176013",
	"SPELL_AURA_APPLIED 176004",
	"SPELL_PERIODIC_DAMAGE 176037",
	"SPELL_ABSORBED 176037"
)

--Oh look, someone designed a world boss that's a copy and paste of Yalnu with tweaks.
--TODO, do dps siwtch to Untamed Mand, or just tanks.
local warnSavageVines				= mod:NewTargetAnnounce(176004, 2)

local specWarnColossalBlow			= mod:NewSpecialWarningDodge(175973, nil, nil, nil, 2, 2)
local specWarnGenesis				= mod:NewSpecialWarningSpell(175979, nil, nil, nil, nil, 2)--Everyone. "Switch" is closest generic to "run around stomping flowers". Might need custom message
local specWarnSavageVines			= mod:NewSpecialWarningYou(176004)
local yellSavageVines				= mod:NewYell(176004)
local specWarnSavageVinesNear		= mod:NewSpecialWarningClose(176004)
local specWarnGrowUntamedMandragora	= mod:NewSpecialWarningSwitch(176013, "-Healer", nil, nil, nil, 2)
local specWarnNoxiousSpit			= mod:NewSpecialWarningMove(176037)

--local timerColossalBlowCD			= mod:NewNextTimer(60, 175973, nil, nil, nil, 3)
local timerGenesis					= mod:NewCastTimer(14, 169613)
local timerGenesisCD				= mod:NewCDTimer(45, 169613, nil, nil, nil, 5)--45-60 variation
local timerGrowUntamedMandragoraCD	= mod:NewCDTimer(30, 176013, nil, nil, nil, 1)

local voiceColossalBlow				= mod:NewVoice(175973)
local voiceMandragora				= mod:NewVoice(176013, "Dps")
local voiceGenesis					= mod:NewVoice(175979)

--mod:AddReadyCheckOption(37462, false)
--mod:AddRangeFrameOption(8, 175979)

local UnitDebuff = UnitDebuff
local debuffName = GetSpellInfo(176004)
local debuffFilter
do
	debuffFilter = function(uId)
		return UnitDebuff(uId, debuffName)
	end
end

function mod:OnCombatStart(delay, yellTriggered)
--	if yellTriggered then
		--Vines--7
		--Colossal Bow--14
		--timerGrowUntamedMandragoraCD:Start(18-delay)
		--timerGenesisCD:Start(20-delay)
--	end
end

function mod:OnCombatEnd()
	if self.Options.RangeFrame then
		DBM.RangeCheck:Hide()
	end
end

function mod:SPELL_CAST_START(args)
	local spellId = args.spellId
	if spellId == 175973 then
		specWarnColossalBlow:Show()
		--timerColossalBlow:Start()
		voiceColossalBlow:Play("shockwave")
	elseif spellId == 175979 then
		specWarnGenesis:Show()
		timerGenesis:Start()
		timerGenesisCD:Start()
		voiceGenesis:Play("169613")
	end
end

function mod:SPELL_CAST_SUCCESS(args)
	local spellId = args.spellId
	if spellId == 176013 then
		specWarnGrowUntamedMandragora:Show()
		timerGrowUntamedMandragoraCD:Start()
		voiceMandragora:Play("killmob")
	end
end

function mod:SPELL_AURA_APPLIED(args)
	local spellId = args.spellId
	if spellId == 176004 then
		local targetName = args.destName
		warnSavageVines:CombinedShow(0.5, targetName)
		if args:IsPlayer() then
			specWarnSavageVines:Show()
			yellSavageVines:Yell()
		else
			if self:CheckNearby(8, targetName) then
				specWarnSavageVinesNear:Show(targetName)
			end
		end
		if self.Options.RangeFrame then
			if UnitDebuff("player", debuffName) then
				DBM.RangeCheck:Show(8, nil)
			else
				DBM.RangeCheck:Show(8, debuffFilter, nil, nil, nil, 8)
			end
		end
	end
end

function mod:SPELL_PERIODIC_DAMAGE(_, _, _, _, destGUID)-- only listen personal Noxious Spit event
	if destGUID ~= UnitGUID("player") then return end
	if self:AntiSpam(2, 1) then
		specWarnNoxiousSpit:Show()
	end
end
mod.SPELL_ABSORBED = mod.SPELL_PERIODIC_DAMAGE


text:
/*
 * Qc API
 *
 * Qc API
 *
 * API version: 3.0.0
 * Contact: cloudsupport@telestream.net
 * Generated by: OpenAPI Generator (https://openapi-generator.tech)
 */

package qc

type AudioConfig struct {
	TrackSelectTest TrackSelectTest `json:"track_select_test,omitempty"`
	AudioCodecTest AudioCodecTest `json:"audio_codec_test,omitempty"`
	AudioChannelPositionsTest AudioChannelPositionsTest `json:"audio_channel_positions_test,omitempty"`
	AudioBitDepthTest AudioBitDepthTest `json:"audio_bit_depth_test,omitempty"`
	AudioSampleRateTest AudioSampleRateTest `json:"audio_sample_rate_test,omitempty"`
	AudioBitrateTest AudioBitrateTest `json:"audio_bitrate_test,omitempty"`
	AudioChannelsTest AudioChannelsTest `json:"audio_channels_test,omitempty"`
	AudioLengthTest AudioLengthTest `json:"audio_length_test,omitempty"`
	AudioFrequencyTest AudioFrequencyTest `json:"audio_frequency_test,omitempty"`
	DigitalSilenceWholeTrackTest DigitalSilenceWholeTrackTest `json:"digital_silence_whole_track_test,omitempty"`
	DigitalSilenceAtStartTest DigitalSilenceAtStartEndTest `json:"digital_silence_at_start_test,omitempty"`
	DigitalSilenceAtEndTest DigitalSilenceAtStartEndTest `json:"digital_silence_at_end_test,omitempty"`
	AudioClippingTest AudioClippingTest `json:"audio_clipping_test,omitempty"`
	AudioTransientTest AudioTransientTest `json:"audio_transient_test,omitempty"`
	AudioDialnormTest AudioDialnormTest `json:"audio_dialnorm_test,omitempty"`
	AudioLayoutTest LayoutTest `json:"audio_layout_test,omitempty"`
	AudioPhaseTest AudioPhaseTest `json:"audio_phase_test,omitempty"`
	AudioMinLevelDurationTest AudioMinLevelDurationTest `json:"audio_min_level_duration_test,omitempty"`
	AudioPeakLevelTest AudioPeakLevelTest `json:"audio_peak_level_test,omitempty"`
	AudioLoudnessItest AudioLoudnessItest `json:"audio_loudness_itest,omitempty"`
	AudioLoudnessStest AudioLoudnessStest `json:"audio_loudness_stest,omitempty"`
	AudioLoudnessMtest AudioLoudnessMtest `json:"audio_loudness_mtest,omitempty"`
	AudioLoudnessRangeTest AudioLoudnessRangeTest `json:"audio_loudness_range_test,omitempty"`
	AudioPpmLevelTest AudioPpmLevelTest `json:"audio_ppm_level_test,omitempty"`
	NielsenWatermarkDetectionTest NielsenWatermarkDetectionTest `json:"nielsen_watermark_detection_test,omitempty"`
}


text:
package org.elasticsearch.xpack.analytics.rate;

import org.elasticsearch.common.Rounding;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.script.Script;
import org.elasticsearch.search.SearchModule;
import org.elasticsearch.search.aggregations.AggregatorFactories;
import org.elasticsearch.search.aggregations.BaseAggregationBuilder;
import org.elasticsearch.test.AbstractSerializingTestCase;
import org.elasticsearch.xcontent.NamedXContentRegistry;
import org.elasticsearch.xcontent.ParseField;
import org.elasticsearch.xcontent.XContentParser;
import org.junit.Before;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import static org.hamcrest.Matchers.hasSize;

public class RateAggregationBuilderTests extends AbstractSerializingTestCase<RateAggregationBuilder> {
    String aggregationName;

    @Before
    public void setupName() {
        aggregationName = randomAlphaOfLength(10);
    }

    @Override
    protected RateAggregationBuilder doParseInstance(XContentParser parser) throws IOException {
        assertSame(XContentParser.Token.START_OBJECT, parser.nextToken());
        AggregatorFactories.Builder parsed = AggregatorFactories.parseAggregators(parser);
        assertThat(parsed.getAggregatorFactories(), hasSize(1));
        assertThat(parsed.getPipelineAggregatorFactories(), hasSize(0));
        RateAggregationBuilder agg = (RateAggregationBuilder) parsed.getAggregatorFactories().iterator().next();
        assertNull(parser.nextToken());
        assertNotNull(agg);
        return agg;
    }

    @Override
    protected RateAggregationBuilder createTestInstance() {
        RateAggregationBuilder aggregationBuilder = new RateAggregationBuilder(aggregationName);
        if (randomBoolean()) {
            if (randomBoolean()) {
                aggregationBuilder.field(randomAlphaOfLength(10));
            } else {
                aggregationBuilder.script(new Script(randomAlphaOfLength(10)));
            }
            if (randomBoolean()) {
                aggregationBuilder.rateMode(randomFrom(RateMode.values()));
            }
        }
        if (randomBoolean()) {
            aggregationBuilder.rateUnit(randomFrom(Rounding.DateTimeUnit.values()));
        }
        return aggregationBuilder;
    }

    @Override
    protected Writeable.Reader<RateAggregationBuilder> instanceReader() {
        return RateAggregationBuilder::new;
    }

    @Override
    protected NamedWriteableRegistry getNamedWriteableRegistry() {
        return new NamedWriteableRegistry(new SearchModule(Settings.EMPTY, Collections.emptyList()).getNamedWriteables());
    }

    @Override
    protected NamedXContentRegistry xContentRegistry() {
        List<NamedXContentRegistry.Entry> namedXContent = new ArrayList<>();
        namedXContent.add(
            new NamedXContentRegistry.Entry(
                BaseAggregationBuilder.class,
                new ParseField(RateAggregationBuilder.NAME),
                (p, n) -> RateAggregationBuilder.PARSER.apply(p, (String) n)
            )
        );
        namedXContent.addAll(new SearchModule(Settings.EMPTY, Collections.emptyList()).getNamedXContents());
        return new NamedXContentRegistry(namedXContent);
    }
}


text:
class PagesController < ApplicationController
  def redux_container
    @counter_initial_value = 17
  end

  def redux_router
    @counter_initial_value = 91
  end

  def server_side_render
    @counter_initial_value = 33
  end
end


text:
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
/// <reference lib="esnext.asynciterable" />
/** Class containing ExtendedDatabaseBlobAuditingPolicies operations. */
export class ExtendedDatabaseBlobAuditingPoliciesImpl {
    /**
     * Initialize a new instance of the class ExtendedDatabaseBlobAuditingPolicies class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Lists extended auditing settings of a database.
     * @param resourceGroupName The name of the resource group that contains the resource. You can obtain
     *                          this value from the Azure Resource Manager API or the portal.
     * @param serverName The name of the server.
     * @param databaseName The name of the database.
     * @param options The options parameters.
     */
    listByDatabase(resourceGroupName, serverName, databaseName, options) {
        const iter = this.listByDatabasePagingAll(resourceGroupName, serverName, databaseName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByDatabasePagingPage(resourceGroupName, serverName, databaseName, options);
            }
        };
    }
    listByDatabasePagingPage(resourceGroupName, serverName, databaseName, options) {
        return __asyncGenerator(this, arguments, function* listByDatabasePagingPage_1() {
            let result = yield __await(this._listByDatabase(resourceGroupName, serverName, databaseName, options));
            yield yield __await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield __await(this._listByDatabaseNext(resourceGroupName, serverName, databaseName, continuationToken, options));
                continuationToken = result.nextLink;
                yield yield __await(result.value || []);
            }
        });
    }
    listByDatabasePagingAll(resourceGroupName, serverName, databaseName, options) {
        return __asyncGenerator(this, arguments, function* listByDatabasePagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = __asyncValues(this.listByDatabasePagingPage(resourceGroupName, serverName, databaseName, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield __await(yield* __asyncDelegator(__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Gets an extended database's blob auditing policy.
     * @param resourceGroupName The name of the resource group that contains the resource. You can obtain
     *                          this value from the Azure Resource Manager API or the portal.
     * @param serverName The name of the server.
     * @param databaseName The name of the database.
     * @param options The options parameters.
     */
    get(resourceGroupName, serverName, databaseName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, serverName, databaseName, options }, getOperationSpec);
    }
    /**
     * Creates or updates an extended database's blob auditing policy.
     * @param resourceGroupName The name of the resource group that contains the resource. You can obtain
     *                          this value from the Azure Resource Manager API or the portal.
     * @param serverName The name of the server.
     * @param databaseName The name of the database.
     * @param parameters The extended database blob auditing policy.
     * @param options The options parameters.
     */
    createOrUpdate(resourceGroupName, serverName, databaseName, parameters, options) {
        return this.client.sendOperationRequest({ resourceGroupName, serverName, databaseName, parameters, options }, createOrUpdateOperationSpec);
    }
    /**
     * Lists extended auditing settings of a database.
     * @param resourceGroupName The name of the resource group that contains the resource. You can obtain
     *                          this value from the Azure Resource Manager API or the portal.
     * @param serverName The name of the server.
     * @param databaseName The name of the database.
     * @param options The options parameters.
     */
    _listByDatabase(resourceGroupName, serverName, databaseName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, serverName, databaseName, options }, listByDatabaseOperationSpec);
    }
    /**
     * ListByDatabaseNext
     * @param resourceGroupName The name of the resource group that contains the resource. You can obtain
     *                          this value from the Azure Resource Manager API or the portal.
     * @param serverName The name of the server.
     * @param databaseName The name of the database.
     * @param nextLink The nextLink from the previous successful call to the ListByDatabase method.
     * @param options The options parameters.
     */
    _listByDatabaseNext(resourceGroupName, serverName, databaseName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, serverName, databaseName, nextLink, options }, listByDatabaseNextOperationSpec);
    }
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const getOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.ExtendedDatabaseBlobAuditingPolicy
        },
        default: {}
    },
    queryParameters: [Parameters.apiVersion2],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.serverName,
        Parameters.databaseName,
        Parameters.blobAuditingPolicyName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const createOrUpdateOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.ExtendedDatabaseBlobAuditingPolicy
        },
        201: {
            bodyMapper: Mappers.ExtendedDatabaseBlobAuditingPolicy
        },
        default: {}
    },
    requestBody: Parameters.parameters12,
    queryParameters: [Parameters.apiVersion2],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.serverName,
        Parameters.databaseName,
        Parameters.blobAuditingPolicyName
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const listByDatabaseOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.ExtendedDatabaseBlobAuditingPolicyListResult
        },
        default: {}
    },
    queryParameters: [Parameters.apiVersion2],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.serverName,
        Parameters.databaseName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listByDatabaseNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.ExtendedDatabaseBlobAuditingPolicyListResult
        },
        default: {}
    },
    queryParameters: [Parameters.apiVersion2],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.serverName,
        Parameters.databaseName,
        Parameters.nextLink
    ],
    headerParameters: [Parameters.accept],
    serializer
};
//# sourceMappingURL=extendedDatabaseBlobAuditingPolicies.js.map


text:
using UnityEngine;
using System.Collections;

public class WalkingAnimation : MonoBehaviour {

	// Use this for initialization
	void Start () {
		animation.CrossFade("idle", 0.25f);
	}

	// Update is called once per frame
	void Update () {
		if (Input.GetKey ("w")) {
			animation.CrossFade ("walk", 0.25f);
		} else {
			animation.CrossFade("idle", 0.25f);
		}
	}
}


text:
Esse é o guia do `Core Team` da comunidade **[Training Center](https://trainingcenter.io)**.

Basicamente nossa responsabilidade é com as pessoas da comunidade e repositórios dos projetos, pois cada projeto possui seus próprios administradores(as) com suas respectivas responsabilidades.

## Nossa responsabilidade

* Seguir o **[código de conduta](http://bit.ly/tc-codigo-de-conduta)**
* Manter os repositórios atualizados
* Manter as issues organizadas
* Orientar as pessoas nas issues
* Melhorar issues mal descritas ou pouco explicativas
* Corrigir e aceitar pull requests
* Sugerir melhorias no projeto e nos repositórios
* Manter a comunicação com os outros membros da moderação e de outros projetos
* Moderar o Slack
* Auxiliar as pessoas no Slack
* Ajudar pessoas que administram os projetos


text:
require "io/console"
require "octokit"
require "pstore"
require "prawntocat/issues"
require "prawntocat/pdf"
require "prawntocat/version"

module Prawntocat
  def self.authenticated?
    auth.has_key?('username') and auth.has_key?('token')
  end

  def self.authenticate!
    $stdout.print("GitHub username: ")
    username = $stdin.gets.chomp
    $stdout.print("GitHub password: ")
    password = $stdin.noecho(&:gets).chomp
    authorization = Octokit::Client.new(login: username, password: password).create_authorization(scopes: ["repo"], note: "Prawntocat Issue Printer", note_url: "http://nuclearsandwich.com/prawntocat")
    auth_store.transaction do
      auth_store['authorization'] ||= Hash.new
      auth_store['authorization']['username'] = username
      auth_store['authorization']['token'] = authorization.token
    end

  end

  def self.auth_store
    @auth_store ||= PStore.new(File.join(ENV['HOME'], ".prawntocat.pstore"))
  end

  def self.auth
    @auth ||= auth_store.transaction{ auth_store['authorization'] ||= Hash.new }
  end

  def self.client
    Octokit::Client.new login: auth['username'], oauth_token: auth['token']
  end
end


text:
.class Landroid/support/v4/app/NotificationCompat$NotificationCompatImplApi20;
.super Landroid/support/v4/app/NotificationCompat$NotificationCompatImplKitKat;
.source "NotificationCompat.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/support/v4/app/NotificationCompat;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = "NotificationCompatImplApi20"
.end annotation

# direct methods
.method constructor <init>()V
    .locals 0

    .prologue
    .line 689
    invoke-direct {p0}, Landroid/support/v4/app/NotificationCompat$NotificationCompatImplKitKat;-><init>()V

    return-void
.end method

# virtual methods
.method public build(Landroid/support/v4/app/NotificationCompat$Builder;)Landroid/app/Notification;
    .locals 25
    .param p1, "b"    # Landroid/support/v4/app/NotificationCompat$Builder;

    .prologue
    .line 692
    new-instance v1, Landroid/support/v4/app/NotificationCompatApi20$Builder;

    move-object/from16 v0, p1

    iget-object v2, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mContext:Landroid/content/Context;

    move-object/from16 v0, p1

    iget-object v3, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mNotification:Landroid/app/Notification;

    move-object/from16 v0, p1

    iget-object v4, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mContentTitle:Ljava/lang/CharSequence;

    move-object/from16 v0, p1

    iget-object v5, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mContentText:Ljava/lang/CharSequence;

    move-object/from16 v0, p1

    iget-object v6, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mContentInfo:Ljava/lang/CharSequence;

    move-object/from16 v0, p1

    iget-object v7, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mTickerView:Landroid/widget/RemoteViews;

    move-object/from16 v0, p1

    iget v8, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mNumber:I

    move-object/from16 v0, p1

    iget-object v9, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mContentIntent:Landroid/app/PendingIntent;

    move-object/from16 v0, p1

    iget-object v10, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mFullScreenIntent:Landroid/app/PendingIntent;

    move-object/from16 v0, p1

    iget-object v11, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mLargeIcon:Landroid/graphics/Bitmap;

    move-object/from16 v0, p1

    iget v12, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mProgressMax:I

    move-object/from16 v0, p1

    iget v13, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mProgress:I

    move-object/from16 v0, p1

    iget-boolean v14, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mProgressIndeterminate:Z

    move-object/from16 v0, p1

    iget-boolean v15, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mShowWhen:Z

    move-object/from16 v0, p1

    iget-boolean v0, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mUseChronometer:Z

    move/from16 v16, v0

    move-object/from16 v0, p1

    iget v0, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mPriority:I

    move/from16 v17, v0

    move-object/from16 v0, p1

    iget-object v0, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mSubText:Ljava/lang/CharSequence;

    move-object/from16 v18, v0

    move-object/from16 v0, p1

    iget-boolean v0, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mLocalOnly:Z

    move/from16 v19, v0

    move-object/from16 v0, p1

    iget-object v0, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mPeople:Ljava/util/ArrayList;

    move-object/from16 v20, v0

    move-object/from16 v0, p1

    iget-object v0, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mExtras:Landroid/os/Bundle;

    move-object/from16 v21, v0

    move-object/from16 v0, p1

    iget-object v0, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mGroupKey:Ljava/lang/String;

    move-object/from16 v22, v0

    move-object/from16 v0, p1

    iget-boolean v0, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mGroupSummary:Z

    move/from16 v23, v0

    move-object/from16 v0, p1

    iget-object v0, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mSortKey:Ljava/lang/String;

    move-object/from16 v24, v0

    invoke-direct/range {v1 .. v24}, Landroid/support/v4/app/NotificationCompatApi20$Builder;-><init>(Landroid/content/Context;Landroid/app/Notification;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/widget/RemoteViews;ILandroid/app/PendingIntent;Landroid/app/PendingIntent;Landroid/graphics/Bitmap;IIZZZILjava/lang/CharSequence;ZLjava/util/ArrayList;Landroid/os/Bundle;Ljava/lang/String;ZLjava/lang/String;)V

    .line 698
    .local v1, "builder":Landroid/support/v4/app/NotificationCompatApi20$Builder;
    move-object/from16 v0, p1

    iget-object v2, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mActions:Ljava/util/ArrayList;

    # invokes: Landroid/support/v4/app/NotificationCompat;->addActionsToBuilder(Landroid/support/v4/app/NotificationBuilderWithActions;Ljava/util/ArrayList;)V
    invoke-static {v1, v2}, Landroid/support/v4/app/NotificationCompat;->access$000(Landroid/support/v4/app/NotificationBuilderWithActions;Ljava/util/ArrayList;)V

    .line 699
    move-object/from16 v0, p1

    iget-object v2, v0, Landroid/support/v4/app/NotificationCompat$Builder;->mStyle:Landroid/support/v4/app/NotificationCompat$Style;

    # invokes: Landroid/support/v4/app/NotificationCompat;->addStyleToBuilderJellybean(Landroid/support/v4/app/NotificationBuilderWithBuilderAccessor;Landroid/support/v4/app/NotificationCompat$Style;)V
    invoke-static {v1, v2}, Landroid/support/v4/app/NotificationCompat;->access$100(Landroid/support/v4/app/NotificationBuilderWithBuilderAccessor;Landroid/support/v4/app/NotificationCompat$Style;)V

    .line 700
    invoke-virtual {v1}, Landroid/support/v4/app/NotificationCompatApi20$Builder;->build()Landroid/app/Notification;

    move-result-object v2

    return-object v2
.end method

.method public getAction(Landroid/app/Notification;I)Landroid/support/v4/app/NotificationCompat$Action;
    .locals 2
    .param p1, "n"    # Landroid/app/Notification;
    .param p2, "actionIndex"    # I

    .prologue
    .line 705
    sget-object v0, Landroid/support/v4/app/NotificationCompat$Action;->FACTORY:Landroid/support/v4/app/NotificationCompatBase$Action$Factory;

    sget-object v1, Landroid/support/v4/app/RemoteInput;->FACTORY:Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;

    invoke-static {p1, p2, v0, v1}, Landroid/support/v4/app/NotificationCompatApi20;->getAction(Landroid/app/Notification;ILandroid/support/v4/app/NotificationCompatBase$Action$Factory;Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;)Landroid/support/v4/app/NotificationCompatBase$Action;

    move-result-object v0

    check-cast v0, Landroid/support/v4/app/NotificationCompat$Action;

    return-object v0
.end method

.method public getActionsFromParcelableArrayList(Ljava/util/ArrayList;)[Landroid/support/v4/app/NotificationCompat$Action;
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Landroid/os/Parcelable;",
            ">;)[",
            "Landroid/support/v4/app/NotificationCompat$Action;"
        }
    .end annotation

    .prologue
    .line 712
    .local p1, "parcelables":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Landroid/os/Parcelable;>;"
    sget-object v0, Landroid/support/v4/app/NotificationCompat$Action;->FACTORY:Landroid/support/v4/app/NotificationCompatBase$Action$Factory;

    sget-object v1, Landroid/support/v4/app/RemoteInput;->FACTORY:Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;

    invoke-static {p1, v0, v1}, Landroid/support/v4/app/NotificationCompatApi20;->getActionsFromParcelableArrayList(Ljava/util/ArrayList;Landroid/support/v4/app/NotificationCompatBase$Action$Factory;Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;)[Landroid/support/v4/app/NotificationCompatBase$Action;

    move-result-object v0

    check-cast v0, [Landroid/support/v4/app/NotificationCompat$Action;

    check-cast v0, [Landroid/support/v4/app/NotificationCompat$Action;

    return-object v0
.end method

.method public getGroup(Landroid/app/Notification;)Ljava/lang/String;
    .locals 1
    .param p1, "n"    # Landroid/app/Notification;

    .prologue
    .line 729
    invoke-static {p1}, Landroid/support/v4/app/NotificationCompatApi20;->getGroup(Landroid/app/Notification;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getLocalOnly(Landroid/app/Notification;)Z
    .locals 1
    .param p1, "n"    # Landroid/app/Notification;

    .prologue
    .line 724
    invoke-static {p1}, Landroid/support/v4/app/NotificationCompatApi20;->getLocalOnly(Landroid/app/Notification;)Z

    move-result v0

    return v0
.end method

.method public getParcelableArrayListForActions([Landroid/support/v4/app/NotificationCompat$Action;)Ljava/util/ArrayList;
    .locals 1
    .param p1, "actions"    # [Landroid/support/v4/app/NotificationCompat$Action;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "([",
            "Landroid/support/v4/app/NotificationCompat$Action;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Landroid/os/Parcelable;",
            ">;"
        }
    .end annotation

    .prologue
    .line 719
    invoke-static {p1}, Landroid/support/v4/app/NotificationCompatApi20;->getParcelableArrayListForActions([Landroid/support/v4/app/NotificationCompatBase$Action;)Ljava/util/ArrayList;

    move-result-object v0

    return-object v0
.end method

.method public getSortKey(Landroid/app/Notification;)Ljava/lang/String;
    .locals 1
    .param p1, "n"    # Landroid/app/Notification;

    .prologue
    .line 739
    invoke-static {p1}, Landroid/support/v4/app/NotificationCompatApi20;->getSortKey(Landroid/app/Notification;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public isGroupSummary(Landroid/app/Notification;)Z
    .locals 1
    .param p1, "n"    # Landroid/app/Notification;

    .prologue
    .line 734
    invoke-static {p1}, Landroid/support/v4/app/NotificationCompatApi20;->isGroupSummary(Landroid/app/Notification;)Z

    move-result v0

    return v0
.end method


text:
goog.provide('jchemhub.controller.ToolbarController');

goog.require('jchemhub.controller.ReactionEditor.EventType');
goog.require('goog.events.EventHandler');
goog.require('goog.events.EventTarget');
goog.require('goog.ui.Component.EventType');

/**
 * A class for managing the editor toolbar.  Acts as a bridge between
 * a {@link jchemhub.controller.ReactionEditor} and a {@link goog.ui.Toolbar}.
 *
 * The {@code toolbar} argument must be an instance of {@link goog.ui.Toolbar}
 * or a subclass.  This class doesn't care how the toolbar was created.  As
 * long as one or more controls hosted  in the toolbar have IDs that match
 * built-in {@link jchemhub.controller.ReactionEditor.Command}s, they will function as expected.  It is
 * the caller's responsibility to ensure that the toolbar is already rendered
 * or that it decorates an existing element.
 *
 *
 * @param {!jchemhub.controller.ReactionEditor} editor to be controlled by the
 *     toolbar.
 * @param {!goog.ui.Toolbar} toolbar Toolbar to control the editable editor.
 * @constructor
 * @extends {goog.events.EventTarget}
 */
jchemhub.controller.ToolbarController = function(editor, toolbar) {
  goog.events.EventTarget.call(this);

  /**
   * Event handler to listen for editor events and user actions.
   * @type {!goog.events.EventHandler}
   * @private
   */
  this.handler_ = new goog.events.EventHandler(this);

  /**
   * The editor instance controlled by the toolbar.
   * @type {!jchemhub.controller.ToolbarController}
   * @private
   */
  this.editor_ = editor;

  /**
   * The toolbar that controls the editor.
   * @type {!goog.ui.Toolbar}
   * @private
   */
  this.toolbar_ = toolbar;

  /**
   * Editing commands whose state is to be queried when updating the toolbar.
   * @type {!Array.<string>}
   * @private
   */
  this.queryCommands_ = [];

  // Iterate over all buttons, and find those which correspond to
  // queryable commands. Add them to the list of commands to query on
  // each COMMAND_VALUE_CHANGE event.
  this.toolbar_.forEachChild(function(button) {
    if (button.queryable) {
      this.queryCommands_.push(this.getComponentId(button.getId()));
    }
  }, this);

  // Make sure the toolbar doesn't steal keyboard focus.
  this.toolbar_.setFocusable(false);

  // Hook up handlers that update the toolbar in response to editor events,
  // and to execute editor commands in response to toolbar events.
  this.handler_.
      listen(this.editor_, jchemhub.controller.ReactionEditor.EventType.COMMAND_VALUE_CHANGE,
          this.updateToolbar).
      listen(this.toolbar_, goog.ui.Component.EventType.ACTION,
          this.handleAction);
};
goog.inherits(jchemhub.controller.ToolbarController, goog.events.EventTarget);

/**
 * Returns the Closure component ID of the control that corresponds to the
 * given {@link jchemhub.controller.Command} constant.
 * Subclasses may override this method if they want to use a custom mapping
 * scheme from commands to controls.
 * @param {string} command Editor command.
 * @return {string} Closure component ID of the corresponding toolbar
 *     control, if any.
 * @protected
 */
jchemhub.controller.ToolbarController.prototype.getComponentId = function(command) {
  // The default implementation assumes that the component ID is the same as
  // the command constant.
  return command;
};

/**
 * Returns the {@link jchemhub.controller.Command} constant
 * that corresponds to the given Closure component ID.  Subclasses may override
 * this method if they want to use a custom mapping scheme from controls to
 * commands.
 * @param {string} id Closure component ID of a toolbar control.
 * @return {string} Editor command or dialog constant corresponding to the
 *     toolbar control, if any.
 * @protected
 */
jchemhub.controller.ToolbarController.prototype.getCommand = function(id) {
  // The default implementation assumes that the component ID is the same as
  // the command constant.
  return id;
};

/**
 * Returns the event handler object for the editor toolbar.  Useful for classes
 * that extend {@code jchemhub.controller.ToolbarController}.
 * @return {!goog.events.EventHandler} The event handler object.
 * @protected
 */
jchemhub.controller.ToolbarController.prototype.getHandler = function() {
  return this.handler_;
};

/**
 * Returns the editor instance managed by the toolbar.  Useful for
 * classes that extend {@code jchemhub.controller.ToolbarController}.
 * @return {!jchemhub.controller.ReactionEditor} The editor managed by the toolbar.
 * @protected
 */
jchemhub.controller.ToolbarController.prototype.getEditor= function() {
  return this.editor_;
};

/**
 * Returns the toolbar UI component that manages the editor.  Useful for
 * classes that extend {@code jchemhub.controller.ToolbarController}.
 * @return {!goog.ui.Toolbar} The toolbar UI component.
 */
jchemhub.controller.ToolbarController.prototype.getToolbar = function() {
  return this.toolbar_;
};

/**
 * @return {boolean} Whether the toolbar is visible.
 */
jchemhub.controller.ToolbarController.prototype.isVisible = function() {
  return this.toolbar_.isVisible();
};

/**
 * Shows or hides the toolbar.
 * @param {boolean} visible Whether to show or hide the toolbar.
 */
jchemhub.controller.ToolbarController.prototype.setVisible = function(visible) {
  this.toolbar_.setVisible(visible);
};

/**
 * @return {boolean} Whether the toolbar is enabled.
 */
jchemhub.controller.ToolbarController.prototype.isEnabled = function() {
  return this.toolbar_.isEnabled();
};

/**
 * Enables or disables the toolbar.
 * @param {boolean} enabled Whether to enable or disable the toolbar.
 */
jchemhub.controller.ToolbarController.prototype.setEnabled = function(enabled) {
  this.toolbar_.setEnabled(enabled);
};

/**
 * Programmatically blurs the editor toolbar, un-highlighting the currently
 * highlighted item, and closing the currently open menu (if any).
 */
jchemhub.controller.ToolbarController.prototype.blur = function() {
  // We can't just call this.toolbar_.getElement().blur(), because the toolbar
  // element itself isn't focusable, so goog.ui.Container#handleBlur isn't
  // registered to handle blur events.
  this.toolbar_.handleBlur(null);
};

/** @inheritDoc */
jchemhub.controller.ToolbarController.prototype.disposeInternal = function() {
  jchemhub.controller.ToolbarController.superClass_.disposeInternal.call(this);
  if (this.handler_) {
    this.handler_.dispose();
    delete this.handler_;
  }
  if (this.toolbar_) {
    this.toolbar_.dispose();
    delete this.toolbar_;
  }
  delete this.editor_;
  delete this.queryCommands_;
};

/**
 * Updates the toolbar in response to editor events.  Specifically, updates
 * button states based on {@code COMMAND_VALUE_CHANGE} events, reflecting the
 * effective formatting of the selection.
 * @param {goog.events.Event} e Editor event to handle.
 * @protected
 */
jchemhub.controller.ToolbarController.prototype.updateToolbar = function(e) {
  if (!this.toolbar_.isEnabled() ||
      !this.dispatchEvent(goog.ui.Component.EventType.CHANGE)) {
    return;
  }

  var state;

  /** @preserveTry */
  try {
    /** @type {Array.<string>} */
    e.commands; // Added by dispatchEvent.

    // If the COMMAND_VALUE_CHANGE event specifies which commands changed
    // state, then we only need to update those ones, otherwise update all
    // commands.
    state = /** @type {Object} */ (
        this.editor_.queryCommandValue(e.commands || this.queryCommands_));
  } catch (ex) {
    // TODO: Find out when/why this happens.
    state = {};
  }

  this.updateToolbarFromState(state);
};

/**
 * Updates the toolbar to reflect a given state.
 * @param {Object} state Object mapping editor commands to values.
 */
jchemhub.controller.ToolbarController.prototype.updateToolbarFromState =
    function(state) {
  for (var command in state) {
    var button = this.toolbar_.getChild(this.getComponentId(command));
    if (button) {
      var value = state[command];
      if (button.updateFromValue) {
        button.updateFromValue(value);
      } else {
        button.setChecked(!!value);
      }
    }
  }
};

/**
 * Handles {@code ACTION} events dispatched by toolbar buttons in response to
 * user actions by executing the corresponding editor command.
 * @param {goog.events.Event} e Action event to handle.
 * @protected
 */
jchemhub.controller.ToolbarController.prototype.handleAction = function(e) {
  var command = this.getCommand(e.target.getId());
  this.editor_.execCommand(command, e.target.getValue());
};


text:
<?php
session_start();
?>
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Login</title>
    <link rel="stylesheet" href="styles.css">

<form name="login-form" action="form.php" method="post">

            Username:
            <input type="text" name="username" id="username" />

            Password:
            <input type="password" name="password" id="password" />

            <input type="submit" value="Log in" id="login" />

</form>


text:
RESTful WP-CLI makes [WP REST API](http://v2.wp-api.org/) endpoints available as [WP-CLI](http://wp-cli.org/) commands.

As WordPress becomes more of an application framework embedded into the web, RESTful WP-CLI enables WP-CLI users to interact with a given WordPress install through the higher-level, self-expressed abstraction of how WordPress understands itself. For instance, on an eCommerce website, instead of having to know data is stored as `wp post list --post_type=edd_product`, RESTful WP-CLI exposes the properly-modeled data at `wp rest product list`.

Here's an overview of how RESTful WP-CLI works, in two parts.

### 1. Auto-discovers WP REST API endpoints from any WordPress site running WordPress 4.4 or higher

Target a specific WordPress install with `--path=<path>`, `--ssh=<host>`, or `--http=<domain>`:

```
# The `--path=<path>` global parameter tells WP-CLI to interact with a WordPress install at a given path.
# Because this is a stock WordPress install, you see the posts, pages, and other resources you'd expect to see.
$ wp --path=/srv/www/wordpress-develop.dev/src rest
usage: wp rest attachment <command>
   or: wp rest category <command>
   or: wp rest comment <command>
   or: wp rest page <command>
   or: wp rest page-revision <command>
   or: wp rest post <command>
   or: wp rest post-revision <command>
   or: wp rest status <command>
   or: wp rest tag <command>
   or: wp rest taxonomy <command>
   or: wp rest type <command>
   or: wp rest user <command>

# The `--http=<domain>` global parameter tells WP-CLI to auto-discover endpoints over HTTP.
# Because Wired has some custom post types, they're automatically registered as WP-CLI commands.
$ wp --http=www.wired.com rest
usage: wp rest attachment <command>
   or: wp rest category <command>
   or: wp rest comment <command>
   or: wp rest liveblog <command>
   or: wp rest liveblog-revision <command>
   or: wp rest page <command>
   or: wp rest page-revision <command>
   or: wp rest podcast <command>
   or: wp rest post <command>
   or: wp rest post-revision <command>
   or: wp rest series <command>
   or: wp rest slack-channel <command>
   or: wp rest status <command>
   or: wp rest tag <command>
   or: wp rest taxonomy <command>
   or: wp rest type <command>
   or: wp rest user <command>
   or: wp rest video <command>

# The `--ssh=<host>` global parameter proxies command execution to a remote WordPress install.
# Because runcommand has a completely custom data model, you can only interact with commands, excerpts, and sparks.
$ wp --ssh=runcommand.io rest
usage: wp rest command <command>
   or: wp rest excerpt <command>
   or: wp rest spark <command>
```

### 2. Registers WP-CLI commands for the resource endpoints it understands, in the `wp rest` namespace.

In addition to the standard list, get, create, update and delete commands, RESTful WP-CLI also registers commands for higher-level operations like `edit`, `generate` and `diff`.

```
# In this example, `@wpdev` is a WP-CLI alias to `--path=/srv/www/wordpress-develop.dev/src`.
$ wp @wpdev rest user
usage: wp rest user create --username=<username> [--name=<name>] [--first_name=<first_name>] [--last_name=<last_name>] --email=<email> [--url=<url>] [--description=<description>] [--nickname=<nickname>] [--slug=<slug>] [--roles=<roles>] --password=<password> [--capabilities=<capabilities>] [--porcelain]
   or: wp rest user delete <id> [--force=<force>] [--reassign=<reassign>] [--porcelain]
   or: wp rest user diff <alias> [<resource>] [--fields=<fields>]
   or: wp rest user edit <id>
   or: wp rest user generate [--count=<count>] [--format=<format>] --username=<username> [--name=<name>] [--first_name=<first_name>] [--last_name=<last_name>] --email=<email> [--url=<url>] [--description=<description>] [--nickname=<nickname>] [--slug=<slug>] [--roles=<roles>] --password=<password> [--capabilities=<capabilities>] [--porcelain]
   or: wp rest user get <id> [--context=<context>] [--fields=<fields>] [--field=<field>] [--format=<format>]
   or: wp rest user list [--context=<context>] [--page=<page>] [--per_page=<per_page>] [--search=<search>] [--exclude=<exclude>] [--include=<include>] [--offset=<offset>] [--order=<order>] [--orderby=<orderby>] [--slug=<slug>] [--roles=<roles>] [--fields=<fields>] [--field=<field>] [--format=<format>]
   or: wp rest user update <id> [--username=<username>] [--name=<name>] [--first_name=<first_name>] [--last_name=<last_name>] [--email=<email>] [--url=<url>] [--description=<description>] [--nickname=<nickname>] [--slug=<slug>] [--roles=<roles>] [--password=<password>] [--capabilities=<capabilities>] [--porcelain]

# Use `wp rest * edit` to open an existing item in the editor.
$ wp rest category edit 1 --user=daniel
---
description:
name: Uncategorized
slug: uncategorized
parent: 0

# Use `wp rest * generate` to generate dummy content.
$ wp @wpdev rest post generate --count=50 --title="Test Post" --user=daniel
Generating items  100% [==============================================] 0:01 / 0:02

# Use `wp rest * diff` to diff a resource or collection of resources between environments.
$ wp @dev-rest rest command diff @prod-rest find-unused-themes --fields=title
(-) http://runcommand.dev/api/ (+) https://runcommand.io/api/
  command:
  + title: find-unused-themes
```

If WP-CLI is operating directly against a WordPress install, you can use the `--debug` flag to track the number of queries and total execution time. This can be useful for measuring and profiling API requests.

```
$ wp rest category list --debug
Debug (rest): REST command executed 3 queries in 0.000311 seconds. Use --debug=rest to see all queries. (1.118s)
+---------------+
| name          |
+---------------+
| Test Category |
| Uncategorized |
+---------------+
```

There are many things RESTful WP-CLI can't yet do. Please [review the issue backlog](https://github.com/wp-cli/restful/issues), and open a new issue if you can't find an exising issue for your topic.


text:
      Software Components (<?=$totalRegistries?>)
      <?=$tableHeader?>

  <?=$tableBody?>


text:
using namespace std;
struct TreeNode {
    int val;
    TreeNode *left;
    TreeNode *right;
    TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};

class Solution {
public:
    //recursion
    TreeNode* invertTree(TreeNode* root) {
        if(root == 0){
            return 0;
        }
        TreeNode *result = new TreeNode(root->val);
        result->left = invertTree(root->right);
        result->right = invertTree(root->left);
        return result;
    }

    //non-recursion
    TreeNode* invertTreeNonRecursion(TreeNode* root) {
        if(root == 0){
            return 0;
        }
        queue<TreeNode *> queue;
        queue.push(root);
        while(!queue.empty()){
            TreeNode *current = queue.front();
            if(current->left !=0 || current->right!=0){
                TreeNode *tmp = current->left;
                current->left = current->right;
                current->right = tmp;
            }
            if(current->left){
                queue.push(current->left);
            }
            if(current->right){
                queue.push(current->right);
            }
            queue.pop();
        }
        return root;
    }
};


text:
const {extractLayoutString} = require('../helpers/shortcodeLayoutParser');

module.exports = (...args) => {
  if (args.length == 0) {
    throw new Error('Missing video src');
  }
  const src = args[0];
  const layout = extractLayoutString(args.splice(1), {
    layout: 'responsive',
    width: 16,
    height: 9,
  });
  return `<amp-video controls src="${src}" ${layout}></amp-video>`;
};


text:
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
    switch (arguments.length) {
        case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
        case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
        case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);
    }
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
define(["require", "exports", 'aurelia-framework'], function (require, exports, aurelia_framework_1) {
    var NavBar = (function () {
        function NavBar() {
            this.router = null;
        }
        __decorate([
            aurelia_framework_1.bindable,
            __metadata('design:type', Object)
        ], NavBar.prototype, "router");
        return NavBar;
    })();
    exports.NavBar = NavBar;
});


text:
module SymlogModel
  DIRECTIONS = [:upward, :downward, :positive, :negative, :forward, :backward]
  DIMENSIONS = {
    :upward_downward => DIRECTIONS[0,2],
    :positive_negative => DIRECTIONS[2,2],
    :forward_backward => DIRECTIONS[4,2]
  }
  DESCRIPTIONS = [
    {:aktiv             => [:upward]},
    {:extravertiert     => [:upward, :positive]},
    {:zielbewusst       => [:upward, :positive, :forward]},
    {:tatkraeftig       => [:upward, :forward]},
    {:disziplinierend   => [:upward, :negative, :forward]},
    {:dominant          => [:upward, :negative]},
    {:geltungssuchend   => [:upward, :negative, :backward]},
    {:macht_spaesse     => [:upward, :backward]},
    {:optimitstisch     => [:upward, :positive, :backward]},
    {:freundlich        => [:positive]},
    {:interessiert      => [:positive, :forward]},
    {:analytisch        => [:forward]},
    {:kritisch          => [:negative, :forward]},
    {:unfreundlich      => [:negative]},
    {:uninteressiert    => [:negative, :backward]},
    {:emotional         => [:backward]},
    {:warmherzig        => [:positive, :backward]},
    {:verstaendnisvoll  => [:downward, :positive]},
    {:ruecksichtnehmend => [:downward, :positive, :forward]},
    {:besonnen          => [:downward, :forward]},
    {:selbstkritisch    => [:downward, :negative, :forward]},
    {:traurig           => [:downward, :negative]},
    {:entmutigt         => [:downward, :negative, :backward]},
    {:unentschlossen    => [:downward, :backward]},
    {:behaglich         => [:downward, :positive, :backward]},
    {:passiv            => [:downward]}
  ]

  class Dimension
    attr_reader :name, :directions
    attr_accessor :value

    def initialize(name, directions = [], value = 0)
      @name = name
      @value = value
      @directions = directions
    end

    def to_s
      "#Dimesion(#{id}): #{name}: #{value} "
    end

    def +(dimension)
      if self.name == dimension.name
        self.value += dimension.value
        return self
      end
    end

    def self.all
      @all_dimensions ||= DIMENSIONS.collect do |name, directions|
        self.new(name, directions)
      end
      return @all_dimensions
    end
  end

  class Description
    attr_reader :name, :value, :directions

    def initialize(name, directions, value = nil)
      @name = name
      @directions = directions
      @value = value.to_i
    end

    def self.create_all_from_survey(survey)
      DESCRIPTIONS.collect do |desc|
        self.new(name = desc.keys.first, desc.values.first, survey.send(name))
      end.extend DescriptionCollection
    end

    def self.all
      @all_desc ||= DESCRIPTIONS.collect do |desc|
        self.new(desc.keys.first, desc.values.first)
      end.extend DescriptionCollection
      return @all_desc
    end

    def self.names
      @names ||= DESCRIPTIONS.collect do |desc|
        desc.keys.first
      end
    end

    DIRECTIONS.each do |dimension|
      self.instance_eval %Q{
          def #{dimension}_descriptions
            @#{dimension}_desc = self.all.collect do |desc|
              desc.directions.include?(:#{dimension}) ? desc : nil
            end.compact
            return @#{dimension}_desc
          end
        }
    end

  end

  module DescriptionCollection
    DIRECTIONS.each do |direction|
      self.class_eval %Q{
          def #{direction}_descriptions
            @#{direction}_desc = self.collect do |desc|
              desc.directions.include?(:#{direction}) ? desc : nil
            end.compact
            return @#{direction}_desc
          end
        }
    end
  end

  module InstanceMethods
    DIMENSIONS.each do |name, directions|
      first = directions.first
      last = directions.last
      direction_methods = directions.map do |direction|
        class_eval %Q{
          def #{direction}_value
            descriptions.#{direction}_descriptions.collect(&:value).compact.sum
          end
        }
      end
      class_eval %Q{
        def #{name}_value
          (#{first}_value - #{last}_value)/2.0
        end
      }
    end
  end

  def self.included(receiver)
    receiver.send :include, InstanceMethods
  end
end


text:
"use strict";
exports.__esModule = true;
var express = require('express');
module.exports = function () {
    var returnRouter = express.Router();
    returnRouter.get('/', function (req, res) {
        res.status(200).json({ 'status': 'up' });
    });
    return returnRouter;
};
//# sourceMappingURL=healthRoute.js.map


text:
layout: nil
---
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title>blog.chicagolobbyists.org</title>
  <link href="http://blog.chicagolobbyists.org/"/>
  <link type="application/atom+xml" rel="self" href="http://blog.chicagolobbyists.org/atom.xml"/>
  <updated>{{ site.time | date_to_xmlschema }}</updated>
  <id>http://blog.chicagolobbyists.org/</id>
  <author>
    <name>Chicago Lobbyists Blog</name>
    <email>chi.lobbyists@gmail.com</email>
  </author>

  {% for post in site.posts %}
  <entry>
    <id>http://blog.chicagolobbyists.org{{ post.id }}</id>
    <link type="text/html" rel="alternate" href="http://blog.chicagolobbyists.org{{ post.url }}"/>
    <title>{{ post.title }}</title>
    <updated>{{ post.date | date_to_xmlschema }}</updated>
    <author>
      <name>Chicago Lobbyists</name>
      <uri>http://blog.chicagolobbyists.org/</uri>
    </author>
    <content type="html">{{ post.content | xml_escape }}</content>
  </entry>
  {% endfor %}

</feed>


text:
Cordova interface for the Stockfish chess engine.

## Exemple apps

* https://github.com/srenault/stockfishm/tree/master
* https://github.com/veloce/lichobile

## Requirements

* [android ndk](http://developer.android.com/ndk/index.html)

## Usage

`Stockfish` global object exposes only 4 methods. Except for `output`, they all
return promises:

```js
// init engine
Stockfish.init().then(() => console.log('engine ready'))

// send commands
Stockfish.cmd('position startpos').then(() => console.log('command success'))

// register output listener
Stockfish.output(function(message) {
  console.log('stockfish message received:', message)
})

// exit engine
Stockfish.exit().then(() => console.log('engine successfully exited'))
```

## Upgrade stockfish (lichess)

```
git remote add stockfish https://github.com/ddugovic/Stockfish.git
git subtree pull --prefix=src/share/stockfish --squash stockfish master
```

## Build android

To build the native code in your project, just launch the gradle build using
`cordova build` or `cordova run` command.

## Build IOS

Through XCode, in the build settings menu:

  * Set `C++ Language Dialect` option to `C++11` value.
  * Set `C++ Standard Library` option to `lib++` value.

To enable variants and skill, in custom compiler flags, `Other C++ flags` section, add:

    -DKOTH -DTHREECHECK -DATOMIC -DHORDE -DRACE -DANTI -DCRAZYHOUSE


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dinglicom.frame.sys.domain;

/**
 *
 * @author panzhen
 */
public class AdminUseraddResp extends BaseMsgBean {
    private Long uid;

    /**
     * @return the uid
     */
    public Long getUid() {
        return uid;
    }

    /**
     * @param uid the uid to set
     */
    public void setUid(Long uid) {
        this.uid = uid;
    }
}


text:
require 'spec_helper'

describe OpsWorks::CLI::Agent do
  context 'recipes' do
    let(:recipe) { 'hotpockets::install' }
    let(:stacks) { Array.new(2) { Fabricate(:stack) } }

    before { allow(subject).to receive(:say) }
    before { allow(OpsWorks::Deployment).to receive(:wait) }
    before { allow(OpsWorks::Stack).to receive(:all) { stacks } }
    before { allow(OpsWorks::Stack).to receive(:active) { stacks } }

    describe 'recipes:run' do
      let(:success) { Fabricate(:deployment, status: 'successful') }
      let(:failure) { Fabricate(:deployment, status: 'failed') }
      let(:args) { [recipe, { layer: nil }] }

      it 'should update custom cookbooks on all stacks' do
        expect(stacks[0]).to receive(:execute_recipe).with(*args) { success }
        expect(stacks[1]).to receive(:execute_recipe).with(*args) { success }
        subject.send('recipes:run', recipe)
      end

      it 'should optionally run on a subset of stacks' do
        expect(stacks[0]).to receive(:execute_recipe).with(*args) { success }
        expect(stacks[1]).not_to receive(:execute_recipe)

        allow(subject).to receive(:options) { { stack: [stacks[0].name] } }
        subject.send('recipes:run', recipe)
      end

      it 'should optionally run on a single layer' do
        args = [recipe, { layer: 'git' }]
        expect(stacks[0]).to receive(:execute_recipe).with(*args) { success }
        expect(stacks[1]).to receive(:execute_recipe).with(*args) { success }

        allow(subject).to receive(:options) { { layer: 'git' } }
        subject.send('recipes:run', recipe)
      end

      it 'should fail if any update fails' do
        expect(stacks[0]).to receive(:execute_recipe).with(*args) { failure }

        allow(subject).to receive(:options) { { stack: [stacks[0].name] } }
        expect { subject.send('recipes:run', recipe) }.to raise_error
      end
    end
  end
end


text:
<?php

class Google_Service_AndroidEnterprise_ManagedConfigurationsSettingsListResponse extends Google_Collection
{
  protected $collection_key = 'managedConfigurationsSettings';
  public $kind;
  protected $managedConfigurationsSettingsType = 'Google_Service_AndroidEnterprise_ManagedConfigurationsSettings';
  protected $managedConfigurationsSettingsDataType = 'array';

  public function setKind($kind)
  {
    $this->kind = $kind;
  }
  public function getKind()
  {
    return $this->kind;
  }
  /**
   * @param Google_Service_AndroidEnterprise_ManagedConfigurationsSettings
   */
  public function setManagedConfigurationsSettings($managedConfigurationsSettings)
  {
    $this->managedConfigurationsSettings = $managedConfigurationsSettings;
  }
  /**
   * @return Google_Service_AndroidEnterprise_ManagedConfigurationsSettings
   */
  public function getManagedConfigurationsSettings()
  {
    return $this->managedConfigurationsSettings;
  }
}


text:
package com.opipo.ultimategamesrating.controller;

import com.opipo.ultimategamesrating.model.Platform;
import com.opipo.ultimategamesrating.service.PlatformService;
import com.opipo.ultimategamesrating.service.ServiceDTOInterface;
import org.mockito.InjectMocks;
import org.mockito.Mock;

public class PlatformControllerTest extends AbstractCRUDControllerTest<Platform, String> {

    @InjectMocks
    private PlatformController controller = new PlatformController();

    @Mock
    private PlatformService service;

    @Override
    AbstractCRUDController<Platform, String> getController() {
        return controller;
    }

    @Override
    ServiceDTOInterface<Platform, String> getService() {
        return service;
    }

    @Override
    String getCorrectID() {
        return "1";
    }

    @Override
    String getIncorrectID() {
        return "2";
    }

    @Override
    Platform buildElement(String name) {
        Platform platform = new Platform();
        platform.setId(name);
        return platform;
    }
}


text:
define(function(require) {
    'use strict';

    var ColumnManagerPlugin;
    var _ = require('underscore');
    var __ = require('orotranslation/js/translator');
    var BasePlugin = require('oroui/js/app/plugins/base/plugin');
    var ShowComponentAction = require('oro/datagrid/action/show-component-action');
    var ColumnsCollection = require('orodatagrid/js/app/models/column-manager/columns-collection');
    var ColumnManagerComponent = require('orodatagrid/js/app/components/column-manager-component');

    var config = require('module').config();
    config = _.extend({
        icon: 'cog',
        wrapperClassName: 'column-manager',
        label: __('oro.datagrid.column_manager.title')
    }, config);

    ColumnManagerPlugin = BasePlugin.extend({
        enable: function() {
            this.listenTo(this.main, 'beforeToolbarInit', this.onBeforeToolbarInit);
            ColumnManagerPlugin.__super__.enable.call(this);
        },

        onBeforeToolbarInit: function(toolbarOptions) {
            this._createManagedCollection();
            var options = {
                datagrid: this.main,
                launcherOptions: _.extend(config, {
                    componentConstructor: ColumnManagerComponent,
                    columns: this.main.columns,
                    managedColumns: this.managedColumns,
                    addSorting: true
                }, toolbarOptions.columnManager),
                order: 600
            };

            toolbarOptions.addToolbarAction(new ShowComponentAction(options));
        },

        /**
         * Create collection with manageable columns
         *
         * @param {Object} options
         * @protected
         */
        _createManagedCollection: function(options) {
            var managedColumns = [];

            this.main.columns.each(function(column, i) {
                // set initial order
                column.set('order', i, {silent: true});
                // collect manageable columns
                if (column.get('manageable') !== false) {
                    managedColumns.push(column);
                }
            });

            this.managedColumns = new ColumnsCollection(managedColumns,
                _.pick(options, ['minVisibleColumnsQuantity']));
        }
    });

    return ColumnManagerPlugin;
});


text:
#include <algorithm>

#include "el/elements/scroll_bar.h"
#include "el/parsing/element_inflater.h"
#include "el/util/math.h"
#include "el/util/metrics.h"

namespace el {
namespace elements {

void ScrollBar::RegisterInflater() {
  EL_REGISTER_ELEMENT_INFLATER(ScrollBar, Value::Type::kFloat, ElementZ::kTop);
}

ScrollBar::ScrollBar()
    : m_axis(Axis::kY) {  // Make SetAxis below always succeed and set the skin
  set_axis(Axis::kX);
  AddChild(&m_handle);
}

ScrollBar::~ScrollBar() { RemoveChild(&m_handle); }

void ScrollBar::OnInflate(const parsing::InflateInfo& info) {
  auto axis = el::from_string(info.node->GetValueString("axis", "x"), Axis::kY);
  set_axis(axis);
  set_gravity(axis == Axis::kX ? Gravity::kLeftRight : Gravity::kTopBottom);
  Element::OnInflate(info);
}

void ScrollBar::set_axis(Axis axis) {
  if (axis == m_axis) return;
  m_axis = axis;
  if (axis == Axis::kX) {
    set_background_skin(TBIDC("ScrollBarBgX"), InvokeInfo::kNoCallbacks);
    m_handle.set_background_skin(TBIDC("ScrollBarFgX"),
                                 InvokeInfo::kNoCallbacks);
  } else {
    set_background_skin(TBIDC("ScrollBarBgY"), InvokeInfo::kNoCallbacks);
    m_handle.set_background_skin(TBIDC("ScrollBarFgY"),
                                 InvokeInfo::kNoCallbacks);
  }
  Invalidate();
}

void ScrollBar::set_limits(double min, double max, double visible_range) {
  max = std::max(min, max);
  visible_range = std::max(visible_range, 0.0);
  if (min == m_min && max == m_max && m_visible == visible_range) {
    return;
  }
  m_min = min;
  m_max = max;
  m_visible = visible_range;
  set_double_value(m_value);

  // If we're currently dragging the scrollbar handle, convert the down point
  // to root and then back after the applying the new limit.
  // This prevents sudden jumps to unexpected positions when scrolling.
  if (captured_element == &m_handle) {
    m_handle.ConvertToRoot(&pointer_down_element_x, &pointer_down_element_y);
  }

  UpdateHandle();

  if (captured_element == &m_handle) {
    m_handle.ConvertFromRoot(&pointer_down_element_x, &pointer_down_element_y);
  }
}

void ScrollBar::set_double_value(double value) {
  value = util::Clamp(value, m_min, m_max);
  if (value == m_value) {
    return;
  }
  m_value = value;

  UpdateHandle();
  Event ev(EventType::kChanged);
  InvokeEvent(std::move(ev));
}

bool ScrollBar::OnEvent(const Event& ev) {
  if (ev.type == EventType::kPointerMove && captured_element == &m_handle) {
    if (m_to_pixel_factor > 0) {
      int dx = ev.target_x - pointer_down_element_x;
      int dy = ev.target_y - pointer_down_element_y;
      double delta_val = (m_axis == Axis::kX ? dx : dy) / m_to_pixel_factor;
      set_double_value(m_value + delta_val);
    }
    return true;
  } else if (ev.type == EventType::kPointerMove && ev.target == this) {
    return true;
  } else if (ev.type == EventType::kPointerDown && ev.target == this) {
    bool after_handle = m_axis == Axis::kX ? ev.target_x > m_handle.rect().x
                                           : ev.target_y > m_handle.rect().y;
    set_double_value(m_value + (after_handle ? m_visible : -m_visible));
    return true;
  } else if (ev.type == EventType::kWheel) {
    double old_val = m_value;
    set_double_value(m_value + ev.delta_y * util::GetPixelsPerLine());
    if (m_value != old_val) {
      return true;
    }
  }
  return Element::OnEvent(ev);
}

void ScrollBar::UpdateHandle() {
  // Calculate the mover size and position.
  bool horizontal = m_axis == Axis::kX;
  int available_pixels = horizontal ? rect().w : rect().h;
  int min_thickness_pixels = std::min(rect().h, rect().w);

  int visible_pixels = available_pixels;

  if (m_max - m_min > 0 && m_visible > 0) {
    double visible_proportion = m_visible / (m_visible + m_max - m_min);
    visible_pixels = static_cast<int>(visible_proportion * available_pixels);

    // Limit the size of the indicator to the slider thickness so that it
    // doesn't become too tiny when the visible proportion is very small.
    visible_pixels = std::max(visible_pixels, min_thickness_pixels);

    m_to_pixel_factor = static_cast<double>(available_pixels - visible_pixels) /
                        (m_max - m_min) /*+ 0.5*/;
  } else {
    m_to_pixel_factor = 0;

    // If we can't scroll anything, make the handle invisible.
    visible_pixels = 0;
  }

  int pixel_pos = static_cast<int>(m_value * m_to_pixel_factor);

  Rect handle_rect;
  if (horizontal) {
    handle_rect.reset(pixel_pos, 0, visible_pixels, rect().h);
  } else {
    handle_rect.reset(0, pixel_pos, rect().w, visible_pixels);
  }

  m_handle.set_rect(handle_rect);
}

void ScrollBar::OnResized(int old_w, int old_h) { UpdateHandle(); }

}  // namespace elements
}  // namespace el