node) {
    return "Stringify: ${temporaryId(node.inputs[0])}";
  }

  @override
  String visitSubtract(HSubtract node) => handleInvokeBinary(node, 'Subtract');

  @override
  String visitSwitch(HSwitch node) {
    StringBuffer buf = StringBuffer();
    buf.write("Switch: (");
    buf.write(temporaryId(node.inputs[0]));
    buf.write(") ");
    for (int i = 1; i < node.inputs.length; i++) {
      buf.write(temporaryId(node.inputs[i]));
      buf.write(": B");
      buf.write(node.block!.successors[i - 1].id);
      buf.write(", ");
    }
    buf.write("default: B");
    buf.write(node.defaultTarget.id);
    return buf.toString();
  }

  @override
  String visitThis(HThis node) => "This";

  @override
  String visitThrow(HThrow node) => "Throw: ${temporaryId(node.inputs[0])}";

  @override
  String visitThrowExpression(HThrowExpression node) {
    return "ThrowExpression: ${temporaryId(node.inputs[0])}";
  }

  @override
  String visitTruncatingDivide(HTruncatingDivide node) {
    return handleInvokeBinary(node, 'TruncatingDivide');
  }

  @override
  String visitRemainder(HRemainder node) {
    return handleInvokeBinary(node, 'Remainder');
  }

  @override
  String visitExitTry(HExitTry node) {
    final targets = currentBlock.successors.map((block) => 'B${block.id}');
    return "ExitTry: (${targets.join(', ')})";
  }

  @override
  String visitTry(HTry node) {
    List<HBasicBlock> successors = currentBlock.successors;
    String tryBlock = 'B${successors[0].id}';
    String catchBlock = 'none';
    if (node.catchBlock != null) {
      catchBlock = 'B${successors[1].id}';
    }

    String finallyBlock = 'none';
    if (node.finallyBlock != null) {
      finallyBlock = 'B${node.finallyBlock!.id}';
    }

    return "Try: $tryBlock, Catch: $catchBlock, Finally: $finallyBlock, "
        "Join: B${successors.last.id}";
  }

  @override
  String visitPrimitiveCheck(HPrimitiveCheck node) {
    String checkedInput = temporaryId(node.checkedInput);
    assert(node.inputs.length == 1);
    String kind = _primitiveCheckKind(node);
    return "PrimitiveCheck: $kind $checkedInput to ${node.instructionType}";
  }

  String _primitiveCheckKind(HPrimitiveCheck node) {
    if (node.isReceiverTypeCheck) return 'RECEIVER';
    if (node.isArgumentTypeCheck) return 'ARGUMENT';
    return '?';
  }

  @override
  String visitBoolConversion(HBoolConversion node) {
    String checkedInput = temporaryId(node.checkedInput);
    return "BoolConversion: $checkedInput";
  }

  @override
  String visitNullCheck(HNullCheck node) {
    String checkedInput = temporaryId(node.checkedInput);
    var comments = [
      if (node.selector != null) 'for ${node.selector!}',
      if (node.field != null) 'for ${node.field!}',
    ].join(', ');
    return "NullCheck: $checkedInput $comments";
  }

  @override
  String visitLateReadCheck(HLateReadCheck node) {
    String checkedInput = temporaryId(node.checkedInput);
    String trust = node.isTrusted ? '.trusted' : '';
    String comment = node.hasName ? "(${temporaryId(node.name)})" : "";
    return "LateReadCheck$trust$comment: $checkedInput";
  }

  @override
  String visitLateWriteOnceCheck(


er than the dynamic version, but can be used only when the
* values are known at compile time.
* \tparam I The row number the manipulator will set the matrix assigner index to.
* \tparam J The column number the manipulator will set the matrix assigner index to.
* \return A static move_to matrix manipulator
*
* Example usage:
* \code:
* matrix<double> A(3, 3, 0);
* A <<= 1, 2, move_to<2,2>, 3;
* \endcode
* will result in:
* \code
* 1 2 0
* 0 0 0
* 0 0 3
* \endcode
* \sa move_to(T i, T j) and static_matrix_move_to_manip
*/
template <std::size_t I, std::size_t J>
BOOST_UBLAS_INLINE static_matrix_move_to_manip<I, J>  move_to() {
    return static_matrix_move_to_manip<I, J>();
}

/**
* \brief A move matrix index manipulator.
*
* When member function \c manip is called the manipulator's
* index will be added to the referenced' index.
*
* \sa move(T i, T j)
*/
template <typename T>
class matrix_move_manip: public index_manipulator<matrix_move_manip<T> > {
public:
    BOOST_UBLAS_INLINE
    matrix_move_manip(T k, T l): i(k), j(l) { }

    template <typename V, typename K>
    BOOST_UBLAS_INLINE
    void manip(V &k, K &l) const {
        k+=i;
        l+=j;
    }
private:
    T i, j;
};

/**
* \brief  An object generator that returns a move matrix index manipulator
*
* \tparam size type
* \param i The number of rows the manipulator will traverse the index when "manip"
* member function is called
* \param j The number of columns the manipulator will traverse the index when "manip"
* member function is called
* \return A move matrix manipulator
*
* Example:
* \code:
* matrix<double> A(3, 3, 0);
* A <<= 1, 2, move(1,0),
*            3,;
* \endcode
* will result in:
* \code
* 1 2 0
* 0 0 3
* 0 0 0
* \endcode
*/
template <typename T>
BOOST_UBLAS_INLINE matrix_move_manip<T>  move(T i, T j) {
    return matrix_move_manip<T>(i, j);
}

/**
* \brief A static move matrix index manipulator.
*
* When member function traverse is called the manipulator's
* index will be added to the referenced' index.
*
* \sa move()
*
* \todo Doxygen has some problems with similar template functions. Correct that.
*/
template <std::ptrdiff_t I, std::ptrdiff_t J>
class static_matrix_move_manip: public index_manipulator<static_matrix_move_manip<I, J> > {
public:
    template <typename V, typename K>
    BOOST_UBLAS_INLINE
    void manip(V &k, K &l) const {
        k+=I;
        l+=J;
    }
};

/**
* \brief  An object generator that returns a static "move" matrix index manipulator.
*
* Typically faster than the dynamic version, but can be used only when the
* values are known at compile time. Negative values can be used.
* \tparam I The number of rows the manipulator will trasverse the matrix assigner index.
* \tparam J The number of columns the manipulator will trasverse the matrix assigner index.
* \tparam size type
* \return A static move matrix manipulator
*
* Example:
* \code:
* matrix<double> A(3, 3, 0);
* A <<= 1, 2, move<1,0>(),
*


index:998;opacity:.999}.page-columns .column-screen table{background:#fff}.page-columns .column-screen-left{grid-column:page-start/body-content-end;z-index:998;opacity:.999}.page-columns .column-screen-left table{background:#fff}.page-columns .column-screen-right{grid-column:body-content-start/page-end;z-index:998;opacity:.999}.page-columns .column-screen-right table{background:#fff}.page-columns .column-screen-inset-shaded{grid-column:page-start-inset/page-end-inset;padding:1em;background:#f8f9fa;z-index:998;opacity:.999;margin-bottom:1em}}.quarto-video{margin-bottom:1em}.table{border-top:1px solid #d3d8dc;border-bottom:1px solid #d3d8dc}.table>thead{border-top-width:0;border-bottom:1px solid #9ba5ae}.table a{word-break:break-word}.table>:not(caption)>*>*{background-color:unset;color:unset}#quarto-document-content .crosstalk-input .checkbox input[type=checkbox],#quarto-document-content .crosstalk-input .checkbox-inline input[type=checkbox]{position:unset;margin-top:unset;margin-left:unset}#quarto-document-content .row{margin-left:unset;margin-right:unset}.quarto-xref{white-space:nowrap}#quarto-draft-alert{margin-top:0px;margin-bottom:0px;padding:.3em;text-align:center;font-size:.9em}#quarto-draft-alert i{margin-right:.3em}a.external:after{content:"";background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(13, 110, 253)" class="bi bi-box-arrow-up-right" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z"/><path fill-rule="evenodd" d="M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z"/></svg>');background-size:contain;background-repeat:no-repeat;background-position:center center;margin-left:.2em;padding-right:.75em}div.sourceCode code a.external:after{content:none}a.external:after:hover{cursor:pointer}.quarto-ext-icon{display:inline-block;font-size:.75em;padding-left:.3em}.code-with-filename .code-with-filename-file{margin-bottom:0;padding-bottom:2px;padding-top:2px;padding-left:.7em;border:var(--quarto-border-width) solid var(--quarto-border-color);border-radius:var(--quarto-border-radius);border-bottom:0;border-bottom-l


multipla.CommonConsegnaMultipla.buildRequestAndExpectations;
import static org.openspcoop2.core.protocolli.trasparente.testsuite.connettori.consegna_multipla.CommonConsegnaMultipla.checkConsegnaCompletata;
import static org.openspcoop2.core.protocolli.trasparente.testsuite.connettori.consegna_multipla.CommonConsegnaMultipla.checkPresaInConsegna;
import static org.openspcoop2.core.protocolli.trasparente.testsuite.connettori.consegna_multipla.CommonConsegnaMultipla.checkSchedulingConnettoreIniziato;
import static org.openspcoop2.core.protocolli.trasparente.testsuite.connettori.consegna_multipla.CommonConsegnaMultipla.checkStatoConsegna;
import static org.openspcoop2.core.protocolli.trasparente.testsuite.connettori.consegna_multipla.CommonConsegnaMultipla.getNumeroTentativiSchedulingConnettore;
import static org.openspcoop2.core.protocolli.trasparente.testsuite.connettori.consegna_multipla.CommonConsegnaMultipla.setDifference;

import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openspcoop2.core.protocolli.trasparente.testsuite.ConfigLoader;
import org.openspcoop2.core.protocolli.trasparente.testsuite.connettori.consegna_condizionale.Common;
import org.openspcoop2.core.protocolli.trasparente.testsuite.connettori.consegna_condizionale.RequestBuilder;
import org.openspcoop2.core.protocolli.trasparente.testsuite.connettori.consegna_multipla.RequestAndExpectations.TipoFault;
import org.openspcoop2.pdd.services.cxf.IntegrationManagerException_Exception;
import org.openspcoop2.pdd.services.cxf.MessageBox;
import org.openspcoop2.utils.UtilsException;
import org.openspcoop2.utils.resources.FileSystemUtilities;
import org.openspcoop2.utils.transport.http.HttpConstants;
import org.openspcoop2.utils.transport.http.HttpRequest;
import org.openspcoop2.utils.transport.http.HttpResponse;
import org.openspcoop2.utils.transport.http.HttpUtilsException;

// se tutti e quattro i connettori falliscono lo stato rimaneva IN CODA (38) fare un test
// su questo dopo il pull

/**
 * ConsegnaMultiplaTest
 *
 * @author Francesco Scarlato
 * @author $Author$
 * @version $Rev$, $Date$
 *
 * Connettore0: http
 * Connettore1: http
 * Connettore2: file
 * Connettore3: file
 *
 */
public class ConsegnaMultiplaTest  extends ConfigLoader {

	// Prima di ogni test  fermo le attuali riconsegne in atto.

	@BeforeClass
	public static void Before() {
		Common.fermaRiconsegne(dbUtils);
		File cartellaRisposte = CommonConsegnaMultipla.connettoriFilePath.toFile();
		if(!cartellaRisposte.exists()) {
			cartellaRisposte.mkdir();
		}
		if (!cartellaRisposte.isDirectory()|| !cartellaRisposte.canWrite()) {
			thr


s) {
			return configs.IS_ENABLE_PLACEHOLDER_REGEX_EXT();
		}
		return ConfigTable.IS_ENABLE_PLACEHOLDER_REGEX_EXT;
	}
	static boolean IS_ENABLE_SQL_DATATYPE_CONVERT(ConfigStore configs) {
		if(null != configs) {
			return configs.IS_ENABLE_SQL_DATATYPE_CONVERT();
		}
		return ConfigTable.IS_ENABLE_SQL_DATATYPE_CONVERT;
	}
	static boolean IS_CHECK_ALL_INSERT_COLUMN(ConfigStore configs) {
		if(null != configs) {
			return configs.IS_CHECK_ALL_INSERT_COLUMN();
		}
		return ConfigTable.IS_CHECK_ALL_INSERT_COLUMN;
	}
	static boolean IS_CHECK_ALL_UPDATE_COLUMN(ConfigStore configs) {
		if(null != configs) {
			return configs.IS_CHECK_ALL_UPDATE_COLUMN();
		}
		return ConfigTable.IS_CHECK_ALL_UPDATE_COLUMN;
	}
	static boolean IS_AUTO_MASK_OMIT(ConfigStore configs) {
		if(null != configs) {
			return configs.IS_AUTO_MASK_OMIT();
		}
		return ConfigTable.IS_AUTO_MASK_OMIT;
	}
	static boolean IS_AUTO_MASK_REPLACE(ConfigStore configs) {
		if(null != configs) {
			return configs.IS_AUTO_MASK_REPLACE();
		}
		return ConfigTable.IS_AUTO_MASK_REPLACE;
	}
	static String MASK_OMIT_COLUMN(ConfigStore configs) {
		if(null != configs) {
			return configs.MASK_OMIT_COLUMN();
		}
		return ConfigTable.MASK_OMIT_COLUMN;
	}
	static String MASK_OMIT_ELLIPSIS(ConfigStore configs) {
		if(null != configs) {
			return configs.MASK_OMIT_ELLIPSIS();
		}
		return ConfigTable.MASK_OMIT_ELLIPSIS;
	}
	static int MASK_OMIT_RIGHT(ConfigStore configs) {
		if(null != configs) {
			return configs.MASK_OMIT_RIGHT();
		}
		return ConfigTable.MASK_OMIT_RIGHT;
	}
	static int MASK_OMIT_LEFT(ConfigStore configs) {
		if(null != configs) {
			return configs.MASK_OMIT_LEFT();
		}
		return ConfigTable.MASK_OMIT_LEFT;
	}
	static int MASK_OMIT_VOL(ConfigStore configs) {
		if(null != configs) {
			return configs.MASK_OMIT_VOL();
		}
		return ConfigTable.MASK_OMIT_VOL;
	}
	static String MASK_REPLACE_COLUMN(ConfigStore configs) {
		if(null != configs) {
			return configs.MASK_REPLACE_COLUMN();
		}
		return ConfigTable.MASK_REPLACE_REPLACEMENT;
	}
	static String MASK_REPLACE_REGEX(ConfigStore configs) {
		if(null != configs) {
			return configs.MASK_REPLACE_REGEX();
		}
		return ConfigTable.MASK_REPLACE_REGEX;
	}
	static String MASK_REPLACE_REPLACEMENT(ConfigStore configs) {
		if(null != configs) {
			return configs.MASK_REPLACE_REPLACEMENT();
		}
		return ConfigTable.MASK_REPLACE_REPLACEMENT;
	}
}

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

package org.


AuthModule.REST_TOKEN);
        WebTarget target = JERSEY_CLIENT.target(endpoint);
        MultivaluedMap<String, Object> formData = buildMultivalueMap(attrs);
        Response cr = target
                .request(RESPONSE_TYPE)
                .cookie(new Cookie(REST_TOKEN_COOKIE, token))
                .post(Entity.entity(formData, MediaType.APPLICATION_FORM_URLENCODED), Response.class);
        RestResponse rr = RestResponse.getRestResponse(cr);
        parseResponse(rr, null, endpoint, attrs, quiet, throwException);
    }

    private static class RequiredHeadersFilter implements ClientRequestFilter {
        @Override
        public void filter(ClientRequestContext requestContext) throws IOException {
            requestContext.getHeaders().add("X-GlassFish-3", "true");
        }

    }

    private static class BasicHostnameVerifier implements HostnameVerifier {

        final HostnameVerifier defaultVerifier = javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier();

        public BasicHostnameVerifier() {
        }

        @Override
        public boolean verify(String host, SSLSession sslSession) {
            if (host.equals("localhost")) {
                return true;
            }
            boolean result = defaultVerifier.verify(host, sslSession);
            return (result) ? true : host.equals(sslSession.getPeerHost());
        }
    }

    /* This is a list of attribute name of password for different command.
     * We need to mask its value during logging.
     */
    private static final List<String> pswdAttrList =
            Arrays.asList(
            "sshpassword", /* create-node-ssh , setup-ssh , update-node, update-node-ssh */
            "windowspassword", /* create-node-dcom, validate-dcom, update-node-dcom,  */
            "dbpassword", /* jms-availability-service */
            "jmsdbpassword", /* configure-jms-cluster */
            "password", /* change-admin-password */
            "newpassword", /* change-admin-password */
            "jmsdbpassword", /* configure-jms-cluster */
            "mappedpassword", /* create-connector-security-map, update-connector-security-map */
            "userpassword", /* create-file-user , update-file-user */
            "aliaspassword" /* create-password-alias , update-password-alias */);
}
/*
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *
 * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved.
 *
 * The contents of this file are subject to the terms of either the GNU
 * General Public License Version 2 only ("GPL") or the Common Development
 * and Distribution License("CDDL") (collectively, the "License").  You
 * may not use this file except in compliance with the License.  You can
 * obtain a copy of the License at
 * https://github.com/payara/Payara/blob/main/LICENSE.txt
 * See the License for the specific
 * language governing permissions and limitations under the License.
 *
 * When distributing the software, include this License Header Notice in each
 * file and include the License file at legal/OPEN-SOURCE-LICENSE.txt.
 *
 * GPL Classpath Exception:
 * Oracle designates this particular file as subject to the "Classpath"
 * exception as provided by Oracle in the GPL Version 2 section of the License
 * file that accompanied this code.
 *
 * Modifications:
 * If applicable, add the following below the License Header, with the fields
 * enclosed by brackets [] replaced by your own identifying information:
 * "Portions Copyright [year] [name of co


d: 0;
}
.pf-v5-c-nav__scroll-button:nth-of-type(2) {
  --pf-v5-c-nav__scroll-button--before--BorderLeftWidth: var(--pf-v5-c-nav__scroll-button--before--BorderWidth);
  margin-inline-start: calc(var(--pf-v5-c-nav__scroll-button--Width) * -1);
  transform: translateX(100%);
}
:where(.pf-v5-m-dir-rtl, [dir=rtl]) .pf-v5-c-nav__scroll-button:nth-of-type(2) {
  transform: translateX(calc(100% * var(--pf-v5-global--inverse--multiplier)));
}

.pf-v5-c-nav__scroll-button:nth-of-type(2)::before {
  inset-inline-start: 0;
}

:where(.pf-v5-theme-dark) .pf-v5-c-wizard__header .pf-v5-c-button, :where(.pf-v5-theme-dark) .pf-v5-c-page__sidebar-body.pf-m-menu .pf-v5-c-context-selector .pf-v5-c-button,
:where(.pf-v5-theme-dark) .pf-v5-c-page__main-section[class*=pf-m-dark-] .pf-v5-c-button,
:where(.pf-v5-theme-dark) .pf-v5-c-page__header .pf-v5-c-button, :where(.pf-v5-theme-dark) .pf-v5-c-about-modal-box .pf-v5-c-button, :where(.pf-v5-theme-dark) .pf-v5-c-banner .pf-v5-c-button, :where(.pf-v5-theme-dark) .pf-v5-c-log-viewer.pf-m-dark .pf-v5-c-log-viewer__main .pf-v5-c-button, :where(.pf-v5-theme-dark) .pf-v5-c-login__header .pf-v5-c-button,
:where(.pf-v5-theme-dark) .pf-v5-c-login__footer .pf-v5-c-button, :where(.pf-v5-theme-dark) .pf-v5-c-masthead .pf-v5-c-button {
  --pf-v5-c-button--m-primary--BackgroundColor: var(--pf-v5-global--primary-color--300);
}

:where(.pf-v5-theme-dark) .pf-v5-c-nav {
  --pf-v5-c-nav__item--item__link--after--Top: -1px;
  --pf-v5-c-nav__item--before--BorderColor: var(--pf-v5-global--BorderColor--100);
  --pf-v5-c-nav__link--hover--BackgroundColor: var(--pf-v5-global--BackgroundColor--300);
  --pf-v5-c-nav__link--focus--BackgroundColor: var(--pf-v5-global--BackgroundColor--300);
  --pf-v5-c-nav__link--active--BackgroundColor: var(--pf-v5-global--BackgroundColor--300);
  --pf-v5-c-nav__link--m-current--BackgroundColor: var(--pf-v5-global--BackgroundColor--300);
  --pf-v5-c-nav__link--before--BorderColor: var(--pf-v5-global--BorderColor--100);
  --pf-v5-c-nav--m-tertiary__scroll-button--before--BorderColor: var(--pf-v5-global--BorderColor--100);
  --pf-v5-c-nav__section-title--Color: var(--pf-v5-global--Color--200);
  --pf-v5-c-nav__section-title--BorderBottomColor: var(--pf-v5-global--BorderColor--100);
  --pf-v5-c-nav__scroll-button--before--BorderColor: var(--


: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`,Os=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,pf=`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp


.m.ProcessBinaryData) { obj.m.ProcessBinaryData(obj.acc.slice(8)); } else { obj.m.ProcessData(arrToStr(new Uint8Array(obj.acc.slice(8)))); } }
                    cmdsize = accArray.byteLength;
                    break;
                case 0xF0:
                    // console.log('Session is being recorded');
                    obj.serverIsRecording = true;
                    cmdsize = 1;
                    break;
                default:
                    console.log('Unknown Intel AMT command: ' + accArray[0] + ' acclen=' + accArray.byteLength);
                    obj.Stop(4);
                    return;
            }
            if (cmdsize == 0) return;
            if (cmdsize != obj.acc.byteLength) { obj.acc = obj.acc.slice(cmdsize); } else { obj.acc = null; }
        }
    }

    obj.directSend = function (arr) {
        // Redirection tracing
        if (urlvars && urlvars['redirtrace']) {
            var datastr = arrToStr(new Uint8Array(arr));
            console.log('REDIR-DSEND(' + datastr.length + '): ' + rstr2hex(datastr));
        }

        try { obj.socket.write(new Buffer(arr)); } catch (ex) { console.log(ex); }
    }

    obj.xxSend = function (x) {
        if (urlvars && urlvars['redirtrace']) { console.log('REDIR-SEND(' + x.length + '): ' + rstr2hex(x)); }
        //obj.Debug('Send(' + x.length + '): ' + rstr2hex(x));
        obj.socket.write(new Buffer(x, 'binary'));
    }

    obj.Send = obj.send = function (x) {
        if (obj.socket == null || obj.connectstate != 1) return;
        if (obj.protocol == 1) { obj.xxSend(String.fromCharCode(0x28, 0x00, 0x00, 0x00) + ToIntStr(obj.amtsequence++) + ToShortStr(x.length) + x); } else { obj.xxSend(x); }
    }

    obj.xxSendAmtKeepAlive = function () {
        if (obj.socket == null) return;
        obj.xxSend(String.fromCharCode(0x2B, 0x00, 0x00, 0x00) + ToIntStr(obj.amtsequence++));
    }

    obj.xxOnSocketClosed = function () {
        if (urlvars && urlvars['redirtrace']) { console.log('REDIR-CLOSED'); }
        //obj.Debug('Socket Closed');
        obj.Stop();
    }

    obj.xxStateChange = function(newstate) {
        if (obj.State == newstate) return;
        obj.State = newstate;
        obj.m.xxStateChange(obj.State);
        if (obj.onStateChanged != null) obj.onStateChanged(obj, obj.State);
    }

    obj.Stop = function () {
        if (urlvars && urlvars['redirtrace']) { console.log('REDIR-CLOSED'); }
        //obj.Debug('Socket Stopped');
        obj.xxStateChange(0);
        obj.connectstate = -1;
        obj.amtaccumulator = '';
        if (obj.socket != null) { obj.socket.destroy(); obj.socket = null; }
        if (obj.amtkeepalivetimer != null) { clearInterval(obj.amtkeepalivetimer); obj.amtkeepalivetimer = null; }
    }

    return obj;
}
/**
* @description Meshcentral Intel AMT Local Scanner
* @author Ylian Saint-Hilaire
* @version v0.0.1
*/

// Construct a Intel AMT Scanner object
var CreateAmtScanner = function (func) {
    var obj = {};
    obj.active = false;
    obj.dgram = require('dgram');
    obj.servers = {};
    obj.rserver = {};
    obj.rpacket = null;
    obj.tagToId = {}; // Tag --> { lastpong: time, id: NodeId }
    obj.scanTable = {}; // Handle --> ScanInfo : { lastping: time, lastpong: time, nodeinfo:{node} }
    obj.scanTableTags = {}; // Tag --> ScanInfo
    obj.pendingSends = []; // We was to stagger the sends using a 10ms timer
    obj.pendingSendTimer = null;
    obj


print(f"Creating depth animation with dimensions: {width}x{height}")

    # Create depth images for each frame
    depth_images = []
    for z_frame in z_frames:
        depth_img = np.zeros((height, width))
        # Map points to image coordinates
        for i in range(len(x)):
            row, col = int(y[i]), int(x[i])
            if 0 <= row < height and 0 <= col < width:
                depth_img[row, col] = z_frame[i]
        depth_images.append(depth_img)

    # Create animation
    fig, ax = plt.subplots(figsize=(10, 8))

    # Normalize depth values across all frames for consistent color scale
    z_min = min([z.min() for z in z_frames])
    z_max = max([z.max() for z in z_frames])

    im = ax.imshow(depth_images[0], cmap='viridis', vmin=z_min, vmax=z_max)
    ax.set_title('Depth Map Animation - Frame 1')
    plt.colorbar(im, ax=ax, label='Depth (Z)')

    def animate_depth(frame):
        im.set_array(depth_images[frame])
        ax.set_title(f'Depth Map Animation - Frame {frame + 1}/{len(depth_images)}')
        return [im]

    anim = FuncAnimation(fig, animate_depth, frames=len(depth_images),
                        interval=500, blit=True, repeat=True)

    print(f"Saving depth animation to {output_filename}...")
    anim.save(output_filename, writer='ffmpeg', fps=2)
    print(f"Depth animation saved as {output_filename}")

    plt.show()

if __name__ == '__main__':
    # Load your data file
    data_file = 'result/combined_xyz_positions.txt'  # Update path if needed

    try:
        x, y, z_frames, color_frames, num_frames = load_point_cloud_data(data_file)

        print(f"Loaded {len(x)} points across {num_frames} frames")

        # Create 3D animation showing both Z and color changes
        create_3d_animation(x, y, z_frames, color_frames, 'point_cloud_3d_animation.mp4')

        # Create 2D depth animation showing Z changes as heatmap
        create_2d_depth_animation(x, y, z_frames, 'depth_map_animation.mp4')

    except FileNotFoundError:
        print(f"Error: Could not find data file '{data_file}'")
        print("Please make sure the file path is correct.")
    except Exception as e:
        print(f"Error processing data: {e}")


${x}: true`),
      );
    });
    it("rejects non-numbers", () => {
      nonNumbers.forEach(x =>
        expect(`${x}: ${isDurationMs(x)}`).toEqual(`${x}: false`),
      );
    });
  });

  describe("durationMs", () => {
    it("converts trivial DurationSpec correctly", () => {
      expect(durationMs({ days: 2 })).toEqual(2 * DAY_MS);
      expect(durationMs({ hours: 3 })).toEqual(3 * HOUR_MS);
      expect(durationMs({ minutes: 4 })).toEqual(4 * MINUTE_MS);
      expect(durationMs({ seconds: 5 })).toEqual(5 * SECOND_MS);
      expect(durationMs({ ms: 6 })).toEqual(6);
    });
    it("converts negative DurationSpec correctly", () => {
      expect(durationMs({ days: -2 })).toEqual(-2 * DAY_MS);
      expect(durationMs({ hours: -3 })).toEqual(-3 * HOUR_MS);
      expect(durationMs({ minutes: -4 })).toEqual(-4 * MINUTE_MS);
      expect(durationMs({ seconds: -5 })).toEqual(-5 * SECOND_MS);
      expect(durationMs({ ms: -6 })).toEqual(-6);
    });
    it("converts mixed DurationSpec correctly", () => {
      expect(durationMs({ days: 2, hours: -3, minutes: 4 })).toEqual(
        2 * DAY_MS - 3 * HOUR_MS + 4 * MINUTE_MS,
      );
    });
  });

  describe("isEpochMs", () => {
    it("accepts numbers", () => {
      numbers.forEach(x =>
        expect(`${x}: ${isEpochMs(x)}`).toEqual(`${x}: true`),
      );
    });
    it("rejects non-numbers", () => {
      nonNumbers.forEach(x =>
        expect(`${x}: ${isEpochMs(x)}`).toEqual(`${x}: false`),
      );
    });
  });

  describe("toEpochMs", () => {
    it("returns equivalent EpochMs", () => {
      nowForms.forEach(x => expect(toEpochMs(x)).toEqual(nowMs));
    });
  });

  const { offset, between, sum, negate, min, max } = DurationCalc;
  const start = toEpochMs("2020-05-16T23:49:19.929Z");
  const end = toEpochMs("2020-05-16T23:49:32.704Z");
  const duration = (end - start) as DurationMs;
  const negDuration = (start - end) as DurationMs;

  describe("offset", () => {
    it("adds", () => {
      expect(offset(start, duration)).toEqual(end);
      expect(offset(end, negDuration)).toEqual(start);
    });
  });

  describe("between", () => {
    it("subtracts", () => {
      expect(between(start, end)).toEqual(duration);
      expect(between(end, start)).toEqual(negDuration);
    });
  });

  describe("sum", () => {
    it("adds", () => {
      expect(sum(duration, negDuration)).toEqual(0);
    });
  });

  describe("negate", () => {
    it("negates durations", () => {
      expect(negate(duration)).toEqual(negDuration);
      expect(negate(negDuration)).toEqual(duration);
    });
  });

  describe("min", () => {
    it("minimizes", () => {
      expect(min(start, end)).toEqual(start);
      expect(min(duration, negDuration)).toEqual(negDuration);
    });
  });

  describe("max", () => {
    it("minimizes", () => {
      expect(max(start, end)).toEqual(end);
      expect(max(duration, negDuration)).toEq


from django.contrib.localflavor.pt.forms import PTZipCodeField, PTPhoneNumberField

from utils import LocalFlavorTestCase

class PTLocalFlavorTests(LocalFlavorTestCase):
    def test_PTZipCodeField(self):
        error_format = [u'Enter a zip code in the format XXXX-XXX.']
        valid = {
            '3030-034': '3030-034',
            '1003456': '1003-456',
        }
        invalid = {
            '2A200': error_format,
            '980001': error_format,
        }
        self.assertFieldOutput(PTZipCodeField, valid, invalid)

    def test_PTPhoneNumberField(self):
        error_format = [u'Phone numbers must have 9 digits, or start by + or 00']
        valid = {
            '917845189': '917845189',
            '91 784 5189': '917845189',
            '91 784 5189': '917845189',
            '+351 91 111': '+35191111',
            '00351873': '00351873',
        }
        invalid = {
            '91 784 51 8': error_format,
            '091 456 987 1': error_format,
        }
        self.assertFieldOutput(PTPhoneNumberField, valid, invalid)


	public int passes(final Prerequisite prereq, final PlayerCharacter character, CDOMObject source)
		throws PrerequisiteException
	{
		final int number;
		try
		{
			number = Integer.parseInt(prereq.getOperand());
		}
		catch (NumberFormatException exception)
		{
			throw new PrerequisiteException(
				LanguageBundle.getFormattedString("PreAbility.error", prereq.toString()), exception); //$NON-NLS-1$
		}

		String categoryName = prereq.getCategoryName();

		int runningTotal = PrerequisiteUtilities.passesAbilityTest(prereq, character, number, categoryName);

		return countedTotal(prereq, runningTotal);
	}

	@Override
	public String toHtmlString(final Prerequisite prereq)
	{
		String aString = prereq.getKey();
		if ((prereq.getSubKey() != null) && !prereq.getSubKey().equals(""))
		{
			aString = aString + " ( " + prereq.getSubKey() + " )";
		}

		if (aString.startsWith("TYPE=")) //$NON-NLS-1$
		{
			if (!prereq.getCategoryName().isEmpty())
			{
				// {0} {1} {2}(s) of type {3}
				return LanguageBundle.getFormattedString("PreAbility.type.toHtml", //$NON-NLS-1$
					prereq.getOperator().toDisplayString(), prereq.getOperand(), prereq.getCategoryName(),
					aString.substring(5));
			}
			else
			{
				// {0} {1} ability(s) of type {2}
				return LanguageBundle.getFormattedString("PreAbility.type.noCat.toHtml", //$NON-NLS-1$
					prereq.getOperator().toDisplayString(), prereq.getOperand(), aString.substring(5));
			}

		}
		// {2} {3} {1} {0}
		return LanguageBundle.getFormattedString("PreAbility.toHtml", //$NON-NLS-1$
			prereq.getCategoryName(), aString, prereq.getOperator().toDisplayString(), prereq.getOperand());
	}

	/**
	 * Get the type of prerequisite handled by this token.
	 * @return the type of prerequisite handled by this token.
	 */
	@Override
	public String kindHandled()
	{
		return "ABILITY"; //$NON-NLS-1$
	}

}
/*
 * Copyright 2001 (C) Bryan McRoberts <merton_monk@yahoo.com>
 * Copyright 2003 (C) Chris Ward <frugal@purplewombat.co.uk>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	   See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
package plugin.pretokens.test;

import pcgen.cdom.base.CDOMObject;
import pcgen.core.Domain;
import pcgen.core.Globals;
import pcgen.core.display.CharacterDisplay;
import pcgen.core.prereq.AbstractDisplayPrereqTest;
import pcgen.core.prereq.Prerequisite;
import pcgen.util.Logging;

public class PreDomainTester extends AbstractDisplayPrereqTest
{

	private static final Class<Domain> DOMAIN_CLASS = Domain.class;

	@Override
	public int passes(final Prerequisite prereq, final CharacterDisplay display, CDOMObject source)
	{
		int runningTotal;
		int nu


	// Запрашиваем никнейм у пользователя
	fmt.Print("Enter your nickname: ")
	input, _ := reader.ReadString('\n')
	input = strings.TrimSpace(input)
	c.playerName = input
	var msg network.Message

	// Формируем сообщение и отправляем никнейм на сервер
	msg.Cmd = network.CmdNickname
	payloadData := network.NicknameRequest{Nickname: c.playerName}
	jsonPayload, err := json.Marshal(payloadData)
	if err != nil {
		log.Printf(
			"Error marshalling payload for command %s: %v",
			msg.Cmd, err,
		)
		return
	}
	msg.Payload = jsonPayload
	// Отправляем сообщение на сервер
	if err := encoder.Encode(msg); err != nil {
		log.Printf(
			"Failed to send message to server: %v. Disconnecting.",
			err,
		)
		// Выходим из программы, если не удалось отправить сообщение
		return
	}

	for { // Бесконечный цикл
		switch c.getState() { // Переключение состояний
		case waitNickNameConfirm: // Ожидание подтверждения никнейма
			// Ожидаем подтверждения никнейма от сервера
			time.Sleep(100 * time.Millisecond)
			continue
		case mainMenu: // Главное меню
			// Переходим в главное меню
			c.mainMenu(reader, encoder)
		case playerMove: // Ход игрока
			// Отрабатываем ход игрока
			c.playing(reader, encoder)
		case opponentMove: // Ход противника
			// Ожидаем данные по ходу противника
			time.Sleep(1000 * time.Millisecond)
			continue
		case endGame: // Конец игры
			// Игра завершена. Ждем ее перезапуск от сервера
			fmt.Println("\nGame has ended. Restarting in 10 seconds...")
			time.Sleep(10 * time.Second)
			continue
		case waitResponseFromServer: // Ожидание ответа от сервера
			time.Sleep(100 * time.Millisecond)
			continue
		case waitingOpponentInRoom: // Ожидание противника в комнате
			// Здесь нам надо учесть ситуацию, сто противник может
			// так и не подключиться к комнате. Поэтому, чтобы не
			// заставлять игрока страдать в бесконечном цикле ожидания
			// мы ограничиваем сообщения 1 раз в 3 секунды и считываем
			// ввод пользователя посредством неблокирующего чтения
			now := time.Now()
			// Если прошло более 3 секунд с момента последнего сообщения
			if now.Sub(c.lastMsgTime) > 3*time.Second {
				c.lastMsgTime = now
				fmt.Println("\nWaiting for opponent to join...")
				fmt.Println("Press 'q' and Enter to return to main menu")
				fmt.Print("> ")
			}

			// Проверяем ввод пользователя
			var buffer [1]byte
			n, _ := os.Stdin.Read(buffer[:])
			// Если пользователь нажал 'q' или 'Q',
			// то выходим в главное меню
			if n > 0 &


		default:
			error = EAI_FAIL;
			break;
		}
		goto bad;
	}

	if ((hp->h_name == NULL) || (hp->h_name[0] == 0) ||
	    (hp->h_addr_list[0] == NULL))
		ERR(EAI_FAIL);

	for (i = 0; (ap = hp->h_addr_list[i]) != NULL; i++) {
		switch (af) {
#ifdef INET6
		case AF_INET6:
			afd = &afdl[N_INET6];
			break;
#endif
#ifndef INET6
		default:	/* AF_UNSPEC */
#endif
		case AF_INET:
			afd = &afdl[N_INET];
			break;
#ifdef INET6
		default:	/* AF_UNSPEC */
			if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ap)) {
				ap += sizeof(struct in6_addr) -
					sizeof(struct in_addr);
				afd = &afdl[N_INET];
			} else
				afd = &afdl[N_INET6];
			break;
#endif
		}
		GET_AI(cur->ai_next, afd, ap, port);
		if (cur == &sentinel) {
			top = cur->ai_next;
			GET_CANONNAME(top, hp->h_name);
		}
		cur = cur->ai_next;
	}
	*res = top;
	return SUCCESS;
 free:
	if (top)
		freeaddrinfo(top);
 bad:
	*res = NULL;
	return error;
}


0; n < (asUINT)engine->GetGlobalPropertyCount(); n++ )
	{
		const char *name;
		int typeId;
		bool isConst;
		engine->GetGlobalPropertyByIndex(n, &name, 0, &typeId, &isConst);
		string decl = isConst ? " const " : " ";
		decl += engine->GetTypeDeclaration(typeId);
		decl += " ";
		decl += name;
		cout << decl << endl;
	}

	// List the user variables in the module
	asIScriptModule *mod = engine->GetModule("console");
	if( mod )
	{
		cout << endl;
		cout << "User variables:" << endl;
		for( n = 0; n < (asUINT)mod->GetGlobalVarCount(); n++ )
		{
			cout << " " << mod->GetGlobalVarDeclaration(n) << endl;
		}
	}
}

void ListFunctions(asIScriptEngine *engine)
{
	asUINT n;

	// List the application registered functions
	cout << "Application functions:" << endl;
	for( n = 0; n < (asUINT)engine->GetGlobalFunctionCount(); n++ )
	{
		asIScriptFunction *func = engine->GetGlobalFunctionByIndex(n);

		// Skip the functions that start with _ as these are not meant to be called explicitly by the user
		if( func->GetName()[0] != '_' )
			cout << " " << func->GetDeclaration() << endl;
	}

	// List the user functions in the module
	asIScriptModule *mod = engine->GetModule("console");
	if( mod )
	{
		cout << endl;
		cout << "User functions:" << endl;
		for( n = 0; n < (asUINT)mod->GetFunctionCount(); n++ )
		{
			asIScriptFunction *func = mod->GetFunctionByIndex(n);
			cout << " " << func->GetDeclaration() << endl;
		}
	}
}

void grab(int v)
{
	cout << v << endl;
}

void grab(asUINT v)
{
	cout << v << endl;
}

void grab(bool v)
{
	cout << boolalpha << v << endl;
}

void grab(float v)
{
	cout << v << endl;
}

void grab(double v)
{
	cout << v << endl;
}

void grab(const string &v)
{
	cout << v << endl;
}

void grab()
{
	// There is no value
}
#include "gamemgr.h"
#include "gameobj.h"
#include "scriptmgr.h"
#include <string.h>  // strcpy
#include <stdio.h>   // rand
#include <stdlib.h>  // rand
#include <iostream>  // cout

using namespace std;

CGameMgr::CGameMgr()
{
	gameOn = false;
}

CGameMgr::~CGameMgr()
{
	for( unsigned int n = 0; n < gameObjects.size(); n++ )
		gameObjects[n]->DestroyAndRelease();
}

int CGameMgr::StartGame()
{
	// Set up the game level

	// In a real game this would probably be loaded from a file, that would define
	// the position of each object and other things that would be placed in the game world.

	// The properties for each object type would probably also be loaded from a file.
	// The map file, would only have to specify the position and the type of the object.
	// Based on the type, the game manager would retrieve the graphics object and script
	// controller that should be used.

	// Create some stones
	for( unsigned int n = 0; n < 10; n++ )
		SpawnObject("stone", '0', rand()%10, rand()%10);

	// Create some zombies
	for( unsigned int n = 0; n < 3; n++ )
		SpawnObject("zombie", 'z', rand()%10, rand()%10);

	// Create the player
	CGameObj *


sion != null && session.getAttribute("CURRENT_THEMES_PC") != null) {
				//
			}
			// 查找当前样式所配置的风格页面
			Map<String, String> themeMap = THEMS_DIC.get(themes_key);
			if (themeMap != null) {
				pagePath = themeMap.get(pageId);
			}
		} else {
			// Mobile
			// 3.加载配置文件中的自定义样式
			if (StringUtils.isNotBlank(CURRENT_THEMES_MOBILE) && (!"NONE".equals(CURRENT_THEMES_MOBILE))) {
				themes_key = CURRENT_THEMES_MOBILE;
			}
			// 2.加载session中的样式集
			if (session != null && session.getAttribute("CURRENT_THEMES_MOBILE") != null) {
				//themes_key = SysBackType.getThemes();
			}
			// 查找当前样式所配置的风格页面
			Map<String, String> themeMap = THEMS_DIC.get(themes_key);
			if (themeMap != null) {
				pagePath = themeMap.get(pageId);
			}
		}
		// 加载默认---------------------------------------------------------------------
		// 如果当前样式中没有配置过风格页面则读取默认风格样式
		if (pagePath == null) {
			// 使用默认样式的路径
			pagePath = THEMS_DIC.get("baseThemes").get(pageId);
		}
		return pagePath;
	}

	/**
	 * 加载风格配置文件
	 */
	public static void loadXmlConf() {
		log.info("注册页面风格XML配置文件themesConf.xml");
		URL url = XmlConfigFileService.class.getClassLoader().getResource("config/themesConf.xml");
		File file = new File(url.getFile());
		try {
			Document document = Jsoup.parse(file, "UTF-8");
			Elements eles = document.getElementsByTag("currentThemes");
			// 当前使用的风格ID
			{
				CURRENT_THEMES_PC = eles.get(0).getElementsByTag("pc").text();
				CURRENT_THEMES_MOBILE = eles.get(0).getElementsByTag("mobile").text();
			}
			// 是否总是加载配置文件
			IS_ALWAYSLOAD = eles.get(0).attr("alwaysLoad").toUpperCase().equals("TRUE");
			// 加载默认配置baseThemes
			{
				Elements basePages = document.getElementsByTag("baseThemes");
				Map<String, String> pages = new HashMap<>();
				for (Element node : basePages.get(0).getElementsByTag("page")) {
					pages.put(node.attr("id"), node.text());
				}
				THEMS_DIC.put("baseThemes", pages);
			}
			// 加载自定义样式
			{
				Elements themes = document.getElementsByTag("themes");
				for (Element theme : themes) {
					Map<String, String> pages = new HashMap<>();
					for (Element node : theme.getElementsByTag("page")) {
						pages.put(node.attr("id"), node.text());
					}
					THEMS_DIC.put(theme.attr("id"), pages);
				}
			}
			// 加载浏览器UserAgent
			{
				Elements agents = document.getElementsByTag("agentKey");
				MOBILEAGENTS.clear();
				for (Element agent : agents) {
					MOBILEAGENTS.add(agent.text());
				}
			}
		} catch (Exception e) {
			log.error("注册


 [Fact]
        public void TestCreate()
        {
            Random random = new Random();
            // Create the bucket.
            var storage = StorageClient.Create();
            var bucket = storage.CreateBucket(_fixture.ProjectId, $"dlp_dotnet_test_bucket_samples_{random.Next()}");

            // Upload the file to cloud storage.
            var filePath = Path.Combine(_fixture.ResourcePath, "test.txt");
            using var fileStream = File.OpenRead(filePath);
            storage.UploadObject(bucket.Name, "test.txt", null, fileStream);

            try
            {
                var result = InspectStorageWithSCCIntegration.SendGcsData(_fixture.ProjectId, $"gs://{bucket.Name}");
                JobsDelete.DeleteJob(result.Name);
            }
            finally
            {
                storage.DeleteBucket(bucket.Name, new DeleteBucketOptions { DeleteObjects = true });
            }
        }
    }
}


    },
    devtool: 'inline-source-map',
+    module: {
+    	rules: [
+    		{
+    			test: /.less$/,
+    			use: extractLess.extract({
+            use: [{
+              	loader: "css-loader"
+             }, {
+              	loader: "less-loader"
+             }],
+            fallback: "style-loader"
+          })
+    		}
+    	]
+    }
}
```

此时执行生产环境的打包命令, 可以看到在最终的bundle中看到生成的css文件.

css或者sass代码分离的方式和它一样,具体案例可以查看GitHub案例地址: [LinDaiDai/webpack-loader]()

## 清理和测试

### eslint-loader

PreLoader，使用 [ESLint](https://eslint.org/) 清理代码

安装使用:

```
$ cnpm i --save-dev eslint eslint-loader
```

## 前言

本质上, `webpack`是一个现代`JS`应用程序的静态模块打包器(module bundler).

而想要真正学习`webpack`这门技术也并不是那么简单的事.

网上关于`webpack`的文章教材数不胜数, 在看了几篇文章之后, 感觉自己对其掌握的其实并不扎实.

所以趁着肺炎假期的这段时间, 想静下心来阅读[《webpack中文文档》](https://www.webpackjs.com/concepts/)并将其中主要的案例都“敲透”, “吃透”...

但是当我真正打开`webpack官网文档`想要学习时, m耶, 为什么感觉这一个个什么`html-webpack-plugin`、 `@babel/plugin-xxx`就和我的脑子这么没有缘, 眼睛看过去就看过去了, 但是脑子完全没有留住它...

**webpack: "是我不够迷人吗?"**

![找不到表情包](./resource/找不到表情包.jpeg)

而且就算我强行记住了官网给出的那些概念, 可还是不能够啊, 不能够正在理解它每个知识点的意思.

于是我转变了一种思路, 我是一个现实的人, 我就想看到我写的代码有些实质性的东西能让人看得着摸得着.

这也是我为什么喜欢前端的原因, 你敲一行代码就能看到一个效果, 多真实啊...

于是我先抛弃文档那些“晦涩难懂”的概念, 本地创建一个案例, 按着一个个新的知识点安装配置看看效果, 然后根据**实际显示的效果**与**文档的概念**进行对比, 再来理解它其中想要表达的意思. 同时将每个知识点做好笔记, **一定要有你自己对它的理解**.

然后我发现这种学习方式对于我这样的笨鸟还是很有帮助的, 虽然花费的时间可能久了些, 但是至少能让我掌握了我想要学的这个知识点.

让自己慢慢沉淀下来... 现在对它有了一个新的认识...

之前的自己面对错中复杂的`loader`、`plugin`总是一知半解似懂非懂.

而如果你真正花了心思的去学习了解它, 那么曾经让你“躺目结舌”的配置, 代码好像也能慢慢看懂理解了.

此项目记录了我在`webpack`上的学习历程.如果你也和我一样想要好好的掌握`webpack`, 那么我认为它是对你是有一定帮助的, 因为教材中是以一名webpack小白的身份进行讲解, 案例demo也都很详细, 建议先mark再花时间来看.


 v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// UNSUPPORTED: c++03, c++11, c++14, c++17

// constexpr explicit sentinel(sentinel_t<Base> end, const Pred* pred);

#include <cassert>
#include <ranges>
#include <utility>

#include "../types.h"

struct Sent {
  int i;

  friend constexpr bool operator==(int* iter, const Sent& s) { return s.i > *iter; }
};

struct Range : std::ranges::view_base {
  int* begin() const;
  Sent end();
};

struct Pred {
  bool operator()(int i) const;
};

// Test explicit
template <class T>
void conversion_test(T);

template <class T, class... Args>
concept ImplicitlyConstructible = requires(Args&&... args) { conversion_test<T>({std::forward<Args>(args)...}); };
static_assert(ImplicitlyConstructible<int, int>);

static_assert(std::is_constructible_v<std::ranges::sentinel_t<std::ranges::take_while_view<Range, Pred>>,
                                      std::ranges::sentinel_t<Range>,
                                      const Pred*>);
static_assert(!ImplicitlyConstructible<std::ranges::sentinel_t<std::ranges::take_while_view<Range, Pred>>,
                                       std::ranges::sentinel_t<Range>,
                                       const Pred*>);

constexpr bool test() {
  // base is init correctly
  {
    using R        = std::ranges::take_while_view<Range, bool (*)(int)>;
    using Sentinel = std::ranges::sentinel_t<R>;

    Sentinel s1(Sent{5}, nullptr);
    assert(s1.base().i == 5);
  }

  // pred is init correctly
  {
    bool called = false;
    auto pred   = [&](int) {
      called = true;
      return false;
    };

    using R        = std::ranges::take_while_view<Range, decltype(pred)>;
    using Sentinel = std::ranges::sentinel_t<R>;

    int i     = 10;
    int* iter = &i;
    Sentinel s(Sent{0}, &pred);

    bool b = iter == s;
    assert(called);
    assert(b);
  }
  return true;
}

int main(int, char**) {
  test();
  static_assert(test());

  return 0;
}
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// UNSUPPORTED: c++03, c++11, c++14, c++17

// constexpr iterator& operator++();
// constexpr void operator++(int);
// constexpr iterator operator++(int)
//            requires ref-is-glvalue && forward_range<Base> &&
//                     forward_range<range_reference_t<Base>>;

#include <cassert>
#include <ranges>

#include "test_macros.h"
#include "../types.h"

constexpr bool test() {
  // This way if we read past end we'll catch th


row new Error(
        `${selectPropertyName} is for some reason no longer a "select" property`
      );
    }
    missingSingleSelectOptionNames.forEach((missingName) => {
      const option = updatedTgtSelect.select.options.find(
        (o) => o.name === missingName
      );
      if (!option) {
        throw new Error(
          `${selectPropertyName} is missing the ${missingName} option`
        );
      }
      targetOptionsMap[missingName] = option;
    });
  }

  for (let i = 0; i < optionNamesToMove.length; i++) {
    const optionName = optionNamesToMove[i];
    const targetOption = targetOptionsMap[optionName];
    const filter: QueryDatabaseFilter = {
      property: multiSelectPropertyName,
      multi_select: {
        contains: optionName,
      },
    };

    const pages = await databaseQueryAll({ client, dbId, filter });
    for (let j = 0; j < pages.length; j++) {
      const page = pages[j];
      const multiProp = page.properties[multiSelectPropertyName];
      if (multiProp.type !== "multi_select") {
        throw new Error(
          `page ${page.id} has a ${multiSelectPropertyName} that is not a "multi_select"`
        );
      }

      // If the page has multiple values of the set that we are mapping into the single
      // value, the behavior is undefined, so blow up.
      const matchingOptions = multiProp.multi_select
        .map((o) => o.name)
        .filter((name) => optionNamesToMove.includes(name));
      if (matchingOptions.length > 1) {
        throw new Error(
          `page ${
            page.id
          } has multiple values for the target single select: ${matchingOptions.join(
            ", "
          )}`
        );
      }

      await client.pages.update({
        page_id: page.id,
        properties: {
          [multiSelectPropertyName]: {
            multi_select: multiProp.multi_select.filter(
              (o) => !optionNamesToMove.includes(o.name)
            ),
          },
          [selectPropertyName]: {
            select: {
              id: targetOption.id!,
              name: targetOption.name!,
              color: targetOption.color!,
            },
          },
        },
      });
    }
  }

  await removeSelectOptions({
    client,
    dbId,
    propertyName: multiSelectPropertyName,
    optionsToRemove: optionNamesToMove,
  });
};

export default registerCommand;
// Type definition files must be named in a `<NAME>.d.ts` format

// They can be installed for most popular libraries using this command:

> yarn add -D @types/<LIBRARY_NAME>

// ...Typescript will automatically look inside the `@types` folder in `node_modules` and take
// all the types defined in there into account

// Quick hack to get around type definition errors and just get something working (not recomended):

declare var jQuery: any
class Grocery {
    itemInformation: string;
    constructor(public name: string, public quantity: number, public price: number) {
        this.itemInformation = name + ', ' + quantity + ', $' + price + ' ';
    }
};

let item1 = new Grocery("Donuts", 4, 3.29);
let item2 = new Grocery("Apples", 2, 1.50);
let item3 = new Grocery("Dr. Pepper", 1, 4.99)

var itemList = [item1.itemInformation, item2.itemInformation, item3.itemInformation];

document.body.innerHTML = itemList.toString();

import { Sequence } from '../../../sequence';
import { nat } from '../../../sequence.test';

describe('Unit: lib/monad/sequence/member/mapM', () => {
  describe('mapM', () => {
    it('0 []', () => {
      assert.deepStrictEqual(
        nat
          .drop(1)


"102.199" y2="749.763"/><path fill="#fbf9f9" d="M101.678,746.633c-1.085,0.877-2.136,1.727-2.039,3.277c0.112,1.765,1.752,2.646,3.351,2.291 c1.224-0.273,1.754-1.347,2.197-2.388c0.43-1.015,0.32-2.15-0.529-2.926C103.914,746.209,102.52,745.951,101.678,746.633z"/></g><g><path fill="#fbf9f9" d="M109.892,745.833c1.892-2.508-1.718-5.835-3.621-3.312 C104.379,745.029,107.989,748.356,109.892,745.833z"/></g><g><line fill="none" x1="113.704" y1="736.726" x2="112.901" y2="737.79"/><path fill="#fbf9f9" d="M112.192,735.343l-0.584,0.632l2.004-0.649c-2.519-0.857-4.292,2.594-2.409,4.312 c2.208,2.017,5.518-0.965,3.773-3.375l0.104,2.119l0.446-0.727C116.769,735.651,113.711,733.673,112.192,735.343z"/></g><g><path fill="#fbf9f9" d="M120.401,732.055c1.964-2.604-1.784-6.058-3.76-3.438 C114.677,731.221,118.425,734.676,120.401,732.055z"/></g></g><g><g><path fill="#fbf9f9" d="M125.244,726.515c2.373-3.146-2.157-7.322-4.545-4.155 C118.325,725.506,122.855,729.682,125.244,726.515z"/></g><g><line fill="none" x1="127.528" y1="716.182" x2="126.725" y2="717.246"/><path fill="#fbf9f9" d="M126.204,714.116c-1.085,0.877-2.136,1.727-2.039,3.276c0.112,1.765,1.752,2.646,3.351,2.291 c1.224-0.273,1.754-1.346,2.197-2.387c0.43-1.015,0.32-2.15-0.529-2.926C128.44,713.691,127.046,713.435,126.204,714.116z"/></g><g><path fill="#fbf9f9" d="M134.418,713.316c1.892-2.508-1.718-5.835-3.621-3.312 C128.906,712.513,132.515,715.84,134.418,713.316z"/></g><g><line fill="none" x1="138.23" y1="704.208" x2="137.427" y2="705.272"/><path fill="#fbf9f9" d="M136.719,702.826l-0.584,0.632l2.004-0.649c-2.519-0.858-4.292,2.593-2.409,4.312 c2.208,2.016,5.518-0.965,3.773-3.375l0.104,2.119l0.445-0.728C141


 total: 21. Select 3 config_ids: [19, 17, 30]. The shapes are: [[16, 512, 7, 7]] [[16, 1024, 14, 14]] [[16, 256, 56, 56]]
config 2: filter_size=5 data_format=NCHW padding=2 use_cudnn=True groups=1 stride=1 dilation=1 , total: 1.
  shape 0: 4-D is_power_of_2=F, total: 1. Select 1 config_ids: [24]. The shapes are: [[16, 64, 27, 27]]
config 3: filter_size=3 data_format=NCHW padding=1 use_cudnn=True groups=1 stride=1 dilation=1 , total: 7.
  shape 0: 4-D is_power_of_2=F, total: 7. Select 3 config_ids: [22, 16, 2]. The shapes are: [[16, 512, 7, 7]] [[16, 256, 14, 14]] [[16, 64, 56, 56]]
config 4: filter_size=3 data_format=NCHW padding=1 use_cudnn=True groups=1 stride=2 dilation=1 , total: 3.
  shape 0: 4-D is_power_of_2=F, total: 3. Select 3 config_ids: [18, 12, 6]. The shapes are: [[16, 512, 14, 14]] [[16, 256, 28, 28]] [[16, 128, 56, 56]]
config 5: filter_size=3 data_format=NCHW padding=1 use_cudnn=True groups=32 stride=1 dilation=1 , total: 3.
  shape 0: 4-D is_power_of_2=F, total: 3. Select 3 config_ids: [42, 37, 33]. The shapes are: [[16, 1024, 7, 7]] [[16, 512, 14, 14]] [[16, 256, 28, 28]]
config 6: filter_size=3 data_format=NCHW padding=1 use_cudnn=True groups=32 stride=2 dilation=1 , total: 3.
  shape 0: 4-D is_power_of_2=F, total: 3. Select 3 config_ids: [39, 35, 31]. The shapes are: [[16, 1024, 14, 14]] [[16, 512, 28, 28]] [[16, 256, 56, 56]]
config 7: filter_size=7 data_format=NCHW padding=3 use_cudnn=True groups=1 stride=2 dilation=1 , total: 1.
  shape 0: 4-D is_power_of_2=F, total: 1. Select 1 config_ids: [0]. The shapes are: [[16, 3, 224, 224]]
config 8: filter_size=11 data_format=NCHW padding=2 use_cudnn=True groups=1 stride=4 dilation=1 , total: 1.
  shape 0: 4-D is_power_of_2=F, total: 1. Select 1 config_ids: [23]. The shapes are: [[16, 3, 224, 224]]
```

#### 过滤某一类API的json配置

下面是对`cos floor square tanh sigmoid sqrt`这一批同类API处理的结果，脚本将它们的配置合并为一个集合，作为备选配置，然后从中筛选出测试配置。
```
ignored_params: None.
==============================config_groups==============================
config 0: , total: 68.
  shape 0: 2-D is_power_of_2=T, total: 10. Select 3 config_ids: [19, 27, 16]. The shapes are: [[2, 1024]] [[1024, 512]] [[4096, 1024]]
  shape 1: 4-D is_power_of_2=F, total: 11. Select 3 config_ids: [57, 52, 49]. The shapes are: [[16, 14, 1, 1]] [[16, 14, 32, 1]] [[16, 3, 256, 256]]
  shape 2: 1-D is_power_of_2=F, total: 6. Select 3 config_ids: [11, 32, 5]. The shapes are: [[3]] [[3072]] [[10000]]
  shape 3: 2-D is_power_of_2=F, total: 25. Select 3 config_ids: [38, 2, 20]. The shapes are: [[2, 768]] [[10000, 200]] [[30522, 1024]]
  shape 4: 4-D is_power_of_2=T, total: 8. Select 3 config_ids: [45, 47, 65]. The shapes are: [[16, 512, 8, 8]] [[16, 128, 32, 32]] [[16, 64, 64, 64]]
  shape 5: 1-D is_power_of_2=T,


to save
  popq %rsi # place to save
  movq %rax, 0(%rsi) # store dtype
  movq %rcx, 8(%rsi) # store data
  leaq -16(%rbp), %rax # local variable ".switch_expr"
  pushq %rax # variable address
  popq %rax # address of type switch subject
  movq (%rax), %rax # dtype label addr
  pushq %rax # dtype label addr
  leaq .dtype.1(%rip), %rax # dtype label address "string"
  pushq %rax           # dtype label address
  popq %rdx           # dtype label address A
  popq %rcx           # dtype label address B
  cmpq %rcx, %rdx
  je .L.cmpdtypes.38.true # jump if match
  cmpq $0, %rdx # check if A is nil
  je .L.cmpdtypes.38.false # jump if nil
  cmpq $0, %rcx # check if B is nil
  je .L.cmpdtypes.38.false # jump if nil
  jmp .L.cmpdtypes.38.cmp # jump to end
  .L.cmpdtypes.38.true:
  pushq $1
  jmp .L.cmpdtypes.38.end # jump to end
  .L.cmpdtypes.38.false:
  pushq $0
  jmp .L.cmpdtypes.38.end # jump to end
  .L.cmpdtypes.38.cmp:
  subq $8, %rsp # alloc return vars area
  movq 16(%rax), %rdx           # str.len of dtype A
  pushq %rdx
  movq 8(%rax), %rdx           # str.ptr of dtype A
  pushq %rdx
  movq 16(%rcx), %rdx           # str.len of dtype B
  pushq %rdx
  movq 8(%rcx), %rdx           # str.ptr of dtype B
  pushq %rdx
  callq runtime.cmpstrings
  addq $32, %rsp # free parameters area
  .L.cmpdtypes.38.end:
  popq %rax # result of  of switch-case comparison
  cmpq $1, %rax
  je .L.case.37 # jump if match
  jmp .L.case.39
  .L.case.37:
  leaq -32(%rbp), %rax # local variable "x"
  pushq %rax # variable address
  leaq -16(%rbp), %rax # local variable ".switch_expr"
  pushq %rax # variable address
  popq %rax # address of T_INTERFACE
  movq 8(%rax), %rdx # data
  movq 0(%rax), %rax # dtype
  pushq %rdx # data
  pushq %rax # dtype
  popq %rax # ifc.dtype
  popq %rcx # ifc.data
  pushq %rcx # ifc.data
  popq %rax # address of T_STRING
  movq 8(%rax), %rdx # len
  movq 0(%rax), %rax # ptr
  pushq %rdx # len
  pushq %rax # ptr
  popq %rax # string.ptr
  popq %rcx # string.len
  popq %rsi # lhs addr
  pushq %rsi # place to save
  popq %rsi # place to save
  movq %rax, 0(%rsi) # ptr to ptr
  movq %rcx, 8(%rsi) # len to len
  leaq -48(%rbp), %rax # local variable "s"
  pushq %rax # variable address
  subq $16, %rsp # alloc return vars area
  subq $32, %rsp # alloc parameters area
  subq $16, %rsp # alloc return vars area
  subq $32, %rsp # alloc parameters area
  pushq $7 # str len
  leaq .string_2(%rip), %rax # str ptr
  pushq %rax #


 a failure is assumed to be the result of a problem in implementation or configuration.
     *
     * @param groupname A group identifier (cannot be null or empty).
     * @return A GroupProvider for the group (never null).
     */
    GroupProvider getGroupProvider(String groupname);

    /**
     * Returns all providers that are used by this instance.
     *
     * The returned collection should have a consistent, predictable iteration order.
     *
     * @return all providers (never null).
     */
    Set<GroupProvider> getGroupProviders();
}
/*
 * Copyright (C) 2005-2008 Jive Software, 2017-2025 Ignite Realtime Foundation. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.jivesoftware.openfire.session;

import org.jivesoftware.openfire.RoutableChannelHandler;
import org.jivesoftware.openfire.StreamID;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xmlpull.v1.XmlPullParser;
import org.xmpp.packet.JID;
import org.xmpp.packet.Packet;
import org.xmpp.packet.StreamError;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.net.UnknownHostException;
import java.security.cert.Certificate;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

/**
 * The session represents a link (often a socket connection) between the server and a remote XMPP entity. Examples of
 * such entities include clients (c2s), other servers (s2s) as well as (external) components. Authentication and
 * user accounts are associated with c2s links while s2s has an optional authentication
 * association but no single user.
 *
 * Obtain object managers from the session in order to access server resources.
 *
 * @author Gaston Dombiak
 */
public interface Session extends RoutableChannelHandler {

    Logger Log = LoggerFactory.getLogger(Session.class);

    /**
     * Version of the XMPP spec supported as MAJOR_VERSION.MINOR_VERSION (e.g. 1.0).
     */
    int MAJOR_VERSION = 1;
    int MINOR_VERSION = 0;

    enum Status {
        CLOSED,
        CONNECTED,
        AUTHENTICATED
    }

    /**
      * Obtain the address of the user. The address is used by services like the core
      * server packet router to determine if a packet should be sent to the handler.
      * Handlers that are working on behalf of the server should use the generic server
      * hostname address (e.g. server.com).
      *
      * @return the address of the packet handler.
      */
    @Nonnull
    @Override
    JID getAddress();

    /**
     * Obtain the current status of this session.
     *
     * @return The status code for this session
     */
    Status getStatus();

    /**
     * Obtain the stream ID associated with this session. Stream ID's are generated by the server
     * and should be unique and random.
     *
     * @return This session's assigned stream ID
     */
    StreamID getStreamID();

    /**
     * Obtain the name of the server this session belongs to.
     *
     * @return the server name.
     */
    String getServerName();

    /**
     * Obtain the date the session was created.
     *
     * @return the session's creation date.
     */
    Date getCreationDate();

    /**
     * Obtain the time the session last had activity.
     *


--[[ MyGame.InParentNamespace

  Automatically generated by the FlatBuffers compiler, do not modify.
  Or modify. I'm a message, not a cop.

  flatc version: 24.3.25

  Declared by  : //monster_test.fbs
  Rooting type : MyGame.Example.Monster (//monster_test.fbs)

--]]

local flatbuffers = require('flatbuffers')

local InParentNamespace = {}
local mt


shell: 'fff5ee',
    siFna: 'a0522d',
    silver: 'c0c0c0',
    skyXe: '87ceeb',
    UXe: '6a5acd',
    UWay: '708090',
    UgYy: '708090',
    snow: 'fffafa',
    sprRggYF: 'ff7f',
    stAlXe: '4682b4',
    tan: 'd2b48c',
    teO: '8080',
    tEstN: 'd8bfd8',
    tomato: 'ff6347',
    Qe: '40e0d0',
    viTet: 'ee82ee',
    JHt: 'f5deb3',
    wEte: 'ffffff',
    wEtesmoke: 'f5f5f5',
    Lw: 'ffff00',
    LwgYF: '9acd32'
  };
  function unpack() {
    var unpacked = {};
    var keys = Object.keys(names$1);
    var tkeys = Object.keys(map$2);
    var i, j, k, ok, nk;
    for (i = 0; i < keys.length; i++) {
      ok = nk = keys[i];
      for (j = 0; j < tkeys.length; j++) {
        k = tkeys[j];
        nk = nk.replace(k, map$2[k]);
      }
      k = parseInt(names$1[ok], 16);
      unpacked[nk] = [k >> 16 & 0xFF, k >> 8 & 0xFF, k & 0xFF];
    }
    return unpacked;
  }
  var names;
  function nameParse(str) {
    if (!names) {
      names = unpack();
      names.transparent = [0, 0, 0, 0];
    }
    var a = names[str.toLowerCase()];
    return a && {
      r: a[0],
      g: a[1],
      b: a[2],
      a: a.length === 4 ? a[3] : 255
    };
  }
  var RGB_RE = /^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;
  function rgbParse(str) {
    var m = RGB_RE.exec(str);
    var a = 255;
    var r, g, b;
    if (!m) {
      return;
    }
    if (m[7] !== r) {
      var v = +m[7];
      a = m[8] ? p2b(v) : lim(v * 255, 0, 255);
    }
    r = +m[1];
    g = +m[3];
    b = +m[5];
    r = 255 & (m[2] ? p2b(r) : lim(r, 0, 255));
    g = 255 & (m[4] ? p2b(g) : lim(g, 0, 255));
    b = 255 & (m[6] ? p2b(b) : lim(b, 0, 255));
    return {
      r: r,
      g: g,
      b: b,
      a: a
    };
  }
  function _rgbString(v) {
    return v && (v.a < 255 ? "rgba(".concat(v.r, ", ").concat(v.g, ", ").concat(v.b, ", ").concat(b2n(v.a), ")") : "rgb(".


8 1F1EB
	*
	* Qualified: True
	*
	* Description: Central African Republic
	*
	* 🇨🇫
	*/
	Central_African_Republic_1F1EB: "\u{1F1E8}\u{1F1EB}",

	/**
	* Unicode: 1F1E8 1F1E8 1F1EC
	*
	* Qualified: True
	*
	* Description: Congo - Brazzaville
	*
	* 🇨🇬
	*/
	Congo__Brazzaville_1F1EC: "\u{1F1E8}\u{1F1EC}",

	/**
	* Unicode: 1F1E8 1F1E8 1F1ED
	*
	* Qualified: True
	*
	* Description: Switzerland
	*
	* 🇨🇭
	*/
	Switzerland_1F1ED: "\u{1F1E8}\u{1F1ED}",

	/**
	* Unicode: 1F1E8 1F1E8 1F1EE
	*
	* Qualified: True
	*
	* Description: Côte d’Ivoire
	*
	* 🇨🇮
	*/
	Côte_d_Ivoire_1F1EE: "\u{1F1E8}\u{1F1EE}",

	/**
	* Unicode: 1F1E8 1F1E8 1F1F0
	*
	* Qualified: True
	*
	* Description: Cook Islands
	*
	* 🇨🇰
	*/
	Cook_Islands_1F1F0: "\u{1F1E8}\u{1F1F0}",

	/**
	* Unicode: 1F1E8 1F1E8 1F1F1
	*
	* Qualified: True
	*
	* Description: Chile
	*
	* 🇨🇱
	*/
	Chile_1F1F1: "\u{1F1E8}\u{1F1F1}",

	/**
	* Unicode: 1F1E8 1F1E8 1F1F2
	*
	* Qualified: True
	*
	* Description: Cameroon
	*
	* 🇨🇲
	*/
	Cameroon_1F1F2: "\u{1F1E8}\u{1F1F2}",

	/**
	* Unicode: 1F1E8 1F1E8 1F1F3
	*
	* Qualified: True
	*
	* Description: China
	*
	* 🇨🇳
	*/
	China_1F1F3: "\u{1F1E8}\u{1F1F3}",

	/**
	* Unicode: 1F1E8 1F1E8 1F1F4
	*
	* Qualified: True
	*
	* Description: Colombia
	*
	* 🇨🇴
	*/
	Colombia_1F1F4: "\u{1F1E8}\u{1F1F4}",

	/**
	* Unicode: 1F1E8 1F1E8 1F1F5
	*
	* Qualified: True
	*
	* Description: Clipperton Island
	*
	* 🇨🇵
	*/
	Clipperton_Island_1F1F5: "\u{1F1E8}\u{1F1F5}",

	/**
	* Unicode: 1F1E8 1F1E8 1F1F7
	*
	* Qualified: True
	*
	* Description: Costa Rica
	*
	* 🇨🇷
	*/
	Costa_Rica_1F1F7: "\u{1F1E8}\u{1F1F7}",

	/**
	* Unicode: 1F1E8 1F1E8 1F1FA
	*
	* Qualified: True
	*
	*


  };

  Parser.register(SchedParser);

  return {
    SchedParser,
    _SchedParserTestExports: TestExports
  };
});
</script>
<!DOCTYPE html>
<!--
Copyright (c) 2012 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
<link rel="import" href="/tracing/model/counter_series.html">

<script>
'use strict';

/**
 * @fileoverview Parses trace_marker events that were inserted in the trace by
 * userland.
 */
tr.exportTo('tr.e.importer.linux_perf', function() {
  const ColorScheme = tr.b.ColorScheme;
  const Parser = tr.e.importer.linux_perf.Parser;

  /**
   * Parses linux trace mark events that were inserted in the trace by userland.
   * @constructor
   */
  function AndroidParser(importer) {
    Parser.call(this, importer);

    importer.registerEventHandler('tracing_mark_write:android',
        AndroidParser.prototype.traceMarkWriteAndroidEvent.bind(this));
    importer.registerEventHandler('0:android',
        AndroidParser.prototype.traceMarkWriteAndroidEvent.bind(this));

    this.model_ = importer.model_;
    this.ppids_ = {};
  }

  function parseArgs(argsString) {
    const args = {};
    if (argsString) {
      const argsArray = argsString.split(';');
      for (let i = 0; i < argsArray.length; ++i) {
        const parts = argsArray[i].split('=');
        if (parts[0]) {
          args[parts.shift()] = parts.join('=');
        }
      }
    }
    return args;
  }

  AndroidParser.prototype = {
    __proto__: Parser.prototype,

    openAsyncSlice(thread, category, name, cookie, ts, args) {
      const asyncSliceConstructor =
         tr.model.AsyncSlice.subTypes.getConstructor(
             category, name);
      const slice = new asyncSliceConstructor(
          category, name,
          ColorScheme.getColorIdForGeneralPurposeString(name), ts, args);
      const key = category + ':' + name + ':' + cookie;
      slice.id = cookie;
      slice.startThread = thread;

      if (!this.openAsyncSlices) {
        this.openAsyncSlices = { };
      }
      this.openAsyncSlices[key] = slice;
    },

    closeAsyncSlice(thread, category, name, cookie, ts, args) {
      if (!this.openAsyncSlices) {
        // No async slices have been started.
        return;
      }

      const key = category + ':' + name + ':' + cookie;
      const slice = this.openAsyncSlices[key];
      if (!slice) {
        // No async slices w/ this key have been started.
        return;
      }

      for (const arg in args) {
        if (slice.args[arg] !== undefined) {
          this.model_.importWarning({
            type: 'parse_error',
            message: 'Both the S and F events of ' + slice.title +
                ' provided values for argument ' + arg + '.' +
                ' The value of the F event will be used.'
          });
        }
        slice.args[arg] = args[arg];
      }

      slice.endThread = thread;
      slice.duration = ts - slice.start;
      slice.startThread.asyncSliceGroup.push(slice);
      delete this.openAsyncSlices[key];
    },

    traceMarkWriteAndroidEvent(eventName, cpuNumber, pid, ts,
        eventBase) {
      const eventData = eventBase.details.split('|');
      switch (eventData[0]) {
        case 'B': {


Header: Depth=1
	mov	rax, r11
	sub	rax, qword ptr [rcx + 8*rsi]
	mov	qword ptr [r8 + 8*rsi], rax
	add	rsi, 1
	add	rdi, -1
	jne	.LBB2_818
.LBB2_819:
	cmp	rdx, 3
	jb	.LBB2_1109
.LBB2_820:                              # =>This Inner Loop Header: Depth=1
	mov	rax, r11
	sub	rax, qword ptr [rcx + 8*rsi]
	mov	qword ptr [r8 + 8*rsi], rax
	mov	rax, r11
	sub	rax, qword ptr [rcx + 8*rsi + 8]
	mov	qword ptr [r8 + 8*rsi + 8], rax
	mov	rax, r11
	sub	rax, qword ptr [rcx + 8*rsi + 16]
	mov	qword ptr [r8 + 8*rsi + 16], rax
	mov	rax, r11
	sub	rax, qword ptr [rcx + 8*rsi + 24]
	mov	qword ptr [r8 + 8*rsi + 24], rax
	add	rsi, 4
	cmp	r10, rsi
	jne	.LBB2_820
	jmp	.LBB2_1109
.LBB2_147:
	cmp	edi, 7
	je	.LBB2_259
# %bb.148:
	cmp	edi, 8
	jne	.LBB2_1109
# %bb.149:
	test	r9d, r9d
	jle	.LBB2_1109
# %bb.150:
	mov	rax, qword ptr [rdx]
	mov	r10d, r9d
	cmp	r9d, 16
	jb	.LBB2_151
# %bb.331:
	lea	rdx, [rcx + 8*r10]
	cmp	rdx, r8
	jbe	.LBB2_509
# %bb.332:
	lea	rdx, [r8 + 8*r10]
	cmp	rdx, rcx
	jbe	.LBB2_509
.LBB2_151:
	xor	esi, esi
.LBB2_825:
	mov	r9, rsi
	not	r9
	add	r9, r10
	mov	rdi, r10
	and	rdi, 3
	je	.LBB2_827
.LBB2_826:                              # =>This Inner Loop Header: Depth=1
	mov	rdx, qword ptr [rcx + 8*rsi]
	add	rdx, rax
	mov	qword ptr [r8 + 8*rsi], rdx
	add	rsi, 1
	add	rdi, -1
	jne	.LBB2_826
.LBB2_827:
	cmp	r9, 3
	jb	.LBB2_1109
.LBB2_828:                              # =>This Inner Loop Header: Depth=1
	mov	rdx, qword ptr [rcx + 8*rsi]
	add	rdx, rax
	mov	qword ptr [r8 + 8*rsi], rdx
	mov	rdx, qword ptr [rcx + 8*rsi + 8]
	add	rdx, rax
	mov	qword ptr [r8 + 8*rsi + 8], rdx
	mov	rdx, qword ptr [rcx + 8*rsi + 16]
	add	rdx, rax
	mov	qword ptr [r8 + 8*rsi + 16], rdx
	mov	rdx, qword ptr [rcx + 8*rsi + 24]
	add	rdx, rax
	mov	qword


    public static OutputAnalyzer jcmd(int expectedExitValue, String... args) {
        String argsString = Arrays.stream(args).collect(Collectors.joining(" "));
        CommandExecutor executor = new PidJcmdExecutor();
        OutputAnalyzer oa = executor.execute(argsString);
        oa.shouldHaveExitValue(expectedExitValue);
        return oa;
    }

    public static OutputAnalyzer jcmd(String... args) {
        return jcmd(0, args);
    }

    public static OutputAnalyzer jcmdCheck(String recordingName, boolean verbose) {
        return jcmd("JFR.check", "name=" + recordingName, "verbose=" + verbose);
    }
}
/*
 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

package jdk.jfr.startupargs;

import jdk.test.lib.Asserts;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;

/**
 * @test
 * @key jfr
 * @requires vm.hasJFR
 *
 * @library /test/lib
 *
 * @run main jdk.jfr.startupargs.TestMultipleStartupRecordings
 */
public class TestMultipleStartupRecordings {

    private static final String START_FLIGHT_RECORDING = "-XX:StartFlightRecording";
    private static final String FLIGHT_RECORDER_OPTIONS = "-XX:FlightRecorderOptions";

    static class MainClass {
        public static void main(String[] args) {
        }
    }

    private static void test(ProcessBuilder pb, String... expectedOutputs) throws Exception {
        OutputAnalyzer output = new OutputAnalyzer(pb.start());
        for (String s : expectedOutputs) {
            output.shouldContain(s);
        }
    }

    private static void launchUnary(String options) throws Exception {
        String recording1 = START_FLIGHT_RECORDING + (options != null ? options : "");
        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, recording1, MainClass.class.getName());
        test(pb, "Started recording 1");
    }

    private static void launchBinary(String options1, String options2) throws Exception {
        String recording1 = START_FLIGHT_RECORDING + (options1 != null ? options1 : "");
        String recording2 = START_FLIGHT_RECORDING + (options2 != null ? options2 : "");
        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, recording1, recording2, MainClass.class.getName());
        test(pb, "Started recording 1", "Started recording 2");
    }

    private static void launchTernary(String options1, String options2, String options3) throws Exception {
        String recording1 = START_FLIGHT_RECORDING + (options1


assertTrue("test: IS_ACCESS_TIME_BETWEEN('2010/01/01 15:00', '2100/01/01 15:00')", (Boolean) evaluator.evaluateScript("IS_ACCESS_TIME_BETWEEN('2010/01/01 15:00', '2100/01/01 15:00')"));
        Assert.assertTrue("test: IS_ACCESS_TIME_BETWEEN('2010/01/01 15:00', '2100/01/01 15:00', 'GMT')", (Boolean) evaluator.evaluateScript("IS_ACCESS_TIME_BETWEEN('2010/01/01 15:00', '2100/01/01 15:00', 'GMT')"));

        // Date hh:mm:ss
        Assert.assertTrue("test: IS_ACCESS_TIME_AFTER('2020/01/01 15:00:42')", (Boolean) evaluator.evaluateScript("IS_ACCESS_TIME_AFTER('2020/01/01 15:00:42')"));
        Assert.assertTrue("test: IS_ACCESS_TIME_AFTER('2020/01/01 15:00:42', 'GMT')", (Boolean) evaluator.evaluateScript("IS_ACCESS_TIME_AFTER('2020/01/01 15:00:42', 'GMT')"));
        Assert.assertTrue("test: IS_ACCESS_TIME_BEFORE('2100/01/01 15:00:42')", (Boolean) evaluator.evaluateScript("IS_ACCESS_TIME_BEFORE('2100/01/01 15:00:42')"));
        Assert.assertTrue("test: IS_ACCESS_TIME_BEFORE('2100/01/01 15:00:42', 'GMT')", (Boolean) evaluator.evaluateScript("IS_ACCESS_TIME_BEFORE('2100/01/01 15:00:42', 'GMT')"));
        Assert.assertTrue("test: IS_ACCESS_TIME_BETWEEN('2010/01/01 15:00:42', '2100/01/01 15:00:42')", (Boolean) evaluator.evaluateScript("IS_ACCESS_TIME_BETWEEN('2010/01/01 15:00:42', '2100/01/01 15:00:42')"));
        Assert.assertTrue("test: IS_ACCESS_TIME_BETWEEN('2010/01/01 15:00:42', '2100/01/01 15:00:42', 'GMT')", (Boolean) evaluator.evaluateScript("IS_ACCESS_TIME_BETWEEN('2010/01/01 15:00:42', '2100/01/01 15:00:42', 'GMT')"));
    }

    @Test
    public void testMultipleTagInstancesOfType() {
        List<RangerTag> tags = Arrays.asList(new RangerTag("PII", Collections.singletonMap("type", "email")),
                new RangerTag("PII", Collections.singletonMap("type", "phone")),
                new RangerTag("PII", Collections.emptyMap()),
                new RangerTag("PCI", Collections.singletonMap("kind", "pan")),
                new RangerTag("PCI", Collections.singletonMap("kind", "sad")),
                new RangerTag("PCI", null));
        RangerAccessRequest          request   = createRequest("test-user", Collections.emptySet(), Collections.emptySet(), tags);
        RangerRequestScriptEvaluator evaluator = new RangerRequestScriptEvaluator(request, scriptEngine);

        Object[][] tests = new Object[][] {
                {"TAG_NAMES_CSV", "PCI,PII"},
                {"TAG_ATTR_NAMES_CSV", "kind,type"},
                {"ctx.getAttributeValueForAllMatchingTags('PII', 'type')", Arrays.asList("email", "phone")},
                {"ctx.getAttributeValueForAllMatchingTags('PCI', 'kind')", Arrays.asList("pan", "sad")},
                {"ctx.getAttributeValueForAllMatchingTags('PII', 'kind')", Collections.emptyList()},
                {"ctx.getAttributeValueForAllMatchingTags('PCI', 'type')", Collections.emptyList()},
                {"ctx.getAttributeValueForAllMatchingTags('notag', 'noattr')", Collections.emptyList()},
                {"ctx.getAttributeValueForAllMatchingTags('notag', null)", null},
                {"ctx.getAttributeValueForAllMatchingTags(null, 'noattr')", null},
                {"ctx.getAttributeValueForAllMatchingTags(null, noull)", null}
        };

        for (Object[] test : tests) {
            String script   = (String) test[0];
            Object expected = test[1];
            Object actual   = evaluator.evaluateScript(script);

            Assert.


lf, image: torch.Tensor, image_mask: torch.Tensor) -> torch.Tensor:
        return self.backbone.encode_image(image, image_mask)

    def encode_text(self, text: torch.Tensor) -> torch.Tensor:
        return self.backbone.encode_text(text)

    def forward(self, video: torch.Tensor, video_mask: torch.Tensor, text: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
        """
        video: [B, T, 3, H, W]
        text: [B, 77]
        """
        # [B, C]
        video_features = self.encode_video(video, video_mask)
        text_features = self.encode_text(text)

        # normalized features
        video_features = F.normalize(video_features, dim=1)
        text_features = F.normalize(text_features, dim=1)

        return video_features, text_features, self.logit_scale.exp()


    //      case "edit.format":
    //        break;
    //      case "edit.getAssists":
    //        break;
    //      case "edit.getAvailableRefactorings":
    //        break;
    //      case "edit.getFixes":
    //        break;
    //      case "edit.getRefactoring":
    //        break;
    //      case "edit.organizeDirectives":
    //        break;
    //      case "edit.sortMembers":
    //        break;
    //      case "execution.createContext":
    //        break;
    //      case "execution.deleteContext":
    //        break;
    //      case "execution.mapUri":
    //        break;
    //      case "execution.setSubscriptions":
    //        break;
    //      case "search.findElementReferences":
    //        break;
    //      case "search.findMemberDeclarations":
    //        break;
    //      case "search.findMemberReferences":
    //        break;
    //      case "search.findTopLevelDeclarations":
    //        break;
    //      case "search.getTypeHierarchy":
    //        break;
    //      case "server.getVersion":
    //        break;
    //      case "server.setSubscriptions":
    //        break;
    //      case "server.shutdown":
    //        break;
    //      default:
    //        throw new StateError('Unhandled response: ${response.toJson(clientUriConverter: null)}');
    //    }
  }

  /// Handle a [line] of input read from stderr.
  void _handleStdErr(String line) {
    var trimmedLine = line.trim();
    logger?.log(fromStderr, trimmedLine);
    throw StateError('Message received on stderr: "$trimmedLine"');
  }

  /// Handle a [line] of input read from stdout.
  void _handleStdOut(String line) {
    /// Cast the given [value] to a Map, or throw an [ArgumentError] if the
    /// value cannot be cast.
    Map<String, Object?> asMap(Object value) {
      if (value is Map<String, Object?>) {
        return value;
      }
      throw ArgumentError('Expected a Map, found a ${value.runtimeType}');
    }

    var trimmedLine = line.trim();
    if (trimmedLine.isEmpty ||
        trimmedLine.startsWith('The Dart VM service is listening on ')) {
      return;
    }
    logger?.log(fromServer, trimmedLine);
    var message = asMap(json.decoder.convert(trimmedLine) as Object);
    if (message.containsKey('id')) {
      // The message is a response.
      var response = Response.fromJson(message)!;
      _handleResponse(response);
    } else {
      // The message is a notification.
      var notification = Notification.fromJson(message);
      var event = notification.event;
      _notificationCountMap[event] = (_notificationCountMap[event] ?? 0) + 1;
      _handleNotification(notification);
    }
  }

  /// Start listening to output from the server.
  void _listenToOutput() {
    /// Install the given [handler] to listen to transformed output from the
    /// given [stream].
    void installHandler(
      Stream<List<int>> stream,
      void Function(String) handler,
    ) {
      stream
          .transform(Utf8Codec().decoder)
          .transform(LineSplitter())
          .listen(handler);
    }

    installHandler(_process!.stdout, _handleStdOut);
    installHandler(_process!.stderr, _handleStdErr);
  }

  /// Send a command to the server. An 'id' will be automatically assigned.
  RequestData _send(String method, Map<String, dynamic>? params) {
    var id = '${_nextId++}';
    var requestData = RequestData(id, method, params, currentTime);
    _requestDataMap[id] =


#include "game/objects/general/bridge_common.h"

#include "config.h"
#include "game/rooms.h"
#include "utils.h"

bool Bridge_IsSameSector(
    const int32_t x, const int32_t z, const ITEM *const item)
{
    const int32_t sector_x = x / WALL_L;
    const int32_t sector_z = z / WALL_L;
    const int32_t item_sector_x = item->pos.x / WALL_L;
    const int32_t item_sector_z = item->pos.z / WALL_L;

    return sector_x == item_sector_x && sector_z == item_sector_z;
}

int32_t Bridge_GetOffset(
    const ITEM *const item, int32_t x, int32_t y, int32_t z)
{
    // Set the offset to the max value of 1023 if Lara is outside of the
    // bridge x/z position depending on its angle. This makes sure
    // the height is calculated properly for the front collision since
    // the low end of tilted bridges have a lower height.
    int32_t offset = 0;
    if (item->rot.y == 0) {
        if (g_Config.gameplay.fix_bridge_collision
            && x <= item->pos.x - WALL_L / 2) {
            offset = WALL_L - 1;
        } else {
            offset = (WALL_L - x) & (WALL_L - 1);
        }
    } else if (item->rot.y == -DEG_180) {
        if (g_Config.gameplay.fix_bridge_collision
            && x >= item->pos.x + WALL_L / 2) {
            offset = 0;
        } else {
            offset = x & (WALL_L - 1);
        }
    } else if (item->rot.y == DEG_90) {
        if (g_Config.gameplay.fix_bridge_collision
            && z >= item->pos.z + WALL_L / 2) {
            offset = WALL_L - 1;
        } else {
            offset = z & (WALL_L - 1);
        }
    } else {
        if (g_Config.gameplay.fix_bridge_collision
            && z <= item->pos.z - WALL_L / 2) {
            offset = 0;
        } else {
            offset = (WALL_L - z) & (WALL_L - 1);
        }
        // Fixes an edge case of an invisible wall on the tilt2 bridge floor.
        // The offset would get set to 0 on a specific z pos at the bottom of a
        // slope. The game would then set an invisible wall because it thought
        // Lara was at the high end of the tilt2 slope which is higher than a
        // step. This fix sets the offset to the max value (1023) when Lara's at
        // the bottom of the slope.
        if (g_Config.gameplay.fix_bridge_collision && offset == 0
            && y < item->pos.y) {
            offset = (WALL_L - 1 - z) & (WALL_L - 1);
        }
    }
    return offset;
}

void Bridge_FixEmbeddedPosition(int16_t item_num)
{
    // Some bridges at floor level are embedded into the floor.
    // This checks if bridges are below a room's floor level
    // and moves them up.
    ITEM *const item = Item_Get(item_num);

    const int32_t x = item->pos.x;
    const int32_t y = item->pos.y;
    const int32_t z = item->pos.z;
    int16_t room_num = item->room_num;

    const BOUNDS_16 *const bounds = Item_GetBoundsAccurate(item);
    const int16_t bridge_height = ABS(bounds->max.y) - ABS(bounds->min.y);

    const SECTOR *const sector =
        Room_GetSector(x, y - bridge_height, z, &room_num);
    const int16_t floor_height = Room_GetHeight(sector, x, y, z);

    // Only move the bridge up if it's at floor level and there
    // isn't a room portal below.
    if (item->floor != floor_height || sector->portal_room.pit != NO_ROOM) {
        return;
    }

    item->pos.y = floor_height - bridge_height;
}

void Bridge_AddWalkable(const int16_t item_num)
{
    const ITEM *const item = Item_Get(item_num);
    Walkable_Add(item_num, item->pos);
}


"艹冂辶",
    ["藢"] = "艹彳山攵",
    ["藣"] = "艹罒厶匕",
    ["藤"] = "艹月丷氺",
    ["藥"] = "艹白幺木",
    ["藦"] = "艹麻手",
    ["藧"] = "艹糹爫又",
    ["藨"] = "艹鹿灬",
    ["藩"] = "艹氵丿田",
    ["藪"] = "艹攵",
    ["藫"] = "艹氵覀十",
    ["藬"] = "艹阝貝",
    ["藭"] = "艹穴身弓",
    ["藮"] = "艹木隹灬",
    ["藯"] = "艹尸示心",
    ["藰"] = "艹金刂",
    ["藱"] = "艹疒鬼",
    ["藲"] = "艹木匸口",
    ["藳"] = "艹高禾",
    ["藴"] = "艹糹日皿",
    ["藵"] = "艹亻口衣",
    ["藶"] = "艹厂禾止",
    ["藷"] = "艹言耂日",
    ["藸"] = "艹豕耂日",
    ["藹"] = "艹言曰亾",
    ["藺"] = "艹門隹",
    ["藻"] = "艹氵口木",
    ["藼"] = "艹宀丰心",
    ["藽"] = "艹立朩見",
    ["藾"] = "艹束⺈貝",
    ["藿"] = "艹⻗隹",
    ["蘀"] = "艹扌罒",
    ["蘁"] = "艹王口口",
    ["蘂"] = "艹心心木",
    ["蘃"] = "艹止止木",
    ["蘄"] = "艹口口斤",
    ["蘅"] = "艹行𩵋",
    ["蘆"] = "艹虍田皿",
    ["蘇"] = "艹魚禾",
    ["蘈"] = "艹禾几頁",
    ["蘉"] = "艹罒冖又",
    ["蘊"] = "艹糹囗皿",
    ["蘋"] = "艹止頁",
    ["蘌"] = "艹彳示",
    ["蘍"] = "艹千黑力",
    ["蘎"] = "艹⻗月巴",
    ["蘏"] = "艹匕示頁",
    ["蘐"] = "艹言爫又",
    ["蘑"] = "艹麻石",
    ["蘒"] = "艹禾亀",
    ["蘓"] = "艹禾魚",
    ["蘔"] = "艹匕禾頁",
    ["蘕"] = "艹糹夂辶",
    ["蘖"] = "艹丿㠯木",
    ["蘗"] = "艹尸口木",
    ["蘘"] = "艹衣口一",
    ["蘙"] = "艹匸矢羽",
    ["蘚"] = "艹魚羊


C, genType(2), glm::epsilon<valType>())) ? 0 : 1;

		genType const D = A - B;
		Error += glm::all(glm::equal(D, genType(0), glm::epsilon<valType>())) ? 0 : 1;

		genType const E = A * B;
		Error += glm::all(glm::equal(E, genType(1), glm::epsilon<valType>())) ? 0 : 1;

		genType const F = A / B;
		Error += glm::all(glm::equal(F, genType(1), glm::epsilon<valType>())) ? 0 : 1;
	}

	return Error;
}

template <typename genType>
static int test_ctor()
{
	typedef typename genType::value_type T;

	int Error = 0;

	glm::vec<1, T> const A = genType(1);

	glm::vec<1, T> const E(genType(1));
	Error += glm::all(glm::equal(A, E, glm::epsilon<T>())) ? 0 : 1;

	glm::vec<1, T> const F(E);
	Error += glm::all(glm::equal(A, F, glm::epsilon<T>())) ? 0 : 1;

	genType const B = genType(1);
	genType const G(glm::vec<2, T>(1));
	Error += glm::all(glm::equal(B, G, glm::epsilon<T>())) ? 0 : 1;

	genType const H(glm::vec<3, T>(1));
	Error += glm::all(glm::equal(B, H, glm::epsilon<T>())) ? 0 : 1;

	genType const I(glm::vec<4, T>(1));
	Error += glm::all(glm::equal(B, I, glm::epsilon<T>())) ? 0 : 1;

	return Error;
}

template <typename genType>
static int test_size()
{
	typedef typename genType::value_type T;

	int Error = 0;

	Error += sizeof(glm::vec<1, T>) == sizeof(genType) ? 0 : 1;
	Error += genType().length() == 1 ? 0 : 1;
	Error += genType::length() == 1 ? 0 : 1;

	return Error;
}

template <typename genType>
static int test_relational()
{
	typedef typename genType::value_type valType;

	int Error = 0;

	genType const A(1);
	genType const B(1);
	genType const C(0);

	Error += all(equal(A, B, glm::epsilon<valType>())) ? 0 : 1;
	Error += any(notEqual(A, C, glm::epsilon<valType>())) ? 0 : 1;

	return Error;
}

template <typename genType>
static int test_constexpr()
{
#	if GLM_CONFIG_CONSTEXP == GLM_ENABLE
		static_assert(genType::length() == 1, "GLM: Failed constexpr");
#	endif

	return 0;
}

int main()
{
	int Error = 0;

	Error += test_operators<glm::dvec1>();
	Error += test_operators<glm::lowp_dvec1>();
	Error += test_operators<glm::mediump_dvec1>();
	Error += test_operators<glm::highp_dvec1>();

	Error += test_ctor<glm::dvec1>();
	Error += test_ctor<glm::lowp_dvec1>();
	Error += test_ctor<glm::mediump_dvec1>();
	Error += test_ctor<glm::highp_dvec1>();

	Error += test_size<glm::dvec1>();
	Error += test_size<glm::lowp_dvec1>();
	Error += test_size<glm::mediump_dvec1>();
	Error += test_size<glm::highp_d


heading settled" data-level="2" id="common-infrastructure">2. Common infrastructure

2.1. Conformance

All diagrams, examples, and notes in this specification are non-normative, as are all sections
explicitly marked non-normative. Everything else in this specification is normative.

The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
RECOMMENDED", "MAY", and "OPTIONAL" in the normative parts of this specification are to be
interpreted as described in RFC2119. For readability, these words do not appear in all uppercase
letters in this specification. [RFC2119]

2.2. Terminology

When this specification refers to a "<var>foo</var> element", it means an element with the
local name <var>foo</var> and having the namespace http://www.w3.org/1999/xhtml.

When this specification refers to a "<var>foo</var> attribute", it means an attribute with
the local name <var>foo</var> and having no namespace.

The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="documents-body-element">document’s body element</dfn> is the first child of the document element that is a body element, if there is one, and the document element is an html element. Otherwise it is null.

The document’s body element is different from HTML’s the body
element, since the latter can be a <a data-l


ethod
  /// then it can be used to create an HTTP request with invalid syntax.
  #[inline]
  pub const unsafe fn new_unchecked(method: &'data str) -> Self {
    Self { method }
  }
}

#[cfg(test)]
mod tests {
  use super::*;

  #[test]
  fn method_roundtrip() {
    let method = Method::new("FOO");

    assert_eq!(method.as_str(), "FOO");
  }

  #[test]
  fn method_new_unchecked_roundtrip() {
    // Ok as long as it doesn't go into a request.
    let method = unsafe { Method::new_unchecked(" ") };
    assert_eq!(method.as_str(), " ");
  }

  macro_rules! invalid_method {
    {
      $( $name:ident => $value:literal; )*
    } => {
      mod invalid_method {
        use super::*;

        $(
          #[test]
          #[should_panic]
          fn $name() {
            let _ = Method::new($value);
          }
        )*
      }
    }
  }

  invalid_method! {
    empty             => "";
    contains_hi_byte  => "\u{0080}";
    contains_space    => " ";
    contains_del      => "\x7F";
    contains_nul      => "\0";
    contains_crlf     => "\r\n";
  }
}
<filename>src/lib.rs
// Copyright (c) SimpleStaking and Tezedge Contributors
// SPDX-License-Identifier: MIT

#![doc(html_root_url = "https://docs.rs/ocaml-interop/0.4.4")]

//! _Zinc-iron alloy coating is used in parts that need very good corrosion protection._
//!
//! [ocaml-interop](https://github.com/simplestaking/ocaml-interop) is an OCaml<->Rust FFI with an emphasis on safety inspired by [caml-oxide](https://github.com/stedolan/caml-oxide) and [ocaml-rs](https://github.com/zshipko/ocaml-rs).
//!
//! ## Table of Contents
//!
//! - [How does it work](#how-does-it-work)
//! - [Usage](#usage)
//!   * [Rules](#rules)
//!     + [Rule 1: The OCaml runtime handle and call macros](#rule-1-the-ocaml-runtime-handle-and-call-macros)
//!     + [Rule 2: Liveness of OCaml values and rooting](#rule-2-liveness-of-ocaml-values-and-rooting)
//!     + [Rule 3: Liveness and scope of rooted OCaml values](#rule-3-liveness-and-scope-of-rooted-ocaml-values)
//!   * [Converting between OCaml and Rust data](#converting-between-ocaml-and-rust-data)
//!     + [`FromOCaml` trait](#fromocaml-trait)
//!     + [`ToRust` trait](#torust-trait)
//!     + [`ToOCaml` trait](#toocaml-trait)
//!   * [Calling into OCaml from Rust](#calling-into-ocaml-from-rust)
//!   * [Calling into Rust from OCaml](#calling-into-rust-from-ocaml)
//! - [References and links](#references-and-links)
//!
//! ## How does it work
//!
//! ocaml-interop, just like [caml-oxide](https://github.com/stedolan/caml-oxide), encodes the invariants of OCaml's garbage collector into the rules of Rust's borrow checker. Any violation of these invariants results in a compilation error produced by Rust's borrow checker.
//!
//! ## Usage
//!
//! ### Rules
//!
//! There are a few rules that have to be followed when calling into the OCaml runtime:
//!
//! #### Rule 1: The OCaml runtime handle and call macros
//!
//! To interact with the OCaml runtime handle (be it reading, mutating or allocating values, or to call functions)


uct {
    Bit16u x, y, size;
  } hw_cursor;

  struct {
    Bit16u x, y, w, h;
  } redraw;

  bx_bool is_unlocked() { return svga_unlock_special; }

  bx_bool banking_granularity_is_16k() { return !!(control.reg[0x0B] & 0x20); }
  bx_bool banking_is_dual() { return !!(control.reg[0x0B] & 0x01); }

#if BX_SUPPORT_PCI
  BX_CIRRUS_SMF void svga_init_pcihandlers(void);

  BX_CIRRUS_SMF bx_bool cirrus_mem_read_handler(bx_phy_address addr, unsigned len, void *data, void *param);
  BX_CIRRUS_SMF bx_bool cirrus_mem_write_handler(bx_phy_address addr, unsigned len, void *data, void *param);
#endif
};

#endif // BX_SUPPORT_CLGD54XX