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

<meta http-equiv="content-type" content="text/html;charset=UTF-8" />

<title>  Putting The (Big) Cat Among the Pidgeons - The Web Standards Project</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="The Web Standards Project is a grassroots coalition fighting for standards which ensure simple, affordable access to web technologies for all." />
<meta name="MSSmartTagsPreventParsing" content="true" />

<link rel="stylesheet" type="text/css" media="screen, projection" href="/wp/wp-content/themes/web-standards-project/styles.css" />
<link rel="stylesheet" type="text/css" media="print" href="/wp/wp-content/themes/web-standards-project/print.css" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="/feed/index.html" />
<link rel="alternate" type="text/xml" title="RSS .92" href="/feed/rss/index.html" />
<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="/feed/atom/index.html" />
<link rel="pingback" href="/wp/xmlrpc.php" />
<link rel="Shortcut Icon" type="image/ico" href="/files/theme/wasp.ico" />
<link rel="home" title="Web Standards Project Home" href="/index.html" />
	<link rel='archives' title='March 2013' href='/2013/03/index.html' />
	<link rel='archives' title='February 2012' href='/2012/02/index.html' />
	<link rel='archives' title='December 2011' href='/2011/12/index.html' />
	<link rel='archives' title='November 2011' href='/2011/11/index.html' />
	<link rel='archives' title='March 2011' href='/2011/03/index.html' />
	<link rel='archives' title='February 2011' href='/2011/02/index.html' />
	<link rel='archives' title='January 2011' href='/2011/01/index.html' />
	<link rel='archives' title='August 2010' href='/2010/08/index.html' />
	<link rel='archives' title='June 2010' href='/2010/06/index.html' />
	<link rel='archives' title='March 2010' href='/2010/03/index.html' />
	<link rel='archives' title='February 2010' href='/2010/02/index.html' />
	<link rel='archives' title='January 2010' href='/2010/01/index.html' />
	<link rel='archives' title='November 2009' href='/2009/11/index.html' />
	<link rel='archives' title='June 2009' href='/2009/06/index.html' />
	<link rel='archives' title='May 2009' href='/2009/05/index.html' />
	<link rel='archives' title='April 2009' href='/2009/04/index.html' />
	<link rel='archives' title='March 2009' href='/2009/03/index.html' />
	<link rel='archives' title='February 2009' href='/2009/02/index.html' />
	<link rel='archives' title='January 2009' href='/2009/01/index.html' />
	<link rel='archives' title='December 2008' href='/2008/12/index.html' />
	<link rel='archives' title='November 2008' href='/2008/11/index.html' />
	<link rel='archives' title='October 2008' href='/2008/10/index.html' />
	<link rel='archives' title='September 2008' href='/2008/09/index.html' />
	<link rel='archives' title='August 2008' href='/2008/08/index.html' />
	<link rel='archives' title='July 2008' href='/2008/07/index.html' />
	<link rel='archives' title='June 2008' href='/2008/06/index.html' />
	<link rel='archives' title='May 2008' href='/2008/05/index.html' />
	<link rel='archives' title='April 2008' href='/2008/04/index.html' />
	<link rel='archives' title='March 2008' href='/2008/03/index.html' />
	<link rel='archives' title='February 2008' href='/2008/02/index.html' />
	<link rel='archives' title='January 2008' href='/2008/01/index.html' />
	<link rel='archives' title='December 2007' href='/2007/12/index.html' />
	<link rel='archives' title='November 2007' href='/2007/11/index.html' />
	<link rel='archives' title='October 2007' href='/2007/10/index.html' />
	<link rel='archives' title='September 2007' href='/2007/09/index.html' />
	<link rel='archives' title='August 2007' href='/2007/08/index.html' />
	<link rel='archives' title='June 2007' href='/2007/06/index.html' />
	<link rel='archives' title='May 2007' href='/2007/05/index.html' />
	<link rel='archives' title='April 2007' href='/2007/04/index.html' />
	<link rel='archives' title='March 2007' href='/2007/03/index.html' />
	<link rel='archives' title='February 2007' href='/2007/02/index.html' />
	<link rel='archives' title='January 2007' href='/2007/01/index.html' />
	<link rel='archives' title='December 2006' href='/2006/12/index.html' />
	<link rel='archives' title='November 2006' href='/2006/11/index.html' />
	<link rel='archives' title='October 2006' href='/2006/10/index.html' />
	<link rel='archives' title='September 2006' href='/2006/09/index.html' />
	<link rel='archives' title='August 2006' href='/2006/08/index.html' />
	<link rel='archives' title='July 2006' href='/2006/07/index.html' />
	<link rel='archives' title='June 2006' href='/2006/06/index.html' />
	<link rel='archives' title='May 2006' href='/2006/05/index.html' />
	<link rel='archives' title='April 2006' href='/2006/04/index.html' />
	<link rel='archives' title='March 2006' href='/2006/03/index.html' />
	<link rel='archives' title='February 2006' href='/2006/02/index.html' />
	<link rel='archives' title='January 2006' href='/2006/01/index.html' />
	<link rel='archives' title='December 2005' href='/2005/12/index.html' />
	<link rel='archives' title='November 2005' href='/2005/11/index.html' />
	<link rel='archives' title='October 2005' href='/2005/10/index.html' />
	<link rel='archives' title='September 2005' href='/2005/09/index.html' />
	<link rel='archives' title='August 2005' href='/2005/08/index.html' />
	<link rel='archives' title='July 2005' href='/2005/07/index.html' />
	<link rel='archives' title='June 2005' href='/2005/06/index.html' />
	<link rel='archives' title='May 2005' href='/2005/05/index.html' />
	<link rel='archives' title='April 2005' href='/2005/04/index.html' />
	<link rel='archives' title='March 2005' href='/2005/03/index.html' />
	<link rel='archives' title='February 2005' href='/2005/02/index.html' />
	<link rel='archives' title='January 2005' href='/2005/01/index.html' />
	<link rel='archives' title='December 2004' href='/2004/12/index.html' />
	<link rel='archives' title='November 2004' href='/2004/11/index.html' />
	<link rel='archives' title='October 2004' href='/2004/10/index.html' />
	<link rel='archives' title='September 2004' href='/2004/09/index.html' />
	<link rel='archives' title='August 2004' href='/2004/08/index.html' />
	<link rel='archives' title='July 2004' href='/2004/07/index.html' />
	<link rel='archives' title='June 2004' href='/2004/06/index.html' />
	<link rel='archives' title='May 2004' href='/2004/05/index.html' />
	<link rel='archives' title='April 2004' href='/2004/04/index.html' />
	<link rel='archives' title='March 2004' href='/2004/03/index.html' />
	<link rel='archives' title='February 2004' href='/2004/02/index.html' />
	<link rel='archives' title='January 2004' href='/2004/01/index.html' />
	<link rel='archives' title='December 2003' href='../../../12/index.html' />
	<link rel='archives' title='November 2003' href='../../../11/index.html' />
	<link rel='archives' title='October 2003' href='../../index.html' />
	<link rel='archives' title='September 2003' href='../../../09/index.html' />
	<link rel='archives' title='August 2003' href='../../../08/index.html' />
	<link rel='archives' title='July 2003' href='../../../07/index.html' />
	<link rel='archives' title='June 2003' href='../../../06/index.html' />
	<link rel='archives' title='May 2003' href='../../../05/index.html' />
	<link rel='archives' title='April 2003' href='../../../04/index.html' />
	<link rel='archives' title='March 2003' href='../../../03/index.html' />
	<link rel='archives' title='February 2003' href='../../../02/index.html' />
	<link rel='archives' title='January 2003' href='../../../01/index.html' />
	<link rel='archives' title='December 2002' href='/2002/12/index.html' />
	<link rel='archives' title='November 2002' href='/2002/11/index.html' />
	<link rel='archives' title='October 2002' href='/2002/10/index.html' />
	<link rel='archives' title='September 2002' href='/2002/09/index.html' />
	<link rel='archives' title='August 2002' href='/2002/08/index.html' />
	<link rel='archives' title='July 2002' href='/2002/07/index.html' />
	<link rel='archives' title='June 2002' href='/2002/06/index.html' />
	<link rel='archives' title='April 2002' href='/2002/04/index.html' />
	<link rel='archives' title='March 2002' href='/2002/03/index.html' />
	<link rel='archives' title='December 2001' href='/2001/12/index.html' />
	<link rel='archives' title='September 2001' href='/2001/09/index.html' />
	<link rel='archives' title='November 2000' href='/2000/11/index.html' />
	<link rel='archives' title='July 2000' href='/2000/07/index.html' />
	<link rel='archives' title='April 2000' href='/2000/04/index.html' />
	<link rel='archives' title='March 1999' href='/1999/03/index.html' />
	<link rel='archives' title='October 1998' href='/1998/10/index.html' />
	<link rel='archives' title='August 1998' href='/1998/08/index.html' />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="/wp/xmlrpc0db0.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="/wp/wp-includes/wlwmanifest.xml" />
<link rel='prev' title='More WaSPs in the Nest' href='../../26/more-wasps-in-the-nest/index.html' />
<link rel='next' title='Longhorn and XAML' href='../longhorn-and-xaml/index.html' />
<meta name="generator" content="WordPress 3.3.1" />
<link rel='canonical' href='index.html' />
<link rel='shortlink' href='../../../../index905c.html?p=212' />

Working together for standards  The Web Standards Project

		Skip to content

				<form id="fm-search" method="get" action="http://www.webstandards.org/index.php">
			<fieldset>
				<legend>Search</legend>
				Search WaSP
				<input id="s" name="s" class="search" value="" />
				<input type="submit" class="submit" name="submit" value="Go!" />
			</fieldset>
		</form>

Home

About

Learn

Action

Buzz

Press

Putting The (Big) Cat Among the Pidgeons

By Ian Lloyd | October 27th, 2003 | Filed in Browsers

								Skip to comment form

So OS X 10.3 is now available, and it looks good to me. Fellow <acronym title="Web Standards Project">WaSP</acronym> Mark Pilgrim has already compiled a useful 11-page site detailing all the new features, but there was one thing that struck me about the new OS – and that is the new version of Safari.

Normally, I like to announce new browser updates on Buzz with a URL for you good folk to follow and then download, but I can’t do that with Safari 1.1. As it stands currently, the link from the Panther information pages takes you to a page about Safari 1.0. Why? Because version 1.1 is only available with Panther. Just take a moment to let that sink in.

Now, when Microsoft announced that it was cancelling future development on IE, everyone was up in arms. Want a new version of IE? You’ll have to wait until the next operating system comes out, mate. People across the web were really hacked off that they would have to buy a whole operating system to get the new browser. Strangely, this is precisely the situation with Safari 1.1 – yet where are the protests?

Now, before you shoot me down in flames let me just say that I am a Mac user, and have OS X (Jaguar) – I’m not a Mac hater by any means, I’m not trying to snipe. But I do find it strange that Apple have not come in for criticism for this in the same way that Microsoft has – especially when the browser has some tantalizing improved support for web standards  (like this text-shadow demonstration). We – the Jaguar users – want it too. Heck, we’ll probably buy Panther eventually. The browser alone is not enough of a carrot to dangle in front of us to upgrade, but in the meantime can’t we get Safari 1.1 on 10.2.*?

About a release for Jaguar users, Dave Hyatt is quoted as saying:

Several trackbacks also ask about Safari 1.1 on Jaguar. As I’ve mentioned in previous blog entries, I can’t comment on future Safari releases.

Well, now that Panther is out I’d love to see something more concrete about this. I’d hate to think that Apple are forcing users to upgrade their OS to get the new browser. I really don’t want to think bad thoughts about Apple. Please, Mr Hyatt, tell me something good.

			Return to top

Post a Reply

Comments are closed.

Back to Top

All of the entries posted in WaSP Buzz express the opinions of their individual authors. They do not necessarily reflect the plans or positions of the Web Standards Project as a group.

This site is valid XHTML 1.0 Strict, CSS | Get Buzz via RSS or Atom | Colophon | Legal


text:
'use strict';
//produce minified svg's in the dist folder
module.exports = {
    dist: {
        files: [{
            expand: true,
            cwd: '.tmp/concat/scripts',
            src: '*.js',
            dest: '.tmp/concat/scripts'
                }]
    }
};

redpajama_set_name: RedPajamaGithub


text:
/******************************************************************************
 *
 * Module Name: dsmethod - Parser/Interpreter interface - control method parsing
 *
 *****************************************************************************/

/*
 * Copyright (C) 2000 - 2011, Intel Corp.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions, and the following disclaimer,
 *    without modification.
 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
 *    substantially similar to the "NO WARRANTY" disclaimer below
 *    ("Disclaimer") and any redistribution must be conditioned upon
 *    including a substantially similar Disclaimer requirement for further
 *    binary redistribution.
 * 3. Neither the names of the above-listed copyright holders nor the names
 *    of any contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * Alternatively, this software may be distributed under the terms of the
 * GNU General Public License ("GPL") version 2 as published by the Free
 * Software Foundation.
 *
 * NO WARRANTY
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES.
 */

#define __DSMETHOD_C__

#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acdispat.h>
#include <contrib/dev/acpica/include/acinterp.h>
#include <contrib/dev/acpica/include/acnamesp.h>
#include <contrib/dev/acpica/include/acdisasm.h>

#define _COMPONENT          ACPI_DISPATCHER
        ACPI_MODULE_NAME    ("dsmethod")

/* Local prototypes */

static ACPI_STATUS
AcpiDsCreateMethodMutex (
    ACPI_OPERAND_OBJECT     *MethodDesc);

/*******************************************************************************
 *
 * FUNCTION:    AcpiDsMethodError
 *
 * PARAMETERS:  Status          - Execution status
 *              WalkState       - Current state
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Called on method error. Invoke the global exception handler if
 *              present, dump the method data if the disassembler is configured
 *
 *              Note: Allows the exception handler to change the status code
 *
 ******************************************************************************/

ACPI_STATUS
AcpiDsMethodError (
    ACPI_STATUS             Status,
    ACPI_WALK_STATE         *WalkState)
{
    ACPI_FUNCTION_ENTRY ();

    /* Ignore AE_OK and control exception codes */

    if (ACPI_SUCCESS (Status) ||
        (Status & AE_CODE_CONTROL))
    {
        return (Status);
    }

    /* Invoke the global exception handler */

    if (AcpiGbl_ExceptionHandler)
    {
        /* Exit the interpreter, allow handler to execute methods */

        AcpiExExitInterpreter ();

        /*
         * Handler can map the exception code to anything it wants, including
         * AE_OK, in which case the executing method will not be aborted.
         */
        Status = AcpiGbl_ExceptionHandler (Status,
                    WalkState->MethodNode ?
                        WalkState->MethodNode->Name.Integer : 0,
                    WalkState->Opcode, WalkState->AmlOffset, NULL);
        AcpiExEnterInterpreter ();
    }

    AcpiDsClearImplicitReturn (WalkState);

#ifdef ACPI_DISASSEMBLER
    if (ACPI_FAILURE (Status))
    {
        /* Display method locals/args if disassembler is present */

        AcpiDmDumpMethodInfo (Status, WalkState, WalkState->Op);
    }
#endif

    return (Status);
}

/*******************************************************************************
 *
 * FUNCTION:    AcpiDsCreateMethodMutex
 *
 * PARAMETERS:  ObjDesc             - The method object
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Create a mutex object for a serialized control method
 *
 ******************************************************************************/

static ACPI_STATUS
AcpiDsCreateMethodMutex (
    ACPI_OPERAND_OBJECT     *MethodDesc)
{
    ACPI_OPERAND_OBJECT     *MutexDesc;
    ACPI_STATUS             Status;

    ACPI_FUNCTION_TRACE (DsCreateMethodMutex);

    /* Create the new mutex object */

    MutexDesc = AcpiUtCreateInternalObject (ACPI_TYPE_MUTEX);
    if (!MutexDesc)
    {
        return_ACPI_STATUS (AE_NO_MEMORY);
    }

    /* Create the actual OS Mutex */

    Status = AcpiOsCreateMutex (&MutexDesc->Mutex.OsMutex);
    if (ACPI_FAILURE (Status))
    {
        return_ACPI_STATUS (Status);
    }

    MutexDesc->Mutex.SyncLevel = MethodDesc->Method.SyncLevel;
    MethodDesc->Method.Mutex = MutexDesc;
    return_ACPI_STATUS (AE_OK);
}

/*******************************************************************************
 *
 * FUNCTION:    AcpiDsBeginMethodExecution
 *
 * PARAMETERS:  MethodNode          - Node of the method
 *              ObjDesc             - The method object
 *              WalkState           - current state, NULL if not yet executing
 *                                    a method.
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Prepare a method for execution.  Parses the method if necessary,
 *              increments the thread count, and waits at the method semaphore
 *              for clearance to execute.
 *
 ******************************************************************************/

ACPI_STATUS
AcpiDsBeginMethodExecution (
    ACPI_NAMESPACE_NODE     *MethodNode,
    ACPI_OPERAND_OBJECT     *ObjDesc,
    ACPI_WALK_STATE         *WalkState)
{
    ACPI_STATUS             Status = AE_OK;

    ACPI_FUNCTION_TRACE_PTR (DsBeginMethodExecution, MethodNode);

    if (!MethodNode)
    {
        return_ACPI_STATUS (AE_NULL_ENTRY);
    }

    /* Prevent wraparound of thread count */

    if (ObjDesc->Method.ThreadCount == ACPI_UINT8_MAX)
    {
        ACPI_ERROR ((AE_INFO,
            "Method reached maximum reentrancy limit (255)"));
        return_ACPI_STATUS (AE_AML_METHOD_LIMIT);
    }

    /*
     * If this method is serialized, we need to acquire the method mutex.
     */
    if (ObjDesc->Method.InfoFlags & ACPI_METHOD_SERIALIZED)
    {
        /*
         * Create a mutex for the method if it is defined to be Serialized
         * and a mutex has not already been created. We defer the mutex creation
         * until a method is actually executed, to minimize the object count
         */
        if (!ObjDesc->Method.Mutex)
        {
            Status = AcpiDsCreateMethodMutex (ObjDesc);
            if (ACPI_FAILURE (Status))
            {
                return_ACPI_STATUS (Status);
            }
        }

        /*
         * The CurrentSyncLevel (per-thread) must be less than or equal to
         * the sync level of the method. This mechanism provides some
         * deadlock prevention
         *
         * Top-level method invocation has no walk state at this point
         */
        if (WalkState &&
            (WalkState->Thread->CurrentSyncLevel > ObjDesc->Method.Mutex->Mutex.SyncLevel))
        {
            ACPI_ERROR ((AE_INFO,
                "Cannot acquire Mutex for method [%4.4s], current SyncLevel is too large (%u)",
                AcpiUtGetNodeName (MethodNode),
                WalkState->Thread->CurrentSyncLevel));

            return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
        }

        /*
         * Obtain the method mutex if necessary. Do not acquire mutex for a
         * recursive call.
         */
        if (!WalkState ||
            !ObjDesc->Method.Mutex->Mutex.ThreadId ||
            (WalkState->Thread->ThreadId != ObjDesc->Method.Mutex->Mutex.ThreadId))
        {
            /*
             * Acquire the method mutex. This releases the interpreter if we
             * block (and reacquires it before it returns)
             */
            Status = AcpiExSystemWaitMutex (ObjDesc->Method.Mutex->Mutex.OsMutex,
                        ACPI_WAIT_FOREVER);
            if (ACPI_FAILURE (Status))
            {
                return_ACPI_STATUS (Status);
            }

            /* Update the mutex and walk info and save the original SyncLevel */

            if (WalkState)
            {
                ObjDesc->Method.Mutex->Mutex.OriginalSyncLevel =
                    WalkState->Thread->CurrentSyncLevel;

                ObjDesc->Method.Mutex->Mutex.ThreadId = WalkState->Thread->ThreadId;
                WalkState->Thread->CurrentSyncLevel = ObjDesc->Method.SyncLevel;
            }
            else
            {
                ObjDesc->Method.Mutex->Mutex.OriginalSyncLevel =
                    ObjDesc->Method.Mutex->Mutex.SyncLevel;
            }
        }

        /* Always increase acquisition depth */

        ObjDesc->Method.Mutex->Mutex.AcquisitionDepth++;
    }

    /*
     * Allocate an Owner ID for this method, only if this is the first thread
     * to begin concurrent execution. We only need one OwnerId, even if the
     * method is invoked recursively.
     */
    if (!ObjDesc->Method.OwnerId)
    {
        Status = AcpiUtAllocateOwnerId (&ObjDesc->Method.OwnerId);
        if (ACPI_FAILURE (Status))
        {
            goto Cleanup;
        }
    }

    /*
     * Increment the method parse tree thread count since it has been
     * reentered one more time (even if it is the same thread)
     */
    ObjDesc->Method.ThreadCount++;
    AcpiMethodCount++;
    return_ACPI_STATUS (Status);

Cleanup:
    /* On error, must release the method mutex (if present) */

    if (ObjDesc->Method.Mutex)
    {
        AcpiOsReleaseMutex (ObjDesc->Method.Mutex->Mutex.OsMutex);
    }
    return_ACPI_STATUS (Status);
}

/*******************************************************************************
 *
 * FUNCTION:    AcpiDsCallControlMethod
 *
 * PARAMETERS:  Thread              - Info for this thread
 *              ThisWalkState       - Current walk state
 *              Op                  - Current Op to be walked
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Transfer execution to a called control method
 *
 ******************************************************************************/

ACPI_STATUS
AcpiDsCallControlMethod (
    ACPI_THREAD_STATE       *Thread,
    ACPI_WALK_STATE         *ThisWalkState,
    ACPI_PARSE_OBJECT       *Op)
{
    ACPI_STATUS             Status;
    ACPI_NAMESPACE_NODE     *MethodNode;
    ACPI_WALK_STATE         *NextWalkState = NULL;
    ACPI_OPERAND_OBJECT     *ObjDesc;
    ACPI_EVALUATE_INFO      *Info;
    UINT32                  i;

    ACPI_FUNCTION_TRACE_PTR (DsCallControlMethod, ThisWalkState);

    ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Calling method %p, currentstate=%p\n",
        ThisWalkState->PrevOp, ThisWalkState));

    /*
     * Get the namespace entry for the control method we are about to call
     */
    MethodNode = ThisWalkState->MethodCallNode;
    if (!MethodNode)
    {
        return_ACPI_STATUS (AE_NULL_ENTRY);
    }

    ObjDesc = AcpiNsGetAttachedObject (MethodNode);
    if (!ObjDesc)
    {
        return_ACPI_STATUS (AE_NULL_OBJECT);
    }

    /* Init for new method, possibly wait on method mutex */

    Status = AcpiDsBeginMethodExecution (MethodNode, ObjDesc,
                ThisWalkState);
    if (ACPI_FAILURE (Status))
    {
        return_ACPI_STATUS (Status);
    }

    /* Begin method parse/execution. Create a new walk state */

    NextWalkState = AcpiDsCreateWalkState (ObjDesc->Method.OwnerId,
                        NULL, ObjDesc, Thread);
    if (!NextWalkState)
    {
        Status = AE_NO_MEMORY;
        goto Cleanup;
    }

    /*
     * The resolved arguments were put on the previous walk state's operand
     * stack. Operands on the previous walk state stack always
     * start at index 0. Also, null terminate the list of arguments
     */
    ThisWalkState->Operands [ThisWalkState->NumOperands] = NULL;

    /*
     * Allocate and initialize the evaluation information block
     * TBD: this is somewhat inefficient, should change interface to
     * DsInitAmlWalk. For now, keeps this struct off the CPU stack
     */
    Info = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EVALUATE_INFO));
    if (!Info)
    {
        return_ACPI_STATUS (AE_NO_MEMORY);
    }

    Info->Parameters = &ThisWalkState->Operands[0];

    Status = AcpiDsInitAmlWalk (NextWalkState, NULL, MethodNode,
                ObjDesc->Method.AmlStart, ObjDesc->Method.AmlLength,
                Info, ACPI_IMODE_EXECUTE);

    ACPI_FREE (Info);
    if (ACPI_FAILURE (Status))
    {
        goto Cleanup;
    }

    /*
     * Delete the operands on the previous walkstate operand stack
     * (they were copied to new objects)
     */
    for (i = 0; i < ObjDesc->Method.ParamCount; i++)
    {
        AcpiUtRemoveReference (ThisWalkState->Operands [i]);
        ThisWalkState->Operands [i] = NULL;
    }

    /* Clear the operand stack */

    ThisWalkState->NumOperands = 0;

    ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
        "**** Begin nested execution of [%4.4s] **** WalkState=%p\n",
        MethodNode->Name.Ascii, NextWalkState));

    /* Invoke an internal method if necessary */

    if (ObjDesc->Method.InfoFlags & ACPI_METHOD_INTERNAL_ONLY)
    {
        Status = ObjDesc->Method.Dispatch.Implementation (NextWalkState);
        if (Status == AE_OK)
        {
            Status = AE_CTRL_TERMINATE;
        }
    }

    return_ACPI_STATUS (Status);

Cleanup:

    /* On error, we must terminate the method properly */

    AcpiDsTerminateControlMethod (ObjDesc, NextWalkState);
    if (NextWalkState)
    {
        AcpiDsDeleteWalkState (NextWalkState);
    }

    return_ACPI_STATUS (Status);
}

/*******************************************************************************
 *
 * FUNCTION:    AcpiDsRestartControlMethod
 *
 * PARAMETERS:  WalkState           - State for preempted method (caller)
 *              ReturnDesc          - Return value from the called method
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Restart a method that was preempted by another (nested) method
 *              invocation.  Handle the return value (if any) from the callee.
 *
 ******************************************************************************/

ACPI_STATUS
AcpiDsRestartControlMethod (
    ACPI_WALK_STATE         *WalkState,
    ACPI_OPERAND_OBJECT     *ReturnDesc)
{
    ACPI_STATUS             Status;
    int                     SameAsImplicitReturn;

    ACPI_FUNCTION_TRACE_PTR (DsRestartControlMethod, WalkState);

    ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
        "****Restart [%4.4s] Op %p ReturnValueFromCallee %p\n",
        AcpiUtGetNodeName (WalkState->MethodNode),
        WalkState->MethodCallOp, ReturnDesc));

    ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
        "    ReturnFromThisMethodUsed?=%X ResStack %p Walk %p\n",
        WalkState->ReturnUsed,
        WalkState->Results, WalkState));

    /* Did the called method return a value? */

    if (ReturnDesc)
    {
        /* Is the implicit return object the same as the return desc? */

        SameAsImplicitReturn = (WalkState->ImplicitReturnObj == ReturnDesc);

        /* Are we actually going to use the return value? */

        if (WalkState->ReturnUsed)
        {
            /* Save the return value from the previous method */

            Status = AcpiDsResultPush (ReturnDesc, WalkState);
            if (ACPI_FAILURE (Status))
            {
                AcpiUtRemoveReference (ReturnDesc);
                return_ACPI_STATUS (Status);
            }

            /*
             * Save as THIS method's return value in case it is returned
             * immediately to yet another method
             */
            WalkState->ReturnDesc = ReturnDesc;
        }

        /*
         * The following code is the optional support for the so-called
         * "implicit return". Some AML code assumes that the last value of the
         * method is "implicitly" returned to the caller, in the absence of an
         * explicit return value.
         *
         * Just save the last result of the method as the return value.
         *
         * NOTE: this is optional because the ASL language does not actually
         * support this behavior.
         */
        else if (!AcpiDsDoImplicitReturn (ReturnDesc, WalkState, FALSE) ||
                 SameAsImplicitReturn)
        {
            /*
             * Delete the return value if it will not be used by the
             * calling method or remove one reference if the explicit return
             * is the same as the implicit return value.
             */
            AcpiUtRemoveReference (ReturnDesc);
        }
    }

    return_ACPI_STATUS (AE_OK);
}

/*******************************************************************************
 *
 * FUNCTION:    AcpiDsTerminateControlMethod
 *
 * PARAMETERS:  MethodDesc          - Method object
 *              WalkState           - State associated with the method
 *
 * RETURN:      None
 *
 * DESCRIPTION: Terminate a control method.  Delete everything that the method
 *              created, delete all locals and arguments, and delete the parse
 *              tree if requested.
 *
 * MUTEX:       Interpreter is locked
 *
 ******************************************************************************/

void
AcpiDsTerminateControlMethod (
    ACPI_OPERAND_OBJECT     *MethodDesc,
    ACPI_WALK_STATE         *WalkState)
{

    ACPI_FUNCTION_TRACE_PTR (DsTerminateControlMethod, WalkState);

    /* MethodDesc is required, WalkState is optional */

    if (!MethodDesc)
    {
        return_VOID;
    }

    if (WalkState)
    {
        /* Delete all arguments and locals */

        AcpiDsMethodDataDeleteAll (WalkState);

        /*
         * If method is serialized, release the mutex and restore the
         * current sync level for this thread
         */
        if (MethodDesc->Method.Mutex)
        {
            /* Acquisition Depth handles recursive calls */

            MethodDesc->Method.Mutex->Mutex.AcquisitionDepth--;
            if (!MethodDesc->Method.Mutex->Mutex.AcquisitionDepth)
            {
                WalkState->Thread->CurrentSyncLevel =
                    MethodDesc->Method.Mutex->Mutex.OriginalSyncLevel;

                AcpiOsReleaseMutex (MethodDesc->Method.Mutex->Mutex.OsMutex);
                MethodDesc->Method.Mutex->Mutex.ThreadId = 0;
            }
        }

        /*
         * Delete any namespace objects created anywhere within the
         * namespace by the execution of this method. Unless:
         * 1) This method is a module-level executable code method, in which
         *    case we want make the objects permanent.
         * 2) There are other threads executing the method, in which case we
         *    will wait until the last thread has completed.
         */
        if (!(MethodDesc->Method.InfoFlags & ACPI_METHOD_MODULE_LEVEL) &&
             (MethodDesc->Method.ThreadCount == 1))
        {
            /* Delete any direct children of (created by) this method */

            AcpiNsDeleteNamespaceSubtree (WalkState->MethodNode);

            /*
             * Delete any objects that were created by this method
             * elsewhere in the namespace (if any were created).
             * Use of the ACPI_METHOD_MODIFIED_NAMESPACE optimizes the
             * deletion such that we don't have to perform an entire
             * namespace walk for every control method execution.
             */
            if (MethodDesc->Method.InfoFlags & ACPI_METHOD_MODIFIED_NAMESPACE)
            {
                AcpiNsDeleteNamespaceByOwner (MethodDesc->Method.OwnerId);
                MethodDesc->Method.InfoFlags &= ~ACPI_METHOD_MODIFIED_NAMESPACE;
            }
        }
    }

    /* Decrement the thread count on the method */

    if (MethodDesc->Method.ThreadCount)
    {
        MethodDesc->Method.ThreadCount--;
    }
    else
    {
        ACPI_ERROR ((AE_INFO,
            "Invalid zero thread count in method"));
    }

    /* Are there any other threads currently executing this method? */

    if (MethodDesc->Method.ThreadCount)
    {
        /*
         * Additional threads. Do not release the OwnerId in this case,
         * we immediately reuse it for the next thread executing this method
         */
        ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
            "*** Completed execution of one thread, %u threads remaining\n",
            MethodDesc->Method.ThreadCount));
    }
    else
    {
        /* This is the only executing thread for this method */

        /*
         * Support to dynamically change a method from NotSerialized to
         * Serialized if it appears that the method is incorrectly written and
         * does not support multiple thread execution. The best example of this
         * is if such a method creates namespace objects and blocks. A second
         * thread will fail with an AE_ALREADY_EXISTS exception.
         *
         * This code is here because we must wait until the last thread exits
         * before marking the method as serialized.
         */
        if (MethodDesc->Method.InfoFlags & ACPI_METHOD_SERIALIZED_PENDING)
        {
            if (WalkState)
            {
                ACPI_INFO ((AE_INFO,
                    "Marking method %4.4s as Serialized because of AE_ALREADY_EXISTS error",
                    WalkState->MethodNode->Name.Ascii));
            }

            /*
             * Method tried to create an object twice and was marked as
             * "pending serialized". The probable cause is that the method
             * cannot handle reentrancy.
             *
             * The method was created as NotSerialized, but it tried to create
             * a named object and then blocked, causing the second thread
             * entrance to begin and then fail. Workaround this problem by
             * marking the method permanently as Serialized when the last
             * thread exits here.
             */
            MethodDesc->Method.InfoFlags &= ~ACPI_METHOD_SERIALIZED_PENDING;
            MethodDesc->Method.InfoFlags |= ACPI_METHOD_SERIALIZED;
            MethodDesc->Method.SyncLevel = 0;
        }

        /* No more threads, we can free the OwnerId */

        if (!(MethodDesc->Method.InfoFlags & ACPI_METHOD_MODULE_LEVEL))
        {
            AcpiUtReleaseOwnerId (&MethodDesc->Method.OwnerId);
        }
    }

    return_VOID;
}


text:
package com.google.cloud.tools.gradle.appengine.core;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Add this annotation to an extension member that should not be printed (displayed to user) when
 * running {@link ShowConfigurationTask}.
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
public @interface InternalProperty {}


text:
package net.ssehub.easy.instantiation.core.model.vilTypes;

/**
 * Implements a pseudo class for reals.
 *
 * @author Holger Eichelberger
 */
@ClassMeta(name = Constants.TYPE_REAL, equiv = Double.class)
public class PseudoReal implements IVilType {

    @DefaultValue
    public static final Double DEFAULT = 0.0;

    /**
     * Prevents external instantiation.
     */
    protected PseudoReal() {
    }

    /**
     * Represents the addition for reals.
     *
     * @param r1 the first real to be considered
     * @param r2 the second real to be considered
     * @return r1 + r2
     */
    @OperationMeta(name = Constants.ADDITION, opType = OperationType.INFIX)
    public static double add(double r1, double r2) {
        return r1 + r2;
    }

    /**
     * Represents the subtraction for reals.
     *
     * @param r1 the first real to be considered
     * @param r2 the second real to be considered
     * @return r1 - r2
     */
    @OperationMeta(name = Constants.SUBTRACTION, opType = OperationType.INFIX)
    public static double subtract(double r1, double r2) {
        return r1 - r2;
    }

    /**
     * Represents the multiplication for reals.
     *
     * @param r1 the first real to be considered
     * @param r2 the second real to be considered
     * @return r1 * r2
     */
    @OperationMeta(name = Constants.MULTIPLICATION, opType = OperationType.INFIX)
    public static double multiplication(double r1, double r2) {
        return r1 * r2;
    }

    /**
     * Represents the division for reals.
     *
     * @param r1 the first real to be considered
     * @param r2 the second real to be considered
     * @return r1 / r2
     */
    @OperationMeta(name = Constants.DIVISION, opType = OperationType.INFIX)
    public static double division(double r1, double r2) {
        return r1 / r2;
    }

    /**
     * Represents the less-than comparison for reals.
     *
     * @param r1 the first real to be considered
     * @param r2 the second real to be considered
     * @return r1 < r2
     */
    @OperationMeta(name = Constants.LESS_THEN, opType = OperationType.INFIX)
    public static boolean lessThan(double r1, double r2) {
        return r1 < r2;
    }

    /**
     * Represents the less-then-equals comparison for reals.
     *
     * @param r1 the first real to be considered
     * @param r2 the second real to be considered
     * @return r1 <= r2
     */
    @OperationMeta(name = Constants.LESS_THEN_EQUALS, opType = OperationType.INFIX)
    public static boolean lessEqualThen(double r1, double r2) {
        return r1 <= r2;
    }

    /**
     * Represents the greater-then-equals comparison for reals.
     *
     * @param r1 the first real to be considered
     * @param r2 the second real to be considered
     * @return r1 >= r2
     */
    @OperationMeta(name = Constants.GREATER_THEN_EQUALS, opType = OperationType.INFIX)
    public static boolean greaterEqualThen(double r1, double r2) {
        return r1 >= r2;
    }

    /**
     * Represents the greater comparison for reals.
     *
     * @param r1 the first real to be considered
     * @param r2 the second real to be considered
     * @return r1 >= r2
     */
    @OperationMeta(name = Constants.GREATER_THEN, opType = OperationType.INFIX)
    public static boolean greaterThan(double r1, double r2) {
        return r1 > r2;
    }

    /**
     * Represents the equality operation for Reals.
     *
     * @param r1 the first real to be considered
     * @param r2 the second real to be considered
     * @return r1 == r2
     */
    @OperationMeta(name = Constants.EQUALITY, opType = OperationType.INFIX)
    public static boolean equals(double r1, double r2) {
        return r1 == r2;
    }

    /**
     * Represents the unequality operation for Reals.
     *
     * @param r1 the first real to be considered
     * @param r2 the second real to be considered
     * @return r1 != r2
     */
    @OperationMeta(name = {Constants.UNEQUALITY, Constants.UNEQUALITY_ALIAS }, opType = OperationType.INFIX)
    public static boolean unequals(double r1, double r2) {
        return r1 != r2;
    }

    /**
     * Negates the given real value.
     *
     * @param r0 the real to be negated
     * @return -r0
     */
    @OperationMeta(name = {Constants.SUBTRACTION }, opType = OperationType.PREFIX)
    public static double negates(double r0) {
        return -r0;
    }

    /**
     * Returns the absolute value of the given real value.
     *
     * @param r0 the real the absolute value shall be returned for
     * @return |r0|
     */
    @OperationMeta(opType = OperationType.FUNCTION)
    public static double abs(double r0) {
        return Math.abs(r0);
    }

    /**
     * Returns whether the given real value is not a number.
     *
     * @param r0 the real the absolute value to be considered
     * @return true if r0 is not a number, false else
     */
    @OperationMeta(opType = OperationType.FUNCTION)
    public static boolean isNaN(double r0) {
        return Double.isNaN(r0);
    }

    /**
     * Returns whether the given real value is finite.
     *
     * @param r0 the real the absolute value to be considered
     * @return true if r0 is finite, false else
     */
    @OperationMeta(opType = OperationType.FUNCTION)
    public static boolean isFinite(double r0) {
        // SE: following function exists only since Java 1.8
        // Double.isFinite(r0);
        return Math.abs(r0) <= Double.MAX_VALUE;
    }

    /**
     * Returns whether the given real value is infinite.
     *
     * @param r0 the real the absolute value to be considered
     * @return true if r0 is infinite, false else
     */
    @OperationMeta(opType = OperationType.FUNCTION)
    public static boolean isInfinite(double r0) {
        return Double.isInfinite(r0);
    }

    /**
     * Returns the largest integer that is less than or equal to r0.
     *
     * @param r0 the real value to be considered
     * @return floor(r0)
     */
    @OperationMeta(opType = OperationType.FUNCTION)
    public static int floor(double r0) {
        return (int) Math.floor(r0);
    }

    /**
     * Returns the integer that is closest to r0.
     *
     * @param r0 the real value to be considered
     * @return ceil(r0)
     */
    @OperationMeta(opType = OperationType.FUNCTION)
    public static int ceil(double r0) {
        return (int) Math.ceil(r0);
    }

    /**
     * Returns the minimum value of r1 and r2.
     *
     * @param r1 the first value to be considered
     * @param r2 the first value to be considered
     * @return min(r1, r2)
     */
    @OperationMeta(opType = OperationType.FUNCTION)
    public static double min(double r1, double r2) {
        return Math.min(r1, r2);
    }

    /**
     * Returns the maximum value of r1 and r2.
     *
     * @param r1 the first value to be considered
     * @param r2 the first value to be considered
     * @return max(r1, r2)
     */
    @OperationMeta(opType = OperationType.FUNCTION)
    public static double max(double r1, double r2) {
        return Math.max(r1, r2);
    }

    /**
     * Returns the string value of r0.
     *
     * @param r0 the real to be turned into a string
     * @return the string value
     */
    @OperationMeta(opType = OperationType.FUNCTION)
    public static String toString(double r0) {
        return String.valueOf(r0);
    }

    /**
     * Returns the type of value. "Overrides" {@link PseudoAny#getType(Object)}.
     *
     * @param value the Real to return the type for
     * @return the type of object (null if ob is null)
     */
    public static TypeDescriptor<?> getType(Double value) {
        return TypeRegistry.realType();
    }
}


text:
package io.rx_cache.internal.cache.memory.apache;

/**
 * The "read" subset of the {@link java.util.Map} interface.
 *
 * @since 4.0
 * @version $Id: IterableGet.java 1477779 2013-04-30 18:55:24Z tn $
 *
 * @see Put
 */
public interface IterableGet<K, V> extends Get<K, V> {
    /**
     * Obtains a MapIterator over the map.
     *

     * A map iterator is an efficient way of iterating over maps.
     * There is no need to access the entry set or use Map Entry objects.
     *

     * IterableMap<String,Integer> map = new HashedMap<String,Integer>();
     * MapIterator<String,Integer> it = map.mapIterator();
     * while (it.hasNext()) {
     *   String key = it.next();
     *   Integer value = it.getValue();
     *   it.setValue(value + 1);
     * }
     *

     *
     * @return a map iterator
     */
    MapIterator<K, V> mapIterator();

}


text:
<?php

/**
 * This code was generated by
 * \ / _    _  _|   _  _
 * | (_)\/(_)(_|\/| |(/_  v1.0.0
 * /       /
 */

namespace Twilio\Rest\Notify\V1\Service;

use Twilio\Options;
use Twilio\Values;

/**
 * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
 */
abstract class NotificationOptions {
    /**
     * @param string $identity Delivery will be attempted only to Bindings with an
     *                         Identity in this list.
     * @param string $tag Delivery will be attempted only to Bindings that have all
     *                    of the Tags in this list.
     * @param string $body Indicates the notification body text.
     * @param string $priority Two priorities defined: low and high.
     * @param integer $ttl This parameter specifies how long the notification is
     *                     valid.
     * @param string $title Indicates the notification title.
     * @param string $sound Indicates a sound to be played.
     * @param string $action Specifies the actions to be displayed for the
     *                       notification.
     * @param array $data This parameter specifies the custom key-value pairs of
     *                    the notification's payload.
     * @param array $apn APNS specific payload that overrides corresponding
     *                   attributes in a generic payload for Bindings with the apn
     *                   BindingType.
     * @param array $gcm GCM specific payload that overrides corresponding
     *                   attributes in generic payload for Bindings with gcm
     *                   BindingType.
     * @param array $sms SMS specific payload that overrides corresponding
     *                   attributes in generic payload for Bindings with sms
     *                   BindingType.
     * @param array $facebookMessenger Messenger specific payload that overrides
     *                                 corresponding attributes in generic payload
     *                                 for Bindings with facebook-messenger
     *                                 BindingType.
     * @param array $fcm FCM specific payload that overrides corresponding
     *                   attributes in generic payload for Bindings with fcm
     *                   BindingType.
     * @param string $segment The segment
     * @param array $alexa The alexa
     * @param string $toBinding The destination address in a JSON object.
     * @return CreateNotificationOptions Options builder
     */
    public static function create($identity = Values::NONE, $tag = Values::NONE, $body = Values::NONE, $priority = Values::NONE, $ttl = Values::NONE, $title = Values::NONE, $sound = Values::NONE, $action = Values::NONE, $data = Values::NONE, $apn = Values::NONE, $gcm = Values::NONE, $sms = Values::NONE, $facebookMessenger = Values::NONE, $fcm = Values::NONE, $segment = Values::NONE, $alexa = Values::NONE, $toBinding = Values::NONE) {
        return new CreateNotificationOptions($identity, $tag, $body, $priority, $ttl, $title, $sound, $action, $data, $apn, $gcm, $sms, $facebookMessenger, $fcm, $segment, $alexa, $toBinding);
    }
}

class CreateNotificationOptions extends Options {
    /**
     * @param string $identity Delivery will be attempted only to Bindings with an
     *                         Identity in this list.
     * @param string $tag Delivery will be attempted only to Bindings that have all
     *                    of the Tags in this list.
     * @param string $body Indicates the notification body text.
     * @param string $priority Two priorities defined: low and high.
     * @param integer $ttl This parameter specifies how long the notification is
     *                     valid.
     * @param string $title Indicates the notification title.
     * @param string $sound Indicates a sound to be played.
     * @param string $action Specifies the actions to be displayed for the
     *                       notification.
     * @param array $data This parameter specifies the custom key-value pairs of
     *                    the notification's payload.
     * @param array $apn APNS specific payload that overrides corresponding
     *                   attributes in a generic payload for Bindings with the apn
     *                   BindingType.
     * @param array $gcm GCM specific payload that overrides corresponding
     *                   attributes in generic payload for Bindings with gcm
     *                   BindingType.
     * @param array $sms SMS specific payload that overrides corresponding
     *                   attributes in generic payload for Bindings with sms
     *                   BindingType.
     * @param array $facebookMessenger Messenger specific payload that overrides
     *                                 corresponding attributes in generic payload
     *                                 for Bindings with facebook-messenger
     *                                 BindingType.
     * @param array $fcm FCM specific payload that overrides corresponding
     *                   attributes in generic payload for Bindings with fcm
     *                   BindingType.
     * @param string $segment The segment
     * @param array $alexa The alexa
     * @param string $toBinding The destination address in a JSON object.
     */
    public function __construct($identity = Values::NONE, $tag = Values::NONE, $body = Values::NONE, $priority = Values::NONE, $ttl = Values::NONE, $title = Values::NONE, $sound = Values::NONE, $action = Values::NONE, $data = Values::NONE, $apn = Values::NONE, $gcm = Values::NONE, $sms = Values::NONE, $facebookMessenger = Values::NONE, $fcm = Values::NONE, $segment = Values::NONE, $alexa = Values::NONE, $toBinding = Values::NONE) {
        $this->options['identity'] = $identity;
        $this->options['tag'] = $tag;
        $this->options['body'] = $body;
        $this->options['priority'] = $priority;
        $this->options['ttl'] = $ttl;
        $this->options['title'] = $title;
        $this->options['sound'] = $sound;
        $this->options['action'] = $action;
        $this->options['data'] = $data;
        $this->options['apn'] = $apn;
        $this->options['gcm'] = $gcm;
        $this->options['sms'] = $sms;
        $this->options['facebookMessenger'] = $facebookMessenger;
        $this->options['fcm'] = $fcm;
        $this->options['segment'] = $segment;
        $this->options['alexa'] = $alexa;
        $this->options['toBinding'] = $toBinding;
    }

    /**
     * Delivery will be attempted only to Bindings with an Identity in this list. Maximum 20 items allowed in this list.
     *
     * @param string $identity Delivery will be attempted only to Bindings with an
     *                         Identity in this list.
     * @return $this Fluent Builder
     */
    public function setIdentity($identity) {
        $this->options['identity'] = $identity;
        return $this;
    }

    /**
     * Delivery will be attempted only to Bindings that have all of the Tags in this list. Maximum 5 items allowed in this list. The implicit tag "all" is available to notify all Bindings in a Service instance. Similarly the implicit tags "apn", "fcm", "gcm", "sms" and "facebook-messenger" are available to notify all Bindings of the given type.
     *
     * @param string $tag Delivery will be attempted only to Bindings that have all
     *                    of the Tags in this list.
     * @return $this Fluent Builder
     */
    public function setTag($tag) {
        $this->options['tag'] = $tag;
        return $this;
    }

    /**
     * (optional for all except Alexa) Indicates the notification body text. Translates to `data.twi_body` for FCM and GCM, `aps.alert.body` for APNS, `Body` for SMS and Facebook Messenger and `request.message.data` for Alexa.  For SMS either this, `body`, or the `media_url` attribute of the `Sms` parameter is required.  For Facebook Messenger either this parameter or the body attribute in the `FacebookMessenger` parameter is required.
     *
     * @param string $body Indicates the notification body text.
     * @return $this Fluent Builder
     */
    public function setBody($body) {
        $this->options['body'] = $body;
        return $this;
    }

    /**
     * Two priorities defined: `low` and `high` (default). `low` optimizes the client app's battery consumption, and notifications may be delivered with unspecified delay. This is the same as Normal priority for FCM and GCM or priority 5 for APNS. `high` sends the notification immediately, and can wake up a sleeping device. This is the same as High priority for FCM and GCM or priority 10 for APNS.  This feature is not supported by SMS and Facebook Messenger and will be ignored for deliveries via those channels.
     *
     * @param string $priority Two priorities defined: low and high.
     * @return $this Fluent Builder
     */
    public function setPriority($priority) {
        $this->options['priority'] = $priority;
        return $this;
    }

    /**
     * This parameter specifies how long (in seconds) the notification is valid. Delivery should be attempted if the device is offline. The maximum time to live supported is 4 weeks. The value zero means that the notification delivery is attempted immediately once but not stored for future delivery. The default value is 4 weeks.  This feature is not supported by SMS and Facebook Messenger and will be ignored for deliveries via those channels.
     *
     * @param integer $ttl This parameter specifies how long the notification is
     *                     valid.
     * @return $this Fluent Builder
     */
    public function setTtl($ttl) {
        $this->options['ttl'] = $ttl;
        return $this;
    }

    /**
     * (optional for all except Alexa) Indicates the notification title. This field is not visible on iOS phones and tablets but it is on Apple Watch and Android devices. Translates to `data.twi_title` for FCM and GCM, `aps.alert.title` for APNS and `displayInfo.content[0].title`, `displayInfo.content[].toast.primaryText` of `request.message` for Alexa. It is not supported for SMS and Facebook Messenger and will be omitted from deliveries via those channels.
     *
     * @param string $title Indicates the notification title.
     * @return $this Fluent Builder
     */
    public function setTitle($title) {
        $this->options['title'] = $title;
        return $this;
    }

    /**
     * Indicates a sound to be played. Translates to `data.twi_sound` for FCM and GCM and `aps.sound` for APNS.  This parameter is not supported by SMS and Facebook Messenger and is omitted from deliveries via those channels.
     *
     * @param string $sound Indicates a sound to be played.
     * @return $this Fluent Builder
     */
    public function setSound($sound) {
        $this->options['sound'] = $sound;
        return $this;
    }

    /**
     * Specifies the actions to be displayed for the notification. Translates to `data.twi_action` for GCM and `aps.category` for APNS.  This parameter is not supported by SMS and Facebook Messenger and is omitted from deliveries via those channels.
     *
     * @param string $action Specifies the actions to be displayed for the
     *                       notification.
     * @return $this Fluent Builder
     */
    public function setAction($action) {
        $this->options['action'] = $action;
        return $this;
    }

    /**
     * This parameter specifies the custom key-value pairs of the notification's payload. Translates to `data` dictionary in FCM and GCM payload. FCM and GCM [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used for those channels. For APNS, attributes of `Data` will be inserted into the APNS payload as custom properties outside of the `aps` dictionary. For Alexa they are added to `request.message.data`. For all channels, the `twi_` prefix is reserved for Twilio for future use. Requests including custom data with keys starting with `twi_` will be rejected as 400 Bad request and no delivery will be attempted.  This parameter is not supported by SMS and Facebook Messenger and is omitted from deliveries via those channels.
     *
     * @param array $data This parameter specifies the custom key-value pairs of
     *                    the notification's payload.
     * @return $this Fluent Builder
     */
    public function setData($data) {
        $this->options['data'] = $data;
        return $this;
    }

    /**
     * APNS specific payload that overrides corresponding attributes in a generic payload for Bindings with the apn BindingType. This value is mapped to the Payload item, therefore the `aps` key has to be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. Refer to [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. The `twi_` key prefix for custom key-value pairs is reserved for Twilio for future use. Custom data with keys starting with `twi_` is not allowed.
     *
     * @param array $apn APNS specific payload that overrides corresponding
     *                   attributes in a generic payload for Bindings with the apn
     *                   BindingType.
     * @return $this Fluent Builder
     */
    public function setApn($apn) {
        $this->options['apn'] = $apn;
        return $this;
    }

    /**
     * GCM specific payload that overrides corresponding attributes in generic payload for Bindings with gcm BindingType.  This value is mapped to the root json dictionary. Refer to [GCM documentation](https://developers.google.com/cloud-messaging/http-server-ref) for more details.  Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. The `twi_` key prefix for custom key-value pairs is reserved for Twilio for future use. Custom data with keys starting with `twi_` is not allowed. FCM and GCM [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used for those channels.
     *
     * @param array $gcm GCM specific payload that overrides corresponding
     *                   attributes in generic payload for Bindings with gcm
     *                   BindingType.
     * @return $this Fluent Builder
     */
    public function setGcm($gcm) {
        $this->options['gcm'] = $gcm;
        return $this;
    }

    /**
     * SMS specific payload that overrides corresponding attributes in generic payload for Bindings with sms BindingType.  Each attribute in this JSON object is mapped to the corresponding form parameter of the Twilio [Message](https://www.twilio.com/docs/api/rest/sending-messages) resource.  The following parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`.  The `status_callback` parameter overrides the corresponding parameter in the messaging service if configured. The `media_urls` expects a JSON array.
     *
     * @param array $sms SMS specific payload that overrides corresponding
     *                   attributes in generic payload for Bindings with sms
     *                   BindingType.
     * @return $this Fluent Builder
     */
    public function setSms($sms) {
        $this->options['sms'] = $sms;
        return $this;
    }

    /**
     * Messenger specific payload that overrides corresponding attributes in generic payload for Bindings with facebook-messenger BindingType.  This value is mapped to the root json dictionary of Facebook's [Send API request](https://developers.facebook.com/docs/messenger-platform/send-api-reference).  Overriding the `recipient` parameter is not allowed.
     *
     * @param array $facebookMessenger Messenger specific payload that overrides
     *                                 corresponding attributes in generic payload
     *                                 for Bindings with facebook-messenger
     *                                 BindingType.
     * @return $this Fluent Builder
     */
    public function setFacebookMessenger($facebookMessenger) {
        $this->options['facebookMessenger'] = $facebookMessenger;
        return $this;
    }

    /**
     * FCM specific payload that overrides corresponding attributes in generic payload for Bindings with fcm BindingType.  This value is mapped to the root json dictionary. Refer to [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details.  Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed. The `twi_` key prefix for custom key-value pairs is reserved for Twilio for future use. Custom data with keys starting with `twi_` is not allowed. Custom data with keys starting with `twi_` is not allowed. FCM and GCM [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used for those channels.
     *
     * @param array $fcm FCM specific payload that overrides corresponding
     *                   attributes in generic payload for Bindings with fcm
     *                   BindingType.
     * @return $this Fluent Builder
     */
    public function setFcm($fcm) {
        $this->options['fcm'] = $fcm;
        return $this;
    }

    /**
     * The segment
     *
     * @param string $segment The segment
     * @return $this Fluent Builder
     */
    public function setSegment($segment) {
        $this->options['segment'] = $segment;
        return $this;
    }

    /**
     * The alexa
     *
     * @param array $alexa The alexa
     * @return $this Fluent Builder
     */
    public function setAlexa($alexa) {
        $this->options['alexa'] = $alexa;
        return $this;
    }

    /**
     * The destination address in a JSON object (see attributes below).  Multiple ToBinding parameters can be included but the total size of the request entity should not exceed 1MB. This is typically sufficient for 10,000 phone numbers.
     *
     * @param string $toBinding The destination address in a JSON object.
     * @return $this Fluent Builder
     */
    public function setToBinding($toBinding) {
        $this->options['toBinding'] = $toBinding;
        return $this;
    }

    /**
     * Provide a friendly representation
     *
     * @return string Machine friendly representation
     */
    public function __toString() {
        $options = array();
        foreach ($this->options as $key => $value) {
            if ($value != Values::NONE) {
                $options[] = "$key=$value";
            }
        }
        return '[Twilio.Notify.V1.CreateNotificationOptions ' . implode(' ', $options) . ']';
    }
}


text:
import os

try:
    from nltk.corpus import stopwords
    stopset = set(stopwords.words('english'))
except ImportError:
    print("Cannot use dbpedia without 'pip install nltk'")

try:
    import ujson as json
except ImportError:
    import json

def generate_testables(words, stopword_set, n_grams=4):
    grams = set()
    n = len(words)
    for i in range(len(words)):
        for j in range(n_grams):
            if n - j > i:
                ws = words[i: i + j + 1]
                if any(['NN' not in x[1] for x in ws]):
                    continue
                word_list = [x[0].lower() for x in ws]
                if any([len(x) < 3 for x in word_list]):
                    continue
                if set(word_list) & stopword_set:
                    continue

                grams.add((" ".join([x[1] for x in ws]), " ".join(word_list)))
    return grams

def get_dbpedia_from_words(pos_tags, db_dict, ok_entities=None):
    if ok_entities is None:
        ok_entities = ['Person', 'Organisation']
    ws = generate_testables(pos_tags, stopset)
    classes = []
    for x in ws:
        if x[1] in db_dict:
            for y in db_dict[x[1]]:
                if y in ok_entities:
                    classes.append(('db_' + y + '_' + x[0], x))
                    break
    return classes

def load_dbpedia():
    # looks for 'dbpedia.json'; sky/sky/dbpedia.json
    with open(os.path.join(os.path.dirname(__file__), 'dbpedia.json')) as f:
        return json.load(f)


text:
package com.fulin.number;

import org.junit.Test;
import org.junit.Before;
import org.junit.After;

/**
* FindMedianSortedArrays Tester.
*
* @author <Authors name>
* @since <pre>���� 8, 2019</pre>
* @version 1.0
*/
public class FindMedianSortedArraysTest {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: findMedianSortedArrays(int[] nums1, int[] nums2)
*
*/
@Test
public void testFindMedianSortedArrays() throws Exception {
    int[] nums1 = {1,2};
    int[] nums2 = {3,4};
    double result = FindMedianSortedArrays.findMedianSortedArrays(nums1,nums2);
    System.out.println(result);
    assert result == 2.5;
}

/**
*
* Method: findMedianSortedArrays2(int[] nums1, int[] nums2)
*
*/
@Test
public void testFindMedianSortedArrays2() throws Exception {
    int[] nums1 = {1,2};
    int[] nums2 = {3,4};
    double result = FindMedianSortedArrays.findMedianSortedArrays2(nums1,nums2);
    System.out.println(result);
    assert result == 2.5;
}

/**
*
* Method: findKthSmall(int[] nums1, int startM, int endM, int[] nums2, int startN, int endN, int k)
*
*/
@Test
public void testFindKthSmall() throws Exception {
//TODO: Test goes here...
/*
try {
   Method method = FindMedianSortedArrays.getClass().getMethod("findKthSmall", int[].class, int.class, int.class, int[].class, int.class, int.class, int.class);
   method.setAccessible(true);
   method.invoke(<Object>, <Parameters>);
} catch(NoSuchMethodException e) {
} catch(IllegalAccessException e) {
} catch(InvocationTargetException e) {
}
*/
}

/**
*
* Method: min(int a, int b)
*
*/
@Test
public void testMin() throws Exception {
//TODO: Test goes here...
/*
try {
   Method method = FindMedianSortedArrays.getClass().getMethod("min", int.class, int.class);
   method.setAccessible(true);
   method.invoke(<Object>, <Parameters>);
} catch(NoSuchMethodException e) {
} catch(IllegalAccessException e) {
} catch(InvocationTargetException e) {
}
*/
}

    @Test
    public void findMedianSortedArrays() {
        int[] nums1 = {1,2};
        int[] nums2 = {3,4};
        double result = FindMedianSortedArrays.findMedianSortedArrays(nums1,nums2);
        System.out.println(result);
        assert result == 2.5;
    }

    @Test
    public void findMedianSortedArrays2() {
        int[] nums1 = {1,2};
        int[] nums2 = {3,4};
        double result = FindMedianSortedArrays.findMedianSortedArrays2(nums1,nums2);
        System.out.println(result);
        assert result == 2.5;
    }

}


text:
function whDone
% closes the window and clears the variables.  first prompts the user to
% save any unsaved data points
%
% Modified by Daniel Golden (dgolden1 at stanford dot edu) May 4 2007

% $Id$

global DF
global DATA_SET
global POINT_HANDLES
global SFERIC_HANDLE

if ( isstruct( DATA_SET ) && DATA_SET.index > 0)
	% prompt the user to save their unsaved data
	response_str = questdlg('Do you want to save this whistler data?');
	if strcmp(response_str, 'Cancel')
		return;
	end

	if strcmp(response_str, 'Yes')
	    whSavePoints;
	end

    % need to make sure these next two lines do not execute until user
    % chooses to save or not save current points
    h = findobj('Tag','tempsave');
    waitfor(h);
    if (ishandle(POINT_HANDLES))
        for k=1:DATA_SET.index
            delete(POINT_HANDLES(k));
        end
    end
    POINT_HANDLES = [];
end

% delete the sferic if it exists
if (ishandle(SFERIC_HANDLE))
	delete(SFERIC_HANDLE);
end

% MAKE SURE THIS IS OK
% not sure this is what I want to do
clear global DATA_SET

delete(findobj('Tag', 'getpointsgui')); % delete the window controlling the get points function

set(findobj('Tag','spec_axis'),'XColor','BLACK','YColor','BLACK');

if (ishandle(DF.fig))
	set(DF.fig, 'Pointer', 'arrow');

	% run whGetClicks whenever there is a mouse click on the spectrogram
	h = findobj('Tag', 'spec_image'); % image of spectrogram
	set(h, 'ButtonDownFcn', '');
end


text:
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Ads.GoogleAds.V10.Enums {

  /// Holder for reflection information generated from google/ads/googleads/v10/enums/criterion_system_serving_status.proto
  public static partial class CriterionSystemServingStatusReflection {

    #region Descriptor
    /// File descriptor for google/ads/googleads/v10/enums/criterion_system_serving_status.proto
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static CriterionSystemServingStatusReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "CkRnb29nbGUvYWRzL2dvb2dsZWFkcy92MTAvZW51bXMvY3JpdGVyaW9uX3N5",
            "c3RlbV9zZXJ2aW5nX3N0YXR1cy5wcm90bxIeZ29vZ2xlLmFkcy5nb29nbGVh",
            "ZHMudjEwLmVudW1zIoEBCiBDcml0ZXJpb25TeXN0ZW1TZXJ2aW5nU3RhdHVz",
            "RW51bSJdChxDcml0ZXJpb25TeXN0ZW1TZXJ2aW5nU3RhdHVzEg8KC1VOU1BF",
            "Q0lGSUVEEAASCwoHVU5LTk9XThABEgwKCEVMSUdJQkxFEAISEQoNUkFSRUxZ",
            "X1NFUlZFRBADQvsBCiJjb20uZ29vZ2xlLmFkcy5nb29nbGVhZHMudjEwLmVu",
            "dW1zQiFDcml0ZXJpb25TeXN0ZW1TZXJ2aW5nU3RhdHVzUHJvdG9QAVpDZ29v",
            "Z2xlLmdvbGFuZy5vcmcvZ2VucHJvdG8vZ29vZ2xlYXBpcy9hZHMvZ29vZ2xl",
            "YWRzL3YxMC9lbnVtcztlbnVtc6ICA0dBQaoCHkdvb2dsZS5BZHMuR29vZ2xl",
            "QWRzLlYxMC5FbnVtc8oCHkdvb2dsZVxBZHNcR29vZ2xlQWRzXFYxMFxFbnVt",
            "c+oCIkdvb2dsZTo6QWRzOjpHb29nbGVBZHM6OlYxMDo6RW51bXNiBnByb3Rv",
            "Mw=="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { },
          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Ads.GoogleAds.V10.Enums.CriterionSystemServingStatusEnum), global::Google.Ads.GoogleAds.V10.Enums.CriterionSystemServingStatusEnum.Parser, null, null, new[]{ typeof(global::Google.Ads.GoogleAds.V10.Enums.CriterionSystemServingStatusEnum.Types.CriterionSystemServingStatus) }, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  ///
  /// Container for enum describing possible criterion system serving statuses.
  ///
  public sealed partial class CriterionSystemServingStatusEnum : pb::IMessage<CriterionSystemServingStatusEnum>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<CriterionSystemServingStatusEnum> _parser = new pb::MessageParser<CriterionSystemServingStatusEnum>(() => new CriterionSystemServingStatusEnum());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<CriterionSystemServingStatusEnum> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Ads.GoogleAds.V10.Enums.CriterionSystemServingStatusReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public CriterionSystemServingStatusEnum() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public CriterionSystemServingStatusEnum(CriterionSystemServingStatusEnum other) : this() {
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public CriterionSystemServingStatusEnum Clone() {
      return new CriterionSystemServingStatusEnum(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as CriterionSystemServingStatusEnum);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(CriterionSystemServingStatusEnum other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(CriterionSystemServingStatusEnum other) {
      if (other == null) {
        return;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
        }
      }
    }
    #endif

    #region Nested types
    /// Container for nested types declared in the CriterionSystemServingStatusEnum message type.
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static partial class Types {
      ///
      /// Enumerates criterion system serving statuses.
      ///
      public enum CriterionSystemServingStatus {
        ///
        /// Not specified.
        ///
        [pbr::OriginalName("UNSPECIFIED")] Unspecified = 0,
        ///
        /// The value is unknown in this version.
        ///
        [pbr::OriginalName("UNKNOWN")] Unknown = 1,
        ///
        /// Eligible.
        ///
        [pbr::OriginalName("ELIGIBLE")] Eligible = 2,
        ///
        /// Low search volume.
        ///
        [pbr::OriginalName("RARELY_SERVED")] RarelyServed = 3,
      }

    }
    #endregion

  }

  #endregion

}

#endregion Designer generated code


text:
<?php

namespace SalesEngineOnline\DesafioBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class CandidatoType extends AbstractType
{
        /**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('nome')
            ->add('telefone')
            ->add(
                    'nascimento',
                    'birthday',
                    array(
                        'years' => range(date('Y') - 110, date('Y'))
                    )
                )
            ->add('localidade', 'choice')
            ->add(
                    'fotografia',
                    'file',
                    array(
                        'required' => true
                        )
                    )
            ->add(
                    'curriculum',
                    'file',
                    array(
                        'required' => true
                        )
                )
            ->add('email')
            ->add('emailAmigo')
        ;
    }

    /**
     * @param OptionsResolverInterface $resolver
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'SalesEngineOnline\DesafioBundle\Entity\Candidato'
        ));
    }

    /**
     * @return string
     */
    public function getName()
    {
        return 'salesengineonline_desafiobundle_candidato';
    }
}


text:
using Newtonsoft.Json;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Windows.Gaming.Input;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Core;
using System;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

namespace XboxControllerClient
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        // Change the IP address if running remotely
        readonly private string WebServiceUrl = "http://localhost:5000/gamepad";

        private Task readInputTask;
        private CancellationTokenSource cancelTokenSource;

        public MainPage()
        {
            this.InitializeComponent();
        }

        private async Task ReadInputLoop(CancellationToken token)
        {
            while (!token.IsCancellationRequested)
            {
                var gamepad = Gamepad.Gamepads.FirstOrDefault();
                if (gamepad != null)
                {
                    // Read gamepad input
                    var reading = gamepad.GetCurrentReading();

                    // Post the gamepad reading to WebService
                    var response = await this.PostGamePadReading(reading);
                    await this.UpdateText(this.GamePadReadingToString(reading) + response);
                }
                else
                {
                    await this.UpdateText("No gamepad connected.");
                }
            }
        }

        private async Task UpdateText(string message)
        {
            // Update Textbox using the UI thread
            await this.textBox.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { this.textBox.Text = message; });
        }

        private async Task<string> PostGamePadReading(GamepadReading reading)
        {
            // Post the gamepad reading to WebService
            try
            {
                var httpClient = new HttpClient();
                var json = JsonConvert.SerializeObject(reading);
                var content = new StringContent(json, Encoding.ASCII, "application/json");
                var response = await httpClient.PostAsync(WebServiceUrl, content);

                if (response.IsSuccessStatusCode)
                {
                    return "Server: ok";
                }
                else
                {
                    return string.Format("Server: error code={0}", response.StatusCode);
                }
            }
            catch (HttpRequestException)
            {
                return "Server: not found\n";
            }
        }

        private string GamePadReadingToString(GamepadReading reading)
        {
            return string.Format("LeftStickX={0}\n" +
                                 "LeftstickY={1}\n" +
                                 "LeftTrigger={2}\n" +
                                 "RightStickX={3}\n" +
                                 "RightStickY={4}\n" +
                                 "RightTrigger={5}\n" +
                                 "Buttons={6}\n\n",
                                 reading.LeftThumbstickX, reading.LeftThumbstickY, reading.LeftTrigger,
                                 reading.RightThumbstickX, reading.RightThumbstickY, reading.RightTrigger,
                                 reading.Buttons);
        }

        private void OnUnloaded(object sender, RoutedEventArgs e)
        {
            this.cancelTokenSource.Cancel();
            this.readInputTask.Wait();
        }

        private void OnLoaded(object sender, RoutedEventArgs e)
        {
            this.cancelTokenSource = new CancellationTokenSource();

            // Execute the ReadInputLoop() on a background thread
            this.readInputTask = Task.Run(async () => { await this.ReadInputLoop(this.cancelTokenSource.Token); });
        }
    }
}


text:
% Based on
%UKF_PREDICTq  Augmented (state and process noise) UKF prediction step
%
% Syntax:
%   [M,P] = UKF_PREDICTQ(M,P,Q,dt,qindstart)
%
% In:
%   M - 19x1 mean state estimate of previous step
%   P - 18x18 state covariance of previous step
%   Q - Non-singular 18x18 covariance of process noise w
%   dt - sampling time
%%   qindstart      ->   Row index where quaternion starts. Empty matrix
%%   means no quaternion
%
% Out:
%   M - Updated state mean
%   P - Updated state covariance
%
% Description:
%   Perform Unscented Kalman Filter prediction step
%   for model with quaternion representation of rotation
%

% This software is distributed under the GNU General Public
% Licence (version 2 or later); please refer to the file
% Licence.txt, included with the software, for details.

function [XXm,Pk, EE, timeused] = ukf_predictq2(M,P,Q,nq,dt)

  timeused = zeros(3,1);
  %% Create sigma points
  n= size(P,1);
  [Wm,Wc,c] = ut_weights(n);

  tic();
  X = sigma(P+Q,M,nq);
  timeused(1) = toc(); % about 3.0 / 200 s

  %% Propagate sigma points
  tic();
  XX = dynamics_q2(X,dt);
  timeused(2) = toc(); % about 1.6 / 200 s

  tic();
  [XXm,Pk,EE] = sigmamean(XX,nq,Wm,Wc);
  timeused(3) = toc(); % About 3.2 / 200 s