_ASSERT(16==decomp.globalNumPoints);

	if(1==myRank){
		size_t numPoints = decomp.numPoints;
		TEST_ASSERT(numPoints==decomp.numPoints);
		TEST_ASSERT(25==decomp.sizeNeighborhoodList);
		int myIds[] = {0,1,4,5};
		set<int> ids(myIds,myIds+numPoints);
		set<int>::iterator i=ids.begin();
		set<int>::iterator iEnd=ids.end();
		int *gIds = decomp.myGlobalIDs.get();
		for(size_t p=0;p<numPoints;p++,gIds++){
//			cout << "myRank, gIds, localId = " << myRank << ", " << *gIds << ", " << p << endl;
			TEST_ASSERT(iEnd!=ids.find(*gIds));
		}
	}
	if(0==myRank){
		size_t numPoints = decomp.numPoints;
		TEST_ASSERT(numPoints==decomp.numPoints);
		TEST_ASSERT(25==decomp.sizeNeighborhoodList);
		int myIds[] = {2,3,6,7};
		set<int> ids(myIds,myIds+numPoints);
		set<int>::iterator i=ids.begin();
		set<int>::iterator iEnd=ids.end();
		int *gIds = decomp.myGlobalIDs.get();
		for(size_t p=0;p<numPoints;p++,gIds++){
			TEST_ASSERT(iEnd!=ids.find(*gIds));
		}

	}
	if(2==myRank){
		size_t numPoints = decomp.numPoints;
		TEST_ASSERT(numPoints==decomp.numPoints);
		TEST_ASSERT(25==decomp.sizeNeighborhoodList);
		int myIds[] = {8,9,12,13};
		set<int> ids(myIds,myIds+numPoints);
		set<int>::iterator i=ids.begin();
		set<int>::iterator iEnd=ids.end();
		int *gIds = decomp.myGlobalIDs.get();
		for(size_t p=0;p<numPoints;p++,gIds++){
			TEST_ASSERT(iEnd!=ids.find(*gIds));
		}

	}
	if(3==myRank){
		size_t numPoints = decomp.numPoints;
		TEST_ASSERT(numPoints==decomp.numPoints);
		TEST_ASSERT(25==decomp.sizeNeighborhoodList);
		int myIds[] = {10,11,14,15};
		set<int> ids(myIds,myIds+numPoints);
		set<int>::iterator i=ids.begin();
		set<int>::iterator iEnd=ids.end();
		int *gIds = decomp.myGlobalIDs.get();
		for(size_t p=0;p<numPoints;p++,gIds++){
//			cout << "myRank, gIds, localId = " << myRank << ", " << *gIds << ", " << p << endl;
			TEST_ASSERT(iEnd!=ids.find(*gIds));
		}
	}

}

TEUCHOS_UNIT_TEST(ReloadBalance_np4, MoveCoordinatesAndReLoadBalance) {

       if (!init) initialize();

       int numProcs = comm->NumProc();
       int myRank   = comm->MyPID();

       TEST_COMPARE(numProcs, ==, 4);

       if(numProcs != 4){
          std::cerr << "Unit test runtime ERROR: utReloadBalance_np4 only makes sense on 4 processors." << std::endl;
          return;
      }

	QUICKGRID::QuickGridData decomp = getGrid( numProcs, myRank);
	/*
	 * Swap some coordinates to that new partition is required
	 * Swap 0 with 15, 3 with 12
	 */
	double *x = decomp.myX.get();
	if(1==myRank){
		/*
		 * point 0 has localId=2
		 */
		int localId0 =


API) and cookie-swapped access token (standard OAuth-web) flows.
 */
class InMemoryOAuthPersistence(private val clock: Clock, private val tokenChecker: TokenChecker) : OAuthPersistence {
    private val csrfName = "securityServerCsrf"
    private val originalUriName = "securityServerUri"
    private val clientAuthCookie = "securityServerAuth"
    private val cookieSwappableTokens = mutableMapOf<String, AccessToken>()

    override fun retrieveCsrf(request: Request) = request.cookie(csrfName)?.value?.let(::CrossSiteRequestForgeryToken)

    override fun retrieveNonce(request: Request): Nonce? = null

    override fun retrieveOriginalUri(request: Request): Uri? = request.cookie(originalUriName)?.value?.let(Uri::of)

    override fun retrievePkce(request: Request)  = null

    override fun retrieveToken(request: Request) = (tryBearerToken(request)
        ?: tryCookieToken(request))
        ?.takeIf(tokenChecker::check)

    override fun assignCsrf(redirect: Response, csrf: CrossSiteRequestForgeryToken) = redirect.cookie(expiring(csrfName, csrf.value))

    override fun assignNonce(redirect: Response, nonce: Nonce): Response = redirect

    override fun assignOriginalUri(redirect: Response, originalUri: Uri): Response = redirect.cookie(expiring(originalUriName, originalUri.toString()))

    override fun assignPkce(redirect: Response, pkce: PkceChallengeAndVerifier) = redirect

    override fun assignToken(request: Request, redirect: Response, accessToken: AccessToken, idToken: IdToken?) =
        UUID.randomUUID().let {
            cookieSwappableTokens[it.toString()] = accessToken
            redirect
                .cookie(expiring(clientAuthCookie, it.toString()))
                .invalidateCookie(csrfName)
                .invalidateCookie(originalUriName)
        }

    override fun authFailureResponse(reason: OAuthCallbackError) = Response(FORBIDDEN)
        .invalidateCookie(csrfName)
        .invalidateCookie(originalUriName)
        .invalidateCookie(clientAuthCookie)

    private fun tryCookieToken(request: Request) =
        request.cookie(clientAuthCookie)?.value?.let { cookieSwappableTokens[it] }

    private fun tryBearerToken(request: Request) = request.header("Authorization")
        ?.removePrefix("Bearer ")
        ?.let { AccessToken(it) }

    private fun expiring(name: String, value: String) = Cookie(name, value,
        path = "/",
        expires = clock.instant().plus(Duration.ofDays(1)))
}

fun main() {

}package security

import org.http4k.ai.mcp.ToolResponse
import org.http4k.ai.mcp.model.Content
import org.http4k.ai.mcp.model.McpEntity
import org.http4k.ai.mcp.model.Tool
import org.http4k.ai.mcp.protocol.ServerMetaData
import org.http4k.ai.mcp.protocol.Version
import org.http4k.ai.mcp.server.security.ApiKeyMcpSecurity
import org.http4k.filter.debugMcp
import org.http4k.lens.Header
import org.http4k.mcp.Http4kMcpDesktop
import org.http4k.routing.bind
import org.http4k.routing.mcpSse
import org.http4k.server.JettyLoom
import org.http4k.server.asServer
import java.time.Instant

fun main() {
    val secureMcpServer = mcpSse(
        ServerMetaData(McpEntity.of("foo"), Version.of("bar")),
        ApiKeyMcpSecurity(Header.requ


difier
                            .fillMaxSize()
                            .background(color = BottlesTheme.color.icon.secondary)
                            .clip(shape = CircleShape),
                    )
                },
                imageOptions = ImageOptions(
                    contentScale = ContentScale.Crop
                )
            )
        }
    }
}

@Deprecated("2차 MVP로 인한 디자인 변경. 2024-09-30")
@Composable
fun BottleItem(
    modifier: Modifier = Modifier,
    bottle: Bottle,
    onClickItem: () -> Unit,
    graphicsLayer: GraphicsLayer = rememberGraphicsLayer()
) {
    Column(
        modifier = modifier
            .background(
                color = BottlesTheme.color.container.primary,
                shape = RoundedCornerShape(20.dp)
            )
            .border(
                width = 1.dp,
                color = BottlesTheme.color.border.primary,
                shape = RoundedCornerShape(20.dp)
            )
            .padding(BottlesTheme.padding.medium)
            .debounceNoRippleClickable(onClick = onClickItem),
        verticalArrangement = Arrangement.spacedBy(space = BottlesTheme.spacing.small)
    ) {
        if (bottle.lastActivatedAt != null) {
            EtcText(text = bottle.lastActivatedAt)
        }

        Row(
            modifier = Modifier.fillMaxWidth(),
            verticalAlignment = Alignment.CenterVertically,
            horizontalArrangement = Arrangement.SpaceBetween
        ) {
            Column {
                Row(verticalAlignment = Alignment.CenterVertically) {
                    Text(
                        text = bottle.name,
                        style = BottlesTheme.typography.subTitle2,
                        color = BottlesTheme.color.text.secondary
                    )

                    if (!bottle.isRead) {
                        val circleColor = BottlesTheme.color.icon.update

                        Spacer(modifier = Modifier.width(width = BottlesTheme.spacing.doubleExtraSmall))
                        Canvas(modifier = Modifier.size(4.dp)) {
                            drawCircle(color = circleColor)
                        }
                    }
                }

                Spacer(modifier = Modifier.height(8.dp))

                Row(
                    verticalAlignment = Alignment.CenterVertically,
                    horizontalArrangement = Arrangement.spacedBy(8.dp)
                ) {
                    Text(
                        text = "${bottle.age}세",
                        style = BottlesTheme.typography.caption,
                        color = BottlesTheme.color.text.tertiary
                    )

                    Text(
                        text = "|",
                        style = TextStyle(
                            fontFamily = wantedSansStd,
                            fontWeight = FontWeight.Medium,
                            fontSize = 12.sp,
                            letterSpacing = 0.sp,
                            lineHeight = 12.sp * 1.5f,
                        ),
                        color = BottlesTheme.color.border.secondary
                    )

                    Text(
                        text = bottle.mbti,
                        style = BottlesTheme.typography.caption,
                        color = BottlesTheme.color.text.tertiary
                    )

                    Text(
                        text = "|",
                        style = TextStyle(
                            fontFamily = wantedSansStd,
                            fontWeight = FontWeight.Medium,
                            fontSize = 12.sp,
                            letterSpacing = 0.sp,
                            lineHeight = 12.sp * 1.5f,
                        ),
                        color = BottlesTheme.color.border.secondary
                    )

                    Text(
                        text = "${bottle.personality[0]}, ${bottle.personality[1]}, ${bottle.personality[2]}",
                        style = BottlesTheme.typography.caption,
                        color = BottlesTheme.color.text.tertiary
                    )
                }
            }

            CoilImage(
                modifier = Modifier


// Massgate
// Copyright (C) 2017 Ubisoft Entertainment
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// This program 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 for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.
#ifndef __MMS_SERVER_LUT_H__
#define __MMS_SERVER_LUT_H__

#include "mms_iocpserver.h"
#include "mt_mutex.h"

class MMS_ServerLUT
{
public:
	MMS_ServerLUT( MT_Mutex* aMutex, MMS_IocpServer::SocketContext* aPeer );
	~MMS_ServerLUT( void );

	friend class MMS_ServerLUTContainer;
	friend class MMS_ServerLUTRef;

	MMS_IocpServer::SocketContext* myPeer;

private:
	MMS_ServerLUT( void ) {}

	MMS_ServerLUT(const MMS_ServerLUT& aRhs) { assert(false && "no copyctor for MMS_ServerLUT!"); }
	MMS_ServerLUT& operator=(const MMS_ServerLUT& aRhs) { assert(false && "no operator= for MMS_ServerLUT!"); }

	MT_Mutex* myMutex;
};

class MMS_ServerLUTRef
{
public:
	MMS_ServerLUTRef();
	MMS_ServerLUTRef(MMS_ServerLUT* aLut);
	~MMS_ServerLUTRef();
	void operator=(MMS_ServerLUT* aLut) { assert(myServerLUT == NULL); myServerLUT = aLut; }
	__forceinline MMS_ServerLUT* operator->( void ) { assert(myServerLUT); return myServerLUT; }
	__forceinline MMS_ServerLUT* GetItem( void )  { assert(myServerLUT); return myServerLUT; }
	__forceinline bool IsGood( void ) { return (myServerLUT != NULL); }

	void Release( void );
private:
	MMS_ServerLUT* myServerLUT;
};

#endif //__MMS_SERVER_LUT_H__


me("Example Drug");
		ConceptMapType sameAs = conceptService.getConceptMapTypeByUuid(ConceptMapType.SAME_AS_MAP_TYPE_UUID);
		ConceptSource snomedCt = conceptService.getConceptSourceByName("SNOMED CT");
		DrugReferenceMap map = new DrugReferenceMap();
		map.setDrug(drug);
		map.setConceptMapType(sameAs);
		map.setConceptReferenceTerm(new ConceptReferenceTerm(snomedCt, "example", ""));
		drug.addDrugReferenceMap(map);
		drug = conceptService.saveDrug(drug);
		assertEquals(1, conceptService.getDrug(drug.getDrugId()).getDrugReferenceMaps().size());
	}

	/**
	 * @see ConceptServiceImpl#purgeConcept(Concept)
	 */
	@Test
	public void purgeConcept_shouldPurgeTheConceptIfNotBeingUsedByAnObs() {
		int conceptId = 88;
		conceptService.purgeConcept(conceptService.getConcept(conceptId));
		assertNull(conceptService.getConcept(conceptId));
	}

	/**
	 * @see ConceptServiceImpl#retireConcept(Concept,String)
	 */
	@Test
	public void retireConcept_shouldFailIfNoReasonIsGiven() {
		Concept concept = conceptService.getConcept(3);
		assertThrows(IllegalArgumentException.class, () -> conceptService.retireConcept(concept, ""));
	}

	/**
	 * @see ConceptServiceImpl#retireConcept(Concept,String)
	 */
	@Test
	public void retireConcept_shouldRetireTheGivenConcept() {
		String retireReason = "dummy reason";
		Concept concept = conceptService.getConcept(3);
		assertFalse(concept.getRetired());
		conceptService.retireConcept(concept, retireReason);
		assertTrue(concept.getRetired());
		assertEquals(retireReason, concept.getRetireReason());
	}

	/**
	 * @see ConceptServiceImpl#purgeDrug(Drug)
	 */
	@Test
	public void purgeDrug_shouldPurgeTheGivenDrug() {
		int drugId = 2;
		conceptService.purgeDrug(conceptService.getDrug(drugId));
		assertNull(conceptService.getDrug(drugId));
	}

	/**
	 * @see ConceptServiceImpl#getAllDrugs()
	 */
	@Test
	public void getAllDrugs_shouldReturnAListOfAllDrugs() {
		int resultWhenTrue = 4;
		List<Drug> allDrugs = conceptService.getAllDrugs();
		assertEquals(resultWhenTrue, allDrugs.size());
	}

	/**
	 * @see ConceptServiceImpl#getAllDrugs(boolean)
	 */
	@Test
	public void getAllDrugs_shouldReturnAllDrugsIncludingRetiredOnesIfGivenTrue() {
		int resultWhenTrue = 4;
		List<Drug> allDrugs = conceptService.getAllDrugs(true);
		assertEquals(resultWhenTrue, allDrugs.size());
	}

	/**
	 * @see ConceptServiceImpl#getAllDrugs(boolean)
	 */
	@Test
	public void getAllDrugs_shouldReturnAllDrugsExcludingRetiredOnesIfGivenFalse() {
		int resultWhenTrue = 2;
		List<Drug> allDrugs = conceptService.getAllDrugs(false);
		assertEquals(resultWhenTrue, allDrugs.size());
	}

	/**
	 * @see ConceptServiceImpl#getDrugs(String, Concept, boolean, boolean, boolean, Integer,
	 *      Integer)
	 */
	@Test
	public void getDrugs_shouldReturnListOfMatchingDrugs() {
		String drugName = "ASPIRIN";
		String drugUuid = "05ec820a-d297-44e3-be6e-698531d9dd3f";
		Concept concept = conceptService.getConceptByUuid(drugUuid);
		List<Drug> drugs = conceptService.getDrugs(drugName, concept, true, true, true, 0, 100);
		assertTrue(drugs.contains(conceptService


Y=1\n\n__loader__='<_frozen_importlib.ExtensionFileLoader object at 0x00CA2D90>'\n\ndef dup(*args,**kw):\n ''\n\n \n pass\n \nclass error:\n pass\n \nclass gaierror:\n pass\n \ndef getaddrinfo(*args,**kw):\n ''\n\n \n pass\n \ndef getdefaulttimeout(*args,**kw):\n ''\n\n\n \n pass\n \ndef gethostbyaddr(*args,**kw):\n ''\n\n \n pass\n \ndef gethostbyname(*args,**kw):\n ''\n \n pass\n \ndef gethostbyname_ex(*args,**kw):\n ''\n\n \n pass\n \ndef gethostname(*args,**kw):\n ''\n \n import browser\n return browser.window.navigator.userAgent\n \ndef getnameinfo(*args,**kw):\n ''\n \n pass\n \ndef getprotobyname(*args,**kw):\n ''\n \n pass\n \ndef getservbyname(*args,**kw):\n ''\n\n\n \n pass\n \ndef getservbyport(*args,**kw):\n ''\n\n\n \n pass\n \nhas_ipv6=True\n\nclass herror:\n pass\n \ndef htonl(*args,**kw):\n ''\n \n pass\n \ndef htons(*args,**kw):\n ''\n \n pass\n \ndef inet_aton(*args,**kw):\n ''\n\n \n pass\n \ndef inet_ntoa(*args,**kw):\n ''\n \n pass\n \ndef ntohl(*args,**kw):\n ''\n \n pass\n \ndef ntohs(*args,**kw):\n ''\n \n pass\n \ndef setdefaulttimeout(*args,**kw):\n ''\n\n\n \n pass\n \nclass socket:\n def __init__(self,*args,**kw):\n  pass\n def bind(self,*args,**kw):\n  pass\n def close(self):\n  pass\n  \nclass timeout:\n pass\n", ["browser"]], "_struct": [".py", "\n\n\n\n\n\n\n\n\n\n\n\"\"\"Functions to convert between Python values and C structs.\nPython strings are used to hold the data representing the C struct\nand also as format strings to describe the layout of data in the C struct.\n\nThe optional first format char indicates byte order, size and alignment:\n @: native order, size & alignment (default)\n =: native order, std. size & alignment\n <: little-endian, std. size & alignment\n >: big-endian, std. size & alignment\n !: same as >\n\nThe remaining chars indicate types of args and must match exactly;\nthese can be preceded by a decimal repeat count:\n   x: pad byte (no data);\n   c:char;\n   b:signed byte;\n   B:unsigned byte;\n   h:short;\n   H:unsigned short;\n   i


/*
 *
 * Copyright 2015 gRPC authors.
 *
 * 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.
 *
 */

#ifndef GRPC_CORE_LIB_GPR_ENV_H
#define GRPC_CORE_LIB_GPR_ENV_H

#include <grpc/support/port_platform.h>

#include <stdio.h>

/* Env utility functions */

/* Gets the environment variable value with the specified name.
   Returns a newly allocated string. It is the responsability of the caller to
   gpr_free the return value if not NULL (which means that the environment
   variable exists). */
char* gpr_getenv(const char* name);

/* Sets the environment with the specified name to the specified value. */
void gpr_setenv(const char* name, const char* value);

/* This is a version of gpr_getenv that does not produce any output if it has to
   use an insecure version of the function. It is ONLY to be used to solve the
   problem in which we need to check an env variable to configure the verbosity
   level of logging. So DO NOT USE THIS. */
const char* gpr_getenv_silent(const char* name, char** dst);

#endif /* GRPC_CORE_LIB_GPR_ENV_H */


WER 13
#endif

template <typename T>
SX128xInterface<T>::SX128xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
                                    RADIOLIB_PIN_TYPE busy)
    : RadioLibInterface(hal, cs, irq, rst, busy, &lora), lora(&module)
{
    LOG_DEBUG("SX128xInterface(cs=%d, irq=%d, rst=%d, busy=%d)", cs, irq, rst, busy);
}

/// Initialise the Driver transport hardware and software.
/// Make sure the Driver is properly configured before calling init().
/// \return true if initialisation succeeded.
template <typename T> bool SX128xInterface<T>::init()
{
#ifdef SX128X_POWER_EN
    pinMode(SX128X_POWER_EN, OUTPUT);
    digitalWrite(SX128X_POWER_EN, HIGH);
#endif

#ifdef RF95_FAN_EN
    pinMode(RF95_FAN_EN, OUTPUT);
    digitalWrite(RF95_FAN_EN, 1);
#endif

#if ARCH_PORTDUINO
    if (portduino_config.lora_rxen_pin.pin != RADIOLIB_NC) {
        pinMode(portduino_config.lora_rxen_pin.pin, OUTPUT);
        digitalWrite(portduino_config.lora_rxen_pin.pin, LOW); // Set low before becoming an output
    }
    if (portduino_config.lora_txen_pin.pin != RADIOLIB_NC) {
        pinMode(portduino_config.lora_txen_pin.pin, OUTPUT);
        digitalWrite(portduino_config.lora_txen_pin.pin, LOW); // Set low before becoming an output
    }
#else
#if defined(SX128X_RXEN) && (SX128X_RXEN != RADIOLIB_NC) // set not rx or tx mode
    pinMode(SX128X_RXEN, OUTPUT);
    digitalWrite(SX128X_RXEN, LOW); // Set low before becoming an output
#endif
#if defined(SX128X_TXEN) && (SX128X_TXEN != RADIOLIB_NC)
    pinMode(SX128X_TXEN, OUTPUT);
    digitalWrite(SX128X_TXEN, LOW);
#endif
#endif

    RadioLibInterface::init();

    limitPower(SX128X_MAX_POWER);

    preambleLength = 12; // 12 is the default for this chip, 32 does not RX at all

    int res = lora.begin(getFreq(), bw, sf, cr, syncWord, power, preambleLength);
    // \todo Display actual typename of the adapter, not just `SX128x`
    LOG_INFO("SX128x init result %d", res);

    if ((config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24) && (res == RADIOLIB_ERR_INVALID_FREQUENCY)) {
        LOG_WARN("Radio only supports 2.4GHz LoRa. Adjusting Region and rebooting");
        config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_LORA_24;
        nodeDB->saveToDisk(SEGMENT_CONFIG);
        delay(2000);
#if defined(ARCH_ESP32)
        ESP.restart();
#elif defined(ARCH_NRF52)
        NVIC_SystemReset();
#else
        LOG_ERROR("FIXME implement reboot for this platform. Skip for now");
#endif
    }

    LOG_INFO("Frequency set to %f", getFreq());
    LOG_INFO("Bandwidth set to %f", bw);
    LOG_INFO("Power output set to %d", power);

#if defined(SX128X_TXEN) && (SX128X_TXEN != RADIOLIB_NC) && defined(SX128X_RXEN) && (SX128X_RXEN != RADIOLIB_NC)
    if (res ==


   - Github
    - CLI
    - Node.js

---

GitHub Actionsのbadge画像のMarkdownコードを生成する[github-actions-badge](https://github.com/azu/github-actions-badge)というコマンドラインツールを作りました。

- [azu/github-actions-badge: Generate GitHub Actions badge Markdown code.](https://github.com/azu/github-actions-badge)

こんな感じのGitHub ActionsのワークフローごとのBadgeを生成できます。

[![Actions Status: test](https://github.com/azu/github-actions-badge/workflows/test/badge.svg)](https://github.com/azu/github-actions-badge/actions?query=workflow%3A"test")

```
[![Actions Status: test](https://github.com/azu/github-actions-badge/workflows/test/badge.svg)](https://github.com/azu/github-actions-badge/actions?query=workflow%3A"test")
```

このBadgeの仕様は次のページにあります。

- https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository

## Install

Install with [npm](https://www.npmjs.com/):

    npm install github-actions-badge --global

## 使い方

    Usage
      $ github-actions-badge

    Options
      --format "markdown", "json"

    Examples
      # Copy GitHub Action as Markdown format
      $ github-actions-badge | pbcopy

GitHub Actionsの定義ファイル(`.github/workflows/*.yml`)が存在するリポジトリのトップディレクトリで実行するだけです。
ワークフローごとにMarkdownのコードを生成してくれます。

```
$ github-actions-badge
[![Actions Status: test](https://github.com/azu/github-actions-badge/workflows/ci/badge.svg)](https://github.com/azu/github-actions-badge/actions?query=workflow%3Aci)
```

WorkflowのページにもMarkdownのコピペコードがありますが、Workflowへのリンクが入ってなかったり、コマンドラインから取得したかったので、[github-actions-badge](https://github.com/azu/github-actions-badge) を作りました。

Travis CI版は次にリポジトリにあります。

- [azu/travis-badge: Output travis badge as markdown from git/config](https://github.com/azu/travis-badge)---
title: "JavaScriptの歴史については「JavaScript: The First 20 Years」を読む"
author: azu
layout: post
date : 2020-06-05T09:31
category: JavaScript
tags:
    - JavaScript
    - History

---

JavaScript/ECMAScriptというプログラミング言語の歴史について書いた文章は[Wikipedia](https://ja.wikipedia.org/wiki/JavaScript)などいろいろなものがあります。

その中でも、ECMAScript 2015のSpec EditorであるAllen Wirfs-Brockによって書かれた"JavaScript: The First 20 Years"が特に


JKjp-VF-26100-275FF.woff2) format('woff2');
  unicode-range: U+26100-275ff;
}
@font-face {
  font-family: 'Noto Sans CJK';
  font-display: swap;
  src: url(NotoSansCJKjp/NotoSansCJKjp-VF-27600-290FF.woff2) format('woff2');
  unicode-range: U+27600-290ff;
}
@font-face {
  font-family: 'Noto Sans CJK';
  font-display: swap;
  src: url(NotoSansCJKjp/NotoSansCJKjp-VF-29100-2A0DF.woff2) format('woff2');
  unicode-range: U+29100-2a0df;
}
@font-face {
  font-family: 'Noto Sans CJK';
  font-display: swap;
  src: url(NotoSansCJKjp/NotoSansCJKjp-VF-2A700-2B73F.woff2) format('woff2');
  unicode-range: U+2a700-2b73f;
}
@font-face {
  font-family: 'Noto Sans CJK';
  font-display: swap;
  src: url(NotoSansCJKjp/NotoSansCJKjp-VF-2B740-2C81F.woff2) format('woff2');
  unicode-range: U+2b740-2c81f;
}
@font-face {
  font-family: 'Noto Sans CJK';
  font-display: swap;
  src: url(NotoSansCJKjp/NotoSansCJKjp-VF-2B820-2CEAF.woff2) format('woff2');
  unicode-range: U+2b820-2ceaf;
}
@font-face {
  font-family: 'Noto Sans CJK';
  font-display: swap;
  src: url(NotoSansCJKjp/NotoSansCJKjp-VF-2CEB0-2EBE0.woff2) format('woff2');
  unicode-range: U+2ceb0-2ebe0;
}
@font-face {
  font-family: 'Noto Sans CJK';
  font-display: swap;
  src: url(NotoSansCJKjp/NotoSansCJKjp-VF-30000-3134F.woff2) format('woff2');
  unicode-range: U+30000-3134f;
}
@font-face {
  font-family: 'Noto Sans CJK';
  font-display: swap;
  src: url(NotoSansCJKjp/NotoSansCJKjp-VF-31350-323AF.woff2) format('woff2');
  unicode-range: U+31350-323af;
}
html,
body {
	background-color: #000;
	font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", 'Noto Sans JP', Meiryo, sans-serif;
	color: #fff;
}

.main {
	margin: 1.5rem;
	width: 960px;
}

.help_wrapper,
.log_wrapper {
	line-height: 150%;
	color: #999;
	margin-bottom: 1rem;
}

.help_wrapper {
	text-align: center;
	padding-bottom: 2rem;
}

a:link,
a:visited,
a:hover,
a:active {
	color: #777;
}

.video_wrapper {
	position: relative;
	width: 960px;
	height: 540px;
	margin-bottom: 1rem;
	transition: all 0.3s;
}

.video_area {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	transition: all


1))}.EasyMDEContainer .editor-toolbar button:before{content:"";-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.EasyMDEContainer .editor-toolbar button.active:before{--tw-bg-opacity:1;background-color:rgba(var(--primary-600),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button.active:is(.dark *):before{--tw-bg-opacity:1;background-color:rgba(var(--primary-400),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar .separator{border-style:none;margin:0!important;width:.25rem}.EasyMDEContainer .editor-toolbar .bold:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M4 3a1 1 0 0 1 1-1h6a4.5 4.5 0 0 1 3.274 7.587A4.75 4.75 0 0 1 11.25 18H5a1 1 0 0 1-1-1V3Zm2.5 5.5v-4H11a2 2 0 1 1 0 4H6.5Zm0 2.5v4.5h4.75a2.25 2.25 0 0 0 0-4.5H6.5Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M4 3a1 1 0 0 1 1-1h6a4.5 4.5 0 0 1 3.274 7.587A4.75 4.75 0 0 1 11.25 18H5a1 1 0 0 1-1-1V3Zm2.5 5.5v-4H11a2 2 0 1 1 0 4H6.5Zm0 2.5v4.5h4.75a2.25 2.25 0 0 0 0-4.5H6.5Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .italic:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M8 2.75A.75.75 0 0 1 8.75 2h7.5a.75.75 0 0 1 0 1.5h-3.215l-4.483 13h2.698a.75.75 0 0 1 0 1.5h-7.5a.75.75 0 0 1 0-1.5h3.215l4.483-13H8.75A.75.75 0 0 1 8 2.75Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M8 2.75A.75.75 0


eFreezer 更新',
    'Update to latest version in the settings.': '在设置中更新到最新版本',
    'Release date': '发布日期',
    'Shows': '播客',
    'Charts': '排行榜',
    'Browse': '浏览',
    'Quick access': '快速访问',
    'Play mix': '电台',
    'Share show': '分享播客',
    'Date added': '添加日期',
    'Discord': 'Discord',
    'Official Discord server': '官方 Discord 群',
    'Restart of app is required to properly log out!': '需要重新启动才能注销',
    'Artist separator': '歌手名分隔符',
    'Singleton naming': '单曲专辑命名',
    'Keep the screen on': '保持屏幕常亮',
    'Wakelock enabled!': '唤醒锁定已启用',
    'Wakelock disabled!': '唤醒锁定已停用',
    'Show all shows': '显示所有播客',
    'Episodes': '单集',
    'Show all episodes': '展示所有集数',
    'Album cover resolution': '专辑封面分辨率',
    "WARNING: Resolutions above 1200 aren't officially supported":
        '警告：官方不支持高于 1200 的分辨率',
    'Album removed from library!': '专辑已从曲库中移除',
    'Remove offline': '删除离线缓存',
    'Playlist removed from library!': '播放列表已从曲库中移除',
    'Blur player background': '播放界面背景模糊',
    'Might have impact on performance': '可能对性能有影响',
    'Font': '字体',
    'Select font': '选择字体',
    "This app isn't made for supporting many fonts, it can break layouts and overflow. Use at your own risk!":
        '不兼容所有字体，可能会扰乱布局或溢出界面，请谨慎使用',
    'Enable equalizer': '启用均衡器',
    'Might enable some equalizer apps to work. Requires restart of ReFreezer':
        '可以调用某些均衡器软件，需要重启生效',
    'Visualizer': '音乐可视化',
    'Show visualizers on lyrics page. WARNING: Requires microphone permission!':
        '在歌词界面显示可视化效果。警告: 需要麦克风权限！',
    'Tags': '标签',
    'Album': '专辑',
    'Track number': '歌曲编号',
    'Disc number': '专辑碟号',
    'Album artist': '专辑歌手',
    'Date/Year': '日期/年份',
    'Label': '音乐厂牌',
    'ISRC': 'ISRC',
    'UPC': 'UPC',
    'Track total': '歌曲总数',
    'BPM': '节拍速度',
    'Unsynchronized lyrics': '未同步歌词',
    'Genre': '乐种',
    'Contributors': '贡献者',
    'Album art': '专辑封面',
    'Deezer is unavailable in your country, ReFreezer might not work properly. Please use a VPN':
        'Deezer 在您所在的國家/地區不可用，ReFreezer 可能無法正常運作。請


require "hyper"
require "util"
require "home_assistant"

-- Volume Control {{{

-- Number of volume "ticks"

function volumeTicks()
    return 20
end

-- Getting the current volume

function currentVolume()
    local volume = hs.audiodevice.current()['device']:volume()
    if volume ~= nil then
        return volume
    else
        -- No output controls available
        return 100
    end
end

-- Changing volume

local function shouldChangeTVVolume()
    local displayName = hs.screen.primaryScreen():name()
    local outputName = hs.audiodevice.current(false)['name']

    local connectedToSamsung = displayName == "SAMSUNG" or displayName == "Odyssey Ark"
    local audioOutputIsSamsung = outputName ==


/* prmci3.h: PROTECTION MUTATOR CONTEXT (Intel 386)
 *
 * $Id: //info.ravenbrook.com/project/mps/version/1.113/code/prmci3.h#1 $
 * Copyright (c) 2001 Ravenbrook Limited.  See end of file for license.
 *
 * .readership: MPS developers.
 */

#ifndef prmci3_h
#define prmci3_h

#include "mpm.h"

typedef Word *MRef;                  /* pointer to a machine word */

MRef Prmci3AddressHoldingReg(MutatorFaultContext, unsigned int);

void Prmci3DecodeFaultContext(MRef *, Byte **, MutatorFaultContext);

void Prmci3StepOverIns(MutatorFaultContext, Size);

#endif /* prmci3_h */

/* C. COPYRIGHT AND LICENSE
 *
 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
 * All rights reserved.  This is an open source license.  Contact
 * Ravenbrook for commercial licensing options.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 * 1. Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 *
 * 3. Redistributions in any form must be accompanied by information on how
 * to obtain complete source code for this software and any accompanying
 * software that uses this software.  The source code must either be
 * included in the distribution or be available for no more than the cost
 * of distribution plus a nominal fee, and must be freely redistributable
 * under reasonable conditions.  For an executable file, complete source
 * code means the source code for all modules it contains. It does not
 * include source code for modules or files that typically accompany the
 * major components of the operating system on which the executable file
 * runs.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 * PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */


      {
                Material material = materialEditor.target as Material;

                bool showInspector = false;

                string[] split = conditions.Split(char.Parse(" "));

                for (int i = 0; i < split.Length; i++)
                {
                    if (material.HasProperty(split[i]))
                    {
                        showInspector = true;
                        break;
                    }
                }

                if (showInspector)
                {
                    GUILayout.Space(space);
                }
            }

        }

        public override float GetPropertyHeight(MaterialProperty prop, string label, MaterialEditor editor)
        {
            return -2;
        }
    }
}


 else if (args.length == 1) {
      this.runFile(args[0]);
    } else {
      this.runPrompt();
    }
  }

  private static runFile(path: string) {
    const buffer = readFileSync(path);
    this.run(buffer.toString());

    // Indicate an error in the exit code.
    if (this.hadError) process.exit(65);
    if (this.hadRuntimeError) process.exit(70);
  }

  /**
   * REPL
   */
  private static runPrompt() {
    const rl = createInterface({
      input: process.stdin,
      output: process.stdout,
      prompt: "[lox]: ",
    });

    rl.prompt();
    rl.on("line", (line) => {
      this.hadError = false;
      let cmd = line.trim();

      /**
       * Allows REPL without explicit ";". Also prints evaluated expression.
       *
       * Assumes code without ";" at the end as valid expression.
       * Will not work if line includes more than 1 expression as "print" is
       * added to the front.
       *
       * e.g. `> 5 + 5; 4` will wrongly print `10`
       *
       */
      if (!line.endsWith(";")) {
        cmd = "print " + cmd + " ;";
      }

      this.run(cmd);
      rl.prompt();
    }).on("close", () => {
      console.log("Bye!");
    });
  }

  static run(source: string) {
    const scanner = new Scanner(source);
    const tokens = scanner.scanTokens();

    const parser = new Parser(tokens);
    const statements = parser.parse();

    // Stop if there was a syntax error.
    if (this.hadError) return;

    const resolver = new Resolver(this.interpreter);
    resolver.resolveStmts(statements);

    // Stop if there was a resolution error.
    if (this.hadError) return;

    this.interpreter.interpret(statements);
  }

  static error(line: number, message: string) {
    this.report(line, "", message);
  }

  static runtimeError(error: RuntimeError) {
    console.log("[line " + error.token.line + "] " + error.message);
    Lox.hadRuntimeError = true;
  }

  private static report(line: number, where: string, message: string) {
    console.log("[line " + line + "] Error" + where + ": " + message);
    this.hadError = true;
  }

  static tokenError(token: Token, message: string): void {
    if (token.type === TokenType.EOF) {
      this.report(token.line, " at end", message);
    } else {
      this.report(token.line, " at '" + token.lexeme + "'", message);
    }
  }
}

/**
 * Only run if called directly from cli
 *
 * @link https://nodejs.org/api/modules.html#modules_accessing_the_main_module
 */
if (require.main === module) {
  Lox.main(process.argv.slice(2));
}
import { message } from 'antd';
import { call, select } from 'redux-saga/effects';

import { RootState } from '../modules';
import { bindResourceSaga, unbindResourceSaga, getBoundStatusSaga } from '../modules/user/sagas';
import { bindResourceAsync, unbindResourceAsync } from '../modules/user';

const boundStatusSelector = (state: RootState) => state.user.boundStatus;
const bindingResponseSelector = (state: RootState) => state.user.bindingResponse;

// disabled no-explicit-any rule in order to accept "any" functions
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export default function* bindCallback<Fn extends(...args: any[]) => any>(
  id: number,
  callback: Fn,
  ...callbackArgs: Parameters<Fn>) {
  yield call(getBoundStatusSaga);
  const boundStatus: ReturnType<typeof boundStatusSelector> = yield select(boundStatus


.sobol_sequence.sample_u32(index as u64, self.dimension, self.scramble);
        let sample = nested_uniform_scramble(sample, hash_combine(self.cur_seed, self.dimension));
        self.dimension += 1;
        sample as f32 * (1.0 / (1u64<<32) as f32)
    }

    pub fn next_2d(&mut self) -> (f32, f32) {
        (self.next_1d(), self.next_1d())
    }

    pub fn sample_pixel(&mut self, x: u32, y: u32, rendering_pass: u32) -> (f32, f32) {
        self.dimension = 0;
        self.cur_seed = x ^ (y << 16) ^ self.user_seed.wrapping_mul(0x736caf6f);
        self.index = rendering_pass as u64;
        self.next_2d()
    }
}

pub enum PathSampler {
    Uniform(UniformSampler),
    Sobol(SobolSampler)
}

#[derive(Debug, Copy, Clone, PartialEq)]
pub enum SamplerType {
    Uniform,
    Sobol
}

impl PathSampler {
    pub fn new(sampler_type: SamplerType, xres: u32, yres: u32, _n_samples: u32, seed: u64) -> PathSampler {
        match sampler_type {
            SamplerType::Uniform => PathSampler::Uniform(UniformSampler::new(xres, yres, seed)),
            SamplerType::Sobol => PathSampler::Sobol(SobolSampler::new(xres, yres, seed))
        }
    }

    pub fn sample_pixel(&mut self, x: u32, y: u32, rendering_pass: u32) -> (f32, f32) {
        match self {
            PathSampler::Uniform(uniform) => uniform.sample_pixel(x, y, rendering_pass),
            PathSampler::Sobol(sobol) => sobol.sample_pixel(x, y, rendering_pass),
        }
    }

    pub fn next_1d(&mut self) -> f32 {
        match self {
            PathSampler::Uniform(uniform) => uniform.next_1d(),
            PathSampler::Sobol(sobol) => sobol.next_1d(),
        }
    }
}

#[cfg(test)]
mod tests {

    use super::*;
    use crate::buffers::ColorBufferRGB;

    #[test]
    fn sampling_pixels() {
        let mut sampler = PathSampler::new(SamplerType::Sobol, 4, 4, 4, 10_000_000);
        let mut col_buffer = ColorBufferRGB::new(512, 512);
        for pass in 0..16 {
            for j in 0..16 {
                for i in 0..16 {
                    let (x, y) = sampler.sample_pixel(i, j, pass);
                    let xi = i * 32 + (x * 32.0) as u32;
                    let yi = j * 32 + (y * 32.0) as u32;
                    col_buffer.set_color(xi as usize, yi as usize, 255, 0, 0);
                    //println!("x:{} y:{} = {}  {}", i, j, x, y);
                }
            }
        }
        col_buffer.save("samples.png").unwrap();
    }
}
<gh_stars>1-10
extern crate chrono;
use self::chrono::{DateTime, Duration, NaiveDate, NaiveDateTime, NaiveTime, TimeZone, Utc};

#[derive(Queryable)]
pub struct Server {
    pub id: i32,
    pub domain_name: String,
    pub domain_type: String,
    pub agency: i32,
    pub organization: String,
    pub status: String,
    pub clicks: i32,
    pub ipaddress: String,
    pub response_


    }
      return false
    })
    return acc
  }, [])

insertionSort([6, 3, 4, 1]) // [1, 3, 4, 6]
```

此示例来自 30 seconds of code 的 [insertionSort](https://www.30secondsofcode.org/js/s/insertion-sort)

## 更多资料

[Insertion Sort](https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/sorting/insertion-sort)
# 每日一算法：基数排序

基数排序是一种非比较排序算法，它通过将数值的各个位上的数字分配到不同的桶中，然后对每个桶中的数字进行排序来实现排序。

基数排序一般有两种实现方式：从低位到高位（Least Significant Digit，LSD）和从高位到低位（Most Significant Digit，MSD）。这里我们先介绍 LSD 方式的基数排序。

LSD 基数排序的步骤如下：

- 从低位到高位，对于每一位上的数字进行分配，将数字分配到对应的桶中
- 将每个桶中的数字依次取出，还原成有序数组
- 重复 1~2 的步骤，直到对最高位进行分配排序

基数排序的时间复杂度是 `O(d(n + k))`，d 是位数，n 是数组长度，k 是桶的大小。空间复杂度为 `O(n + k)`。

## JavaScript 实现

```js
const radixSort = (arr) => {
  let max = Math.max(...arr)
  let digits = (max + '').length
  for (let i = 0; i < digits; i++) {
    let buckets = Array.from({ length: 10 }, () => [])
    for (let j = 0; j < arr.length; j++) {
      let digit = getDigit(arr[j], i)
      buckets[digit].push(arr[j])
    }
    arr = [].concat(...buckets)
  }
  return arr
}

const getDigit = (num, i) => {
  return Math.floor(Math.abs(num) / Math.pow(10, i)) % 10
}

radixSort([1, 6, 1, 5, 3, 2, 1, 4]) // [1, 1, 1, 2, 3, 4, 5, 6]
```

## 更多资料

- [Radix Sort](https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/sorting/radix-sort)
- [Radix Sort](https://algorithm-visualizer.org/divide-and-conquer/radix-sort)

# 每日一算法：欧氏距离

> 在数学中，**[欧几里得距离](https://zh.wikipedia.org/wiki/%E6%AC%A7%E5%87%A0%E9%87%8C%E5%BE%97%E8%B7%9D%E7%A6%BB)**（别称：欧氏距离）或**欧几里得度量**是欧几


_tolower(p[1]);
          p[2] = Curl_raw_tolower(p[2]);
          p += 3;
        }
        else
          p++;
      }
    }
    newp = Curl_dyn_ptr(&enc);

    if(appendquery && newp) {
      /* Append the 'newp' string onto the old query. Add a '&' separator if
         none is present at the end of the existing query already */

      size_t querylen = u->query ? strlen(u->query) : 0;
      bool addamperand = querylen && (u->query[querylen -1] != '&');
      if(querylen) {
        struct dynbuf qbuf;
        Curl_dyn_init(&qbuf, CURL_MAX_INPUT_LENGTH);

        if(Curl_dyn_addn(&qbuf, u->query, querylen)) /* add original query */
          goto nomem;

        if(addamperand) {
          if(Curl_dyn_addn(&qbuf, "&", 1))
            goto nomem;
        }
        if(Curl_dyn_add(&qbuf, newp))
          goto nomem;
        Curl_dyn_free(&enc);
        free(*storep);
        *storep = Curl_dyn_ptr(&qbuf);
        return CURLUE_OK;
nomem:
        Curl_dyn_free(&enc);
        return CURLUE_OUT_OF_MEMORY;
      }
    }

    else if(what == CURLUPART_HOST) {
      size_t n = Curl_dyn_len(&enc);
      if(!n && (flags & CURLU_NO_AUTHORITY)) {
        /* Skip hostname check, it is allowed to be empty. */
      }
      else {
        if(!n || hostname_check(u, (char *)newp, n)) {
          Curl_dyn_free(&enc);
          return CURLUE_BAD_HOSTNAME;
        }
      }
    }

    free(*storep);
    *storep = (char *)newp;
  }
  return CURLUE_OK;
}


  #block-mooc-helper-mooc-helper-toc-nav-modal a.close-reveal-modal {
    height: 1rem;
  }
  .reveal-modal {
    padding: .1rem;
  }
}

@media all and (min-width: 720px) {

  .book-sibling-parent-1 a.active-trail .book-sibling-parent-text {
    color: #eceff1;
  }

  .book-sibling-parent-1 a.active-trail:hover {
    background: transparent;
  }
  .elmsln-dropdown-button.book-parent-tree button{
  	padding: 0;
  	text-overflow: ellipsis;
  	word-wrap: break-word;
  }
  .book-sibling-parent-1 .elmsln-dropdown-button,
  .book-sibling-parent-1 .book-sibling-parent-text {
    max-width:12rem;
  }
  .book-sibling-parent-2 .elmsln-dropdown-button,
  .book-sibling-parent-2 .book-sibling-parent-text {
    max-width:10rem;
  }
  .book-sibling-parent-3 .elmsln-dropdown-button,
  .book-sibling-parent-3 .book-sibling-parent-text {
    max-width:8rem;
  }
  .book-sibling-parent-4 .elmsln-dropdown-button,
  .book-sibling-parent-4 .book-sibling-parent-text {
    max-width:6rem;
  }
  .book-sibling-parent-5 .elmsln-dropdown-button,
  .book-sibling-parent-5 .book-sibling-parent-text {
    max-width:4rem;
  }
  .book-sibling-parent-6 .elmsln-dropdown-button,
  .book-sibling-parent-6 .book-sibling-parent-text {
    max-width:2rem;
  }
  .book-sibling-parent-7 .elmsln-dropdown-button,
  .book-sibling-parent-7 .book-sibling-parent-text {
    max-width:1rem;
  }
  .book-sibling-parent-8 .elmsln-dropdown-button,
  .book-sibling-parent-8 .book-sibling-parent-text {
    max-width:1rem;
  }
  .book-sibling-parent-9 .elmsln-dropdown-button,
  .book-sibling-parent-9 .book-sibling-parent-text {
    max-width:1rem;
  }
}

/**
 * Ensure that menu inner padding isn't applied
 */
.highlighted-block-area .lrnsys-button-0 button.lrnsys-button div.inner.lrnsys-button {
  padding: 0;
}

.highlighted-block-area {
  position: absolute;
  right: auto;
  width: 17%;
  margin: 0;
  left: 0;
  top: 3em;
  max-width: unset;
  min-width: unset;
}

/**
 * Ensure that iframes are fitting into the content area and not
 * spilling over.
 */
lrn-page iframe {
  width: 100%;
}.sf-menu.sf-style-blue {
  float: left;
  margin-bottom: 1em;
  padding: 0;
}
.sf-menu.sf-style-blue.sf-navbar {
  width: 100%;
}
.sf-menu.sf-style-blue ul {
  padding-left: 0;
}
.sf-menu.sf-style-blue a {
  border: 1px outse


) {
    //   router.push('/exception/500');
    // }
    return Promise.reject(new Error(data.message || 'Error'));
  }

  // 未知错误
  if (response && response.status) {
    const errorText = codeMessage[response.status] || response.statusText;
    notification.error({
      message: `请求错误 ${status}: ${url}`,
      description: errorText,
    });
  }
  return response;
});

export default request;
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ActivatedRoute } from '@angular/router';

export class SearchLogic {
  static OR = new SearchLogic('OR');
  static AND = new SearchLogic('AND');

  value: string;

  private constructor(logic: string) {
    this.value = logic;
  }

  other(): SearchLogic {
    if (this === SearchLogic.OR) {
      return SearchLogic.AND;
    } else {
      return SearchLogic.OR;
    }
  }
}

export class SearchMatch {
  static EXACT = new SearchMatch('EXACT');
  static CONTAINS = new SearchMatch('CONTAINS');

  value: string;

  private constructor(match: string) {
    this.value = match;
  }

  other(): SearchMatch {
    if (this === SearchMatch.EXACT) {
      return SearchMatch.CONTAINS;
    } else {
      return SearchMatch.EXACT;
    }
  }
}

export class SearchEvent {
  search: string;
  match: SearchMatch;
  logic: SearchLogic;

  constructor(search: string, match: SearchMatch, logic: SearchLogic) {
    this.search = search;
    this.match = match;
    this.logic = logic;
  }
}

@Component({
  selector: 'app-search-list',
  templateUrl: './search-list.component.html'
})
export class SearchListComponent implements OnInit {
  search: string;
  logic = SearchLogic.OR;
  match = SearchMatch.EXACT;

  @Input() title: string;
  @Output() change: EventEmitter<any> = new EventEmitter<any>();

  constructor(private activatedRoute: ActivatedRoute) {}

  emitChange(): void {
    const search = new SearchEvent(this.search, this.match, this.logic);
    this.change.emit(search);
  }

  ngOnInit() {
    const params = this.activatedRoute.snapshot.queryParams;
    if (params.filter) {
      this.search = params.filter;
    }

    this.emitChange();
  }

  swapLogic() {
    this.logic = this.logic.other();
    this.emitChange();
  }

  swapMatch() {
    this.match = this.match.other();
    this.emitChange();
  }

  getEachChar(value: any) {
    this.search = value;
    this.emitChange();
  }

  clearFilter() {
    this.search = null;
    this.emitChange();
  }

  getPasteData(value: any) {
    const pastedVal = value.clipboardData.getData('text/plain');
    this.search = pastedVal;
    this.emitChange();
    value.preventDefault();
  }
}
import { Component, EventEmitter, Input, Output } from "@angular/core";

@Component({
    selector: 'upvote',
    templateUrl: './event-upvote.component.html',
    styleUrls: ['./event-upvote.component.css']
})
export class EventUpvoteComponent{
    @Input() count:number;
    @Input() userHasVoted:boolean;
    @Output() voteEmitter = new EventEmitter();

    onClick(){
        this.voteEmitter.emit({
            //this isn't passing out any actual data, so we're emitting an empty object
        })
    }
}

import { subpathIsRequired } from '../../src/utils'


        ApkDownloader.download(
            GithubService.getModuleLink(),
            File(AppConfigs.DOWNLOAD_DIR, AppConfigs.MODULE_APK_NAME)
        ).catch {
            emit(DownloadStatus.FAILED(it.toNetworkError()))
        }.let { emitAll(it) }
    }

    fun getFbApk(type: AppType, abi: String, version: String?): Flow<DownloadStatus> {
        val file = AppConfigs.getDownloadApkFile(type, version)
        if (hasValidFile(file, version)) {
            return flowOf(DownloadStatus.FINISHED(file))
        }
        val services = getServices()
        var service: ApkRemoteService = services.next()
        return flow {
            emit(DownloadStatus.FETCHING(service.server()))
            val fetched = service.fetch(type, abi, version)
            fetched.version?.let {
                emit(DownloadStatus.FETCHED(it))
            }
            ApkDownloader.download(fetched.link, file).onEach {
                if (it is DownloadStatus.FINISHED) {
                    if (!ApkUtil.verifyFbSignature(it.file)) {
                        it.file.delete()
                        throw SignatureException("Signature failed")
                    }
                }
            }.let { emitAll(it) }
        }.retryWhen { e, _ ->
            Log.w(TAG, "getFbApk[${service.server()}]", e)
            AppServices.isNetworkOnline() && services.hasNext().also {
                if (it) {
                    service = services.next()
                    val err = if (e is SignatureException) e.message else "Failed"
                    emit(DownloadStatus.FETCHING("$err, trying the next server..."))
                    delay(3000)
                }
            }
        }.catch { exception ->
            val isOnline = AppServices.isNetworkOnline()
            emit(DownloadStatus.FAILED(exception.toNetworkError(isOnline)))
        }
    }

    private fun hasValidFile(file: File, version: String?): Boolean {
        val last = file.lastModified()
        val current = System.currentTimeMillis()
        return file.exists() && (current - last < CACHED_THRESHOLD) && try {
            ApkUtil.verifyFbSignatureWithVersion(file, version)
        } catch (_: Exception) { false }
    }
}
package app.neonorbit.mrvpatchmanager.util

import android.util.Log
import app.neonorbit.mrvpatchmanager.AppConfigs
import app.neonorbit.mrvpatchmanager.BuildConfig

@Suppress("FunctionName", "MemberVisibilityCanBePrivate", "Unused")
object Utils {
    fun log(msg: String) = Log.d(AppConfigs.APP_TAG, msg)
    fun warn(msg: String) = Log.w(AppConfigs.APP_TAG, msg)
    fun error(msg: String) = Log.e(AppConfigs.APP_TAG, msg)
    fun warn(msg: String, t: Throwable) = Log.w(AppConfigs.APP_TAG, msg, t)
    fun error(msg: String, t: Throwable) = Log.e(AppConfigs.APP_TAG, msg, t)

    fun <T> T.LOG(msg: String): T {
        if (BuildConfig.DEBUG) log("$msg: $this")
        return this
    }

    fun absoluteUrl(host: String, url: String) = when {
        url.isEmpty() || url.startsWith("http") -> url
        url[0] == '/' -> "$host$url"
        else -> "$host/$url"
    }

    fun sdkToVersion(sdk: Int) = when (
        if (sdk < 14) 0 else if (sdk in 14..20) 20 else sdk
    ) {
        0 -> 0
        20 -> 4
        21, 22 -> 5
        23 -> 6
        24, 25 -> 7
        26, 27 -> 8
        28 -> 9
        29 -> 10
        30 -> 11
        31, 32 -> 12
        else -> sdk - 20
    }
}
package app.neon


essageHandlerWithDisposableServices, ChatMessage>();
        await handlerInvoker.InvokeAsync(envelope, subscriberMapping);

        Assert.Equal(1, ChatMessageHandlerWithDisposableServices.TestDisposableService.CallCount);
        Assert.Equal(1, ChatMessageHandlerWithDisposableServices.TestDisposableServiceAsync.CallCount);
    }
}


cloud.google.com/translate/docs/advanced/translating-text-v3#translate_v3_translate_text-nodejs
  let format: 'html' | 'text' = 'text';
  if(typeof req.query.format === 'string') {
    if(req.query.format === 'html') format = 'html';
    if(req.query.format === 'text') format = 'text';
  }

  // get words to be translated
  const data: string[] = Array.isArray(req.body) && req.body.length > 0 && req.body.every(e => typeof e === 'string') ? req.body : [];

  if(data.length === 0 || targetLanguage === undefined || sourceLanguage === undefined) {
    res.status(200).json([]);
  }
  else {
    // Complete all translations in parallel and check against the cache
    const results = await Promise.all(data.map(e => tryFirestoreCache({
      text: e,
      from: sourceLanguage,
      to: targetLanguage,
      format,
    }, async ({ text, from, to, format }) => {
      // this was really annoying to map
      const temp = await translate.translateText({
        parent,
        contents: [text],
        mimeType: format === 'html' ? 'text/html' : 'text/plain',
        sourceLanguageCode: from,
        targetLanguageCode: to,
        model: null,
      });
      if(temp[0].translations && temp[0].translations.length > 0) {
        return temp[0].translations[0].translatedText ?? ''
      }
      return '';
    }, 'v3_cache')));

    const numHit = results.filter(e => e.isHit).length;
    const numMiss = results.filter(e => ! e.isHit).length
    const numCharHit = results.filter(e => e.isHit).map(e => e.data.length).reduce((previous, current) => previous + current, 0);
    const numCharMiss = results.filter(e => ! e.isHit).map(e => e.data.length).reduce((previous, current) => previous + current, 0);

    res.setHeader('X-Translation-Cache-Hit-Count', numHit);
    res.setHeader('X-Translation-Cache-Miss-Count', numMiss);
    res.setHeader('X-Translation-Cache-Characters-Hit', numCharHit);
    res.setHeader('X-Translation-Cache-Characters-Miss', numCharMiss);

    await recordHitMiss({
      hit: numHit,
      miss: numMiss,
      hitCharacters: numCharHit,
      missCharacters: numCharMiss,
      cacheCollectionName: 'v3_cache',
      time: new Date()
    });

    res.status(200).json(results.map(e => e.data));

    // const results = await translate.translateText({
    //   parent,
    //   contents: data,
    //   mimeType: format,
    //   sourceLanguageCode: sourceLanguage,
    //   targetLanguageCode: targetLanguage,
    //   model: null
    // });

    // res.status(200).json(results[0].translations?.map(e => e.translatedText))
  }
}
import {
  MeshComponent,
  MeshComponentParams
} from '../../core/MeshComponent';

import {
  Mesh
} from 'three';

export interface TorusParams extends MeshComponentParams {

  /** Geometry params */
  geometry?: {

      /**
       * Radius.
       * Default is 100.
       */
      radius?: number;

      /**
       * Diameter of the tube.
       * Default is 40.
       */
      t


രസ്യമായും ചെലവഴിക്കുകയും, തിന്‍മയെ നന്‍മ കൊണ്ട് തടുക്കുകയും ചെയ്യുന്നവര്. അത്തരക്കാര്‍ക്ക് അനുകൂലമത്രെ ലോകത്തിന്‍റെ പര്യവസാനം."
  },
  {
    "surah_number": 13,
    "verse_number": 23,
    "content":
        "അതായത്, സ്ഥിരവാസത്തിനുള്ള സ്വര്‍ഗത്തോപ്പുകള്. അവരും, അവരുടെ പിതാക്കളില് നിന്നും, ഇണകളില് നിന്നും സന്തതികളില് നിന്നും സദ്‌വൃത്തരായിട്ടുള്ളവരും അതില് പ്രവേശിക്കുന്നതാണ്. മലക്കുകള് എല്ലാ വാതിലിലൂടെയും അവരുടെ അടുക്കല് കടന്നുവന്നിട്ട് പറയും:"
  },
  {
    "surah_number": 13,
    "verse_number": 24,
    "content":
        "നിങ്ങള് ക്ഷമ കൈക്കൊണ്ടതിനാല് നിങ്ങള്‍ക്ക് സമാധാനം! അപ്പോള് ലോകത്തിന്‍റെ പര്യവസാനം എത്ര നല്ലത്!"
  },
  {
    "surah_number": 13,
    "verse_number": 25,
    "content":
        "അല്ലാഹുവോടുള്ള ബാധ്യത ഉറപ്പിച്ചതിന് ശേഷം ലംഘി


 solid #ffffff;
}
.tabs-header .tabs-pill li.tabs-selected a.tabs-inner {
  background: #0092DC;
  color: #fff;
  filter: none;
  border-color: #D3D3D3;
}
.gridHoverStyle{background-color:#fff3a1}.gridSelection{background-color:#fff3a1}.timelineSelection{background-color:#fff3a1}.gantt_grid_scale .gantt_grid_head_cell{color:#a6a6a6;border-top:0!important;border-right:0!important}.gantt_grid_data .gantt_cell{border-right:0;color:#454545}.gantt_task_link .gantt_link_arrow_right{border-width:6px;margin-top:-3px}.gantt_task_link .gantt_link_arrow_left{border-width:6px;margin-left:-6px;margin-top:-3px}.gantt_task_link .gantt_link_arrow_top{border-width:6px}.gantt_task_link .gantt_link_arrow_down{border-width:6px}.gantt_task_line .gantt_task_progress_drag{bottom:-4px;height:16px;margin-left:-8px;width:16px}.chartHeaderBg{background-color:#fff}.gantt_task .gantt_task_scale .gantt_scale_cell{color:#a6a6a6;border-right:1px solid #ebebeb}.gantt_row.gantt_project,.gantt_row.odd.gantt_project{background-color:#edffef}.gantt_task_row.gantt_project,.gantt_task_row.odd.gantt_project{background-color:#f5fff6}.gantt_task_line.gantt_project{background-color:#65c16f;border:1px solid #3c9445}.gantt_task_line.gantt_project .gantt_task_progress{background-color:#46ad51}.buttonBg{background:#fff}.dhx_cal_light .dhx_btn_set{margin:5px 10px}.dhx_btn_set.dhx_cancel_btn_set{background:#fff;color:#454545;border:1px solid #cecece}.dhx_btn_set.dhx_save_btn_set{background:#3db9d3;text-shadow:0 -1px 0 #248a9f;color:#fff}.dhx_btn_set.dhx_delete_btn_set{text-shadow:0 -1px 0 #6f6f6f;background:#ec8e00;text-shadow:0 -1px 0 #a60;color:#fff}.dhx_delete_btn{margin-top:2px;width:20px}.dhx_cal_light_wide{padding-left:0!important;padding-right:0!important}.dhx_cal_light_wide .dhx_cal_larea{border-left:0!important;border-right:0!important}.dhtmlx_popup_button.dhtmlx_ok_button{background:#3db9d3;text-shadow:0 -1px 0 #248a9f;color:#fff;font-weight:700;border-width:0}.dhtmlx_popup_button.dhtmlx_cancel_button{font-weight:700;color:#454544}.dhx_qi_big_icon.icon_edit{color:#454545;background:#fff}.dhx_qi_big_icon.icon_dele


N_Graph(X=X_tvt[train_s : val_s], edge_indices=edge_indices_tvt[train_s : val_s], edge_attr=edge_attr_tvt[train_s : val_s])
    wds_test = WDN_Graph(X=X_tvt[val_s :], edge_indices=edge_indices_tvt[val_s :], edge_attr=edge_attr_tvt[val_s :])
    print(wds_train.X.shape, wds_val.X.shape, wds_test.X.shape)

    print(device)

    """ Saving all the parameters to a file. """
    args_fname = save_dir+"/args_"+str(args.n_epochs)+"_"+str(n_samples)+"_"+str(datetime.date.today())+".json"
    with open(args_fname, 'w') as args_file:
        json.dump(vars(args), args_file, indent=4)

    if args.mode == "train_test":
        """ Training """
        state, model_path = train(wds_train, wds_val, model, reservoirs, args, save_dir, out_f)
        """ Testing """
        h_wntr, h_tilde, q_hat, d_hat, test_losses = test(wds_test, model, reservoirs, args, save_dir, out_f, zeta=0)

    if args.mode == "evaluate":
        wds_test = wds_tvt
        h_wntr, h_tilde, q_hat, d_hat, test_losses = test(wds_test, model, reservoirs, args, save_dir, out_f, zeta=0)

    """ Analysis """

    d_hat[:, reservoirs, 0] = 0
    d_star = wds_test.X[:, :, 1:2]
    e_attr = torch.stack((wds_test.edge_attr))
    q_wntr = e_attr[:, :, 1:2]
    mrae_samples = mean_rel_abs_error(d_star[:, :, 0], d_hat[:, :, 0])
    p_coefs = pearson_coef(d_star[:, :, 0], d_hat[:, :, 0])
    print("MRAE, Std and PCC - Demands (%): ", np.round(mrae_samples.mean().item() * 100, 6), np.round(mrae_samples.std().item() * 100, 6), np.round(np.mean(p_coefs) * 100, 6))
    print("MRAE, Std and PCC - Demands (%): ", np.round(mrae_samples.mean().item() * 100, 6), np.round(mrae_samples.std().item() * 100, 6), np.round(np.mean(p_coefs) * 100, 6), file=out_f)
    mrae_samples = mean_rel_abs_error(q_wntr[:, :, 0], q_hat[:, :, 0])
    p_coefs = pearson_coef(q_wntr[:, :, 0], q_hat[:, :, 0])
    print("MRAE, Std and PCC - Flows (%): ", np.round(mrae_samples.mean().item() * 100, 6), np.round(mrae_samples.std().item() * 100, 6), np.round(np.mean(p_coefs) * 100, 6))
    print("MRAE, Std and PCC - Flows (%): ", np.round(mrae_samples.mean().item() * 100, 6), np.round(mrae_samples.std().item() * 100, 6), np.round(np.mean(p_coefs) * 100, 6), file=out_f)
    mrae_samples = mean_rel_abs_error(h_wntr[:,:,0], h_tilde[:,:,0])
    p_coefs = pearson_coef(h_wntr[:, :, 0], h_tilde[:, :, 0])
    print("MRAE, Std and PCC - Heads (%): ", np.round(mrae_samples.mean().item() * 100, 6), np.round(mrae_samples.std().item() * 100, 6), np.round(np.mean(p_coefs) * 100, 6))
    print("MRAE, Std and PCC - Heads (%): ", np.round(mrae_samples.mean().item() * 100, 6), np.round(mrae_samples.std().item(), 6), np.round(np.mean(p_coefs) * 100, 6), file=out_f)

if __name__ == '__main__':
    parser = create_cli_parser()

    args = parser.parse_args()

    print(args)
    run(args)


/*
 * Copyright 2009-2017 Alibaba Cloud 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.
 */

#ifndef ALIBABACLOUD_SAS_MODEL_DESCRIBESTRATEGYTARGETRESULT_H_
#define ALIBABACLOUD_SAS_MODEL_DESCRIBESTRATEGYTARGETRESULT_H_

#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/sas/SasExport.h>

namespace AlibabaCloud
{
	namespace Sas
	{
		namespace Model
		{
			class ALIBABACLOUD_SAS_EXPORT DescribeStrategyTargetResult : public ServiceResult
			{
			public:
				struct StrategyTarget
				{
					std::string target;
					int bindUuidCount;
					std::string targetType;
					std::string flag;
				};

				DescribeStrategyTargetResult();
				explicit DescribeStrategyTargetResult(const std::string &payload);
				~DescribeStrategyTargetResult();
				std::vector<StrategyTarget> getStrategyTargets()const;

			protected:
				void parse(const std::string &payload);
			private:
				std::vector<StrategyTarget> strategyTargets_;

			};
		}
	}
}
#endif // !ALIBABACLOUD_SAS_MODEL_DESCRIBESTRATEGYTARGETRESULT_H_


the
/// corresponding element).
///
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_maskload_epi32)
#[inline]
#[target_feature(enable = "avx2")]
#[cfg_attr(test, assert_instr(vpmaskmovd))]
#[stable(feature = "simd_x86", since = "1.27.0")]
pub unsafe fn _mm256_maskload_epi32(mem_addr: *const i32, mask: __m256i) -> __m256i {
    transmute(maskloadd256(mem_addr as *const i8, mask.as_i32x8()))
}

/// Loads packed 64-bit integers from memory pointed by `mem_addr` using `mask`
/// (elements are zeroed out when the highest bit is not set in the
/// corresponding element).
///
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_maskload_epi64)
#[inline]
#[target_feature(enable = "avx2")]
#[cfg_attr(test, assert_instr(vpmaskmovq))]
#[stable(feature = "simd_x86", since = "1.27.0")]
pub unsafe fn _mm_maskload_epi64(mem_addr: *const i64, mask: __m128i) -> __m128i {
    transmute(maskloadq(mem_addr as *const i8, mask.as_i64x2()))
}

/// Loads packed 64-bit integers from memory pointed by `mem_addr` using `mask`
/// (elements are zeroed out when the highest bit is not set in the
/// corresponding element).
///
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_maskload_epi64)
#[inline]
#[target_feature(enable = "avx2")]
#[cfg_attr(test, assert_instr(vpmaskmovq))]
#[stable(feature = "simd_x86", since = "1.27.0")]
pub unsafe fn _mm256_maskload_epi64(mem_addr: *const i64, mask: __m256i) -> __m256i {
    transmute(maskloadq256(mem_addr as *const i8, mask.as_i64x4()))
}

/// Stores packed 32-bit integers from `a` into memory pointed by `mem_addr`
/// using `mask` (elements are not stored when the highest bit is not set
/// in the corresponding element).
///
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_maskstore_epi32)
#[inline]
#[target_feature(enable = "avx2")]
#[cfg_attr(test, assert_instr(vpmaskmovd))]
#[stable(feature = "simd_x86", since = "1.27.0")]
pub unsafe fn _mm_maskstore_epi32(mem_addr: *mut i32, mask: __m128i, a: __m128i) {
    maskstored(mem_addr as *mut i8, mask.as_i32x4(), a.as_i32x4())
}

/// Stores packed 32-bit integers from `a` into memory pointed by `mem_addr`
/// using `mask` (elements are not stored when the highest bit is not set
/// in the corresponding element).
///
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_maskstore_epi32)
#[inline]
#[target_feature(enable = "avx2")]
#[cfg_attr(test, assert_instr(vpmaskmovd))]
#[stable(feature = "simd_x86", since = "1.27.0")]
pub unsafe fn _mm256_maskstore


就多放一两天
难度到底在哪里
打工人不能多放假，但可以多看点打工人的喜剧
近期的喜人奇妙夜，喜剧之王单口祭和脱口秀和他的朋友们三档综艺
职场题材出了不少爆款
职场竞争越是激烈，就业景气度越是低迷
打工人发疯文学的需求就越强烈
今年元旦党电影年会不能停就先吃上了这一波红利
各类职场段子在如今的就业环境下只能算是纪录片
比如吐槽老板，说老板给实习生提的要求就像在跟神仙许愿一样
00后实习生的精神状态是敢以毒乱回，怼回老板
我妈跟我说过，上班就是爱吃苦的孩子，有苦吃
老板要说你不行，你说别人也这样
她要说别人不这样，你就说，我在别的地方也不这样
POA是手段，少给钱才是目的
你问我怎么疯了，对好好的一个人上了班他就疯了
吐槽资本大家都喜欢，这些年网上有一股风向
遇到事情就怪资本，但另一方面
资本办的综艺比赛里资本还是可以被吐槽的
而关于穷大家也误到了
不是只指银行卡里可怜的余额，还指可分配资源

## 2. 离线权

下班了可以为“打工人喜剧”上头，可以不接老板的电话和邮件吗？
8月26日澳大利亚打工人得到明确的答案
新法律赋予他们“离线权”，15人及以上的公司
员工下班后忽略不合理的工作电话和电子邮件是合法的
雇主在工作时间之外，出于非必要原因联系员工
面临最高9.3万澳元，约合44.93万人民币的罚款
“离线权”通常指劳动者在工作时间之外
可断开数字工具而免于从事与工作相关的活动或通信的权利
澳大利亚政府希望通过立法保护劳工在工作时间外免受不合理的联系
工党出身的总理阿尔巴尼斯预计将提高生产力
他说就像人们并非一天24小时领工资一样，人们也不必每天24小时工作
一项调查研究显示，澳大利亚人2023年在下班时段平均被雇主“偷走”280亿个小时
相应劳动价值估计1300亿澳元约合6280亿人民币
支持者表示，新法让劳动者有底气对抗工作邮件、短信和电话“稳步侵入”个人生活
居家办公等在疫情期间成为主流的工作模式
让个人住所和工作场所的界线进一步混淆，因此有必要通过法律来纠正
但工商业团体表达了疑虑，澳大利亚工商会就表示
政府并未征求企业的意见，同时认为新法在执行时存在模糊地带
比如如何界定什么是“合理”的工作请求
此前已有法国、西班牙、比利时、葡萄牙、泰国等20多个国家推行离线权
不少国际大企业也开始正视这项权利
比如大众汽车规定下班后关闭公司的电邮服务器
戴姆勒则


ival && dep_airport_expr.exactMatch(stationIDFromSearchResult)){
        qDebug() << "Changing departure airport stop to arrival";
        qDebug() << "Before:" << stationIDFromSearchResult;
        stationIDFromSearchResult.replace(dep_airport_expr, "\\1ARRIVAL_\\2");
        qDebug() << "After:" << stationIDFromSearchResult;
    }

    return stationIDFromSearchResult;
}

QString ParserFinlandMatka::prettyPlaceType(const QString& type)
{
    if (type == "localadmin" || type == "locality" || type == "county" || type == "neighbourhood")
        return tr("Place");
    else if (type == "station")
        return tr("Station");
    else if (type == "stop")
        return tr("Stop");
    else if (type == "region")
        return tr("Region");
    else
        return "";
}

QString ParserFinlandMatka::languageCode() const
{
    if (QLocale().language() == QLocale::Swedish)
        return "sv";
    else
        return "fi";
}
/****************************************************************************
**
**  This file is a part of Fahrplan.
**
**  This program is free software; you can redistribute it and/or modify
**  it under the terms of the GNU General Public License as published by
**  the Free Software Foundation; either version 2 of the License, or
**  (at your option) any later version.
**
**  This program 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 for more details.
**
**  You should have received a copy of the GNU General Public License along
**  with this program.  If not, see <http://www.gnu.org/licenses/>.
**
****************************************************************************/

/*  This parser was written by Evan Sebire
 *  San Francisco area, uses EFAv9
 *  Seems to have a ridiculous number of transit option, these were copied from website
 */

#include "parser_sf_bay_efa.h"

#include <QBuffer>
#include <QDomDocument>
#include <QFile>
#include <QNetworkReply>

ParserSFBayEFA::ParserSFBayEFA(QObject *parent) :
    ParserEFA(parent)
{
    baseRestUrl = "http://tripplanner.transit.511.org/mtc/";
}

QStringList ParserSFBayEFA::getTrainRestrictions()
{
    QStringList result;
    result.append(tr("All"));
    result.append(tr("AC Transit (Local Service)"));
    result.append(tr("AC Transit (Transbay Service)"));
    result.append(tr("ACE"));
    result.append(tr("AirBART"));
    result.append(tr("American Canyon Transit"));
    result.append(tr("Amtrak Capitol Cor. & Reg. Svc"));
    result.append(tr("Angel Island - Tiburon Ferry"));
    result.append(tr("BART"));
    result.append(tr("Blue & Gold Fleet"));
    result.append(tr("Caltrain"));
    result.append(tr("County Connection"));
    result.append(tr("Dumbarton Express"));
    result.append(tr("Emery Go-Round"));
    result.append(tr("Fairfield and Suisun Transit (FAST)"));
    result.append(tr("Golden Gate Ferry"));
    result.append(tr("Golden Gate Transit"));
    result.append(tr("Hornblower Alcatraz Ferry"));
    result.append(tr("Marin Transit"));
    result.append(tr("Petaluma Transit"));
    result.append(tr("Rio Vista Delta Breeze"));
    result.append(tr("SamTrans"));
    result.append(tr("San Francisco Muni"));
    result.append(tr("Santa Clara VTA"));
    result.append(tr("Santa Rosa CityBus"));
    result.append


 _poisson_div_RT[k-1]->texture());
				_interp_scale.set(float(_poisson_div_RT[k-1]->w()) / _poisson_div_RT[k]->w());
				RenderUtility::renderScreenQuad();
				_poisson_RT->unbind();
				_interpShader.end();
			} else {
				std::swap(_poisson_tmp_RT, _poisson_RT);
				_interpShader.begin();
				_poisson_RT->clear();
				_poisson_RT->bind();
				glViewport(0,0, _poisson_RT->w(), _poisson_RT->h());
				glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, _poisson_tmp_RT->texture());
				glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, texture);
				_interp_scale.set(1.0f);
				RenderUtility::renderScreenQuad();
				_poisson_RT->unbind();
				_interpShader.end();
			}
		}
		glPopDebugGroup();
		return _poisson_RT->texture();
	}

	void	PoissonRenderer::process( const RenderTargetRGBA::Ptr& src, RenderTargetRGBA::Ptr& dst )
	{
		SIBR_ASSERT(src != nullptr);
		/// \todo TODO SR: support IRenderTarget instead of just RGBA
		render(src->texture());
		std::swap(dst, _poisson_RT);
	}

	void	PoissonRenderer::process( uint texID, RenderTargetRGBA::Ptr& dst )
	{
		render(texID);
		std::swap(dst, _poisson_RT);
	}

} /*namespace sibr*/
/*
 * Copyright (C) 2020, Inria
 * GRAPHDECO research group, https://team.inria.fr/graphdeco
 * All rights reserved.
 *
 * This software is free for non-commercial, research and evaluation use
 * under the terms of the LICENSE.md file.
 *
 * For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
 */

#pragma once

# include <core/system/Config.hpp>
# include <core/graphics/Texture.hpp>
# include <core/graphics/Image.hpp>
# include <core/graphics/Shader.hpp>
# include <core/view/ViewBase.hpp>

namespace sibr {

	/** Basic view to display an image and inspect it.
	 *Two modes are supported:
	 * * interactive, where the user can pan/zoom, rescale the values, display some channels, via the mouse and GUI.
	 * * fixed, where the image is displayed as is, without any modification possible.
	 */
	class SIBR_VIEW_EXPORT ImageView : public sibr::ViewBase
	{
		SIBR_CLASS_PTR(ImageView);
	public:

		/** Constructor.
		 * \param interactiveMode should the GUI panel be displayed and the user be able to pan/zoom into the image
		 */
		ImageView(bool interactiveMode = true);

		/** Render the image in the currently bound rendertarget.
		 *\param vpRender the region to render into
		 */
		void onRender(const Viewport & vpRender) override;

		/** Update user interactions.
		 *\param input the user input for the view
		 *\param vp the view viewport
		 */
		void onUpdate(Input& input, const Viewport & vp) override;

		/*** Render GUI panels. */
		void onGUI() override;

		/** Set an attachment of a rendertarget as the texture to display.
		 *\param rt the rendertarget to display
		 *\param handle the index of the attachment to display
		 *\warning Will only be valid until the RT is deleted.
		 */
		void setRenderTarget(const IRenderTarget & rt, uint handle = 0);

		/** Set the texture to display.
		 *\param tex the texture to display
		 *\warning Will only be valid until the texture is deleted.
		 */
		void setTexture(const ITexture2D& tex);

		/** Set an image as the texture to display. An internal copy of the image will be sent t


ne LV_USE_DEMO_STRESS CONFIG_LV_USE_DEMO_STRESS
    #else
        #define LV_USE_DEMO_STRESS 0
    #endif
#endif

/*Music player demo*/
#ifndef LV_USE_DEMO_MUSIC
    #ifdef CONFIG_LV_USE_DEMO_MUSIC
        #define LV_USE_DEMO_MUSIC CONFIG_LV_USE_DEMO_MUSIC
    #else
        #define LV_USE_DEMO_MUSIC 0
    #endif
#endif
#if LV_USE_DEMO_MUSIC
    #ifndef LV_DEMO_MUSIC_SQUARE
        #ifdef CONFIG_LV_DEMO_MUSIC_SQUARE
            #define LV_DEMO_MUSIC_SQUARE CONFIG_LV_DEMO_MUSIC_SQUARE
        #else
            #define LV_DEMO_MUSIC_SQUARE    0
        #endif
    #endif
    #ifndef LV_DEMO_MUSIC_LANDSCAPE
        #ifdef CONFIG_LV_DEMO_MUSIC_LANDSCAPE
            #define LV_DEMO_MUSIC_LANDSCAPE CONFIG_LV_DEMO_MUSIC_LANDSCAPE
        #else
            #define LV_DEMO_MUSIC_LANDSCAPE 0
        #endif
    #endif
    #ifndef LV_DEMO_MUSIC_ROUND
        #ifdef CONFIG_LV_DEMO_MUSIC_ROUND
            #define LV_DEMO_MUSIC_ROUND CONFIG_LV_DEMO_MUSIC_ROUND
        #else
            #define LV_DEMO_MUSIC_ROUND     0
        #endif
    #endif
    #ifndef LV_DEMO_MUSIC_LARGE
        #ifdef CONFIG_LV_DEMO_MUSIC_LARGE
            #define LV_DEMO_MUSIC_LARGE CONFIG_LV_DEMO_MUSIC_LARGE
        #else
            #define LV_DEMO_MUSIC_LARGE     0
        #endif
    #endif
    #ifndef LV_DEMO_MUSIC_AUTO_PLAY
        #ifdef CONFIG_LV_DEMO_MUSIC_AUTO_PLAY
            #define LV_DEMO_MUSIC_AUTO_PLAY CONFIG_LV_DEMO_MUSIC_AUTO_PLAY
        #else
            #define LV_DEMO_MUSIC_AUTO_PLAY 0
        #endif
    #endif
#endif

/*----------------------------------
 * End of parsing lv_conf_template.h
 -----------------------------------*/

LV_EXPORT_CONST_INT(LV_DPI_DEF);

#undef _LV_KCONFIG_PRESENT

/*Set some defines if a dependency is disabled*/
#if LV_USE_LOG == 0
    #define LV_LOG_LEVEL            LV_LOG_LEVEL_NONE
    #define LV_LOG_TRACE_MEM        0
    #define LV_LOG_TRACE_TIMER      0
    #define LV_LOG_TRACE_INDEV      0
    #define LV_LOG_TRACE_DISP_REFR  0
    #define LV_LOG_TRACE_EVENT      0
    #define LV_LOG_TRACE_OBJ_CREATE 0
    #define LV_LOG_TRACE_LAYOUT     0
    #define LV_LOG_TRACE_ANIM       0
#endif  /*LV_USE_LOG*/

/*If running without lv_conf.h add typedefs with default value*/
#ifdef LV_CONF_SKIP
    #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)    /*Disable warnings for Visual Studio*/
        #define _CRT_SECURE_NO_WARNINGS
    #endif
#endif  /*defined(LV_CONF_SKIP)*/

#endif  /*LV_CONF_INTERNAL_H*/


ore;

        public NamedPipeShare(List<string> shareList)
        {
            List<RemoteService> services = new List<RemoteService>();
            services.Add(new ServerService(Environment.MachineName, shareList));
            services.Add(new WorkstationService(Environment.MachineName, Environment.MachineName));
            m_store = new NamedPipeStore(services);
        }

        public string Name
        {
            get
            {
                return NamedPipeShareName;
            }
        }

        public INTFileStore FileStore
        {
            get
            {
                return m_store;
            }
        }
    }
}


#include <stdio.h>
#include <omp.h>

extern void __kmpc_rfun_sum_lds_i(int *val, int *otherval);
extern void __kmpc_rfun_sum_i (int *val, int otherval);
extern void __kmpc_xteamr_i_4x64(int v, int *r_p, int *tvs, unsigned int *td,
                     void (*rf)(int *, int),
                     void (*rflds)(int *, int *), const int rnv,
                     const unsigned long int k, const unsigned int nt) ;
extern void __kmpc_xteamr_i_4x64_fast_sum(int v, int *r_p, int *tvs,
		     unsigned int *td, void (*rf)(int *, int),
                     void (*rflds)(int *, int *), const int rnv,
                     const unsigned long int k, const unsigned int nt) ;
int main() {
  int devid = 0;
  // int nteams = 60;
  int nteams = 1;
  int nthreads = 256;
  int result_i = 0;
  int tvals[60];
  //int sz = 19200;
  int sz = 5;
  int validate_i = ((sz + 1) * sz) / 2; // Sum of integers from 1 to sz
  unsigned int teams_done = 0;
  // printf(" tvals0 tvals1 tvals59= %d %d %d\n",tvals[0], tvals[1], tvals[59]);

#pragma omp target teams distribute parallel for num_teams(nteams)   \
  num_threads(nthreads) map(tofrom :result_i) map(from: tvals) device(devid)
  for (unsigned long int k = 0; k < (nteams * nthreads); k++) {
    int val0_i = 0;
    for (unsigned long int i = k; i < sz; i += (nteams*nthreads)) {
      if (k<sz)
        val0_i += i + 1;
    }
    __kmpc_xteamr_i_4x64_fast_sum(val0_i, &result_i, tvals, &teams_done,
      __kmpc_rfun_sum_i, __kmpc_rfun_sum_lds_i, 0 , k, nteams);
  }

  // when used without fast_sum, intermediate sums are ok but result is not
  // This could be problem with no initialization of lds.
  int check_sum=0;
  for (unsigned int i =0; i<nteams; i++)
    check_sum += tvals[i];
  // printf(" check_sum %d tvals0 tvals1 tvals59= %d %d %d%d\n",
  //   check_sum, tvals[0], tvals[1], tvals[59]);

  printf(" Result is %d\n",result_i);
  printf(" Validate is %d\n",validate_i);
  if ( validate_i == result_i)
    return 2;
  else
    return 0;
}


js)
//!    as the JS backend.
//! * `duktape`: Use [duktape](https://crates.io/crates/ducc) as the JS backend.
//!    You need to disable the default features to enable this backend.
//! * `wasm-js`: Use [wasm-bindgen](https://crates.io/crates/wasm-bindgen) and
//!    [js-sys](https://crates.io/crates/js-sys) as the JS backend.
//!    You need to disable the default features to enable this backend.
//!
//! # Examples
//!
//! ```
//! let html = katex::render("E = mc^2").unwrap();
//!
//! let opts = katex::Opts::builder().display_mode(true).build().unwrap();
//! let html_in_display_mode = katex::render_with_opts("E = mc^2", &opts).unwrap();
//! ```

#![forbid(unsafe_code)]
#![deny(missing_docs)]

use core::cell::RefCell;

pub mod error;
pub use error::{Error, Result};

pub mod opts;
pub use opts::{Opts, OptsBuilder, OutputType};

mod js_engine;
use js_engine::{Engine, JsEngine, JsScope, JsValue, Scope};

/// JS source code.
const JS_SRC: &str = concat!(
    // HACK to load KaTeX code in Node.js
    // By setting `module` and `exports` as undefined, we prevent KaTeX to
    // be loaded like normal Node.js module.
    include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/js/node-hack.js")),
    // KaTeX JS source code
    include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/vendor/katex.min.js")),
    // mhchem JS source code
    include_str!(concat!(
        env!("CARGO_MANIFEST_DIR"),
        "/vendor/contrib/mhchem.min.js"
    )),
    // restore HACK done in node-hack.js
    include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/js/post-node-hack.js")),
    // entry function
    include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/js/entry.js")),
);

thread_local! {
    /// Per thread JS Engine used to render KaTeX.
    static KATEX: Result<RefCell<Engine>> = init_katex();
}

/// Initialize KaTeX js environment.
fn init_katex() -> Result<RefCell<Engine>> {
    let mut engine = Engine::new()?;
    let scope = Scope::global_scope(&mut engine);
    scope.eval(JS_SRC)?;
    Ok(RefCell::new(engine))
}

/// Render LaTeX equation to HTML using specified [engine](`JsEngine`) and [options](`Opts`).
#[inline]
fn render_inner(engine: &mut Engine, input: &str, opts: impl AsRef<Opts>) -> Result<String> {
    use core::iter;

    let scope = Scope::global_scope(engine);
    let input = scope.create_string_value(input.to_owned())?;
    let opts = opts.as_ref().to_js_value(&scope)?;
    let args = iter::once(input).chain(iter::once(opts));
    let result = scope.call_function("katexRenderToString", args)?;
    result.into_string()
}

/// Render LaTeX equation to HTML with additional [options](`


t            self.fast_deletes.append(objs)\n   190\t            return\n   191\t        new_objs = self.add(objs, source, nullable,\n   192\t                            reverse_dependency=reverse_dependency)\n   193\t        if not new_objs:\n   194\t            return\n   195\t\n   196\t        model = new_objs[0].__class__\n   197\t\n   198\t        if not keep_parents:\n   199\t            # Recursively collect concrete model\'s parent models, but not their\n   200\t            # related objects. These will be found by meta.get_fields()\n   201\t            concrete_model = model._meta.concrete_model\n   202\t            for ptr in concrete_model._meta.parents.values():\n   203\t                if ptr:\n   204\t                    parent_objs = [getattr(obj, ptr.name) for obj in new_objs]\n   205\t                    self.collect(parent_objs, source=model,\n   206\t                                 source_attr=ptr.remote_field.related_name,\n   207\t                                 collect_related=False,\n   208\t                                 reverse_dependency=True)\n   209\t        if collect_related:\n   210\t            parents = model._meta.parents\n   211\t            for related in get_candidate_relations_to_delete(model._meta):\n   212\t                # Preserve parent reverse relationships if keep_parents=True.\n   213\t                if keep_parents and related.model in parents:\n   214\t                    continue\n   215\t                field = related.field\n   216\t                if field.remote_field.on_delete == DO_NOTHING:\n   217\t                    continue\n   218\t                batches = self.get_del_batches(new_objs, field)\n   219\t                for batch in batches:\n   220\t                    sub_objs = self.related_objects(related, batch)\n   221\t                    if self.can_fast_delete(sub_objs, from_field=field):\n   222\t                        self.fast_deletes.append(sub_objs)\n   223\t                    elif sub_objs:\n   224\t                        field.remote_field.on_delete(self, field, sub_objs, self.using)\n   225\t            for field in model._meta.private_fields:\n   226\t                if hasattr(field, \'bulk_related_objects\'):\n   227\t                    # It\'s something like generic foreign key.\n   228\t                    sub_objs = field.bulk_related_objects(new_objs, self.using)\n   229\t                    self.collect(sub_objs, source=model, nullable=True)\n   230\t\n   231\t    def related_objects(self, related, objs):\n   232\t        """\n   233\t        Get a QuerySet of objects related to `objs` via the relation `related`.\n   234\t        """\n   235\t        return related.related_model._base_manager.using(self.using).filter(\n   236\t        \n   237\t<response clipped>\n'}]}, {'role': 'assistant', 'content': [{'type': 'text', 'text': 'Let me also check the query.py file:'}, {'type': 'text', 'text': "<tool_use>\n{'tool_name': editor, 'tool_input': {'command': 'view', 'path': '/testbed/django/db/models/query.py'}}\n</tool_use>"}]}, {'role': 'user', 'content': [{'type': 'text', 'text': 'Tool Result: Here\'s the result of running `cat -n` on /testbed/django/db/models/query.py:


can_mask = PSSCAN_COMM | PSSCAN_ARGV0;
	if (OPT_FULL)
		scan_mask |= PSSCAN_ARGVN;

	/* One pattern is required, if no -s and no -P */
	if ((sid2match & ppid2match) < 0 && (!argv[0] || argv[1]))
		bb_show_usage();

	if (argv[0])
		xregcomp(&re_buffer, argv[0], OPT_ANCHOR ? REG_EXTENDED : (REG_EXTENDED|REG_NOSUB));

	matched_pid = 0;
	cmd_last = NULL;
	proc = NULL;
	while ((proc = procps_scan(proc, scan_mask)) != NULL) {
		char *cmd;
		int cmdlen, match;

		if (proc->pid == pid)
			continue;

		if (!OPT_INVERT) {
			/* Quickly reject -sN -PN mismatches... unless -v */
			if (ppid2match >= 0 && ppid2match != proc->ppid)
				continue;
			if (sid2match >= 0 && sid2match != proc->sid)
				continue;
		}

		cmdlen = -1;
		cmd = proc->argv0;
		if (!cmd) {
			cmd = proc->comm;
		} else {
			int i = proc->argv_len;

			if (!OPT_LISTFULL)
				cmdlen = strlen(cmd); /* not -a: find first NUL */
			/*
			 * "sleep 11" looks like "sleep""\0""11""\0" in argv0.
			 * Make sure last "\0" does not get converted to " ":
			 */
			if (i && cmd[i-1] == '\0')
				i--;
			while (--i >= 0) {
				if ((unsigned char)cmd[i] < ' ')
					cmd[i] = ' ';
			}
		}

		if (OPT_INVERT) {
			/* "pgrep -v -P1 firefox" means "not (ppid=1 AND name=firefox)"
			 * or equivalently "ppid!=1 OR name!=firefox".
			 * Check the first condition and if true, skip matching.
			 */
			if (ppid2match >= 0 && ppid2match != proc->ppid)
				goto got_it;
			if (sid2match >= 0 && sid2match != proc->sid)
				goto got_it;
		}

		match = !argv[0]; /* if no PATTERN, then it's a match, else... */
		if (!match) {
 again:
			match = (regexec(&re_buffer, cmd, 1, re_match, 0) == 0);
			if (!match && cmd != proc->comm) {
				/* if argv[] did not match, try comm */
				cmdlen = -1;
				cmd = proc->comm;
				goto again;
			}
			if (match && OPT_ANCHOR) {
				/* -x requires full string match */
				match = (re_match[0].rm_so == 0 && cmd[re_match[0].rm_eo] == '\0');
			}
		}

		/* NB: OPT_INVERT is always 0 or 1 */
		if (match ^ OPT_INVERT) {
 got_it:
			matched_pid = proc->pid;
			if (OPT_LAST) {
				free(cmd_last);
				cmd_last = xstrdup(cmd);
				continue;
			}
			if (cmdlen >= 0)
				cmd[cmdlen] = '\0';
			act(proc->pid, cmd, signo);
			if (OPT_FIRST)
				break;
		}
	}

	if (cmd_last) {
		act(matched_pid, cmd_last, signo);
		if (ENABLE_FEATURE_CLEAN_UP)
			free(cmd_last);
	}
	return matched_pid == 0; /* return 1 if no processes listed/signaled */
}


//=============================================================================
/**
 *  @file    Thread_Lane_Resources_Manager.h
 *
 *  Thread_Lane_Resources_Manager.h,v 1.4 2001/09/18 00:05:45 irfan Exp
 *
 *  @author  Irfan Pyarali
 */
// ===================================================================

#ifndef TAO_THREAD_LANE_RESOURCES_MANAGER_H
#define TAO_THREAD_LANE_RESOURCES_MANAGER_H

#include "ace/pre.h"
#include "tao/orbconf.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "tao/corbafwd.h"
#include "ace/Service_Object.h"

class TAO_ORB_Core;
class TAO_Thread_Lane_Resources;
class TAO_LF_Strategy;
class TAO_MProfile;

/**
 * @class TAO_Thread_Lane_Resources_Manager
 *
 * @brief This class is a manager for thread resources.
 *
 * \nosubgrouping
 *
 **/
class TAO_Export TAO_Thread_Lane_Resources_Manager
{
public:

  /// Constructor.
  TAO_Thread_Lane_Resources_Manager (TAO_ORB_Core &orb_core);

  /// Destructor.
  virtual ~TAO_Thread_Lane_Resources_Manager (void);

  /// Finalize resources.
  virtual void finalize (void) = 0;

  /// Open default resources.
  virtual int open_default_resources (CORBA_Environment &ACE_TRY_ENV) = 0;

  /// Shutdown reactor.
  virtual void shutdown_reactor (void) = 0;

  // Does <mprofile> belong to us?
  virtual int is_collocated (const TAO_MProfile& mprofile) = 0;

  /// @name Accessors
  // @{

  virtual TAO_Thread_Lane_Resources &lane_resources (void) = 0;

  virtual TAO_Thread_Lane_Resources &default_lane_resources (void) = 0;

  TAO_LF_Strategy &lf_strategy (void);

  // @}

protected:
  /// The ORB Core.
  TAO_ORB_Core *orb_core_;

  /// The leader follower strategy
  TAO_LF_Strategy *lf_strategy_;
};

/**
 * @class TAO_Thread_Lane_Resources_Manager_Factory
 *
 * @brief This class is a factory for managers of thread resources.
 *
 * \nosubgrouping
 *
 **/
class TAO_Export TAO_Thread_Lane_Resources_Manager_Factory
  : public ACE_Service_Object
{
public:

  /// Virtual destructor.
  virtual ~TAO_Thread_Lane_Resources_Manager_Factory (void);

  /// Factory method.
  virtual TAO_Thread_Lane_Resources_Manager *create_thread_lane_resources_manager (TAO_ORB_Core &core) = 0;

};

#if defined (__ACE_INLINE__)
# include "tao/Thread_Lane_Resources_Manager.i"
#endif /* __ACE_INLINE__ */

#include "ace/post.h"

#endif /* TAO_THREAD_LANE_RESOURCES_MANAGER_H */


Tag;
        continue;
      }
      // We are inside an ExL block because level > 0.
      // Adobe ExL marks up paragraphs as

 instead of using

 tags
      if (tokens[i].type === TokenType.PARAGRAPH_OPEN) {
        tokens[i].tag = 'div';
        tokens[i].attrSet('class', 'p');
        continue;
      } else if (tokens[i].type === TokenType.PARAGRAPH_CLOSE) {
        tokens[i].tag = 'div';
        continue;
      }
      // The next token after the paragraph open will be the label of the note type that could
      // be one of [!NOTE], [!CAUTION], [!IMPORTANT], [!TIP], [!WARNING].  If it's not, then this is an
      // ordinary block, so stop processing.
      if (tokens[i].type === TokenType.INLINE) {
        let labelMatches = tokens[i].content.match(
          /^\[\!(NOTE|CAUTION|IMPORTANT|TIP|WARNING|ADMIN|AVAILABILITY|PREREQUISITES|MORELIKETHIS)\](\n\s*)*(.*)/,
        );
        if (labelMatches) {
          tokens[i].content = labelMatches[3]; // Clear the [!NOTE] label text, retaining the message.
          let labelText = labelMatches[1] === 'MORELIKETHIS' ? 'Related Articles' : labelMatches[1] || 'alert';
          tokens[startBlock].tag = 'div';
          tokens[startBlock].attrSet('class', `extension ${labelMatches[1].toLowerCase()}`);
          tokens[startBlock].attrSet('data-label', labelText);
        } else {
          let videoMatches = tokens[i].content.match(/^\[\!VIDEO\]\s*\((.*)\)/);

          if (videoMatches) {
            let url = videoMatches[1];
            tokens[startBlock].tag = 'div';
            tokens[startBlock].attrSet('class', 'extension video');
            tokens[i - 1].tag = 'video';
            tokens[i - 1].attrSet('allowfullscreen', true);
            tokens[i - 1].attrSet('controls', true);
            tokens[i - 1].attrSet('height', 250);
            tokens[i - 1].attrSet('poster', '/assets/img/video_slug.png');
            tokens[i - 1].attrSet('crossorigin', 'anonymous');
            tokens[i - 1].attrSet('src', url);
            tokens[i].content = '';
            tokens[i + 1].tag = 'video';
            // Increment the counter to skip the closing tag we just made.
            i += 1;
          }
        }
      }
    }
  }
  // Install the rule processors
  md.core.ruler.after('block', 'alert', transformAlerts);
  md.core.ruler.after('block', 'heading-anchors', transformHeaderAnchors);
};
/* 系统：[保存&读取 系统] */
class SaveSystem{

    /* [保存] */
    public Save():void
    {
        //获取这个网页的localStorage对象
        let _localStorage = window.localStorage;

        //修改数据
        _localStorage.setItem("volume",TimerApp.Datas.volume+"");
    }

    /* [读取] */
    public Load():void
    {
        //获取这个网页的localStorage对象
        let _localStorage = window.localStorage;

        //获取数据
        let _volume:string = _localStorage.getItem("volume");

        //把字符串转换为数字
        if(_volume!=null){
            TimerApp.Datas.volume = window. parseInt(_volume);
        }

        //修改音量
        TimerApp.Uis.SettingUi.UpdateVolume(TimerApp.Datas.volume);
        TimerApp.Systems.AudioSystem.UpdateVolume(TimerApp.Datas.volume);
    }

}import { ActionsUnion, createAction } from '../../helpers/actionCreator';


d.detail">Method

Package hydra.ext.python.syntax

Class SequencePattern.List

java.lang.Object

hydra.ext.python.syntax.SequencePattern

hydra.ext.python.syntax.SequencePattern.List

All Implemented Interfaces:

java.io.Serializable

Enclosing class:

SequencePattern

public static final class SequencePattern.List
extends SequencePattern
implements java.io.Serializable

See Also:

Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class hydra.ext.python.syntax.SequencePattern

SequencePattern.List, SequencePattern.PartialVisitor<R>, SequencePattern.Tuple, SequencePattern.Visitor<R>


    end
        end

        if (belt == 28420) then -- Fotia Belt
            accBonus = accBonus + 10
            ftpBonus = ftpBonus + 0.1
        end
    end
    return ftpBonus, accBonus
end

function shadowAbsorb(target)
    local targShadows = target:getMod(dsp.mod.UTSUSEMI)
    local shadowType = dsp.mod.UTSUSEMI

    if targShadows == 0 then
        if math.random() < 0.8 then
            targShadows = target:getMod(dsp.mod.BLINK)
            shadowType = dsp.mod.BLINK
        end
    end

    if targShadows > 0 then
        if shadowType == dsp.mod.UTSUSEMI then
            local effect = target:getStatusEffect(dsp.effect.COPY_IMAGE)
            if effect then
                if targShadows - 1 == 1 then
                    effect:setIcon(dsp.effect.COPY_IMAGE)
                elseif targShadows - 1 == 2 then
                    effect:setIcon(dsp.effect.COPY_IMAGE_2)
                elseif targShadows - 1 == 3 then
                    effect:setIcon(dsp.effect.COPY_IMAGE_3)
                end
            end
        end
        target:setMod(shadowType, targShadows - 1)
        if targShadows - 1 == 0 then
            target:delStatusEffect(dsp.effect.COPY_IMAGE)
            target:delStatusEffect(dsp.effect.COPY_BLINK)
        end
        return true
    end
    return false
end


�ം നിയന്ത്രിക്കുന്നവനും ആയുള്ളവന്ന് മുഖങ്ങള് കീഴൊതുങ്ങിയിരിക്കുന്നു. അക്രമത്തിന്‍റെ ഭാരം ചുമന്നവന് പരാജയമടയുകയും ചെയ്തിരിക്കുന്നു."
  },
  {
    "surah_number": 20,
    "verse_number": 112,
    "content":
        "ആരെങ്കിലും സത്യവിശ്വാസിയായിക്കൊണ്ട് സല്‍കര്‍മ്മങ്ങളില് വല്ലതും പ്രവര്‍ത്തിക്കുന്ന പക്ഷം അവന് അക്രമത്തെയോ അനീതിയെയോ ഭയപ്പെടേണ്ടി വരില്ല."
  },
  {
    "surah_number": 20,
    "verse_number": 113,
    "content":
        "അപ്രകാരം അറബിയില് പാരായണം ചെയ്യപ്പെടുന്ന ഒരു ഗ്രന്ഥമായി നാം ഇതിനെ അവതരിപ്പിച്ചിരിക്കുന്നു. ഇതില് നാം താക്കീത് വിവിധ തരത്തില് വിവരിച്ചിരിക്കുന്നു. അവര് സൂക്ഷ്മതയുള്ളവരാകുകയോ, അവര്‍ക്ക് ബോധമുളവാക്കുകയോ ചെയ്യുന്നതിനുവേണ്ടി."
  },
  {
    "surah_number": 20,
    "verse_number": 114,
    "content":
        "സാക്ഷാല് രാജാവായ അല്ലാഹു അത്യുന്നതനായിരിക്കുന്നു. ഖുര


 100,

   categories = {
      "elona.equip_ranged_bow",
      "elona.equip_ranged"
   },

   _ext = {
      [IItemEquipment] = {
         equip_slots = { "elona.ranged" },
         hit_bonus = 8,
         damage_bonus = 3,
      },
      [IItemRangedWeapon] = {
         skill = "elona.bow",
         dice_x = 3,
         dice_y = 5,
         effective_range = { 70, 100, 100, 80, 60, 20, 20, 20, 20, 20 },
         pierce_rate = 15,
      }
   }
}

data:add {
   _type = "base.item",
   _id = "wind_bow",
   elona_id = 673,
   image = "elona.item_long_bow",
   value = 35000,
   weight = 800,
   material = "elona.ether",
   level = 60,
   fltselect = Enum.FltSelect.SpUnique,
   coefficient = 100,

   is_precious = true,
   identify_difficulty = 500,
   quality = Enum.Quality.Unique,

   color = { 225, 225, 255 },

   categories = {
      "elona.equip_ranged_bow",
      "elona.unique_item",
      "elona.equip_ranged"
   },
   light = light.item,

   enchantments = {
      { _id = "elona.invoke_skill", power = 200, params = { enchantment_skill_id = "elona.speed" } },
      { _id = "elona.invoke_skill", power = 200, params = { enchantment_skill_id = "elona.lulwys_trick" } },
      { _id = "elona.modify_attribute", power = 250, params = { skill_id = "elona.stat_speed" } },
      { _id = "elona.modify_resistance", power = 300, params = { element_id = "elona.lightning" } },
   },

   _ext = {
      [IItemEquipment] = {
         equip_slots = { "elona.ranged" },
         hit_bonus = 4,
         damage_bonus = 11,
      },
      [IItemRangedWeapon] = {
         skill = "elona.bow",
         dice_x = 2,
         dice_y = 23,
         effective_range = { 50, 90, 100, 90, 80, 80, 70, 60, 50, 20 },
         pierce_rate = 20,
      }
   }
}

data:add {
   _type = "base.item",
   _id = "skull_bow",
   elona_id = 788,
   image = "elona.item_skull_bow",
   value = 2000,
   weight = 700,
   material = "elona.metal",
   level = 15,
   rarity = 50000,
   coefficient = 100,

   categories = {
      "elona.equip_ranged_bow",
      "elona.equip_ranged"
   },

   _ext = {
      [IItemEquipment] = {
         equip_slots = { "elona.ranged" },
         hit_bonus = -18,
         damage_bonus = 10,
      },
      [IItemRangedWeapon] = {
         skill = "elona.bow",
         dice_x = 1,
         dice_y = 17,
         effective_range = { 60, 90, 100, 100, 80, 60, 20, 20, 20, 20 },
         pierce_rate = 15,
      }
   }
}

--
-- Crossbow
--

data:add {
   _type = "base.item",
   _id = "crossbow",
   elona_id = 482,
   image = "elona.item_crossbow",
   value = 500,
   weight


senting the user a table to select from
        /// </summary>
        /// <remarks>
        /// If this is null or empty, it implies that there is only a single column.
        /// This may be better suited for a simple dropdown as opposed to a table or modal select.
        /// </remarks>
        public List<TypeHintResourceColumn>? Columns { get; set; }

        /// <summary>
        /// List of resources that the user could select from
        /// </summary>
        public List<TypeHintResourceSummary>? Resources { get; set; }
    }
}