 = RedisKeys.keyOfIndexName(config.getAppId());
        redis.opsForHash().delete(indexNameKey, config.getName());
        return Boolean.TRUE;
    }

    @Override
    public Boolean unIndexByAppId(Long appId) {
        String indexNameKey = RedisKeys.keyOfIndexName(appId);
        redis.delete(indexNameKey);
        return Boolean.TRUE;
    }

    @Override
    public Config findByName(Long appId, String name) {
        String indexNameKey = RedisKeys.keyOfIndexName(appId);
        Object idObj = redis.opsForHash().get(indexNameKey, name);
        return idObj == null ? null : findById(Long.valueOf(idObj.toString()));
    }

    @Override
    public List<Config> findByNames(Long appId, List<String> names) {
        String indexNameKey = RedisKeys.keyOfIndexName(appId);

        List<Object> namesObj = Lists.transform(names, new Function<String, Object>() {
            @Override
            public Object apply(String name) {
                return name;
            }
        });

        List<Object> idsObj = redis.opsForHash().multiGet(indexNameKey, namesObj);
        if (idsObj == null){
            return Collections.emptyList();
        }
        idsObj.removeAll(Collections.singleton(null));

        List<String> idsStr = Lists.newArrayListWithExpectedSize(idsObj.size());
        for (Object idObj : idsObj){
            idsStr.add(String.valueOf(idObj));
        }

        return findByIds(idsStr);
    }

    @Override
    public Boolean bindApp(Config config) {
        String appConfigsKey = RedisKeys.keyOfAppConfigs(config.getAppId());
        return redis.opsForList()
                .leftPush(appConfigsKey, config.getId().toString()) > 0L;
    }

    @Override
    public Boolean unBindApp(Config config) {
        String appConfigsKey = RedisKeys.keyOfAppConfigs(config.getAppId());
        redis.opsForList().remove(appConfigsKey, 1, String.valueOf(config.getId()));
        return Boolean.TRUE;
    }

    @Override
    public Long countByAppId(Long appId) {
        String appConfigsKey = RedisKeys.keyOfAppConfigs(appId);
        return redis.opsForList().size(appConfigsKey);
    }

    @Override
    public List<Config> listByAppId(Long appId, Integer offset, Integer limit) {
        return list(RedisKeys.keyOfAppConfigs(appId), offset, limit);
    }

    @Override
    public Boolean deleteBindOfApp(Long appId) {
        String appConfigsKey = RedisKeys.keyOfAppConfigs(appId);
        redis.delete(appConfigsKey);
        return Boolean.TRUE;
    }
}
package me.hao0.wepay.model.common;

import java.io.Serializable;

/**
 * 代金券
 * Author: haolin
 * Email: haolin.h0@gmail.com
 * Date: 1/12/15
 * @since 1.0.0
 */
public class Coupon implements Serializable {

    private static final long serialVersionUID = -2006707624918389486L;

    /**
     * 代金券或立减优惠批次ID
     */
    private String batchId;

    /**
     * 代金券或立减优惠ID
     */
    private String id;

    /**
     * 单个代金券或立减优惠支付金额
     */
    private Integer fee;

    private Coupon(){}

    public String getBatchId() {
        return batchId;
    }

    public void setBatchId(String batchId) {
        this.batchId = batchId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getFee() {
        return fee;
    }


_buffer_object "
				 "layout qualifier `%s' is used\n", (yyvsp[(1) - (1)].type_qualifier));
	   }
	}
    break;

  case 154:

/* Line 1806 of yacc.c  */
#line 1261 "src/src/glsl/glsl_parser.yy"
    {
	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
	   (yyval.type_qualifier).flags.q.row_major = 1;
	}
    break;

  case 155:

/* Line 1806 of yacc.c  */
#line 1266 "src/src/glsl/glsl_parser.yy"
    {
	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
	   (yyval.type_qualifier).flags.q.packed = 1;
	}
    break;

  case 156:

/* Line 1806 of yacc.c  */
#line 1274 "src/src/glsl/glsl_parser.yy"
    {
	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
	   (yyval.type_qualifier).flags.q.smooth = 1;
	}
    break;

  case 157:

/* Line 1806 of yacc.c  */
#line 1279 "src/src/glsl/glsl_parser.yy"
    {
	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
	   (yyval.type_qualifier).flags.q.flat = 1;
	}
    break;

  case 158:

/* Line 1806 of yacc.c  */
#line 1284 "src/src/glsl/glsl_parser.yy"
    {
	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
	   (yyval.type_qualifier).flags.q.noperspective = 1;
	}
    break;

  case 159:

/* Line 1806 of yacc.c  */
#line 1292 "src/src/glsl/glsl_parser.yy"
    {
	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
	   (yyval.type_qualifier).flags.q.constant = 1;
	}
    break;

  case 162:

/* Line 1806 of yacc.c  */
#line 1302 "src/src/glsl/glsl_parser.yy"
    {
	   (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier);
	   (yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i;
	}
    break;

  case 164:

/* Line 1806 of yacc.c  */
#line 1308 "src/src/glsl/glsl_parser.yy"
    {
	   (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier);
	   (yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i;
	}
    break;

  case 165:

/* Line 1806 of yacc.c  */
#line 1313 "src/src/glsl/glsl_parser.yy"
    {
	   (yyval.type_qualifier) = (yyvsp[(2) - (2)].type_qualifier);
	   (yyval.type_qualifier).flags.q.invariant = 1;
	}
    break;

  case 166:

/* Line 1806 of yacc.c  */
#line 1318 "src/src/glsl/glsl_parser.yy"
    {
	   (yyval.type_qualifier) = (yyvsp[(2) - (3)].type_qualifier);
	   (yyval.type_qualifier).flags.i |= (yyvsp[(3) - (3)].type_qualifier).flags.i;
	   (yyval.type_qualifier).flags.q.invariant = 1;
	}
    break;

  case 167:


ter .cesium-animation-rectButton .cesium-animation-buttonPath {
    fill: #111;
}

.cesium-lighter .cesium-animation-rectButton .cesium-animation-buttonMain {
    stroke: #759DC0;
}

.cesium-lighter .cesium-animation-buttonToggled .cesium-animation-buttonGlow {
    fill: #FFAA2A;
}

.cesium-lighter .cesium-animation-buttonToggled .cesium-animation-buttonMain {
    /* Widget will add: fill: url(#animation_buttonToggled); */
    stroke: #EA0;
}

.cesium-lighter .cesium-animation-rectButton:hover .cesium-animation-buttonMain {
    stroke: #759DC0;
}

.cesium-lighter .cesium-animation-buttonToggled:hover .cesium-animation-buttonGlow {
    fill: #fff;
}

.cesium-lighter .cesium-animation-buttonToggled:hover .cesium-animation-buttonMain {
    stroke: #EA0;
}

.cesium-lighter .cesium-animation-rectButton:active .cesium-animation-buttonMain {
    fill: #ABD6FF;
}

.cesium-lighter .cesium-animation-buttonDisabled .cesium-animation-buttonMain {
    stroke: #D3D3D3;
}

.cesium-lighter .cesium-animation-buttonDisabled .cesium-animation-buttonPath {
    fill: #818181;
}

.cesium-lighter .cesium-animation-shuttleRingBack {
    fill: #FAFAFA;
    fill-opacity: 1;
    stroke: #AEAEAE;
    stroke-width: 1.2;
}

.cesium-lighter .cesium-animation-shuttleRingSwoosh line {
    stroke: #8AC;
}

.cesium-lighter .cesium-animation-knobOuter {
    stroke: #A5A5A5;
}
.cesium-viewer-geocoderContainer .cesium-geocoder-input {
    border: solid 1px #444;
    background-color: rgba(40, 40, 40, 0.7);
    color: white;
    display: inline-block;
    vertical-align: middle;
    width: 0;
    height: 32px;
    margin: 0;
    padding: 0 32px 0 0;
    border-radius: 0;
    box-sizing: border-box;
    transition: width ease-in-out 0.25s, background-color 0.2s ease-in-out;
    -webkit-appearance: none;
}

.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input {
    border-color: #aef;
    box-shadow: 0 0 8px #fff;
}

.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus {
    border-color: #ea4;
    background-color: rgba(15, 15, 15, 0.9);
    box-shadow: none;
    outline: none;
}

.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input,
.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus,
.cesium-viewer-geocoderContainer .cesium-geocoder-input-wide {
    padding-left: 4px;
    width: 250px;
}

.cesium-viewer-geocoderContainer .search-results {
    position: absolute;
    background-color: #000;
    color: #eee;
    overflow-y


E%3C/svg%3E")!important}.custom-control-input-primary.custom-control-input-outline:checked[type=radio]~.custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23007bff'/%3E%3C/svg%3E")!important}.custom-control-input-primary:focus~.custom-control-label::before{box-shadow:inset 0 0 0 transparent,0 0 0 .2rem rgba(0,123,255,.25)}.custom-control-input-primary:focus:not(:checked)~.custom-control-label::before{border-color:#80bdff}.custom-control-input-primary:not(:disabled):active~.custom-control-label::before{background-color:#b3d7ff;border-color:#b3d7ff}.custom-control-input-secondary:checked~.custom-control-label::before{border-color:#6c757d;background-color:#6c757d}.custom-control-input-secondary.custom-control-input-outline:checked[type=checkbox]~.custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%236c757d' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E")!important}.custom-control-input-secondary.custom-control-input-outline:checked[type=radio]~.custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%236c757d'/%3E%3C/svg%3E")!important}.custom-control-input-secondary:focus~.custom-control-label::before{box-shadow:inset 0 0 0 transparent,0 0 0 .2rem rgba(108,117,125,.25)}.custom-control-input-secondary:focus:not(:checked)~.custom-control-label::before{border-color:#afb5ba}.custom-control-input-secondary:not(:disabled):active~.custom-control-label::before{background-color:#caced1;border-color:#caced1}.custom-control-input-success:checked~.custom-control-label::before{border-color:#28a745;background-color:#28a745}.custom-control-input-success.custom-control-input-outline:checked[type=checkbox]~.custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%2328a745' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E")!important}.custom-control-input-success.custom-control-input-outline:checked[type=radio]~.custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%2328a745'/%3E%3C/svg%3E")!important}.custom-control-input-success:focus~.custom-control-label::before{box-shadow:inset 0 0 0 transparent,0 0 0 .2rem rgba(40,167,69,.25)}.custom-control-input-success:focu


', (done) => {

      // 'Albert',
      // 'Derek',
      // 'Dingleberry',
      // 'James',
      // 'Joe',
      // 'Sally',
      // 'Samantha',
      // 'Samuel',
      // 'Suzy',
      // 'Zoolander'

      Parent.query()
        .where({name__icontains: ['a', 'e']})
        .end((err, parents) => {

          expect(err).to.not.exist;
          expect(parents).to.exist;
          expect(parents.length).to.equal(4);
          expect(parents.map(p => p.get('name'))).to.contain('Albert');
          expect(parents.map(p => p.get('name'))).to.contain('James');
          expect(parents.map(p => p.get('name'))).to.contain('Samuel');
          expect(parents.map(p => p.get('name'))).to.contain('Zoolander');
          done();

        });

    });

    it('Should be able to filter multiple join types', (done) => {

      Parent.query()
        .join('partner', {job: 'Plumber', full_time: true}, {job: 'Nurse', full_time: true})
        .join('pets', {name: 'Ruby'})
        .end((err, parents) => {

          expect(err).to.not.exist;
          expect(parents).to.exist;
          expect(parents.length).to.equal(10);
          for (let i = 0; i < 10; i++) {
            let parent = parents[i];
            expect(parent.joined('pets').length).to.equal(1);
            expect(parent.joined('pets')[0].get('name')).to.equal('Ruby');
            if (parent.joined('partner')) {
              expect(['Plumber', 'Nurse']).to.include(parent.joined('partner').get('job'));
              expect(parent.joined('partner').get('full_time')).to.equal(true);
            }
          }
          done();

        });

    });

    it('Should get correct pets on an OR join', (done) => {

      Parent.query()
        .join('pets', {name: 'Ruby'}, {name: 'Oliver'})
        .end((err, parents) => {

          expect(err).to.not.exist;
          expect(parents).to.exist;
          expect(parents.length).to.equal(10);
          for (let i = 0; i < parents.length; i++) {
            let parent = parents[i];
            expect(parent.joined('pets').length).to.equal(2);
          }
          done();

        });

    });

    it('Should LIMIT properly with an OR join', (done) => {

      Parent.query()
        .join('pets')
        .where({pets__name: 'Ruby'}, {pets__name: 'Oliver'})
        .orderBy('created_at', 'DESC')
        .limit(0, 5)
        .end((err, parents) => {

          expect(err).to.not.exist;
          expect(parents).to.exist;
          expect(parents.length).to.equal(5);
          done();

        });

    });

    it('Should LIMIT properly with an OR join and limit in OR', (done) => {

      Parent.query()
        .join('pets')
        .where({pets__name: 'Ruby', __offset: 0, __count: 5}, {pets__name: 'Oliver', __offset: 0, __count: 5})
        .orderBy('created_at', 'DESC')
        .end((err, parents) => {

          expect(err).to.not.exist;
          expect(parents).to.exist;
          expect(parents.length).to.equal(5);
          done();

        });

    });

    it('Should filter a joined model properly', done => {

      Child.query()
        .join('parent', {name: 'Albert'})
        .join('parent__pets')
        .join('parent__partner')
        .where({id__in: [1, 11, 22]})
        .end((err, children) => {

          let par


_id":"MDU6TGFiZWwxMTA0MzAzNTQ=","url":"https://api.github.com/repos/robotframework/robotframework/labels/priority:%20high","name":"priority: high","color":"006d2c","default":false,"description":""},{"id":911065884,"node_id":"MDU6TGFiZWw5MTEwNjU4ODQ=","url":"https://api.github.com/repos/robotframework/robotframework/labels/acknowledge","name":"acknowledge","color":"bc82e0","default":false,"description":"To be acknowledged in release notes"},{"id":4972220183,"node_id":"LA_kwDOAUSaQ88AAAABKF4PFw","url":"https://api.github.com/repos/robotframework/robotframework/labels/effort:%20small","name":"effort: small","color":"5319E7","default":false,"description":""}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/robotframework/robotframework/milestones/65","html_url":"https://github.com/robotframework/robotframework/milestone/65","labels_url":"https://api.github.com/repos/robotframework/robotframework/milestones/65/labels","id":8098814,"node_id":"MI_kwDOAUSaQ84Ae5P-","number":65,"title":"v6.1","description":"Feature release adding JSON serialization support for the execution model (#3902), mixing embedded arguments with normal arguments (#4234), making it possible to use custom parsers (#1283), and many other nice new features.\r\n\r\nCritical and high priority issues, as well as the deadline, have been approved by Robot Framework Foundation board on January 16, 2023.","creator":{"login":"pekkaklarck","id":114985,"node_id":"MDQ6VXNlcjExNDk4NQ==","avatar_url":"https://avatars.githubusercontent.com/u/114985?v=4","gravatar_id":"","url":"https://api.github.com/users/pekkaklarck","html_url":"https://github.com/pekkaklarck","followers_url":"https://api.github.com/users/pekkaklarck/followers","following_url":"https://api.github.com/users/pekkaklarck/following{/other_user}","gists_url":"https://api.github.com/users/pekkaklarck/gists{/gist_id}","starred_url":"https://api.github.com/users/pekkaklarck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pekkaklarck/subscriptions","organizations_url":"https://api.github.com/users/pekkaklarck/orgs","repos_url":"https://api.github.com/users/pekkaklarck/repos","events_url":"https://api.github.com/users/pekkaklarck/events{/privacy}","received_events_url":"https://api.github.com/users/pekkaklarck/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":77,"state":"closed","created_at":"2022-06-20T15:09:49Z","updated_at":"2023-06-12T09:40:06Z","due_on":"2023-06-12T07:00:00Z","closed_at":"2023-06-12T09:40:06Z"},"comments":2,"created_at":"2023-06-09T11:53:31Z","updated_at":"2023-06-13T14:00:42Z","closed_at":"2023-06-09T11:54:49Z","author_association":"MEMBER","active_lock_reason":null,"body":"We added translation infrastructure and as well as translations for various languages in RF 6.0 (#4390). We now have P


this.GetStructure("RXC", rep);
	}

	/**
	 * Returns the number of existing repetitions of RXC
	 */
	public int RXCRepetitionsUsed {
get{
	    int reps = -1;
	    try {
	        reps = this.GetAll("RXC").Length;
	    } catch (HL7Exception e) {
	        string message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
	        HapiLogFactory.GetHapiLog(GetType()).Error(message, e);
	        throw new System.Exception(message);
	    }
	    return reps;
	}
	}

	/**
	 * Enumerate over the RXC results
	 */
	public IEnumerable<RXC> RXCs
	{
		get
		{
			for (int rep = 0; rep < RXCRepetitionsUsed; rep++)
			{
				yield return (RXC)this.GetStructure("RXC", rep);
			}
		}
	}

	///
	///Adds a new RXC
	///
	public RXC AddRXC()
	{
		return this.AddStructure("RXC") as RXC;
	}

	///
	///Removes the given RXC
	///
	public void RemoveRXC(RXC toRemove)
	{
		this.RemoveStructure("RXC", toRemove);
	}

	///
	///Removes the RXC at the given index
	///
	public void RemoveRXCAt(int index)
	{
		this.RemoveRepetition("RXC", index);
	}

	///
	/// Returns  first repetition of RDE_O11_OBSERVATION (a Group object) - creates it if necessary
	///
	public RDE_O11_OBSERVATION GetOBSERVATION() {
	   RDE_O11_OBSERVATION ret = null;
	   try {
	      ret = (RDE_O11_OBSERVATION)this.GetStructure("OBSERVATION");
	   } catch(HL7Exception e) {
	      HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
	      throw new System.Exception("An unexpected error ocurred",e);
	   }
	   return ret;
	}

	///
	///Returns a specific repetition of RDE_O11_OBSERVATION
	/// * (a Group object) - creates it if necessary
	/// throws HL7Exception if the repetition requested is more than one
	///     greater than the number of existing repetitions.
	///
	public RDE_O11_OBSERVATION GetOBSERVATION(int rep) {
	   return (RDE_O11_OBSERVATION)this.GetStructure("OBSERVATION", rep);
	}

	/**
	 * Returns the number of existing repetitions of RDE_O11_OBSERVATION
	 */
	public int OBSERVATIONRepetitionsUsed {
get{
	    int reps = -1;
	    try {
	        reps = this.GetAll("OBSERVATION").Length;
	    } catch (HL7Exception e) {
	        string message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
	        HapiLogFactory.GetHapiLog(GetType()).Error(message, e);
	        throw new System.Exception(message);
	    }
	    return reps;
	}
	}

	/**
	 * Enumerate over the RDE_O11_OBSERVATION results
	 */
	public IEnumerable<RDE_O11_


#include "gas.h"
#include "../PHL.h"
#include "../game.h"
#include "../hero.h"
#include <stdlib.h>

void gasStep(Gas* g);
void gasDraw(Gas* g);

void createGas(int x, int y, int temp)
{
	if (temp == 0 || hasKey[7] == 0) {
		int i;
		for (i = 0; i < MAX_ENEMIES; i++) {
			if (enemies[i] == NULL) {
				Enemy* e = malloc(sizeof *e);
				Gas* g = malloc(sizeof *g);
				g->id = i;

				g->x = x;
				g->y = y;

				g->state = 0;
				g->timer = 0;
				g->imageIndex = 0;

				/*
				g->mask.unused = g->mask.circle = 0;
				g->mask.w = g->mask.h = 24;
				g->mask.x = x + 20 - (g->mask.w / 2);
				g->mask.y = y + 40 - g->mask.h;
				*/

				e->data = g;
				e->enemyStep = gasStep;
				e->enemyDraw = gasDraw;
				e->type = -1;

				enemies[i] = e;
				i = MAX_ENEMIES;
			}
		}
	}
}

void gasStep(Gas* g)
{
	if (g->state != 0) {
		g->imageIndex += 0.2;
	}

	if (g->state == 0) { //Wait
		Mask tempMask;
		tempMask.circle = tempMask.unused = 0;
		tempMask.x = g->x - 100;
		tempMask.y = g->y - 20;
		tempMask.w = 240;
		tempMask.h = 60;

		if (checkCollisionXY(tempMask, herox, heroy + 20)) {
			g->state = 1;
			g->imageIndex = 3;
			g->timer = 32;
			PHL_PlaySound(sounds[sndGas01], CHN_ENEMIES);
		}
	}
	else if (g->state == 1 || g->state == 3) { //Small puff
		if (g->imageIndex >= 5) {
			g->imageIndex -= 2;
		}

		g->timer -= 1;
		if (g->timer <= 0) {
			if (g->state == 3) {
				g->state = 0;
			}else{
				g->state = 2;
				g->imageIndex = 0;
				g->timer = 175;
			}
		}
	}
	else if (g->state == 2) { //Big puff
		if (g->imageIndex >= 3) {
			g->imageIndex -= 3;
		}

		g->timer -= 1;
		if (g->timer <= 0) {
			g->state = 3;
			g->timer = 120;
			g->imageIndex = 3;
		}

		if (hasItem[7] != 1) { //Does not have gas mask
			Mask mask;
			mask.unused = mask.circle = 0;
			mask.w = mask.h = 24;
			mask.x = g->x + 20 - (mask.w / 2);
			mask.y = g->y + 40 - mask.h;

			if (checkCollision(getHeroMask(), mask)) {
				if (heroHit(15, g->x + 20)) {
					heroPoison();
				}
			}
		}
	}
}

void gasDraw(Gas* g)
{
	if (g->state != 0) {
		PHL_DrawSurfacePart(g->x, g->y, (int)g->imageIndex * 40, 400, 40, 40, images[imgEnemies]);
	}
}


, message, wait: true },
      invariantContext,
      robotInitialState
    )
    const res = getSuccessResult(result)
    expect(res.commands).toEqual([
      {
        commandType: 'waitForResume',
        key: expect.any(String),
        params: {
          message,
        },
      },
    ])
  })

  it('should delay for a given duration', () => {
    const robotInitialState = getRobotInitialState()
    const message = 'delay 95.5 secs message'
    const result = delay(
      { ...mixInArgs, message, wait: 95.5 },
      invariantContext,
      robotInitialState
    )
    const res = getSuccessResult(result)
    expect(res.commands).toEqual([
      {
        commandType: 'waitForDuration',
        key: expect.any(String),
        params: {
          seconds: 95.5,
          message,
        },
      },
    ])
  })
})
import { KeyboardEvent } from "react";

export const parseDate = (dateNumber: number): string => {
    const date = new Date(dateNumber);
    const day = date.getDay() < 10 ? `0${date.getDay()}` : date.getDay();
    const month =
        date.getMonth() + 1 < 10
            ? `0${date.getMonth() + 1}`
            : date.getMonth() + 1;
    return `${day}/${month}/${date.getFullYear()}`;
};

export const handleEnter = (fn: any) => (event: KeyboardEvent<any>) => {
    event.stopPropagation();
    const allowedCodes = ["Enter", "NumpadEnter"];
    allowedCodes.includes(event.code) && fn();
};
/**
 * @author fanliangqin@ultrain.io
 * @datetime 15:46:43, 07/06/2018
 * All rights reserved by ultrain.io @2018
 */

import { Asset, SYS_NAME, SYS } from "../src/asset";
import { PermissionLevel } from "./permission-level";
import { TransferParams, dispatchInline } from "../src/action";
import { NEX } from "./name_ex";
import { NAME } from "../src/account";
/**
 * class CurrencyAccount for Token system.
 *
 * @class CurrencyAccount
 */
export class CurrencyAccount implements Serializable {
    balance: Asset;

    constructor(blc: Asset) {
        this.balance = blc;
    }

    primaryKey(): u64 { return this.balance.symbolName(); }

    deserialize(ds: DataStream): void {
        this.balance.deserialize(ds);
    }

    serialize(ds: DataStream): void {
        this.balance.serialize(ds);
    }
}
/**
 * class CurrencyStats for Token system.
 *
 * @class CurrencyStats
 */
export class CurrencyStats implements Serializable {
    supply: Asset;
    max_supply: Asset;
    issuer: account_name;
    timestamp: u64;

    constructor(supply: Asset, max_supply: Asset, issuer: account_name, time: u64 = 0) {
        this.max_supply = max_supply;
        this.supply = supply;
        this.issuer = issuer;
        this.timestamp = time;
    }

    primaryKey(): u64 { return this.supply.symbolName(); }

    deserialize(ds: DataStream): void {
        this.supply.deserialize(ds);
        this.max_supply.deserialize(ds);
        this.issuer = ds.read<account_name>();
        this.timestamp = ds.read<u64>();
    }

    serialize(ds: DataStream): void {
        this.supply.serialize(ds);
        this.max_supply.serialize(ds);
        ds.write<account_name>(this.issuer);
        ds.write<u64


",
		["Reckoning"]="清算",
		["Redemption"]="救贖",
		["Redoubt"]="盾牌壁壘",
		["Reflection"]="反射",
		["Regeneration"]="再生",
		["Regrowth"]="癒合",
		["Reincarnation"]="複生效果",
		["Rejuvenation"]="回春術",
		["Relentless Strikes"]="無情打擊",
		["Remorseless"] = "冷酷",
		["Remorseless Attacks"]="冷酷攻擊",
		["Remove Curse"]="解除詛咒",
		["Remove Insignia"]="解除徽記",
		["Remove Lesser Curse"]="解除次級詛咒",
		["Rend"]="撕裂",
		["Renew"]="恢復",
		["Repentance"]="懺悔",
		["Resurrection"]="復活術",
		["Retaliation"]="反擊風暴",
		["Retribution Aura"]="懲罰光環",
		["Revenge Stun"]="復仇昏迷",
		["Revenge"]="復仇",
		["Reverberation"]="迴響",
		["Revive Pet"]="復活寵物",
		["Righteous Fury"]="正義之怒",
		["Rip"]="撕扯",
		["Riposte"]="還擊",
		["Ritual of Doom Effect"]="末日儀式效果",
		["Ritual of Doom"]="末日儀式",
		["Ritual of Summoning"]="召喚儀式",
		["Rockbiter Weapon"]="石化武器",
		["Rogue Passive"]="Rogue Passive",
		["Rough Sharpening Stone"]="劣質磨刀石",
		["Ruin"]="毀滅",
		["Rupture"]="割裂",
		["Ruthlessness"]="無情",
		["Sacrifice"]="犧牲",
		["Safe Fall"]="安全降落",
		["Sanctity Aura"]="聖潔光環",
		["Sap"]="悶棍",
		["Savage Fury"]="野蠻暴怒",
		["Savage Strikes"]="猛烈強擊",
		["Scare Beast"]="恐嚇野獸",
		["Scatter Shot"]="驅散射擊",
		["Scorch"]="灼燒",
		["Scorpid Poison"]="蠍毒",
		["Scorpid Sting"]="毒蠍釘刺",
		["Screech"]="尖嘯",
		["Seal Fate"]="封印命運",
		["Seal of Command"]="命令聖印",
		["Seal of Justice"]="公正聖印",
		["Seal of Light"]="光明聖印",
		["Seal of Righteousness"]="正義聖印",
		["Seal of Wisdom"]="智慧聖印",
		["Seal of the Crusader"]="十字軍聖印",
		["Searing Light"]="灼熱之光",
		["Searing Pain"]="灼熱之痛",
		["Searing Totem"]="灼熱圖騰",
		["Seduction"]="誘惑",
		["Sense Demons"]="感知惡魔",
		["Sense Undead"]="感知不死生物",
		["Sentry Totem"]="崗哨圖騰",
		["


 "../../util/type_traits.hpp"
#include "../../warp/warp.hpp"
#include "../../warp/shuffle.hpp"

namespace cv { namespace cudev {

namespace block_reduce_detail
{
    // GetType

    template <typename T> struct GetType;

    template <typename T> struct GetType<T*>
    {
        typedef T type;
    };

    template <typename T> struct GetType<volatile T*>
    {
        typedef T type;
    };

    template <typename T> struct GetType<T&>
    {
        typedef T type;
    };

    // For

    template <int I, int N> struct For
    {
        template <class PointerTuple, class ValTuple>
        __device__ static void loadToSmem(const PointerTuple& smem, const ValTuple& val, uint tid)
        {
            get<I>(smem)[tid] = get<I>(val);

            For<I + 1, N>::loadToSmem(smem, val, tid);
        }

        template <class PointerTuple, class ValTuple>
        __device__ static void loadFromSmem(const PointerTuple& smem, const ValTuple& val, uint tid)
        {
            get<I>(val) = get<I>(smem)[tid];

            For<I + 1, N>::loadFromSmem(smem, val, tid);
        }

        template <class PointerTuple, class ValTuple, class OpTuple>
        __device__ static void merge(const PointerTuple& smem, const ValTuple& val, uint tid, uint delta, const OpTuple& op)
        {
            typename GetType<typename tuple_element<I, PointerTuple>::type>::type reg = get<I>(smem)[tid + delta];
            get<I>(smem)[tid] = get<I>(val) = get<I>(op)(get<I>(val), reg);

            For<I + 1, N>::merge(smem, val, tid, delta, op);
        }

#if CV_CUDEV_ARCH >= 300
        template <class ValTuple, class OpTuple>
        __device__ static void mergeShfl(const ValTuple& val, uint delta, uint width, const OpTuple& op)
        {
            typename GetType<typename tuple_element<I, ValTuple>::type>::type reg = shfl_down(get<I>(val), delta, width);
            get<I>(val) = get<I>(op)(get<I>(val), reg);

            For<I + 1, N>::mergeShfl(val, delta, width, op);
        }
#endif
    };

    template <int N> struct For<N, N>
    {
        template <class PointerTuple, class ValTuple>
        __device__ __forceinline__ static void loadToSmem(const PointerTuple&, const ValTuple&, uint)
        {
        }
        template <class PointerTuple, class ValTuple>
        __device__ __forceinline__ static void loadFromSmem(const PointerTuple&, const ValTuple&, uint)
        {
        }

        template <class PointerTuple, class ValTuple, class OpTuple>
        __device__ __forceinline__ static void merge(const PointerTuple&, const ValTuple&, uint, uint, const OpTuple&)
        {
        }

#if CV_CUDEV_ARCH >= 300
        template <class ValTuple, class OpTuple>
        __device__ __forceinline__ static void mergeShfl(const ValTuple&, uint, uint, const OpTuple&)
        {
        }
#endif
    };

    // loadToSmem / loadFromSmem

    template <typename T>
    __device__ __forceinline__ void loadToSmem(volatile T* smem, T& val, uint tid)
    {
        smem[tid] = val;
    }

    template <typename T>
    __device__ __fo


import os
import asyncio
import yt_dlp

from ... import app
from pyrogram import filters
from pyrogram.types import Message
from youtubesearchpython import VideosSearch

@app.on_message(filters.command(["song"], ["/", "!", "."]))
async def song(client: app, message: Message):
    aux = await message.reply_text("**🔄 𝐏𝐫𝐨𝐜𝐞𝐬𝐬𝐢𝐧𝐠 ...**")
    if len(message.command) < 2:
        return await aux.edit(
            "**🤖 𝐆𝐢𝐯𝐞 🙃 𝐌𝐮𝐬𝐢𝐜 💿 𝐍𝐚𝐦𝐞 😍\n💞 𝐓𝐨 🔊 𝐃𝐨𝐰𝐧𝐥𝐨𝐚𝐝 🥀 𝐒𝐨𝐧𝐠❗**"
        )
    try:
        song_name = message.text.split(None, 1)[1]
        vid = VideosSearch(song_name, limit = 1)
        song_title = vid.result()["result"][0]["title"]
        song_link = vid.result()["result"][0]["link"]
        ydl_opts = {
            "format": "mp3/bestaudio/best",
            "verbose": True,
            "geo-bypass": True,
            "nocheckcertificate": True,
            "postprocessors": [
                {
                    "key": "FFmpegExtractAudio",
                    "preferredcodec": "mp3"
                }
            ],
            "outtmpl": f"downloads/{song_title}",
        }
        await aux.edit("**𝐃𝐨𝐰𝐧𝐥𝐨𝐚𝐝𝐢𝐧𝐠 ...**")
        with yt_dlp.YoutubeDL(ydl_opts) as ydl:
            ydl.download(song_link)
        await aux.edit("**𝐔𝐩𝐥𝐨𝐚𝐝𝐢𝐧𝐠 ...**")
        await message.reply_audio(f"downloads/{song_title}.mp3")
        try:
            os.remove(f"downloads/{song_title}.mp3")
        except:
            pass
        await aux.delete()
    except Exception as e:
        await aux.edit(f"**Error:** {e}")


 incoming responses
            self.on('data', onData);

            try {
                this.write(request)
                    .then(() => {
                        // wait for data to come in or timeout...
                        timeout = setTimeout((self: HcpDevice) => {
                            timeout = null;
                            self.removeListener('data', onData);
                            reject('Response timed out.');
                        }, 1000, this);
                    })
                    .catch(reject);
            } catch (error) {
                if (timeout) {
                    clearTimeout(timeout);
                    self.removeListener('data', onData);
                }

                reject(error);
            }

        });
    }

    public get completer(): Completer {
        return this._codec.model.completer;
    }
    /**
     * Write a request to the serial port and waits for the bytes to be written.
     */
    public async write(request: string): Promise<void> {
        return new Promise<void>((resolve, reject) => {
            let bytesWritten: number = 0;

            try {
                bytesWritten = this._codec.encode(request, this._writeBuffer);
            } catch (error) {
                reject(error);
                return;
            }

            if (bytesWritten > 0) {
                try {
                    this._port.write(Buffer.from(this._writeBuffer, 0, bytesWritten),
                        (error) => {
                            if (error) {
                                reject(error);
                            } else {
                                resolve();
                            }
                        });
                } catch (error) {
                    reject(error);
                }
            }
        });
    }
    /**
     * Attempts to connect to a device.
     */
    public async connect(port: string, library: string, model: any): Promise<HcpDevice> {
        let self: HcpDevice = this;
        this._isConnected = false;

        return new Promise<HcpDevice>((resolve, reject) => {
            try {
                this._port = new SerialPort(port, { autoOpen: true }, ((error) => {
                    if (error) {
                        reject(error);
                    } else {
                        try {
                            self.initialize.bind(self)(library, model);
                        } catch (error) {
                            reject(error);
                            return;
                        }

                        self._port.on('data', self.onReceiveData.bind(self));

                        self._isConnected = true;
                        resolve(self);
                    }
                }) as any);
            } catch (error) {
                reject(error);
            }
        });
    }

    private initialize(library: string, modelObj: any): void {
        let model = Hcp.loadModel(modelObj);
        this._codec = Hcp.newCodec(library, model);

        // generate the model-ts file
        model.compileTo('./temp-mode.ts');
    }
    /**
     * Returns a value which indicate if a connection has been established by calling connect
     */
    public get isConnected() {
        return this._isConnected;
    }

    private onReceiveData(data: Buffer): void {
        if (data && data.length > 0) {
            let response = this._codec.decode(data);

            if (response) {
                this.emit('data', response);
            }
        }
    }
}import { TreeNode } from '../model/TreeNode';

/**
 * @description 判断两个树是否在结构上相同，并且节点具有相同的值
 * @author angle
 * @date 2020-07-27
 * @export
 * @pa


import sys

def readFile(filePath):
    file = open(filePath, "r")

    lines = file.readlines()

    lines = [line[:-1] if line[-1] == "\n" else line for line in lines]

    splitLines = [line.split(",") for line in lines]

    intSplitLines = [[int(coord) for coord in line] for line in splitLines]

    return intSplitLines

def genGrid(coords, bound, sim):
    grid = [["." for j in range(bound)] for i in range(bound)]

    for i in range(sim + 1):
        coord = coords[i]
        grid[coord[1]][coord[0]] = "#"

    return grid

sys.setrecursionlimit(5000)
def dijkstra(scoreGrid, grid, i, j, unvisited, nonInfinityNodes):
    if (i, j) not in unvisited:
        return

    unvisited.remove((i, j))
    nonInfinityNodes.pop(0)

    if grid[i][j] == "#":
        return

    score = scoreGrid[i][j]

    up = (i - 1, j)
    down = (i + 1, j)
    left = (i, j - 1)
    right = (i, j + 1)

    upPossible = i != 0 and grid[up[0]][up[1]] != "#" and up in unvisited and up not in nonInfinityNodes
    downPossible = i != len(grid) - 1 and grid[down[0]][down[1]] != "#" and down in unvisited and down not in nonInfinityNodes
    leftPossible = j != 0 and grid[left[0]][left[1]] != "#" and left in unvisited and left not in nonInfinityNodes
    rightPossible = j != len(grid[i]) - 1 and grid[right[0]][right[1]] != "#" and right in unvisited and right not in nonInfinityNodes

    if upPossible:
        scoreGrid[up[0]][up[1]] = score + 1
        nonInfinityNodes.append(up)
    if downPossible:
        scoreGrid[down[0]][down[1]] = score + 1
        nonInfinityNodes.append(down)
    if leftPossible:
        scoreGrid[left[0]][left[1]] = score + 1
        nonInfinityNodes.append(left)
    if rightPossible:
        scoreGrid[right[0]][right[1]] = score + 1
        nonInfinityNodes.append(right)

    if len(nonInfinityNodes) == 0:
        return

    minNode = nonInfinityNodes[0]

    dijkstra(scoreGrid, grid, minNode[0], minNode[1], unvisited, nonInfinityNodes)

def main(bound, sim, coordsList):
    grid = genGrid(coordsList, bound, sim)

    scoreGrid = [[bound**2 + 1 for y in range(bound)] for x in range(bound)]
    unvisited = set()

    for i in range(bound):
        for j in range(bound):
            unvisited.add((i, j))

    scoreGrid[0][0] = 0

    nonInfinityNodes = []
    nonInfinityNodes.append((0, 0))

    dijkstra(scoreGrid, grid, 0, 0, unvisited, nonInfinityNodes)
    return scoreGrid[-1][-1]


omp], src
                            )
                        )

        def test_Jvec_j_Jform(self):
            for src in SrcType:
                for orientation in ["x", "y", "z"]:
                    for comp in ["r", "i"]:
                        self.assertTrue(
                            derivTest("j", ["CurrentDensity", orientation, comp], src)
                        )

        def test_Jvec_h_Jform(self):
            for src in SrcType:
                for orientation in ["x", "y", "z"]:
                    for comp in ["r", "i"]:
                        self.assertTrue(
                            derivTest("j", ["MagneticField", orientation, comp], src)
                        )

    if testH:

        def test_Jvec_e_Hform(self):
            for src in SrcType:
                for orientation in ["x", "y", "z"]:
                    for comp in ["r", "i"]:
                        self.assertTrue(
                            derivTest("h", ["ElectricField", orientation, comp], src)
                        )

        def test_Jvec_b_Hform(self):
            for src in SrcType:
                for orientation in ["x", "y", "z"]:
                    for comp in ["r", "i"]:
                        self.assertTrue(
                            derivTest(
                                "h", ["MagneticFluxDensity", orientation, comp], src
                            )
                        )

        def test_Jvec_j_Hform(self):
            for src in SrcType:
                for orientation in ["x", "y", "z"]:
                    for comp in ["r", "i"]:
                        self.assertTrue(
                            derivTest("h", ["CurrentDensity", orientation, comp], src)
                        )

        def test_Jvec_h_Hform(self):
            for src in SrcType:
                for orientation in ["x", "y", "z"]:
                    for comp in ["r", "i"]:
                        self.assertTrue(
                            derivTest("h", ["MagneticField", orientation, comp], src)
                        )


             sats: 546n,
                },
                {
                    outputScript:
                        '76a914b8d9512d2adf8b4e70c45c26b6b00d75c28eaa9688ac',
                    token: {
                        tokenId:
                            '50d8292c6255cda7afc6c8566fed3cf42a2794e9619740fe8f4c95431271410e',
                        tokenType: {
                            protocol: 'SLP',
                            type: 'SLP_TOKEN_TYPE_FUNGIBLE',
                            number: 1,
                        },
                        isMintBaton: true,
                        entryIdx: 0,
                        atoms: 0n,
                    },
                    sats: 546n,
                },
                {
                    outputScript:
                        '76a914b8d9512d2adf8b4e70c45c26b6b00d75c28eaa9688ac',
                    spentBy: {
                        txid: '618d0dd8c0c5fa5a34c6515c865dd72bb76f8311cd6ee9aef153bab20dabc0e6',
                        outIdx: 0,
                    },
                    sats: 89406n,
                },
            ],
            lockTime: 0,
            timeFirstSeen: 0,
            size: 336,
            isCoinbase: false,
            tokenEntries: [
                {
                    tokenId:
                        '50d8292c6255cda7afc6c8566fed3cf42a2794e9619740fe8f4c95431271410e',
                    tokenType: {
                        protocol: 'SLP',
                        type: 'SLP_TOKEN_TYPE_FUNGIBLE',
                        number: 1,
                    },
                    txType: 'GENESIS',
                    isInvalid: false,
                    burnSummary: '',
                    failedColorings: [],
                    burnsMintBatons: false,
                    actualBurnAtoms: 0n,
                    intentionalBurnAtoms: 0n,
                },
            ],
            tokenFailedParsings: [],
            tokenStatus: 'TOKEN_STATUS_NORMAL',
            block: {
                height: 674143,
                hash: '000000000000000034c77993a35c74fe2dddace27198681ca1e89e928d0c2fff',
                timestamp: 1613859311,
            },
        },
        calculated: {
            genesisSupply: '100',
            genesisOutputScripts: [
                '76a914b8d9512d2adf8b4e70c45c26b6b00d75c28eaa9688ac',
            ],
            genesisMintBatons: 1,
        },
    },
    'f36e1b3d9a2aaf74f132fef3834e9743b945a667a4204e761b85f2e7b65fd41a': {
        token: {
            tokenId:
                'f36e1b3d9a2aaf74f132fef3834e9743b945a667a4204e761b85f2e7b65fd41a',
            tokenType: {
                protocol: 'SLP',
                type: 'SLP_TOKEN_TYPE_FUNGIBLE',
                number: 1,
            },
            timeFirstSeen: 0,
            genesisInfo: {
                tokenTicker: 'POW',
                tokenName: 'ProofofWriting.com Token',
                url: 'https://www.proofofwriting.com/26',
                decimals: 0,
                hash: '',
            },
            block: {
                height: 685949,
                hash: '0000000000000000436e71d5291d2fb067decc838dcb85a99ff6da1d28b89fad',
                timestamp:


-brand{width:180px}.w1 #mallPage.mallist #site-nav .sn-sitemap .menu-bd{width:1188px}.mui-global-in-pad #site-nav .sn-mobile,.mui-global-in-pad #site-nav .sn-seller,.mui-global-in-pad #site-nav .sn-separator,.mui-global-in-pad #site-nav .sn-sitemap,.mui-global-in-pad-app #J_CommonBottomBar,.mui-global-in-pad-app #footer,.mui-global-in-pad-app #header,.mui-global-in-pad-app #site-nav,.mui-global-in-pad-app #tstart,.mui-global-in-pad-app .mui-mbar-outer{display:none!important}.mui-global-in-pad #site-nav{font-size:14px;height:42px;padding:2px 0}.mui-global-in-pad #site-nav .mui-global-iconfont{font-size:14px}.mui-global-in-pad #site-nav .sn-container{padding:8px 0}.mui-global-in-pad #site-nav .sn-quick-menu .menu-hd{line-height:42px;height:42px}.mui-global-in-pad #site-nav .sn-quick-menu .menu-bd{top:43px}.mui-global-in-pad #site-nav .sn-quick-menu .menu-hd b{top:20px}.mui-global-in-pad #site-nav .sn-cart,.mui-global-in-pad #site-nav .sn-home,.mui-global-in-pad #site-nav .sn-mobile,.mui-global-in-pad #site-nav .sn-mybrand{padding-top:8px;padding-bottom:8px}.mui-global-in-pad #site-nav .sn-tmallbao{margin-top:8px}.mui-global-in-pad #header{height:130px}.mui-global-in-pad #header .hot-query li{border:none;font-size:14px}.mui-global-in-pad .mui-global-sub-nav{line-height:38px;height:38px;margin:0;padding:0 20px 0 8px}.mui-global-in-pad .mui-global-kill-line,.mui-global-in-pad .mui-global-nav-list{top:38px}.mui-global-in-pad .mui-global-kill-line{width:56px}.mui-global-in-pad .mui-global-sub-nav i{top:16px}.mui-global-in-pad .mui-global-nav-list{padding:16px 0 8px 16px;width:520px}.mui-global-in-pad .mui-global-nav-list ul{width:510px}.mui-global-in-pad .mui-global-nav-list li{border:1px solid #f5f5f5;margin:0 8px 8px 0;padding-bottom:0;text-align:center}.mui-global-in-pad #site-nav .sn-quick-menu .menu-hd b{border-width:6px;top:18px}.mui-global-in-pad #site-nav .sn-favorite .menu-hd,.mui-global-in-pad #site-nav .sn-mytaobao .menu-hd,.mui-global-in-pad #site-nav .sn-seller .menu-hd,.mui-global-in-pad #site-nav .sn-sitemap .menu-hd{padding-right:24px}.mui-global-in-pad #site-nav a.sn-identity{background:#86807c;line-height:16px;height:16px;top:5px;width:16px}.mui-global-in-pad #site-nav .sn-identity.sn-vip1,.mui-global-in-pad #site-nav .sn-identity.sn-vip2,.mui-global-in-pad #site-nav .sn-identity.sn-vip3,.mui-global-in-pad #site-nav .sn-identity.sn-vip4{background:#c50808}.mui-


tion on node {} from {}",
                    self.node_id,
                    dest,
                );
                return Some(transport);
            }
        }

        None
    }

    fn connect(
        &mut self,
        address: &<Self::Transport as Transport<M>>::Address,
    ) -> Result<MpscChannelTransport<M>, ConnectError> {
        log::debug!("attempting to connect from {} to {}", self.node_id, address);

        let src_id = self.node_id;
        let dest_id = *address;

        let src_channel = mpsc::channel();
        let dest_channel = mpsc::channel();

        self.transports.lock().unwrap().get_mut(&dest_id).unwrap().push(MpscChannelTransport {
            src_id: dest_id,
            dest_id: src_id,
            send: src_channel.0,
            recv: dest_channel.1,
        });

        Ok(MpscChannelTransport {
            src_id: src_id,
            dest_id: dest_id,
            send: dest_channel.0,
            recv: src_channel.1,
        })
    }
}

pub struct MpscChannelTransport<M: MachineCore> {
    src_id: u64,
    dest_id: u64,
    send: Sender<TransportItem<M, u64>>,
    recv: Receiver<TransportItem<M, u64>>,
}

impl<M: MachineCore> Transport<M> for MpscChannelTransport<M> {
    type Address = u64;

    fn send(&mut self, item: TransportItem<M, Self::Address>) -> Result<(), TransportError> {
        log::trace!("sending item {:?} over MPSC-channel transport", item);
        self.send.send(item).map_err(|_| TransportError::Disconnected(Backtrace::new()))
    }

    fn try_recv(&mut self) -> Result<TransportItem<M, Self::Address>, TransportError> {
        self.recv.try_recv().map_err(|e| {
            match e {
                TryRecvError::Empty => TransportError::Empty(Backtrace::new()),
                TryRecvError::Disconnected => TransportError::Disconnected(Backtrace::new()),
            }
        })
    }

    fn src(&self) -> Result<u64, AddressError> {
        Ok(self.src_id)
    }

    fn dest(&self) -> Result<u64, AddressError> {
        Ok(self.dest_id)
    }

    fn close(self) {
        //log::debug!("storing transport from {} to {} in transports", self.src_id, self.dest_id);
        //let arc = self.transports.clone();
        //let mut transports = arc.lock().unwrap();
        //transports.get_mut(&self.src_id).unwrap().push(self);
    }
}
//
//
// This file is a part of Aleph
//
// https://github.com/nathanvoglsam/aleph
//
// MIT License
//
// Copyright (c) 2020 Aleph Engine
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//


sroot "sysroot with spaces" --sysroot="sysroot with spaces" \
# RUN:   --version-script ver --dynamic-linker "some unusual/path" -soname 'foo bar' \
# RUN:   -soname='foo bar'
# RUN: tar xOf repro3.tar repro3/response.txt | FileCheck %s --check-prefix=RSP3
# RSP3:      --chroot .
# RSP3:      "{{.*}}foo bar"
# RSP3-NEXT: --library-path "[[BASEDIR:.+]]/foo bar"
# RSP3-NEXT: --library-path [[BASEDIR]]/file
# RSP3-NEXT: --script [[BASEDIR]]/file2
# RSP3-NEXT: --dynamic-list [[BASEDIR]]/dyn
# RSP3-NEXT: -rpath [[BASEDIR]]/file
# RSP3-NEXT: --script [[BASEDIR]]/file
# RSP3-NEXT: --symbol-ordering-file [[BASEDIR]]/order
# RSP3-NEXT: --sysroot "[[BASEDIR]]/sysroot with spaces"
# RSP3-NEXT: --sysroot "[[BASEDIR]]/sysroot with spaces"
# RSP3-NEXT: --version-script [[BASEDIR]]/ver
# RSP3-NEXT: --dynamic-linker "some unusual/path"
# RSP3-NEXT: -soname "foo bar"
# RSP3-NEXT: -soname "foo bar"

# RUN: tar tf repro3.tar | FileCheck %s
# CHECK:      repro3/response.txt
# CHECK-NEXT: repro3/version.txt
# CHECK-NEXT: repro3/{{.*}}/order
# CHECK-NEXT: repro3/{{.*}}/dyn
# CHECK-NEXT: repro3/{{.*}}/ver
# CHECK-NEXT: repro3/{{.*}}/foo bar
# CHECK-NEXT: repro3/{{.*}}/file2
# CHECK-NEXT: repro3/{{.*}}/file

## Check that directory path is stripped from -o <file-path>
# RUN: mkdir -p %t.dir/build4/a/b/c
# RUN: cd %t.dir
# RUN: ld.lld build1/foo.o -o build4/a/b/c/bar -shared --as-needed --reproduce=repro4.tar
# RUN: tar xOf repro4.tar repro4/response.txt | FileCheck %s --check-prefix=RSP4
# RSP4: -o bar

.globl _start
_start:
  mov $60, %rax
  mov $42, %rdi
  syscall


]) * cos7_32;
	pp[12] = (p[4] - p[11]) * cos9_32;
	pp[13] = (p[5] - p[10]) * cos11_32;
	pp[14] = (p[6] - p[9]) * cos13_32;
	pp[15] = (p[7] - p[8]) * cos15_32;

	p[0] = pp[0] + pp[7];
	p[1] = pp[1] + pp[6];
	p[2] = pp[2] + pp[5];
	p[3] = pp[3] + pp[4];
	p[4] = (pp[0] - pp[7]) * cos1_16;
	p[5] = (pp[1] - pp[6]) * cos3_16;
	p[6] = (pp[2] - pp[5]) * cos5_16;
	p[7] = (pp[3] - pp[4]) * cos7_16;
	p[8] = pp[8] + pp[15];
	p[9] = pp[9] + pp[14];
	p[10] = pp[10] + pp[13];
	p[11] = pp[11] + pp[12];
	p[12] = (pp[8] - pp[15]) * cos1_16;
	p[13] = (pp[9] - pp[14]) * cos3_16;
	p[14] = (pp[10] - pp[13]) * cos5_16;
	p[15] = (pp[11] - pp[12]) * cos7_16;

	pp[0] = p[0] + p[3];
	pp[1] = p[1] + p[2];
	pp[2] = (p[0] - p[3]) * cos1_8;
	pp[3] = (p[1] - p[2]) * cos3_8;
	pp[4] = p[4] + p[7];
	pp[5] = p[5] + p[6];
	pp[6] = (p[4] - p[7]) * cos1_8;
	pp[7] = (p[5] - p[6]) * cos3_8;
	pp[8] = p[8] + p[11];
	pp[9] = p[9] + p[10];
	pp[10] = (p[8] - p[11]) * cos1_8;
	pp[11] = (p[9] - p[10]) * cos3_8;
	pp[12] = p[12] + p[15];
	pp[13] = p[13] + p[14];
	pp[14] = (p[12] - p[15]) * cos1_8;
	pp[15] = (p[13] - p[14]) * cos3_8;

	p[0] = pp[0] + pp[1];
	p[1] = (pp[0] - pp[1]) * cos1_4;
	p[2] = pp[2] + pp[3];
	p[3] = (pp[2] - pp[3]) * cos1_4;
	p[4] = pp[4] + pp[5];
	p[5] = (pp[4] - pp[5]) * cos1_4;
	p[6] = pp[6] + pp[7];
	p[7] = (pp[6] - pp[7]) * cos1_4;
	p[8] = pp[8] + pp[9];
	p[9] = (pp[8] - pp[9]) * cos1_4;
	p[10] = pp[10] + pp[11];
	p[11] = (pp[10] - pp[11]) * cos1_4;
	p[12] = pp[12] + pp[13];
	p[13] = (pp[12] - pp[13]) * cos1_4;
	p[14] = pp[14] + pp[15];
	p[15] = (pp[14] - pp[15]) * cos1_4;

	// manually doing something that a compiler should handle sucks
	// coding like this is hard to read
	float tmp2;
	new_v[5] = (new_v[11] = (new_v[13] = (new_v[15] = p[


// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build linux
// +build mips64 mips64le

//
// System calls and other sys.stuff for mips64, Linux
//

#include "go_asm.h"
#include "go_tls.h"
#include "textflag.h"

#define AT_FDCWD -100

#define SYS_exit		5058
#define SYS_read		5000
#define SYS_write		5001
#define SYS_close		5003
#define SYS_getpid		5038
#define SYS_kill		5060
#define SYS_fcntl		5070
#define SYS_mmap		5009
#define SYS_munmap		5011
#define SYS_setitimer		5036
#define SYS_clone		5055
#define SYS_nanosleep		5034
#define SYS_sched_yield		5023
#define SYS_rt_sigreturn	5211
#define SYS_rt_sigaction	5013
#define SYS_rt_sigprocmask	5014
#define SYS_sigaltstack		5129
#define SYS_madvise		5027
#define SYS_mincore		5026
#define SYS_gettid		5178
#define SYS_futex		5194
#define SYS_sched_getaffinity	5196
#define SYS_exit_group		5205
#define SYS_epoll_create	5207
#define SYS_epoll_ctl		5208
#define SYS_tgkill		5225
#define SYS_openat		5247
#define SYS_epoll_pwait		5272
#define SYS_clock_gettime	5222
#define SYS_epoll_create1	5285
#define SYS_brk			5012
#define SYS_pipe2		5287

TEXT runtime·exit(SB),NOSPLIT|NOFRAME,$0-4
	MOVW	code+0(FP), R4
	MOVV	$SYS_exit_group, R2
	SYSCALL
	RET

// func exitThread(wait *uint32)
TEXT runtime·exitThread(SB),NOSPLIT|NOFRAME,$0-8
	MOVV	wait+0(FP), R1
	// We're done using the stack.
	MOVW	$0, R2
	SYNC
	MOVW	R2, (R1)
	SYNC
	MOVW	$0, R4	// exit code
	MOVV	$SYS_exit, R2
	SYSCALL
	JMP	0(PC)

TEXT runtime·open(SB),NOSPLIT|NOFRAME,$0-20
	// This uses openat instead of open, because Android O blocks open.
	MOVW	$AT_FDCWD, R4 // AT_FDCWD, so this acts like open
	MOVV	name+0(FP), R5
	MOVW	mode+8(FP), R6
	MOVW	perm+12(FP), R7
	MOVV	$SYS_openat, R2
	SYSCALL
	BEQ	R7, 2(PC)
	MOVW	$-1, R2
	MOVW	R2, ret+16(FP)
	RET

TEXT runtime·closefd(SB),NOSPLIT|NOFRAME,$0-12
	MOVW	fd+0(FP), R4
	MOVV	$SYS_c


            "::",
            stringify!(lctrl)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TCOD_key_t>())).lmeta as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(TCOD_key_t),
            "::",
            stringify!(lmeta)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TCOD_key_t>())).ralt as *const _ as usize },
        41usize,
        concat!(
            "Offset of field: ",
            stringify!(TCOD_key_t),
            "::",
            stringify!(ralt)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TCOD_key_t>())).rctrl as *const _ as usize },
        42usize,
        concat!(
            "Offset of field: ",
            stringify!(TCOD_key_t),
            "::",
            stringify!(rctrl)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TCOD_key_t>())).rmeta as *const _ as usize },
        43usize,
        concat!(
            "Offset of field: ",
            stringify!(TCOD_key_t),
            "::",
            stringify!(rmeta)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TCOD_key_t>())).shift as *const _ as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(TCOD_key_t),
            "::",
            stringify!(shift)
        )
    );
}
impl Default for TCOD_key_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum TCOD_chars_t {
    TCOD_CHAR_HLINE = 196,
    TCOD_CHAR_VLINE = 179,
    TCOD_CHAR_NE = 191,
    TCOD_CHAR_NW = 218,
    TCOD_CHAR_SE = 217,
    TCOD_CHAR_SW = 192,
    TCOD_CHAR_TEEW = 180,
    TCOD_CHAR_TEEE = 195,
    TCOD_CHAR_TEEN = 193,
    TCOD_CHAR_TEES = 194,
    TCOD_CHAR_CROSS = 197,
    TCOD_CHAR_DHLINE = 205,
    TCOD_CHAR_DVLINE = 186,
    TCOD_CHAR_DNE = 187,
    TCOD_CHAR_DNW = 201,
    TCOD_CHAR_DSE = 188,
    TCOD_CHAR_DSW = 200,
    TCOD_CHAR_DTEEW = 185,
    TCOD_CHAR_DTEEE = 204,
    TCOD_CHAR_DTEEN = 202,
    TCOD_CHAR_DTEES = 203,
    TCOD_CHAR_DCROSS = 206,
    TCOD_CHAR_BLOCK1 = 176,
    TCOD_CHAR_BLOCK2 = 177,
    TCOD_CHAR_BLOCK3 = 178,
    TCOD_CHAR_ARROW_N = 24,
    TCOD_CHAR_ARROW_S = 25,
    TCOD_CHAR_ARROW_E = 26,
    TCOD_CHAR_ARROW_W = 27,
    TCOD_CHAR_ARROW2_N = 30,
    TCOD_CHAR_ARROW2_S = 31,


 일상생활에서 흔히 쓰이는 수준의 유행어.
    * **예시:** (한국어) '레알' -> (베트남어) 「thật sự」 (텃 스, '정말로') 또는 「chuẩn rồi」 (쭈언 로이, '정확해') / (한국어) '인정?' -> (베트남어) 「chuẩn không cần chỉnh?」 (쭈언 콩 껀 찡?, '고칠 필요 없이 완벽해?') / 「đỉnh của chóp」 (딩 꾸어 촙, '정점 중의 정점')

* **6.3. 소셜 미디어:**
    * **사용 여부:** 가장 적극적으로 밈과 유행어를 활용. 짧고 강렬한 메시지 전달, 젊은 세대와의 소통에 최적화.
    * **주의사항:** 최신 밈/유행어의 빠른 변화를 지속적으로 파악하고 적용. 특정 커뮤니티에서만 통용되는 밈은 지양. **(특히 정치적, 사회적으로 민감한 밈은 절대 사용 금지. 베트남 인터넷 환경의 특성을 고려하여 불필요한 논란이 발생하지 않도록 주의해야 합니다.)**
    * **선택 기준:** 실시간 트렌드, 플랫폼 특성, 타겟 팔로워의 연령층에 맞는 밈/유행어.
    * **예시:** (한국어) 'TMI' -> (베트남어) 「TMI」 (TMI 자체 사용) 또는 「bí mật」 (비멋, '비밀') / (한국어) '좋아요 누르러 갑니다' -> (베트남어) 「nhấn like đi!」 (년 라이 디!, '좋아요 눌러!') / 「cười chết」 (끄어이 쩻, '개웃겨')

## 7. 감정 및 정서 표현 강화 가이드라인 (베트남 시장 최적화)

베트남어는 어조(성조)를 통해 의미와 감정을 풍부하게 전달할 수 있는 �


},
        .#{$abbrev}x#{$infix}-#{$size} {
          #{$prop}-left: $length !important;
        }
      }
    }

    // Some special margin utils
    .m#{$infix}-auto { margin: auto !important; }
    .mt#{$infix}-auto,
    .my#{$infix}-auto {
      margin-top: auto !important;
    }
    .mr#{$infix}-auto,
    .mx#{$infix}-auto {
      margin-right: auto !important;
    }
    .mb#{$infix}-auto,
    .my#{$infix}-auto {
      margin-bottom: auto !important;
    }
    .ml#{$infix}-auto,
    .mx#{$infix}-auto {
      margin-left: auto !important;
    }
  }
}
@charset "UTF-8";/*!
 * Bootstrap v5.1.1 (https://getbootstrap.com/)
 * Copyright 2011-2021 The Bootstrap Authors
 * Copyright 2011-2021 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
 */:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-body-color-rgb:33,37,41;--bs-body-bg-rgb:255,255,255;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;fo


.fromEnvironment { region = "us-east-1" }.use { ddb ->
        val response = ddb.createTable(request)
        ddb.waitUntilTableExists {
            // suspend call
            tableName = tableNameVal
        }
        println("The table was successfully created ${response.tableDescription?.tableArn}")
    }
}
// snippet-end:[dynamodb.kotlin.scenario.create_table.main]

// snippet-start:[dynamodb.kotlin.scenario.populate_table.main]
// Load data into the table.
suspend fun loadData(
    tableName: String,
    fileName: String,
) {
    val parser = JsonFactory().createParser(File(fileName))
    val rootNode = ObjectMapper().readTree<JsonNode>(parser)
    val iter: Iterator<JsonNode> = rootNode.iterator()
    var currentNode: ObjectNode

    var t = 0
    while (iter.hasNext()) {
        if (t == 50) {
            break
        }

        currentNode = iter.next() as ObjectNode
        val year = currentNode.path("year").asInt()
        val title = currentNode.path("title").asText()
        val info = currentNode.path("info").toString()
        putMovie(tableName, year, title, info)
        t++
    }
}

suspend fun putMovie(
    tableNameVal: String,
    year: Int,
    title: String,
    info: String,
) {
    val itemValues = mutableMapOf<String, AttributeValue>()
    val strVal = year.toString()
    // Add all content to the table.
    itemValues["year"] = AttributeValue.N(strVal)
    itemValues["title"] = AttributeValue.S(title)
    itemValues["info"] = AttributeValue.S(info)

    val request =
        PutItemRequest {
            tableName = tableNameVal
            item = itemValues
        }

    DynamoDbClient.fromEnvironment { region = "us-east-1" }.use { ddb ->
        ddb.putItem(request)
        println("Added $title to the Movie table.")
    }
}
// snippet-end:[dynamodb.kotlin.scenario.populate_table.main]

// snippet-start:[dynamodb.kotlin.scenario.get_item.main]
suspend fun getMovie(
    tableNameVal: String,
    keyName: String,
    keyVal: String,
) {
    val keyToGet = mutableMapOf<String, AttributeValue>()
    keyToGet[keyName] = AttributeValue.N(keyVal)
    keyToGet["title"] = AttributeValue.S("King Kong")

    val request =
        GetItemRequest {
            key = keyToGet
            tableName = tableNameVal
        }

    DynamoDbClient.fromEnvironment { region = "us-east-1" }.use { ddb ->
        val returnedItem = ddb.getItem(request)
        val numbersMap = returnedItem.item
        numbersMap?.forEach { key1 ->
            println(key1.key)
            println(key1.value)
        }
    }
}
// snippet-end:[dynamodb.kotlin.scenario.get_item.main]

suspend fun deletIssuesTable(tableNameVal: String) {
    val request =
        DeleteTableRequest {
            tableName = tableNameVal
        }

    DynamoDbClient.fromEnvironment { region = "us-east-1" }.use { ddb ->
        ddb.deleteTable(request)
        println("$tableNameVal was deleted")
    }
}

suspend fun queryMovieTable(
    tableNameVal: String,
    partitionKeyName: String,
    partitionAlias: String,
): Int {
    val attrNameAlias = mutableMapOf<String, String>()
    attrNameAlias[partitionAlias] = "year"

    // Set up mapping of the partition name with the value.
    val attrValues = mutableMapOf<String, AttributeValue>()
    attrValues[":$partitionKeyName"] = AttributeValue.N("2013")

    val request =
        QueryRequest {
            tableName = tableNameVal
            keyConditionExpression = "$pa


max_stream_id = progress.get("max_stream_id_exclusive")

            if not target_min_stream_id or not max_stream_id:
                txn.execute("SELECT COALESCE(MIN(stream_ordering), 0) FROM events")
                rows = txn.fetchall()
                target_min_stream_id = rows[0][0]

                txn.execute("SELECT COALESCE(MAX(stream_ordering), 0) FROM events")
                rows = txn.fetchall()
                max_stream_id = rows[0][0]

            min_stream_id = max_stream_id - batch_size

            sql = """
                DELETE FROM event_auth
                WHERE event_id IN (
                    SELECT event_id FROM events
                    LEFT JOIN state_events AS se USING (room_id, event_id)
                    WHERE ? <= stream_ordering AND stream_ordering < ?
                        AND se.state_key IS null
                )
            """

            txn.execute(sql, (min_stream_id, max_stream_id))

            new_progress = {
                "target_min_stream_id_inclusive": target_min_stream_id,
                "max_stream_id_exclusive": min_stream_id,
            }

            self.db_pool.updates._background_update_progress_txn(
                txn, self.EVENT_AUTH_STATE_ONLY, new_progress
            )

            return min_stream_id >= target_min_stream_id

        result = await self.db_pool.runInteraction(
            self.EVENT_AUTH_STATE_ONLY, delete_event_auth
        )

        if not result:
            await self.db_pool.updates._end_background_update(
                self.EVENT_AUTH_STATE_ONLY
            )

        return batch_size

def _materialize(
    origin_chain_id: int,
    origin_sequence_number: int,
    links: Dict[int, List[Tuple[int, int, int]]],
    materialized: Dict[int, int],
) -> None:
    """Helper function for fetching auth chain links. For a given origin chain
    ID / sequence number and a dictionary of links, updates the materialized
    dict with the reachable chains.

    To get a dict of all chains reachable from a set of chains this function can
    be called in a loop, once per origin chain with the same links and
    materialized args. The materialized dict will the result.

    Args:
        origin_chain_id, origin_sequence_number
        links: map of the links between chains as a dict from origin chain ID
            to list of 3-tuples of origin sequence number, target chain ID and
            target sequence number.
        materialized: dict to update with new reachability information, as a
            map from chain ID to max sequence number reachable.
    """

    # Do a standard graph traversal.
    stack = [(origin_chain_id, origin_sequence_number)]

    while stack:
        c, s = stack.pop()

        chain_links = links.get(c, [])
        for (
            sequence_number,
            target_chain_id,
            target_sequence_number,
        ) in chain_links:
            # Ignore any links that are higher up the chain
            if sequence_number > s:
                continue

            # Check if we have already visited the target chain before, if so we
            # can skip it.
            if materialized.get(target_chain_id, 0) < target_sequence_number:
                stack.append((target_chain_id, target_sequence_number))
                materialized[target_chain_id] = target_sequence_number


'''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GLES2 import _types as _cs
# End users want this...
from OpenGL.raw.GLES2._types import *
from OpenGL.raw.GLES2 import _errors
from OpenGL.constant import Constant as _C

import ctypes
_EXTENSION_NAME = 'GLES2_EXT_geometry_point_size'
def _f( function ):
    return _p.createFunction( function,_p.PLATFORM.GLES2,'GLES2_EXT_geometry_point_size',error_checker=_errors._error_checker)


endered h6 {
  color: light-dark(rgb(33, 34, 44), rgb(248, 248, 242));
  font-family:
    "Fira Sans",
    sans-serif,
    ui-sans-serif,
    -apple-system,
    "system-ui",
    system-ui,
    "Segoe UI",
    Roboto,
    Inter,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    sans-serif;
  text-shadow: none;
}
body .search-results {
  background-color: light-dark(rgb(243, 244, 246), rgb(33, 33, 44));
  border: 1px solid rgba(0, 0, 0, 0);
  border-radius: 12px;
  box-shadow:
    rgba(0, 0, 0, 0.07) 0px 1.8px 7.3px 0px,
    rgba(0, 0, 0, 0.114) 0px 6.3px 24.7px 0px,
    rgba(0, 0, 0, 0.2) 0px 30px 90px 0px;
}
body .search-results .suggestion-item {
  color: light-dark(rgb(33, 34, 44), rgb(248, 248, 242));
}
body .search-results .suggestion-item.is-selected {
  background-color: light-dark(
    rgba(0, 0, 0, 0.067),
    rgba(255, 255, 255, 0.067)
  );
  color: light-dark(rgb(33, 34, 44), rgb(248, 248, 242));
  font-weight: 400;
}
body .search-results > * {
  background-color: rgba(0, 0, 0, 0);
  color: light-dark(rgb(33, 34, 44), rgb(248, 248, 242));
  cursor: auto;
  filter: none;
  font-family:
    "Fira Sans",
    sans-serif,
    ui-sans-serif,
    -apple-system,
    "system-ui",
    system-ui,
    "Segoe UI",
    Roboto,
    Inter,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    sans-serif;
  font-weight: 400;
  outline: rgb(248, 248, 242) none 0px;
  text-decoration: none solid rgb(248, 248, 242);
  text-decoration-color: rgb(248, 248, 242);
  text-decoration-line: none;
  text-decoration-style: solid;
  text-decoration-thickness: auto;
  transition: all;
  user-select: text;
}
body .site-body-left-column input.search-bar {
  background-color: light-dark(rgb(223, 223, 231), rgb(20, 20, 26));
  border: 1px solid rgba(0, 0, 0, 0);
  border-color: rgba(0, 0, 0, 0);
  border-radius: 5px;
  color: light-dark(rgb(33, 34, 44), rgb(248, 248, 242));
  font-family:
    "Fira Sans",
    sans-serif,
    ui-sans-serif,
    -apple-system,
    "system-ui",
    system-ui,
    "Segoe UI",
    Roboto,
    Inter,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    sans-serif;
}
body .suggestion-item.is-selected {
  background-color: light-dark(
    rgba(0, 0, 0, 0.067),
    rgba(255, 255, 255, 0.067)
  );
  border-radius: 4px;
  color: light-dark(rgb(33, 34, 44), rgb(248, 248, 242));
}
body :not(pre) > code[class*="language-"],
body pre[class*="language-"] {
  background-color: light-dark(rgb(252, 252, 253), rgb(


00, 0)  }),
    '33':new upgrade({id:33, cost:900e3, name:"Mayor Day", desc: "Parades generate +4 SPS for every other parade.", fn:gen_upgradetype1(4, 4, 0)  }),
    '34':new upgrade({id:34, cost:100e6, name:"Celestia Day", desc: "Parades generate +40 SPS for every other parade.", fn:gen_upgradetype1(4, 40, 0)  }),
    '35':new upgrade({id:35, cost:2e9, name:"Parade Day", desc: "Parades generate +400 SPS for every other parade.", fn:gen_upgradetype1(4, 400, 0)  }),
    '36':new upgrade({id:36, cost:40e9, name:"Night Day ...?", desc: "Parades generate +4000 SPS for every other parade.", fn:gen_upgradetype1(4, 4000, 0)  }),
    '37':new upgrade({id:37, cost:850e9, name:"Day Day ???", desc: "Parades generate +40000 SPS for every other parade.", fn:gen_upgradetype1(4, 40000, 0)  }),
    '38':new upgrade({id:38, cost:1e6, name:"Canon In D Major", desc: "Concerts generate +8 SPS for every other concert.", fn:gen_upgradetype1(5, 8, 0) , flavor: "It follows you everywhere. There is no escape." }),
    '39':new upgrade({id:39, cost:100e6, name:"Four Seasons", desc: "Concerts generate +80 SPS for every other concert.", fn:gen_upgradetype1(5, 80, 0)  }),
    '40':new upgrade({id:40, cost:1.75e9, name:"The Nutcracker", desc: "Concerts generate +800 SPS for every other concert.", fn:gen_upgradetype1(5, 800, 0)  }),
    '41':new upgrade({id:41, cost:80e9, name:"Beethooven's Ninth", desc: "Concerts generate +8000 SPS for every other concert.", fn:gen_upgradetype1(5, 8000, 0)  }),
    '42':new upgrade({id:42, cost:1e12, name:"Requiem In D Minor", desc: "Concerts generate +80000 SPS for every other concert.", fn:gen_upgradetype1(5, 80000, 0)  }),
    '43':new upgrade({id:43, cost:1.5e9, name:"Festive Festivities", desc: "Festivals generate twice as many smiles.", fn:gen_upgradetype1(6, 0, 1.0)  }),
    '44':new upgrade({id:44, cost:15e9, name:"Flower Festival", desc: "Festivals smile generation doubled, again.", fn:gen_upgradetype1(6, 0, 1.0)  }),
    //'45':new upgrade({id:45, cost:150e9, name:"Upgrade 6", desc: "Festivals smile generation doubled, again.", fn:gen_upgradetype1(6, 0, 1.0)  }),
    //'46':new upgrade({id:46, cost:1.5e12, name:"Upgrade 6", desc: "Festivals smile generation doubled, again.", fn:gen_upgradetype1(6, 0, 1.0)  }),
    //'47':new upgrade({id:47, cost:15e12, name:"Upgrade 6", desc: "Festivals smile generation doubled, again.", fn:gen_upgradetype1(6, 0, 1.0)  }),
    '48':new upgrade({id:48, cost:8e6, name:"DJ Pon-3", desc: "Raves generate +32 SPS for every other rave.", fn:gen_upgradetype1(7, 32, 0)  }),
    '49':new upgrade({id:49, cost:800e6, name:"Glaze", desc: "Raves generate +320 SPS for every other rave.", fn:gen_upgradetype1(7, 320, 0)  }),
    '50':new upgrade({id:50, cost:11e9, name:"Glowsticks", de


 1);
				imgGraphics.drawLine(x2, y1 + 1, x2, y1 + 1);
				imgGraphics.drawLine(x2, y1 + t.height - 1, x2, y1 + t.height - 1);
				break;
		}

		// draw Grip
		if(t.height < 13) return;

		if(scrollbar.getOrientation() == JScrollBar.VERTICAL) {
			y1 = (t.height) / 2 - 4;
			y2 = Math.min(y1 + 8, t.height - 3);
			x1 = t.width / 4 + 1;
			x2 = t.width - t.width / 4 - 2;
			int y = y1 + 1;
			// we take only saturation & brightness and apply them
			// to the background color (normal/rollover/pressed)
			imgGraphics.setColor(ColorRoutines.getAdjustedColor(c,
				Theme.scrollGripLightColor.getSaturation(),
				Theme.scrollGripLightColor.getBrightness()));

			while(y < y2) {
				imgGraphics.drawLine(x1, y, x2, y);
				y += 2;
			}

			y = y1;
			x1 = t.width / 4 + 2;
			x2 = t.width - t.width / 4 - 1;
			imgGraphics.setColor(ColorRoutines.getAdjustedColor(c,
				Theme.scrollGripDarkColor.getSaturation(),
				Theme.scrollGripDarkColor.getBrightness()));

			while(y < y2) {
				imgGraphics.drawLine(x1, y, x2, y);
				y += 2;
			}
		}
		else {	// HORIZONTAL
			x1 = (t.width) / 2 - 4;
			x2 = Math.min(x1 + 8, t.width - 3);
			y1 = t.height / 4 + 1;
			y2 = t.height - t.height / 4 - 2;
			int x = x1 + 1;
			// we take only saturation & brightness and apply them
			// to the background color (normal/rollover/pressed)
			imgGraphics.setColor(ColorRoutines.getAdjustedColor(c,
				Theme.scrollGripLightColor.getSaturation(),
				Theme.scrollGripLightColor.getBrightness()));

			while(x < x2) {
				imgGraphics.drawLine(x, y1, x, y2);
				x += 2;
			}

			x = x1;
			y1 = t.height / 4 + 2;
			y2 = t.height - t.height / 4 - 1;
			imgGraphics.setColor(ColorRoutines.getAdjustedColor(c,
				Theme.scrollGripDarkColor.getSaturation(),
				Theme.scrollGripDarkColor.getBrightness()));

			while(x < x2) {
				imgGraphics.drawLine(x, y1, x, y2);
				x += 2;
			}
		}

//		int x1 = 0;
//		int y1 = 0;
//		int x2 = t.width - 1;
//		int y2 = t.height - 1;
//
//		int spread1 = Theme.scrollSpreadLight.getValue();
//		int spread2 = Theme.scrollSpreadDark.getValue();
//
//		int h = 15;
//		float spreadStep1 = 10.0f * spread1 / 10;
//		float spreadStep2 = 10.0f * spread2 / 10;
//		int halfY = h / 2;
//		int yd;
//
//		if(scrollbar.getOrientation() == JScrollBar.VERTICAL) {
//			for(int y = 1; y < h; y++) {
//				if(y < halfY) {
//					yd = halfY - y;
//					imgGraphics.setColor(ColorRoutines.lighten(c, (int)(yd * spreadStep1)));
//				}
//				else if(y == halfY) {
//


/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/init.h>
#include <linux/linkage.h>

#include <asm/assembler.h>
#include <asm/asm-offsets.h>
#include <asm/errno.h>
#include <asm/thread_info.h>
#include <asm/uaccess-asm.h>
#include <asm/v7m.h>

@ Bad Abort numbers
@ -----------------
@
#define BAD_PREFETCH	0
#define BAD_DATA	1
#define BAD_ADDREXCPTN	2
#define BAD_IRQ		3
#define BAD_UNDEFINSTR	4

@
@ Most of the stack format comes from struct pt_regs, but with
@ the addition of 8 bytes for storing syscall args 5 and 6.
@ This _must_ remain a multiple of 8 for EABI.
@
#define S_OFF		8

/*
 * The SWI code relies on the fact that R0 is at the bottom of the stack
 * (due to slow/fast restore user regs).
 */
#if S_R0 != 0
#error "Please fix"
#endif

	.macro	zero_fp
#ifdef CONFIG_FRAME_POINTER
	mov	fp, #0
#endif
	.endm

#ifdef CONFIG_ALIGNMENT_TRAP
#define ATRAP(x...) x
#else
#define ATRAP(x...)
#endif

	.macro	alignment_trap, rtmp1, rtmp2, label
#ifdef CONFIG_ALIGNMENT_TRAP
	mrc	p15, 0, \rtmp2, c1, c0, 0
	ldr_va	\rtmp1, \label
	teq	\rtmp1, \rtmp2
	mcrne	p15, 0, \rtmp1, c1, c0, 0
#endif
	.endm

#ifdef CONFIG_CPU_V7M
/*
 * ARMv7-M exception entry/exit macros.
 *
 * xPSR, ReturnAddress(), LR (R14), R12, R3, R2, R1, and R0 are
 * automatically saved on the current stack (32 words) before
 * switching to the exception stack (SP_main).
 *
 * If exception is taken while in user mode, SP_main is
 * empty. Otherwise, SP_main is aligned to 64 bit automatically
 * (CCR.STKALIGN set).
 *
 * Linux assumes that the interrupts are disabled when entering an
 * exception handler and it may BUG if this is not the case. Interrupts
 * are disabled during entry and reenabled in the exit macro.
 *
 * v7m_exception_slow_exit is used when returning from SVC or PendSV.
 * When returning to kernel mode, we don't return from exception.
 */
	.macro	v7m_exception_entry
	@ determine the location of the registers saved by the core during
	@ exception entry. Depending on the mode the cpu was in when the
	@ exception happend that is either on the main or the process stack.
	@ Bit 2 of EXC_RETURN stored in the lr register specifies which stack
	@ was used.
	tst	lr, #EXC_RET_STACK_MASK
	mrsne	r12, psp
	moveq	r12, sp

	@ we cannot rely on r0-r3 and r12 matching the value saved in the
	@ exception frame because of tail-chaining. So these have to be
	@ reloaded.
	ldmia	r12!, {r0-r3}

	@ Linux expects to have irqs off. Do it here before taking stack space
	cpsid	i

	sub	sp, #PT_REGS_SIZE-S_IP


TTER A (RI) ÷ [0.3]
× 1100 × 0020 ÷ 1F1E6 ÷	#  × [0.3] HANGUL CHOSEONG KIYEOK (JL) × [7.01] SPACE (SP) ÷ [18.0] REGIONAL INDICATOR SYMBOL LETTER A (RI) ÷ [0.3]
× 1100 × 0308 ÷ 1F1E6 ÷	#  × [0.3] HANGUL CHOSEONG KIYEOK (JL) × [9.0] COMBINING DIAERESIS (CM1_CM) ÷ [999.0] REGIONAL INDICATOR SYMBOL LETTER A (RI) ÷ [0.3]
× 1100 × 0308 × 0020 ÷ 1F1E6 ÷	#  × [0.3] HANGUL CHOSEONG KIYEOK (JL) × [9.0] COMBINING DIAERESIS (CM1_CM) × [7.01] SPACE (SP) ÷ [18.0] REGIONAL INDICATOR SYMBOL LETTER A (RI) ÷ [0.3]
× 1100 ÷ 261D ÷	#  × [0.3] HANGUL CHOSEONG KIYEOK (JL) ÷ [999.0] WHITE UP POINTING INDEX (EB) ÷ [0.3]
× 1100 × 0020 ÷ 261D ÷	#  × [0.3] HANGUL CHOSEONG KIYEOK (JL) × [7.01] SPACE (SP) ÷ [18.0] WHITE UP POINTING INDEX (EB) ÷ [0.3]
× 1100 × 0308 ÷ 261D ÷	#  × [0.3] HANGUL CHOSEONG KIYEOK (JL) × [9.0] COMBINING DIAERESIS (CM1_CM) ÷ [999.0] WHITE UP POINTING INDEX (EB) ÷ [0.3]
× 1100 × 0308 × 0020 ÷ 261D ÷	#  × [0.3] HANGUL CHOSEONG KIYEOK (JL) × [9.0] COMBINING DIAERESIS (CM1_CM) × [7.01] SPACE (SP) ÷ [18.0] WHITE UP POINTING INDEX (EB) ÷ [0.3]
× 1100 ÷ 1F3FB ÷	#  × [0.3] HANGUL CHOSEONG KIYEOK (JL) ÷ [999.0] EMOJI MODIFIER FITZPATRICK TYPE-1-2 (EM) ÷ [0.3]
× 1100 × 0020 ÷ 1F3FB ÷	#  × [0.3] HANGUL CHOSEONG KIYEOK (JL) × [7.01] SPACE (SP) ÷ [18.0] EMOJI MODIFIER FITZPATRICK TYPE-1-2 (EM) ÷ [0.3]
× 1100 × 0308 ÷ 1F3FB ÷	#  × [0.3] HANGUL CHOSEONG KIYEOK (JL) × [9.0] COMBINING DIAERESIS (CM1_CM) ÷ [999.0] EMOJI MODIFIER FITZPATRICK TYPE-1-2 (EM) ÷ [0.3]
× 1100 × 0308 × 0020 ÷ 1F3FB ÷	#  × [0.3] HANGUL CHOSEONG KIYEOK (JL) × [9.0] COMBINING DIAERESIS (CM1_CM) × [7.01] SPACE (SP) ÷ [18.0] EMOJI MODIFIER FITZPATRICK TYPE-1-2 (EM) ÷ [0.3]
× 1100 × 0029 ÷	#  × [0.3] HANGUL CHOSEONG KIYEOK (JL) × [13.02] RIGHT PARENTHESIS (CP_CP30) ÷ [0.3]
× 1100 × 0020 × 0029 ÷	#  × [0.3]


k corresponding to result
} t_disasm;

extern t_modrm   modrm16[256];         // 16-bit ModRM decodings
extern t_modrm   modrm32[256];         // 32-bit ModRM decodings without SIB
extern t_modrm   sib0[256];            // ModRM-SIB decodings with Mod=00
extern t_modrm   sib1[256];            // ModRM-SIB decodings with Mod=01
extern t_modrm   sib2[256];            // ModRM-SIB decodings with Mod=10

extern const t_bincmd bincmd[];        // List of 80x86 commands
extern t_chain   *cmdchain;            // Commands sorted by first CMDMASK bits

int              Preparedisasm(void);
void             Finishdisasm(void);

ulong            Disasm(uchar const *cmd,ulong cmdsize,ulong cmdip,
                   t_disasm *da,int cmdmode,t_config *cmdconfig,
                   int (*decodeaddress)(tchar *s,ulong addr));
tchar            *Geterrwarnmessage(ulong errors,ulong warnings);


ndex.html#Document-Index" rel="index" title="Document Index">
<link href="Document-Index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Stdlib.html#Stdlib" rel="up" title="Stdlib">
<link href="wcstombs.html#wcstombs" rel="next" title="wcstombs">
<link href="system.html#system" rel="prev" title="system">

Next: wcstombs, Previous: system, Up: Stdlib   [Contents][Index]

2.49 utoa—unsigned integer to string

Synopsis

#include <stdlib.h>
char *utoa(unsigned <var>value</var>, char *<var>str</var>, int <var>base</var>);
char *__utoa(unsigned <var>value</var>, char *<var>str</var>, int <var>base</var>);

Description

utoa converts the unsigned integer [<value>] to a null-terminated string
using the specified base, which must be between 2 and 36, inclusive.
<var>str</var> should be an array long enough to contain the converted
value, which in the worst case is sizeof(int)*8+1 bytes.

Returns

A pointer to the string, <var>str</var>, or NULL if <var>base</var> is invalid.


 copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
 * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package com.tencent.devops.repository.pojo.enums

enum class RedirectUrlTypeEnum(val type: String) {
    SPEC("spec"),
    DEFAULT("default");

    companion object {
        fun getRedirectUrlType(type: String): RedirectUrlTypeEnum {
            return when (type) {
                "spec" -> SPEC
                else -> DEFAULT
            }
        }
    }
}
/*
 * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
 *
 * Copyright (C) 2019 Tencent.  All rights reserved.
 *
 * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
 *
 * A copy of the MIT License is included in this file.
 *
 *
 * Terms of the MIT License:
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
 * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package com.tencent.devops.repository.pojo.enums

enum class RepoAuthType {
    SSH,
    HTTP,
    HTTPS,
    OAUTH;

    companion object {
        fun parse(type: String?): RepoAuthType {
            return when (type) {
                "SSH" -> SSH
                "HTTP" -> HTTP
                "HTTPS" -> HTTPS
                "OAUTH" -> OAUTH
                else -> SSH
            }
        }
    }
}
/*
 * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
 *
 * Copyright (C) 2019 Tencent.  All rights reserved.
 *
 * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
 *
 * A copy of the MIT License is included in this file.
 *
 *
 * Terms of the MIT License:
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the


;

    const point = oprf.hashToPoint(createRandString());
    const encoded = oprf.encodePoint(point, 'UTF-8');
    const decoded = oprf.decodePoint(encoded, 'UTF-8');

    expect(decoded).to.deep.equals(point);
  });
  it('UTF-8 Encode/Decode of Unaligned Buffers', async function () {
    const oprf = new OPRF();
    await oprf.ready;

    const randByte = Math.floor(Math.random() * Math.pow(2, 8));
    const evenBuffer = oprf.generateRandomScalar();
    const oddBuffer = new Uint8Array(Array.from(evenBuffer).concat([randByte]));

    expect(function () {
      oprf.encodePoint(oddBuffer, 'UTF-8');
    }).to.throw();
  });
it('UTF-8 Encoding/Decoding', async function () {
    const oprf = new OPRF();
    await oprf.ready;

    const point = oprf.hashToPoint(createRandString());
    const encoded = oprf.encodePoint(point, 'UTF-8');
    const decoded = oprf.decodePoint(encoded, 'UTF-8');

    expect(decoded).to.deep.equals(point);
  });

  it('Point Addition', async function () {
    const oprf = new OPRF();
    await oprf.ready;

    const r = oprf.generateRandomScalar();
    const k = oprf.generateRandomScalar();
    const correct = oprf.sodium.crypto_core_ristretto255_add(r, k);

    const result = oprf.addPoints(r, k);

    expect(result).to.deep.equals(correct);
    expect(oprf.subtractPoints(result, k)).to.deep.equals(r);
  });

  it('Point Subtraction', async function () {
    const oprf = new OPRF();
    await oprf.ready;

    const r = oprf.generateRandomScalar();
    const k = oprf.generateRandomScalar();
    const correct = oprf.sodium.crypto_core_ristretto255_sub(r, k);

    const result = oprf.subtractPoints(r, k);

    expect(result).to.deep.equals(correct);
    expect(oprf.addPoints(result, k)).to.deep.equals(r);
  });
});

describe('End-to-End', () => {
  it('Stress', async function () {
    const oprf = new OPRF();
    await oprf.ready;

    for (let i = 0; i < NUM_STRESS_TESTS; i++) {
      endToEnd(createRandString(), oprf);
    }
  });

  it('End-to-end on specified input, set scalar key, and known result', async function () {
    const oprf = new OPRF();
    await oprf.ready;

    const input = 'abcdefghijklmnopr';
    const key = oprf.sodium.from_hex('0a20a9b3c5f5b83a326f50a71e296c2c0161a2660b501e538fe88fb2e740dd3f');

    // OPRF
    const masked = oprf.maskInput(input);
    const salted = oprf.scalarMult(masked.point, key);
    const unmasked = oprf.unmaskPoint(salted, masked.mask);

    // scalar mult of input and key
    const hashedPoint = oprf.hashToPoint(input);
    const result = oprf.scalarMult(hashedPoint, key);

    const knownResult = oprf.sodium.from_hex('6a587ae064543aaa8b36127bcc4309d59aeb563045526cee4d90cbc145bccb47');


    --checkpoint /path/to/your/checkpoint
```

### Các stage training
1. `alignment` - Train alignment model (nhanh)
2. `pre_acoustic` - Pre-training acoustic
3. `acoustic` - Training acoustic chính
4. `pre_textual` - Pre-training textual
5. `textual` - Training textual chính
6. `joint` - Training kết hợp

## Export ONNX

```bash
cd stylish-tts/train
uv run stylish_train/train.py \
    --convert true \
    --model_config_path ../config/model.yml \
    --config_path /path/to/your/config.yml \
    --stage textual \
    --out_dir /path/to/your/output \
    --checkpoint /path/to/your/checkpoint
```

## Test ONNX Model

```bash
cd stylish-tts/train
uv run stylish_train/test_onnx.py \
    --onnx_path /path/to/your/output/stylish.onnx \
    --text "phonemes_text_here" \
    --combine true
```

## Lưu ý quan trọng

1. **Thời gian training**: Rất lâu, nên dùng `screen` hoặc `tmux`
2. **Dung lượng**: Checkpoint chiếm nhiều dung lượng
3. **VRAM**: Cần ít nhất 16GB, nhiều hơn thì tốt hơn
4. **Audio length**: 0.25s - 10s, phân bố đều các độ dài
5. **Phonemes**: Tối đa 510 phonemes mỗi segment

## Config cho tiếng Việt

Nếu train cho tiếng Việt, cần chỉnh `model.yml`:
- Thay đổi `symbol` section với phonemes tiếng Việt
- Cập nhật `text_encoder.tokens` = số lượng phoneme tokens

```yaml
text_encoder:
  tokens: 178  # số lượng phoneme tokens

symbol:
  pad: "$"
  punctuation: ";:,.!?¡¿—…\"()"" "
  letters: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
  letters_ipa: "ɑɐɒæɓʙβɔɕçɗɖðʤəɘɚɛɜɝɞɟʄɡɠɢʛɦɧħɥʜɨɪʝɭɬɫɮʟɱɯɰŋɳɲɴøɵɸθœɶʘɹɺɾɻʀʁɽʂʃʈʧʉʊʋⱱʌɣɤʍχʎʏʑʐʒʔʡʕʢǀǁᵊǃˈˌːˑʼʴʰʱʲʷˠˤ˞↓↑→↗↘'̩'ᵻ"
```

## Tips
- Bắt đầu với stage `alignment` trước
- Loại bỏ 10% alignment có confidence thấp nhất để model hội tụ nhanh hơn
- Kiểm tra validation loss và confidence trong quá trình training
- Backup checkpoint thường xuyên
## Enoncé de l'exercice : Création d'un Gestionnaire de Contacts

Vous devez créer une application de gestion de contacts en utilisant la programmation orientée objet (POO) en Python. Cette application doit permettre aux utilisateurs d'ajouter, afficher, mettre à jour et supprimer des contacts. Vous devez également utiliser des modules Python pour simplifier le code.

# Voici les spécifications de base de l'application :

- Créez une classe Contact qui représente un contact. Un contact doit avoir les attributs suivants : nom, prénom, numéro de téléphone et adresse e-mail.

- Utilisez un module Python pour stocker et gérer les contacts. Vous pouvez créer un module contact_manager.py où vous implémenterez une classe ContactManager. Cette classe doit avoir des méthodes pour ajouter, afficher, mettre à jour et supprimer des contacts.

- Dans votre programme principal, importez le module contact_manager.py et utilisez la classe ContactManager pour créer une application de gestion de contacts.


iFiIdentifier("SSID2", "58:6d:8f:fa:ae:c0"),
            WiFiSecurity.EMPTY,
            WiFiSignal(2442, 2442, wiFiWidth, -70),
            WiFiAdditional.EMPTY,
        )
    private val wiFiDetail3 =
        WiFiDetail(
            WiFiIdentifier("SSID3", "84:94:8c:9d:40:68"),
            WiFiSecurity.EMPTY,
            WiFiSignal(2452, 2452, wiFiWidth, -60),
            WiFiAdditional.EMPTY,
        )
    private val wiFiDetail4 =
        WiFiDetail(
            WiFiIdentifier("SSID3", "64:A4:8c:90:10:12"),
            WiFiSecurity.EMPTY,
            WiFiSignal(2452, 2452, wiFiWidth, -80),
            WiFiAdditional.EMPTY,
        )

    private val fixture = ChannelRating()

    @Test
    fun channelRating() {
        // setup
        val wiFiChannel: WiFiChannel = wiFiDetail1.wiFiSignal.centerWiFiChannel
        // execute & validate
        assertThat(fixture.count(wiFiChannel)).isEqualTo(0)
        assertThat(fixture.strength(wiFiChannel)).isEqualTo(Strength.ZERO)
    }

    @Test
    fun count() {
        // setup
        fixture.wiFiDetails(listOf(wiFiDetail1, wiFiDetail2, wiFiDetail3, wiFiDetail4))
        // execute and validate
        validateCount(2, wiFiDetail1.wiFiSignal.centerWiFiChannel)
        validateCount(4, wiFiDetail2.wiFiSignal.centerWiFiChannel)
        validateCount(3, wiFiDetail3.wiFiSignal.centerWiFiChannel)
    }

    @Test
    fun strengthShouldReturnMaximum() {
        // setup
        val other: WiFiDetail = makeCopy(wiFiDetail3)
        fixture.wiFiDetails(listOf(other, wiFiDetail3))
        val expected: Strength = wiFiDetail3.wiFiSignal.strength
        // execute
        val actual: Strength = fixture.strength(wiFiDetail3.wiFiSignal.centerWiFiChannel)
        // execute and validate
        assertThat(actual).isEqualTo(expected)
    }

    @Test
    fun strengthWithConnected() {
        // setup
        val other: WiFiDetail = makeCopy(wiFiDetail1)
        fixture.wiFiDetails(listOf(other, wiFiDetail1))
        val expected: Strength = other.wiFiSignal.strength
        // execute
        val actual: Strength = fixture.strength(wiFiDetail1.wiFiSignal.centerWiFiChannel)
        // execute and validate
        assertThat(actual).isEqualTo(expected)
    }

    @Test
    fun bestChannelsSortedInOrderWithMinimumChannelsUS() {
        // setup
        val wiFiBand = WiFiBand.GHZ2
        val channels: List<WiFiChannel> = wiFiBand.wiFiChannels.availableChannels(wiFiBand, Locale.US.country)
        fixture.wiFiDetails(listOf(wiFiDetail1, wiFiDetail2, wiFiDetail3, wiFiDetail4))
        // execute
        val actual: List<ChannelAPCount> = fixture.bestChannels(wiFiBand, channels)
        // validate
        assertThat(actual).hasSize(4)
        validateChannelAPCount(1, 0, actual[0])
        validateChannelAPCount(2, 0, actual[1])
        validateChannelAPCount(3, 1, actual[2])
        validateChannelAPCount(4, 1, actual[3])
    }

    @Test
    fun bestChannelsSortedInOrderWithMinimumChannelsJP() {
        // setup
        val wiFiBand = WiFiBand.GHZ2
        val channels: List<WiFiChannel> = wiFiBand.wiFiChannels.availableChannels(wiFiBand, Locale.JAPAN.country)
        fixture.wiFiDetails(listOf(wiFiDetail1, wiFiDetail2, wiFiDetail3, wiFiDetail4))
        // execute
        val actual: List<ChannelAPCount> = fixture.bestChanne


osionShape.LARGE_BALL
			hasTrail = true
			hasTwinkle = false
		}
	}

	jsonEncoder.encodeToString(fireworkExplosion) assertsIsJson """
		{
			"minecraft:firework_explosion": {
				"shape": "large_ball",
				"has_trail": true,
				"has_twinkle": false
			}
		}
	""".trimIndent()

	val fireworks = ItemStackSubPredicates().apply {
		fireworks {
			explosions {
				countElement(size = rangeOrInt(1), test = fireworkExplosion.matchers.first() as FireworkExplosionComponentMatcher)
			}
			flightDuration = rangeOrInt(1..2)
		}
	}

	jsonEncoder.encodeToString(fireworks) assertsIsJson """
		{
			"minecraft:fireworks": {
				"explosions": {
					"count": [
						{
							"count": 1,
							"test": {
								"shape": "large_ball",
								"has_trail": true,
								"has_twinkle": false
							}
						}
					]
				},
				"flight_duration": {
					"min": 1,
					"max": 2
				}
			}
		}
	""".trimIndent()

	val jukeboxPlayable = ItemStackSubPredicates().apply {
		jukeboxPlayable {
			songs(JukeboxSongs.OTHERSIDE, JukeboxSongs.CREATOR)
		}
	}

	jsonEncoder.encodeToString(jukeboxPlayable) assertsIsJson """
		{
			"minecraft:jukebox_playable": {
				"song": [
					"minecraft:otherside",
					"minecraft:creator"
				]
			}
		}
	""".trimIndent()

	val potionContents = ItemStackSubPredicates().apply {
		potionContents(Effects.HASTE, Effects.SPEED)
	}

	jsonEncoder.encodeToString(potionContents) assertsIsJson """
		{
			"minecraft:potion_contents": [
				"minecraft:haste",
				"minecraft:speed"
			]
		}
	""".trimIndent()

	val storedEnchantment = ItemStackSubPredicates().apply {
		storedEnchantments {
			enchantment(Enchantments.SHARPNESS, level = 3)
		}
	}

	jsonEncoder.encodeToString(storedEnchantment) assertsIsJson """
		{
			"minecraft:stored_enchantments": [
				{
					"enchantments": "minecraft:sharpness",
					"levels": 3
				}
			]
		}
	""".trimIndent()

	val trim = ItemStackSubPredicates().apply {
		trim {
			materials(TrimMaterials.IRON)
			patterns(TrimPatterns.WARD, TrimPatterns.HOST)
		}
	}

	jsonEncoder.encodeToString(trim) assertsIsJson """
		{
			"minecraft:trim": {
				"material": "minecraft:iron",
				"pattern": [
					"minecraft:ward",
					"minecraft:host"
				]
			}
		}
	""".trimIndent()

	val writableBookContent = ItemStackSubPredicates().apply {
		writableBookContent {
			pages {
				contains {
					add("Hello, world!")
				}
			}
		}
	}

	jsonEncoder.encodeToString(writableBookContent) assertsIsJson """
		{
			"minecraft:writable_book_content": {
				"pages": {
					"contains": [
						"Hello, world!"
					]
				}
			}
		}
	""".trimIndent()

	val writtenBookContent = ItemStackSubPredicates().apply {
		writtenBookContent {
			pages {
				contains {
					this += textComponent("Hello, world!")
				}
			}
			generation(1)
			resolved = true
		}
	}

	jsonEncoder.encodeToString(writtenBookContent) assertsIsJson """
		{
			"minecraft:written_book_content": {
				"pages": {
					"contains": [


ted override int _progressValue
        {
            get => ProgressBar.Value;
            set => ProgressBar.Value = value;
        }

        protected override bool _cancelEnabled
        {
            get => this.buttonCancel.Enabled;
            set => this.buttonCancel.Enabled = value;
        }

        public LegacyDialog2008()
        {
            InitializeComponent();

            this.buttonCancel.Text = Strings.Common_Cancel;

            ScaleWindow();
            SetupDialog();

            this.ProgressBar.RightToLeft = this.RightToLeft;
            this.ProgressBar.RightToLeftLayout = this.RightToLeftLayout;
        }

        private void LegacyDialog2008_Load(object sender, EventArgs e)
        {
            this.Activate();
        }
    }
}