.millis).milliseconds

    operator fun plus(other: Duration) = SimpleTimeMark(millis + other.inWholeMilliseconds)

    operator fun minus(other: Duration) = plus(-other)

    fun passedSince() = now() - this

    fun timeUntil() = -passedSince()

    fun isInPast() = timeUntil().isNegative()

    fun isInFuture() = timeUntil().isPositive()

    fun isFarPast() = millis == 0L

    fun isFarFuture() = millis == Long.MAX_VALUE

    fun isFarPastOrFuture() = isFarPast() || isFarFuture()

    fun takeIfInitialized() = if (isFarPastOrFuture()) null else this

    fun takeIfFuture() = if (isInFuture()) this else null

    override fun compareTo(other: SimpleTimeMark): Int = millis.compareTo(other.millis)

    override fun toString(): String =
        when (this) {
            farPast() -> "The Far Past"
            farFuture() -> "The Far Future"
            else -> Instant.ofEpochMilli(millis).toString()
        }

    fun toLocalDateTime(): LocalDateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(millis), ZoneId.systemDefault())

    fun toMillis() = millis

    fun elapsedMinutes() = passedSince().inWholeMinutes

    companion object {
        fun now() = SimpleTimeMark(System.currentTimeMillis())

        @JvmStatic
        @JvmName("farPast")
        fun farPast() = SimpleTimeMark(0)

        fun farFuture() = SimpleTimeMark(Long.MAX_VALUE)

        fun Duration.fromNow() = now() + this

        fun Long.asTimeMark() = SimpleTimeMark(this)
    }
}package at.raven.ravenAddons.data

import at.raven.ravenAddons.event.DebugDataCollectionEvent
import at.raven.ravenAddons.event.hypixel.HypixelGameSwitch
import at.raven.ravenAddons.event.hypixel.HypixelServerChangeEvent
import at.raven.ravenAddons.loadmodule.LoadModule
import net.hypixel.data.type.GameType
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent

enum class HypixelGame(val gameType: GameType) {
    THE_PIT(GameType.PIT),
    SKYBLOCK(GameType.SKYBLOCK),
    ;

    fun isPlaying(): Boolean = this == currentGame
    fun isNotPlaying(): Boolean = this != currentGame

    @LoadModule
    companion object {
        var currentGame: HypixelGame? = null
            private set

        inline val inSkyBlock: Boolean get() = SKYBLOCK.isPlaying()
        inline val inPit: Boolean get() = THE_PIT.isPlaying()

        fun isPlayingAny(games: Collection<HypixelGame>): Boolean {
            val current = currentGame ?: return false
            return current in games
        }
        fun isPlayingAny(vararg games: HypixelGame): Boolean {
            val current = currentGame ?: return false
            return current in games
        }

        fun isNotPlayingAny(games: Collection<HypixelGame>) = !isPlayingAny(games)
        fun isNotPlayingAny(vararg games: HypixelGame) = !isPlayingAny(*games)

        @SubscribeEvent(priority = EventPriority.HIGHEST)
        fun onHypixelData(event: HypixelServerChangeEvent) {
            val oldGame = currentGame
            currentGame = entries.find { it.gameType == event.serverType }
            if (oldGame == currentGame) return

            HypixelGameSwitch(oldGame, currentGame).post()
        }

        @SubscribeEvent
        fun onDebug(event: DebugDataCollectionEvent) {
            ev


/* Copyright (c) 2012-2025. The SimGrid Team.  All rights reserved.         */

/* This program is free software; you can redistribute it and/or modify it
 * under the terms of the license (GNU LGPL) which comes with this package. */

#ifndef _DHT_KADEMLIA_ROUTING_TABLE
#define _DHT_KADEMLIA_ROUTING_TABLE
#include "common.h"
#include <xbt/dynar.h>

/* Routing table bucket */
typedef struct s_bucket {
  xbt_dynar_t nodes; // Nodes in the bucket.
  unsigned int id;   // bucket id
} s_bucket_t;

typedef s_bucket_t* bucket_t;
typedef const s_bucket_t* const_bucket_t;

/* Node routing table */
typedef struct s_routing_table {
  unsigned int id;     // node id of the client's routing table
  s_bucket_t* buckets; // Node bucket list - 160 sized.
} s_routing_table_t;

typedef s_routing_table_t* routing_table_t;
typedef const s_routing_table_t* const_routing_table_t;

// bucket functions
unsigned int bucket_find_id(const_bucket_t bucket, unsigned int id);

// routing table functions
routing_table_t routing_table_init(unsigned int node_id);
void routing_table_free(routing_table_t table);
void routing_table_print(const_routing_table_t table);
bucket_t routing_table_find_bucket(const_routing_table_t table, unsigned int id);

#endif /* _DHT_KADEMLIA_ROUTING_TABLE */


(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.compute.v1.VpnTunnelCipherSuite) {
        return mergeFrom((com.google.cloud.compute.v1.VpnTunnelCipherSuite) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.compute.v1.VpnTunnelCipherSuite other) {
      if (other == com.google.cloud.compute.v1.VpnTunnelCipherSuite.getDefaultInstance())
        return this;
      if (other.hasPhase1()) {
        mergePhase1(other.getPhase1());
      }
      if (other.hasPhase2()) {
        mergePhase2(other.getPhase2());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 674312370:
              {
                input.readMessage(getPhase1FieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000001;
                break;
              } // case 674312370
            case 674312378:
              {
                input.readMessage(getPhase2FieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000002;
                break;
              } // case 674312378
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private com.google.cloud.compute.v1.VpnTunnelPhase1Algorithms phase1_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.compute.v1.VpnTunnelPhase1Algorithms,
            com.google.cloud.compute.v1.VpnTunnelPhase1Algorithms.Builder,
            com.google.cloud.compute.v1.VpnTunnelPhase1AlgorithmsOrBuilder>
        phase1Builder_;

    /**
     * optional .google.cloud.compute.v1.VpnTunnelPhase1Algorithms phase1 = 84289046;
     *
     * @return Whether the phase1 field is set.
     */
    public boolean hasPhase1() {
      return ((bitField0_ & 0x00000001) != 0);
    }

    /**
     * optional .google.cloud.compute.v1.VpnTunnelPhase1Algorithms phase1 = 84289046;
     *
     * @return The phase1.
     */
    public com.google.cloud.compute.v1.VpnTunnelPhase1Algorithms getPhase1() {
      if (phase1Builder_ == null) {
        return phase1_ == null
            ? com.google.cloud.compute.v1.VpnTunnelPhase1Algorithms.getDefaultInstance()
            : phase1


 "music/2019-12-09_-_Retro_Forest_-_David_Fesliyan.mp3",
    type: AUDIO_TYPES.BACKGROUND_MUSIC,
    options: {},
  },
  {
    key: AUDIO_KEYS.LEVEL_MUSIC,
    path: "music/SLOWEST-TEMPO2019-12-11_-_Retro_Platforming_-_David_Fesliyan.mp3",
    type: AUDIO_TYPES.BACKGROUND_MUSIC,
    options: {},
  },
  // Gameplay
  {
    key: AUDIO_KEYS.TILE_PLACE,
    path: "gameplay/cardPlace2.ogg",
    type: AUDIO_TYPES.SFX,
    options: {},
  },
  {
    key: AUDIO_KEYS.INVALID_MOVE,
    path: "gameplay/error_006.ogg",
    type: AUDIO_TYPES.SFX,
    options: {},
  },
  // Weapons
  {
    key: AUDIO_KEYS.WEAPON_HACK,
    path: "weapons/laserSmall_003.ogg",
    type: AUDIO_TYPES.SFX,
    options: {},
  },
  // Pickups
  {
    key: AUDIO_KEYS.TILE_PICKUP,
    path: "pickups/powerUp7.ogg",
    type: AUDIO_TYPES.SFX,
    options: {},
  },
  {
    key: AUDIO_KEYS.TILE_HIT,
    path: "pickups/impactWood_light_002.ogg",
    type: AUDIO_TYPES.SFX,
    options: {},
  },
  // Player
  {
    key: AUDIO_KEYS.PLAYER_MOVE,
    path: "player/cardShove2.ogg",
    type: AUDIO_TYPES.SFX,
    options: {},
  },
  // UI
  {
    key: AUDIO_KEYS.UI_TYPE,
    path: "ui/glass_006.ogg",
    type: AUDIO_TYPES.UI,
    options: {},
  },
  {
    key: AUDIO_KEYS.UI_CLICK,
    path: "ui/select_001.ogg",
    type: AUDIO_TYPES.UI,
    options: {},
  },
  {
    key: AUDIO_KEYS.UI_HOVER,
    path: "ui/drop_003.ogg",
    type: AUDIO_TYPES.UI,
    options: {},
  },
];

/**
 * Register the audio files to the given game using the AUDIO_KEYS enum values.
 * TODO(rex): Investigate Audiosprites
 */
function loadAudio(scene: Phaser.Scene) {
  scene.load.setPath("resources/audio/"); // set the initial path

  audioData.forEach((data) => {
    scene.load.audio(data.key, data.path);
  });

  scene.load.setPath(); // reset the path
}

/** Add the relevant audio files to a scene. */
function addAudio(scene: Phaser.Scene): { [key: string]: Phaser.Sound.BaseSound } {
  scene.load.setPath("resources/audio/"); // set the initial path

  const audioMap: { [key: string]: Phaser.Sound.BaseSound } = {};
  audioData.forEach((data) => {
    try {
      const sound = scene.sound.add(data.key, data.options);
      audioMap[data.key] = sound;
    } catch (err) {
      console.log(data);
      console.log(err);
    }
  });

  scene.load.setPath(); // reset the path

  return audioMap
}

export { installScenes, SCENE_NAME, AUDIO_KEYS, loadAudio, addAudio };
import * as s3 from '@aws-cdk/aws-s3';
import * as s3_assets from '@aws-cdk/aws-s3-assets';
import * as cdk from '@aws-cdk/core';

export abstract class Code {
  /**
   * @returns `LambdaS3Code` associated with the specified S3 object.
   * @param bucket The S3 bucket
   * @param key The object key
   * @param objectVersion Optional S3 object version
   */
  public static fromBucket(bucket: s3.IBucket, key: string, objectVersion?: string): S3Code {
    return new S3Code(bucket, key, objectVersion);
  }


4S+V/6rgDZx9UHHU8hVXe8knNQQIFl73b98EWD8C1/lXA6uMOS5jJTLTXDf2t2a5zUkvOdTEQt4=

	node tx.js BTC verifymessage 'Thanks Ayms this module is great!' 'Hw/PE+L4GW8C4S+V/6rgDZx9UHHU8hVXe8knNQQIFl73b98EWD8C1/lXA6uMOS5jJTLTXDf2t2a5zUkvOdTEQt4=' 18v29GccczH8nxPVm3zQ1xVaxV5Wh4Yz9v

	Signature verified - Public key 038c71760a4aac81afd4a314dc989c1a0621d28aac584992a26d1993709bdafddb

	node tx.js BTC verifymessage 'Thanks Ayms this module is great!' 'Hw/PE+L4GW8C4S+V/6rgDZx9UHHU8hVXe8knNQQIFl73b98EWD8C1/lXA6uMOS5jJTLTXDf2t2a5zUkvOdTEQt4=' 3NqxkcqbasHnTxQ6hHyMrJv5kC1D4o3jTC

	Signature verified - Public key 038c71760a4aac81afd4a314dc989c1a0621d28aac584992a26d1993709bdafddb

	node tx.js BTC verifymessage 'Thanks Ayms this module is great!' 'Hw/PE+L4GW8C4S+V/6rgDZx9UHHU8hVXe8knNQQIFl73b98EWD8C1/lXA6uMOS5jJTLTXDf2t2a5zUkvOdTEQt4=' bc1q2m87z4h0mwxdqjuetmgf95tdc9wmdqz7tg4540

	Signature verified - Public key 038c71760a4aac81afd4a314dc989c1a0621d28aac584992a26d1993709bdafddb

	node tx.js BCH verifymessage 'Thanks Ayms this module is great!' 'Hw/PE+L4GW8C4S+V/6rgDZx9UHHU8hVXe8knNQQIFl73b98EWD8C1/lXA6uMOS5jJTLTXDf2t2a5zUkvOdTEQt4=' qptvlc2kaldce5ztn90dpyk3dhq4md5qtc6jk64fjm

	Signature verified - Public key 038c71760a4aac81afd4a314dc989c1a0621d28aac584992a26d1993709bdafddb

	node tx.js ZEC verifymessage 'I am a signed Zcash message' 'IO5jX5/RhpIqbo52uOs1d9g0D5+Al4cpzyWyEitZYO24HFZbb6lI94k+X7LwhqmaEi6eorUzpDSG2JPArKTN1EU=' t1LF5Se66f3uRFPFLC86FSRBasbLqTbz86k

	Signature verified - Public key 0259a77bc3c5621b65e557a6cc83a45a8fc4a9aa5a8908ae8e9664f41cd345842f

## Notes for the devs

The module is not trivial, any slight change can cause everything not to work any longer and can become difficult to identify at a certain point of time, therefore it is advised to periodically test the latest example in the multisig test vectors while making changes (if this one passes it's unlikely that something is wrong). In addition serialize/deserialize is not symetrical then ``true`` must be used when not coming from a Tx constructor transaction, initially this was a mistake due to misreading of segwit specs, we decided to keep it like this because double checking


ion.accordion-multi-colored .card:nth-child(2) {
  background: #34B1AA;
}
.accordion.accordion-multi-colored .card:nth-child(3) {
  background: #F95F53;
}
.accordion.accordion-multi-colored .card:nth-child(4) {
  background: #ffaf00;
}
.accordion.accordion-multi-colored .card:nth-child(5) {
  background: #52CDFF;
}
.accordion.accordion-multi-colored .card .card-header a[aria-expanded=true] {
  color: inherit;
}
.accordion.accordion-multi-colored .card .card-header a[aria-expanded=true]:before {
  content: "\e648";
}
.accordion.accordion-multi-colored .card .card-header a[aria-expanded=false]:before {
  content: "\e64b";
}

/* Badges */
.badge {
  border-radius: 20px;
  font-size: 12px;
  line-height: 1;
  padding: 0.375rem 0.5625rem;
  font-weight: normal;
}
.badge.badge-pill {
  border-radius: 10rem;
}

/*Badge outlined variations*/
.badge-outline-primary {
  color: #1F3BB3;
  border: 1px solid #1F3BB3;
}

.badge-outline-secondary {
  color: #F1F1F1;
  border: 1px solid #F1F1F1;
}

.badge-outline-success {
  color: #34B1AA;
  border: 1px solid #34B1AA;
}

.badge-outline-info {
  color: #52CDFF;
  border: 1px solid #52CDFF;
}

.badge-outline-warning {
  color: #ffaf00;
  border: 1px solid #ffaf00;
}

.badge-outline-danger {
  color: #F95F53;
  border: 1px solid #F95F53;
}

.badge-outline-light {
  color: #fbfbfb;
  border: 1px solid #fbfbfb;
}

.badge-outline-dark {
  color: #1E283D;
  border: 1px solid #1E283D;
}

.badge-opacity-primary {
  background: #b6c1f2;
  color: #172d88;
}

.badge-opacity-secondary {
  background: white;
  color: #d8d8d8;
}

.badge-opacity-success {
  background: #cbf0ee;
  color: #288a84;
}

.badge-opacity-info {
  background: white;
  color: #1fbeff;
}

.badge-opacity-warning {
  background: #fff2d6;
  color: #cc8c00;
}

.badge-opacity-danger {
  background: white;
  color: #f73122;
}

.badge-opacity-light {
  background: white;
  color: #e2e2e2;
}

.badge-opacity-dark {
  background: #768cbb;
  color: #0d121b;
}

.badge-primary {
  color: #1F3BB3;
  border: 1px solid #1F3BB3;
}

.badge-secondary {
  color: #F1F1F1;
  border: 1px solid #F1F1F1;
}

.badge-success, .preview-list .preview-item .preview-thumbnail .badge.badge-online {
  color: #34B1AA;
  border: 1px solid #34B1AA;
}

.badge-info, .preview-list .pr


 if our morph has been detected
    CheckMorphDetected();

    return (quit);
  }

  //
  // RestoreMesh
  //
  void SpyIdle::RestoreMesh()
  {
#ifdef CHANGEMESH
    if (oldMesh)
    {
      ASSERT(newMesh)

      // Restore old mesh
      subject->SetMesh(oldMesh);

      // Update position of old mesh to match new
      subject->SetSimCurrent(newMesh->WorldMatrix());

      delete newMesh;
      oldMesh = newMesh = NULL;
    }
#endif
  }

  //
  // SetSpyingBig
  //
  void SpyIdle::SetSpyingBit(Bool state)
  {
    if (state)
    {
      target->SetSpyInside(subject->GetTeam()->GetId(), TRUE);
      hasSetSpying = TRUE;
    }
    else
    {
      if (target.Alive())
      {
        target->SetSpyInside(subject->GetTeam()->GetId(), FALSE);
      }
      hasSetSpying = FALSE;
    }
  }

  //
  // Ejected
  //
  void SpyIdle::Ejected()
  {
    // Clear the spy status in the target building
    if (hasSetSpying)
    {
      SetSpyingBit(FALSE);
    }

    // Unsteal Line of sight
    if (sightSrc && sightDst)
    {
      sightSrc->UngiveSightTo(sightDst->GetId());
    }

    sightSrc = NULL;
    sightDst = NULL;

    // Unsteal power
    if (powerSrc)
    {
      powerSrc->RemovePowerLeak(subject);
    }

    powerSrc = NULL;
  }

  //
  // Initial state
  //
  void SpyIdle::StateInit()
  {
  }

  //
  // Infiltrating
  //
  void SpyIdle::StateInfiltrate(StateMachineNotify notify)
  {
    switch (notify)
    {
      case SMN_ENTRY:
      {
        // Move to the object to infiltrate
        if (target.Alive())
        {
          FootPrint::Instance *footInst = target->GetFootInstance();
          Vector dst;

          if (footInst)
          {
            // Move to the closest point on the footprint
            Point<S32> pos(subject->GetCellX(), subject->GetCellZ());
            footInst->ClampToFringe(pos);
            dst.Set(WorldCtrl::CellToMetresX(pos.x), 0.0F, WorldCtrl::CellToMetresZ(pos.z));
          }
          else
          {
            // Move to the centre of the object
            dst = target->Position();
          }

          subject->Move(moveHandle, &dst, NULL, FALSE);
        }
        break;
      }

      case SMN_PROCESS:
      {
        if (!target.Alive())
        {
          NextState(0xABAA7B48); // "Init"
        }
        break;
      }
    }
  }

  //
  // Morphing
  //
  void SpyIdle::StateMorph()
  {
    if (target.Alive())
    {
      // Make it clandestine
      subject->SetFlag(UnitObj::FLAG_CLANDESTINE, TRUE);

      // Set our flag
      isMorphed = TRUE;

      // Setup the spy data
      subject->SetMorphTarget(target);

#ifdef CHANGEMESH

      // Current mesh
      MeshEnt *curMesh = &subject->Mesh();

      // If alreay morphed, delete the current mesh
      Bool delCur = oldMesh ? TRUE : FALSE;

      // Store original mesh
      if (!oldMesh)
      {
        oldMesh = curMesh;
      }

      // Create a new mesh
      newMesh = new MeshEnt(target->MapType()->GetMeshRoot());
      subject->SetMesh(newMesh);


x_dbdma_init(void)
{
	dbdma_gptr->ddma_config = 0;
	dbdma_gptr->ddma_throttle = 0;
	dbdma_gptr->ddma_inten = 0xffff;
	au_sync();

	if (request_irq(AU1550_DDMA_INT, dbdma_interrupt, SA_INTERRUPT,
			"Au1xxx dbdma", (void *)dbdma_gptr))
		printk("Can't get 1550 dbdma irq");
}

void
au1xxx_dbdma_dump(u32 chanid)
{
	chan_tab_t		*ctp;
	au1x_ddma_desc_t	*dp;
	dbdev_tab_t		*stp, *dtp;
	volatile au1x_dma_chan_t *cp;

	ctp = *((chan_tab_t **)chanid);
	stp = ctp->chan_src;
	dtp = ctp->chan_dest;
	cp = ctp->chan_ptr;

	printk("Chan %x, stp %x (dev %d)  dtp %x (dev %d) \n",
		(u32)ctp, (u32)stp, stp - dbdev_tab, (u32)dtp, dtp - dbdev_tab);
	printk("desc base %x, get %x, put %x, cur %x\n",
		(u32)(ctp->chan_desc_base), (u32)(ctp->get_ptr),
		(u32)(ctp->put_ptr), (u32)(ctp->cur_ptr));

	printk("dbdma chan %x\n", (u32)cp);
	printk("cfg %08x, desptr %08x, statptr %08x\n",
		cp->ddma_cfg, cp->ddma_desptr, cp->ddma_statptr);
	printk("dbell %08x, irq %08x, stat %08x, bytecnt %08x\n",
		cp->ddma_dbell, cp->ddma_irq, cp->ddma_stat, cp->ddma_bytecnt);

	/* Run through the descriptors
	*/
	dp = ctp->chan_desc_base;

	do {
		printk("dp %08x, cmd0 %08x, cmd1 %08x\n",
			(u32)dp, dp->dscr_cmd0, dp->dscr_cmd1);
		printk("src0 %08x, src1 %08x, dest0 %08x\n",
			dp->dscr_source0, dp->dscr_source1, dp->dscr_dest0);
		printk("dest1 %08x, stat %08x, nxtptr %08x\n",
			dp->dscr_dest1, dp->dscr_stat, dp->dscr_nxtptr);
		dp = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
	} while (dp != ctp->chan_desc_base);
}


x90| 0x94| 0x98| 0x9c|  *
 *  -------------------------------------------------  *
 *  |    x27    |    x28    |    FP     |     LR    |  *
 *  -------------------------------------------------  *
 *  -------------------------------------------------  *
 *  |  40 |  41 |  42 | 43  |           |           |  *
 *  -------------------------------------------------  *
 *  | 0xa0| 0xa4| 0xa8| 0xac|           |           |  *
 *  -------------------------------------------------  *
 *  |     PC    |   align   |           |           |  *
 *  -------------------------------------------------  *
 *                                                     *
 *******************************************************/

.file "jump_arm64_aapcs_elf_gas.S"
.text
.align  2
.global jump_fcontext
.type   jump_fcontext, %function
jump_fcontext:
    # prepare stack for GP + FPU
    sub  sp, sp, #0xb0

    # save d8 - d15
    stp  d8,  d9,  [sp, #0x00]
    stp  d10, d11, [sp, #0x10]
    stp  d12, d13, [sp, #0x20]
    stp  d14, d15, [sp, #0x30]

    # save x19-x30
    stp  x19, x20, [sp, #0x40]
    stp  x21, x22, [sp, #0x50]
    stp  x23, x24, [sp, #0x60]
    stp  x25, x26, [sp, #0x70]
    stp  x27, x28, [sp, #0x80]
    stp  x29, x30, [sp, #0x90]

    # save LR as PC
    str  x30, [sp, #0xa0]

    # store RSP (pointing to context-data) in X0
    mov  x4, sp

    # restore RSP (pointing to context-data) from X1
    mov  sp, x0

    # load d8 - d15
    ldp  d8,  d9,  [sp, #0x00]
    ldp  d10, d11, [sp, #0x10]
    ldp  d12, d13, [sp, #0x20]
    ldp  d14, d15, [sp, #0x30]

    # load x19-x30
    ldp  x19, x20, [sp, #0x40]
    ldp  x21, x22, [sp, #0x50]
    ldp  x23, x24, [sp, #0x60]
    ldp  x25, x26, [sp, #0x70]
    ldp  x27, x28, [sp, #0x80]
    ldp  x29, x30, [sp, #0x90]

    # return transfer_t from jump
    # pass transfer_t as first arg in context function
    # X0 == FCTX, X1 == DATA
    mov x0, x4

    # load pc
    ldr  x4, [sp, #0xa0]

    # restore stack from GP + FPU
    add  sp, sp, #0xb0

    ret x4
.size   jump_fcontext,.-jump_fcontext
# Mark that we don't need executable stack.
.section .note.GNU-stack,"",%progbits


ttps://nvd.nist.gov/vuln/detail/CVE-2017-11882)## CVE-2017-7921-Hikvision Cameras-不当身份验证

**漏洞编号:** CVE-2017-7921

**漏洞类型:** 不当身份验证

**影响应用:** Hikvision Cameras

**危害等级:** 高危，可能导致权限提升和敏感信息泄露

**影响版本:** DS-2CD2xx2F-I Series V5.2.0 build 140721 to V5.4.0 build 160530, DS-2CD2xx0F-I Series V5.2.0 build 140721 to V5.4.0 Build 160401, DS-2CD2xx2FWD Series V5.3.1 build 150410 to V5.4.4 Build 161125, DS-2CD4x2xFWD Series V5.2.0 build 140721 to V5.4.0 Build 160414, DS-2CD4xx5 Series V5.2.0 build 140721 to V5.4.0 Build 160421, DS-2DFx Series V5.2.0 build 140805 to V5.4.5 Build 160928, and DS-2CD63xx Series V5.0.9 build 140305 to V5.3.5 Build 160106

**利用条件:** 需要网络访问，目标设备运行受影响版本的Hikvision摄像头

**POC 可用性:** 是

**投毒风险:** 10%

## 详情

CVE-2017-7921 存在于 Hikvision 摄像头中，由于不当的身份验证，未经身份验证的攻击者可以访问摄像头快照。PoC 代码通过向 `/onvif-http/snapshot?auth=YWRtaW46MTEK` 发送 HTTP GET 请求来利用此漏洞，其中 `YWRtaW46MTEK` 是经过 Base64 编码的用户名 admin 和密码 11。如果状态码为 200 且内容长度大于 100，则认为目标易受攻击。PoC 代码使用多线程加速扫描，并将易受攻击的 URL 写入 vulnerable.txt 文件。

**有效性：**
根据漏洞信息和搜索引擎结果，此 PoC 似乎有效，因为它可以利用身份验证绕过漏洞来获取摄像头快照。

**投毒风险：**
PoC 代码本身主要用于检测漏洞。虽然没有明显的恶意代码，但存在轻微的投毒风险（10%）。
*   该脚本在 vulnerable.txt 文件中追加 URL，如果被大规模利用，可能造成隐私泄露。
*   依赖 `requirements.txt` 安装第三方库，可能存在依赖包被篡改的风�


        driver.switchTo().frame("frame");
        driver.findElement(By.id("frameinput")).click();

        driver.switchTo().defaultContent();
        jsExecutor.executeScript("check();");
        verifyTitle2(driver, alerts[i++], alerts[i++], alerts[i++]);
    }

    /**
     * @throws Exception if the test fails
     */
    @Test
    @Alerts({"loaded", "null"})
    public void deny() throws Exception {
        retrictByHeader(
                new NameValuePair(HttpHeader.X_FRAME_OPTIONS, "DENY"),
                new URL(URL_FIRST, "content.html"));
    }

    /**
     * @throws Exception if the test fails
     */
    @Test
    @Alerts({"loaded", "null"})
    public void csp_None() throws Exception {
        retrictByHeader(
                new NameValuePair(HttpHeader.CONTENT_SECURIRY_POLICY, "frame-ancestors 'none';"),
                new URL(URL_FIRST, "content.html"));
    }

    /**
     * @throws Exception if the test fails
     */
    @Test
    @Alerts({"loaded", "[object HTMLDocument]"})
    public void csp_Self() throws Exception {
        retrictByHeader(
                new NameValuePair(HttpHeader.CONTENT_SECURIRY_POLICY, "frame-ancestors 'self';"),
                new URL(URL_FIRST, "content.html"));
    }

    /**
     * @throws Exception if the test fails
     */
    @Test
    @Alerts({"loaded", "[object HTMLDocument]"})
    public void csp_SelfDifferentPath() throws Exception {
        retrictByHeader(
                new NameValuePair(HttpHeader.CONTENT_SECURIRY_POLICY, "frame-ancestors 'self';"),
                new URL(URL_FIRST, "/path2/content.html"));
    }

    /**
     * @throws Exception if the test fails
     */
    @Test
    @Alerts({"loaded", "[object HTMLDocument]"})
    public void csp_Url() throws Exception {
        retrictByHeader(
                new NameValuePair(HttpHeader.CONTENT_SECURIRY_POLICY, "frame-ancestors 'self';"),
                new URL(new URL("http://localhost:" + PORT + "/"), "content.html"));
    }

    /**
     * @throws Exception if the test fails
     */
    @Test
    @Alerts({"loaded", "null"})
    public void csp_UrlDifferentPort() throws Exception {
        retrictByHeader(
                new NameValuePair(HttpHeader.CONTENT_SECURIRY_POLICY, "frame-ancestors 'self';"),
                new URL(new URL("http://localhost:" + PORT2 + "/"), "content.html"));
    }

    /**
     * @throws Exception if the test fails
     */
    @Test
    @Alerts({"loaded", "null"})
    public void csp_many() throws Exception {
        retrictByHeader(
                new NameValuePair(HttpHeader.CONTENT_SECURIRY_POLICY,
                        "default-src 'none'; script-src 'self'; frame-ancestors 'self';"),
                new URL(new URL("http://localhost:" + PORT2 + "/"), "content.html"));
    }

    private void retrictByHeader(final NameValuePair header, final URL contentUrl) throws Exception {
        final String html = DOCTYPE_HTML
            + "<html>\n"
            + "<head>\n"
            + "  <script>\n"
            + LOG_WINDOW_NAME_FUNCTION
            + "    function check() {\n"
            + "      try {\n"
            + "        log(document.getElementById(\"frame1\").contentDocument);\n"
            + "      } catch(e) { log('error'); }\n"
            + "    }\n"
            + "  </script>\n"
            + "</head>\n"
            + "<body>\n"
            + "  <iframe id='frame1' src='" + contentUrl + "' "
                    + "onLoad='log(\"loaded\")' onError='


NUM_DATES];
    for (int32_t i = 0; i < NUM_DATES; i++) {
        cal->clear();
        cal->set(DATES[i][0], DATES[i][1], DATES[i][2], DATES[i][3], DATES[i][4]);
        MILLIS[i] = cal->getTime(status);
        if (U_FAILURE(status)) {
            errln("cal->getTime failed");
            return;
        }
    }

    SimpleDateFormat df(UnicodeString("yyyy-MM-dd HH:mm:ss"), status);
    if (U_FAILURE(status)) {
        dataerrln("Failed to initialize a SimpleDateFormat - %s", u_errorName(status));
    }
    df.setTimeZone(*utc);
    UnicodeString dateStr;

    // Test getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
    // uint8_t dayOfWeek, int32_t millis, UErrorCode& status)
    for (int32_t i = 0; i < NUM_TIMEZONES; i++) {
        for (int32_t d = 0; d < NUM_DATES; d++) {
            status = U_ZERO_ERROR;
            int32_t offset = TESTZONES[i]->getOffset(GregorianCalendar::AD, DATES[d][0], DATES[d][1], DATES[d][2],
                                                UCAL_SUNDAY, DATES[d][5], status);
            if (U_FAILURE(status)) {
                errln((UnicodeString)"getOffset(era,year,month,day,dayOfWeek,millis,status) failed for TESTZONES[" + i + "]");
            } else if (offset != OFFSETS1[d]) {
                dateStr.remove();
                df.format(MILLIS[d], dateStr);
                dataerrln((UnicodeString)"Bad offset returned by TESTZONES[" + i + "] at "
                        + dateStr + "(standard) - Got: " + offset + " Expected: " + OFFSETS1[d]);
            }
        }
    }

    // Test getOffset(UDate date, UBool local, int32_t& rawOffset,
    // int32_t& dstOffset, UErrorCode& ec) with local = true
    for (int32_t i = 0; i < NUM_TIMEZONES; i++) {
        for (int32_t m = 0; m < NUM_DATES; m++) {
            status = U_ZERO_ERROR;
            TESTZONES[i]->getOffset(MILLIS[m], true, rawOffset, dstOffset, status);
            if (U_FAILURE(status)) {
                errln((UnicodeString)"getOffset(date,local,rawOfset,dstOffset,ec) failed for TESTZONES[" + i + "]");
            } else if (rawOffset != OFFSETS2[m][0] || dstOffset != OFFSETS2[m][1]) {
                dateStr.remove();
                df.format(MILLIS[m], dateStr);
                dataerrln((UnicodeString)"Bad offset returned by TESTZONES[" + i + "] at "
                        + dateStr + "(wall) - Got: "
                        + rawOffset + "/" + dstOffset
                        + " Expected: " + OFFSETS2[m][0] + "/" + OFFSETS2[m][1]);
            }
        }
    }

    // Test getOffsetFromLocal(UDate date, UTimeZoneLocalOption nonExistingTimeOpt, UTimeZoneLocalOption duplicatedTimeOpt,
    // int32_t& rawOffset, int32_t& dstOffset, UErroCode& status)
    // with nonExistingTimeOpt=STANDARD_FORMER/duplicatedTimeOpt=STANDARD_LATTER
    for (int32_t i = 0; i < NUM_TIMEZONES; i++) {
        for (int m = 0; m < NUM_DATES; m++) {
            status = U_ZERO_ERROR;
            TESTZONES[i]->getOffse


  }

  public void keyboard(char key, int x, int y) {
    switch (key) {
      case 27:
        System.exit(0);
      default:
        break;
    }
  }

  /*
   * Main Loop Open window with initial window size, title bar, RGBA display mode, and handle input
   * events.
   */
  public void init() {
    myUT.glutInitWindowSize(440, 120);
    myUT.glutInitWindowPosition(0, 0);
    myUT.glutCreateWindow(this);
    myinit();
    myUT.glutDisplayFunc("display");
    myUT.glutReshapeFunc("myReshape");
    myUT.glutKeyboardFunc("keyboard");
    myUT.glutMainLoop();
  }

  static public void main(String args[]) throws IOException {
    Frame mainFrame = new Frame();
    mainFrame.setSize(448, 147);
    stroke mainCanvas = new stroke();
    mainCanvas.init();
    mainFrame.add(mainCanvas);
    mainFrame.setVisible(true);
  }

}
package examples.applets.glut;

import jgl.GL;
import jgl.wt.awt.GLApplet;
import jgl.wt.awt.GLUT;

public class picksquare extends GLApplet {

  private int board[][] = new int[3][3]; /* amount of color for each square */

  /* Clear color value for every square on the board */
  private void myinit() {
    int i, j;
    for (i = 0; i < 3; i++)
      for (j = 0; j < 3; j++)
        board[i][j] = 0;
    myGL.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
  }

  /*
   * The nine squares are drawn. In selection mode, each square is given two names: one for the row
   * and the other for the column on the grid. The color of each square is determined by its
   * position on the grid, and the value in the board[][] array.
   */
  private void drawSquares(int mode) {
    int i, j;
    for (i = 0; i < 3; i++) {
      if (mode == GL.GL_SELECT)
        myGL.glLoadName(i);
      for (j = 0; j < 3; j++) {
        if (mode == GL.GL_SELECT)
          myGL.glPushName(j);
        myGL.glColor3f((float) (i / 3.0), (float) (j / 3.0), (float) (board[i][j] / 3.0));
        myGL.glRecti(i, j, i + 1, j + 1);
        if (mode == GL.GL_SELECT)
          myGL.glPopName();
      }
    }
  }

  /*
   * processHits prints out the contents of the selection array.
   */
  private void processHits(int hits, int buffer[]) {
    int i, j;
    int ii = 0, jj = 0, names, ptr;

    System.out.println("hits = " + hits);
    ptr = 0;
    for (i = 0; i < hits; i++) { /* for each hit */
      names = buffer[ptr];
      System.out.println(" number of names for hit = " + names);
      ptr++;
      System.out.print("  z1 is " + buffer[ptr] + ";");
      ptr++;
      System.out.println(" z2 is " + buffer[ptr]);
      ptr++;
      System.out.print("   the name is ");
      for (j = 0; j < names; j++) { /* for each name */
        System.out.print(buffer[ptr] + " ");
        i


(image, "jpeg", ios);

            buffer = ByteBuffer.wrap(imageBytes.toByteArray());
        }
        catch (Throwable t)
        {
            Logging.logger().log(java.util.logging.Level.SEVERE, t.getMessage(), t);
        }
        finally
        {
            close(ios);
        }

        return buffer;
    }

    public static ByteBuffer asPNG(DataRaster raster)
    {
        ByteBuffer buffer = null;

        if (null == raster)
        {
            String msg = Logging.getMessage("nullValue.RasterIsNull");
            Logging.logger().severe(msg);
            throw new IllegalArgumentException(msg);
        }

        BufferedImage image;

        if (raster instanceof BufferedImageRaster)
        {
            image = ((BufferedImageRaster) raster).getBufferedImage();
        }
        else if (raster instanceof BufferWrapperRaster)
        {
            image = ImageUtil.visualize((BufferWrapperRaster) raster);
        }
        else
        {
            String msg = Logging.getMessage("generic.UnexpectedRasterType", raster.getClass().getName());
            Logging.logger().severe(msg);
            throw new WWRuntimeException(msg);
        }

        ImageOutputStream ios = null;

        if (null == image)
        {
            String msg = Logging.getMessage("nullValue.ImageIsNull");
            Logging.logger().severe(msg);
            throw new WWRuntimeException(msg);
        }

        try
        {
            ByteArrayOutputStream imageBytes = new ByteArrayOutputStream();
            ios = new MemoryCacheImageOutputStream(imageBytes);

            ImageIO.write(image, "png", ios);

            buffer = ByteBuffer.wrap(imageBytes.toByteArray());
        }
        catch (Throwable t)
        {
            Logging.logger().log(java.util.logging.Level.SEVERE, t.getMessage(), t);
        }
        finally
        {
            close(ios);
        }

        return buffer;
    }

    protected static void close(ImageOutputStream ios)
    {
        if (null != ios)
        {
            try
            {
                ios.close();
            }
            catch (Throwable t)
            {
                Logging.logger().log(java.util.logging.Level.SEVERE, t.getMessage(), t);
            }
        }
    }

    /**
     * Converts a non-imagery data raster (elevations) to visually representable image raster.
     * Calculates min and max values, and normalizes pixel value from 0 - 65,535 and creates
     * a GRAY color image raster with pixel data type of unsigned short.
     *
     * @param raster non-imagery data raster (elevations) instance of data raster derived from BufferWrapperRaster
     *
     * @return BufferedImage visual representation of the non-imagery data raster
     */
    public static BufferedImage visualize(BufferWrapperRaster raster)
    {
        if (null == raster)
        {
            String message = Logging.getMessage("nullValue.RasterIsNull");
            Logging.logger().severe(message);
            throw new WWRuntimeException(message);
        }

        // we are building UINT DataBuffer, cannot use negative values as -32768 or -9999, so we will use 0
        double missingDataSignal = AVListImpl.getDoubleValue(raster, AVKey.MISSING_DATA_SIGNAL,
            (double) Short.MIN_VALUE);
        int missingDataReplacement = 0;

        Double minElevation = (Double) raster.getValue(AVKey.ELEVATION_MIN);
        Double maxElevation = (Double) raster.getValue(AVKey.ELEVATION_MAX);

        double min = (null != minElevation && minElevation >=


" is where you must
/// specify all the parent classes of the one you are wrapping. The uppermost parent class,
/// `glib::Object`, must not be specified.
///
/// For example, `ffi::GtkWindowGroup` derives directly from
/// `GObject`, so it can be simply wrapped as follows:
///
/// ```ignore
/// glib_wrapper! {
///     pub struct WindowGroup(Object<ffi::GtkWindowGroup, ffi::GtkWindowGroupClass, WindowGroupClass>);
///
///     match fn {
///         get_type => || ffi::gtk_window_group_get_type(),
///     }
/// }
/// ```
///
/// In contrast, `ffi::GtkButton` has a parent, grandparent, etc. classes, which must be specified:
///
/// ```ignore
/// glib_wrapper! {
///     pub struct Button(Object<ffi::GtkButton, ButtonClass>) @extends Bin, Container, Widget;
///         // see note on interfaces in the example below
///
///     match fn {
///         get_type => || ffi::gtk_button_get_type(),
///     }
/// }
/// ```
///
/// #### Objects which implement interfaces
///
/// The example above is incomplete, since `ffi::GtkButton` actually implements two interfaces,
/// `Buildable` and `Actionable`.  In this case, they must be specified after all the parent classes
/// behind the `@implements` keyword:
///
/// ```ignore
/// glib_wrapper! {
///     pub struct Button(Object<ffi::GtkButton, ButtonClass>)
///         @extends Bin, Container, Widget, // parent classes
///         @implements Buildable, Actionable;  // interfaces
///
///     match fn {
///         get_type => || ffi::gtk_button_get_type(),
///     }
/// }
/// ```
///
/// #### Non-derivable classes
///
/// By convention, GObject implements "final" classes, i.e. those who
/// cannot be subclassed, by *not* exposing a public Class struct.
/// This way it is not possible to override any methods, as there are
/// no `klass.method_name` fields to overwrite.  In this case, don't
/// specify a FFI class name at all in the `Object<>` part:
///
/// ```ignore
/// glib_wrapper! {
///     pub struct Clipboard(Object<ffi::GtkClipboard, ClipboardClass>);
///     ...
/// }
/// ```
///
/// #### Interfaces
///
/// Interfaces are passed in the same way to the macro but instead of specifying
/// `Object`, `Interface` has to be specified:
///
/// ```ignore
/// glib_wrapper! {
///     pub struct TreeModel(Interface<ffi::GtkTreeModel, ffi::GtkTreeModelIface, TreeModelIface>);
///     ...
/// }
/// ```
///
/// #### Interfaces with prerequisites
///
/// Interfaces can declare prerequisites, i.e. the classes from which types that implement the
/// interface have to inherit or interfaces that have to be implemented:
///
/// ```ignore
/// glib_wrapper! {
///     pub struct TreeSortable(Interface<ffi::GtkTreeSortable, ffi::GtkTreeSortable, TreeSortableIface>) @requires TreeModel;
///     ...
/// }
/// ```
///
/// [#boxed]: #boxed
/// [#shared]: #shared
/// [#object]: #object
/// [#non-derivable-classes]: #non-derivable-classes

#[macro_export]
macro_rules! glib_wrapper {
    // Boxed

    (
        $(#[$attr:met


             return Avx2.mm256_cmpeq_epi32(Avx2.mm256_max_epu32(a, b), a);
            }
            else throw new IllegalInstructionException();
        }
    }
}


(&mut self) -> SPLLCM_W {
        SPLLCM_W { w: self }
    }
    #[doc = "Bit 17 - System PLL Clock Monitor Reset Enable"]
    #[inline(always)]
    pub fn spllcmre(&mut self) -> SPLLCMRE_W {
        SPLLCMRE_W { w: self }
    }
    #[doc = "Bit 23 - Lock Register"]
    #[inline(always)]
    pub fn lk(&mut self) -> LK_W {
        LK_W { w: self }
    }
    #[doc = "Bit 26 - System PLL Clock Error"]
    #[inline(always)]
    pub fn spllerr(&mut self) -> SPLLERR_W {
        SPLLERR_W { w: self }
    }
}
#![cfg(feature = "rustls")]
//! Commonly used code in most examples.

use quinn::{
    Certificate, CertificateChain, ClientConfig, ClientConfigBuilder, Endpoint, Incoming,
    PrivateKey, ServerConfig, ServerConfigBuilder, TransportConfig,
};
use std::{error::Error, net::SocketAddr, sync::Arc};

/// Constructs a QUIC endpoint configured for use a client only.
///
/// ## Args
///
/// - server_certs: list of trusted certificates.
#[allow(unused)]
pub fn make_client_endpoint(
    bind_addr: SocketAddr,
    server_certs: &[&[u8]],
) -> Result<Endpoint, Box<dyn Error>> {
    let client_cfg = configure_client(server_certs)?;
    let mut endpoint_builder = Endpoint::builder();
    endpoint_builder.default_client_config(client_cfg);
    let (endpoint, _incoming) = endpoint_builder.bind(&bind_addr)?;
    Ok(endpoint)
}

/// Constructs a QUIC endpoint configured to listen for incoming connections on a certain address
/// and port.
///
/// ## Returns
///
/// - a sream of incoming QUIC connections
/// - server certificate serialized into DER format
#[allow(unused)]
pub fn make_server_endpoint(bind_addr: SocketAddr) -> Result<(Incoming, Vec<u8>), Box<dyn Error>> {
    let (server_config, server_cert) = configure_server()?;
    let mut endpoint_builder = Endpoint::builder();
    endpoint_builder.listen(server_config);
    let (_endpoint, incoming) = endpoint_builder.bind(&bind_addr)?;
    Ok((incoming, server_cert))
}

/// Builds default quinn client config and trusts given certificates.
///
/// ## Args
///
/// - server_certs: a list of trusted certificates in DER format.
fn configure_client(server_certs: &[&[u8]]) -> Result<ClientConfig, Box<dyn Error>> {
    let mut cfg_builder = ClientConfigBuilder::default();
    for cert in server_certs {
        cfg_builder.add_certificate_authority(Certificate::from_der(&cert)?)?;
    }
    Ok(cfg_builder.build())
}

/// Returns default server configuration along with its certificate.
fn configure_server() -> Result<(ServerConfig, Vec<u8>), Box<dyn Error>> {
    let cert = rcgen::generate_simple_self_signed(vec!["localhost".into()]).unwrap();
    let cert_der = cert.serialize_der().unwrap();
    let priv_key = cert.serialize_private_key_der();
    let priv_key = PrivateKey::from_der(&priv_key)?;

    let mut transport_config = TransportConfig::default();
    transport_config.stream_window_uni(0


 << 10;
  }

  // create an imm22 field, given a 32-bit left-justified constant
  static int hi22( int x ) {
    int r = int( juint(x) >> 10 );
    assert( (r & ~((1 << 22) - 1))  ==  0, "just checkin'");
    return r;
  }

  // create a low10 __value__ (not a field) for a given a 32-bit constant
  static int low10( int x ) {
    return x & ((1 << 10) - 1);
  }

  // AES crypto instructions supported only on certain processors
  static void aes_only() { assert( VM_Version::has_aes(), "This instruction only works on SPARC with AES instructions support"); }

  // SHA crypto instructions supported only on certain processors
  static void sha1_only()   { assert( VM_Version::has_sha1(),   "This instruction only works on SPARC with SHA1"); }
  static void sha256_only() { assert( VM_Version::has_sha256(), "This instruction only works on SPARC with SHA256"); }
  static void sha512_only() { assert( VM_Version::has_sha512(), "This instruction only works on SPARC with SHA512"); }

  // instruction only in VIS1
  static void vis1_only() { assert( VM_Version::has_vis1(), "This instruction only works on SPARC with VIS1"); }

  // instruction only in VIS2
  static void vis2_only() { assert( VM_Version::has_vis2(), "This instruction only works on SPARC with VIS2"); }

  // instruction only in VIS3
  static void vis3_only() { assert( VM_Version::has_vis3(), "This instruction only works on SPARC with VIS3"); }

  // instruction only in v9
  static void v9_only() { } // do nothing

  // instruction deprecated in v9
  static void v9_dep()  { } // do nothing for now

  // v8 has no CC field
  static void v8_no_cc(CC cc)  { if (cc)  v9_only(); }

 protected:
  // Simple delay-slot scheme:
  // In order to check the programmer, the assembler keeps track of deley slots.
  // It forbids CTIs in delay slots (conservative, but should be OK).
  // Also, when putting an instruction into a delay slot, you must say
  // asm->delayed()->add(...), in order to check that you don't omit
  // delay-slot instructions.
  // To implement this, we use a simple FSA

#ifdef ASSERT
  #define CHECK_DELAY
#endif
#ifdef CHECK_DELAY
  enum Delay_state { no_delay, at_delay_slot, filling_delay_slot } delay_state;
#endif

 public:
  // Tells assembler next instruction must NOT be in delay slot.
  // Use at start of multinstruction macros.
  void assert_not_delayed() {
    // This is a separate overloading to avoid creation of string constants
    // in non-asserted code--with some compilers this pollutes the object code.
#ifdef CHECK_DELAY
    assert_not_delayed("next instruction should not be a delay slot");
#endif
  }
  void assert_not_delayed(const char* msg) {
#ifdef CHECK_DELAY
    assert(delay_state == no_delay, msg);
#endif
  }

 protected:
  // Insert a nop if the previous is cbcond
  void insert_nop_after_cbcond() {
    if (UseCBCond && cbcond_before()) {
      nop();
    }
  }


 eina_stringshare_add(argv[i]));

   curfile = filenames;

   if (!ecore_evas_init())
     return EXIT_FAILURE;

   /* this will give you a window with an Evas canvas under the first
    * engine available */
   ee = ecore_evas_new(NULL, 10, 10, WIDTH, HEIGHT, NULL);
   if (!ee)
     goto error;

   ecore_evas_show(ee);

   /* the canvas pointer, de facto */
   e = ecore_evas_get(ee);

   /* adding a background to this example */
   bg = evas_object_rectangle_add(e);
   evas_object_name_set(bg, "our dear rectangle");
   evas_object_color_set(bg, 255, 255, 255, 255); /* white bg */
   evas_object_move(bg, 0, 0); /* at canvas' origin */
   evas_object_resize(bg, WIDTH, HEIGHT); /* covers full canvas */
   evas_object_show(bg);

   /* Creating the emotion object */
   em = _create_emotion_object(e);
   emotion_object_file_set(em, eina_list_data_get(curfile));
   evas_object_move(em, 0, 0);
   evas_object_resize(em, WIDTH, HEIGHT);
   evas_object_show(em);

   efl_event_callback_array_add(em, emotion_object_example_callbacks(), NULL);

   evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_key_down, em);
   evas_object_focus_set(bg, EINA_TRUE);

   emotion_object_play_set(em, EINA_TRUE);

   ecore_main_loop_begin();

   ecore_evas_free(ee);
   ecore_evas_shutdown();
   return 0;

error:
   fprintf(stderr, "error: Requires at least one Evas engine built and linked"
                   " to ecore-evas for this example to run properly.\n");

   EINA_LIST_FREE(filenames, curfile)
      eina_stringshare_del(eina_list_data_get(curfile));

   ecore_evas_shutdown();
   eina_shutdown();
   return -1;
}


 n)
		}
	}

	opts := ClientOptions{
		MinCoverage:   1,
		MinOccurrence: 0,
	}

	return &Client{
		packageStats: &index{
			invertedIndex: invertedIndex,
		},
		opts: &opts,
	}
}

func TestSearchWithCount(t *testing.T) {
	client := makeClient(
		[]*IdentCount{
			newIdentCount("os.path.join", 100),
			newIdentCount("os.test.join", 50),
			newIdentCount("test.join", 10),
			newIdentCount("market.join", 5),
			newIdentCount("json.loads", 1),
			newIdentCount("mock.path.join", 200),
		})

	r := client.SearchWithCount("join")
	require.Len(t, r.IdentCounts, 5)

	assert.Equal(t, IdentCount{"mock.path.join", 200, 200, ""}, *r.IdentCounts[0])
	assert.Equal(t, IdentCount{"os.path.join", 100, 100, ""}, *r.IdentCounts[1])
	assert.Equal(t, IdentCount{"os.test.join", 50, 50, ""}, *r.IdentCounts[2])
}

func TestSearch(t *testing.T) {
	client := makeClient(
		[]*IdentCount{
			newIdentCount("os.path.join", 100),
			newIdentCount("os.test.join", 50),
			newIdentCount("test.join", 10),
			newIdentCount("market.join", 5),
			newIdentCount("json.loads", 1),
			newIdentCount("mock.path.join", 200),
		})

	names := client.Search("os join")
	require.Len(t, names, 2)

	assert.Equal(t, "os.path.join", names[0])
	assert.Equal(t, "os.test.join", names[1])

	names = client.Search("OS join")
	require.Len(t, names, 2)

	names = client.Search("join")
	require.Len(t, names, 5)
}

func TestCompletion(t *testing.T) {
	client := makeClient(
		[]*IdentCount{
			newIdentCount("mock.path.join", 200),
			newIdentCount("json.load", 250),
			newIdentCount("os.path.join", 100),
			newIdentCount("os.test.join", 50),
			newIdentCount("test.join", 10),
			newIdentCount("market.join", 5),
			newIdentCount("json.loads", 1),
		})

	// We build suffix array only from identifier parts not from example titles or doc strings.
	var tokens []string
	for t := range client.packageStats.invertedIndex {
		tokens = append(tokens, t)
	}

	client.suffixArray = newSuffixArray(tokens)

	completions := client.QueryCompletion("json lo")
	require.Len(t, completions, 2)

	assert.Equal(t, "json.load", completions[0].Display)
	assert.Equal(t, "json.loads", completions[1].Display)

	completions = client.QueryCompletion("os j")
	require.Len(t, completions, 2)

	assert.Equal(t, "os.path.join", completions[0].Display)
	assert.Equal(t, "os.test.join", completions[1].Display)

	completions = client.QueryCompletion("j")
	require.Len(t, completions, 6)

	assert.Equal(t, "json.load", completions[0].Display)
	assert.Equal(t, "os.path.join", completions[2].Display)
}
package pythonmetrics

import (
	"fmt"
	"go/token"

	"github.com/kiteco/kiteco/kite-go/lang/python/pythonanalyzer"
	"github.com/kiteco/kiteco/kite-go/lang/python/pythonast"
	"github.com/kiteco/kiteco/kite-go/lang/python/pythontype"
)

// ProcessFileOffline processes a python file and generates all the reference comparisons for all references
// contained in the referenceMap. The offline mode includes text from the python file and should NOT be used by kite local.
func ProcessFileOffline(f


c int finish(int hash) {
    // ignore: parameter_assignments
    hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
    // ignore: parameter_assignments
    hash = hash ^ (hash >> 11);
    return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
  }
}

typedef _ColorThemeRef = AutoDisposeProviderRef<ColorTheme>;

/// See also [_colorTheme].
@ProviderFor(_colorTheme)
const _colorThemeProvider = _ColorThemeFamily();

/// See also [_colorTheme].
class _ColorThemeFamily extends Family<ColorTheme> {
  /// See also [_colorTheme].
  const _ColorThemeFamily();

  /// See also [_colorTheme].
  _ColorThemeProvider call(
    Palette palette,
  ) {
    return _ColorThemeProvider(
      palette,
    );
  }

  @override
  _ColorThemeProvider getProviderOverride(
    covariant _ColorThemeProvider provider,
  ) {
    return call(
      provider.palette,
    );
  }

  static const Iterable<ProviderOrFamily>? _dependencies = null;

  @override
  Iterable<ProviderOrFamily>? get dependencies => _dependencies;

  static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;

  @override
  Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
      _allTransitiveDependencies;

  @override
  String? get name => r'_colorThemeProvider';
}

/// See also [_colorTheme].
class _ColorThemeProvider extends AutoDisposeProvider<ColorTheme> {
  /// See also [_colorTheme].
  _ColorThemeProvider(
    this.palette,
  ) : super.internal(
          (ref) => _colorTheme(
            ref,
            palette,
          ),
          from: _colorThemeProvider,
          name: r'_colorThemeProvider',
          debugGetCreateSourceHash:
              const bool.fromEnvironment('dart.vm.product')
                  ? null
                  : _$colorThemeHash,
          dependencies: _ColorThemeFamily._dependencies,
          allTransitiveDependencies:
              _ColorThemeFamily._allTransitiveDependencies,
        );

  final Palette palette;

  @override
  bool operator ==(Object other) {
    return other is _ColorThemeProvider && other.palette == palette;
  }

  @override
  int get hashCode {
    var hash = _SystemHash.combine(0, runtimeType.hashCode);
    hash = _SystemHash.combine(hash, palette.hashCode);

    return _SystemHash.finish(hash);
  }
}

String _$baseThemeHash() => r'317a5ef77def208357a54b7938ef3d91666fce70';

/// See also [baseTheme].
@ProviderFor(baseTheme)
final baseThemeProvider = AutoDisposeProvider<ColorTheme>.internal(
  baseTheme,
  name: r'baseThemeProvider',
  debugGetCreateSourceHash:
      const bool.fromEnvironment('dart.vm.product') ? null : _$baseThemeHash,
  dependencies: null,
  allTransitiveDependencies: null,
);

typedef BaseThemeRef = AutoDisposeProviderRef<ColorTheme>;
String _$albumArtPaletteHash() => r'8130b954ee3c67f53207593d4ed3dfbffb00c95d';
typedef AlbumArtPaletteRef = AutoDisposeFutureProviderRef<Palette>;

/// See also [albumArtPalette].
@ProviderFor(albumArtPalette)
const albumArtPaletteProvider = AlbumArtPaletteFamily();

/// See also [albumArtPalette].
class AlbumArtPaletteFamily extends Family<AsyncValue<Palette>> {
  /// See also [albumArtPalette].
  const AlbumArtPaletteFamily();

  /// See also [albumArtPalette].
  AlbumArtPaletteProvider call(
    String id,
  ) {
    return AlbumArtPaletteProvider(
      id,
    );
  }

  @override
  AlbumArtPaletteProvider getProviderOverride(
    covariant AlbumArtPalette


S));
  #endif

  #if ENABLED(HOST_PROMPT_SUPPORT)
    SETUP_RUN(hostui.prompt_end());
  #endif

  #if HAS_DRIVER_SAFE_POWER_PROTECT
    SETUP_RUN(stepper_driver_backward_report());
  #endif

  #if HAS_PRUSA_MMU2
    SETUP_RUN(mmu2.init());
  #endif

  #if ENABLED(IIC_BL24CXX_EEPROM)
    BL24CXX::init();
    const uint8_t err = BL24CXX::check();
    SERIAL_ECHO_TERNARY(err, "BL24CXX Check ", "failed", "succeeded", "!\n");
  #endif

  #if HAS_DWIN_E3V2_BASIC
    SETUP_RUN(DWIN_InitScreen());
  #endif

  #if HAS_SERVICE_INTERVALS && !HAS_DWIN_E3V2_BASIC
    SETUP_RUN(ui.reset_status(true));  // Show service messages or keep current status
  #endif

  #if ENABLED(MAX7219_DEBUG)
    SETUP_RUN(max7219.init());
  #endif

  #if ENABLED(DIRECT_STEPPING)
    SETUP_RUN(page_manager.init());
  #endif

  #if HAS_TFT_LVGL_UI
    #if ENABLED(SDSUPPORT)
      if (!card.isMounted()) SETUP_RUN(card.mount()); // Mount SD to load graphics and fonts
    #endif
    SETUP_RUN(tft_lvgl_init());
  #endif

  #if BOTH(HAS_WIRED_LCD, SHOW_BOOTSCREEN)
    const millis_t elapsed = millis() - bootscreen_ms;
    #if ENABLED(MARLIN_DEV_MODE)
      SERIAL_ECHOLNPGM("elapsed=", elapsed);
    #endif
    SETUP_RUN(ui.bootscreen_completion(elapsed));
  #endif

  #if ENABLED(PASSWORD_ON_STARTUP)
    SETUP_RUN(password.lock_machine());      // Will not proceed until correct password provided
  #endif

  #if BOTH(HAS_MARLINUI_MENU, TOUCH_SCREEN_CALIBRATION) && EITHER(TFT_CLASSIC_UI, TFT_COLOR_UI)
    SETUP_RUN(ui.check_touch_calibration());
  #endif

  #if ENABLED(EASYTHREED_UI)
    SETUP_RUN(easythreed_ui.init());
  #endif

  #if HAS_TRINAMIC_CONFIG && DISABLED(PSU_DEFAULT_OFF)
    SETUP_RUN(test_tmc_connection());
  #endif

  #if ENABLED(BD_SENSOR)
    SETUP_RUN(bdl.init(I2C_BD_SDA_PIN, I2C_BD_SCL_PIN, I2C_BD_DELAY));
  #endif

  marlin_state = MF_RUNNING;

  SETUP_LOG("setup() completed.");

  TERN_(MARLIN_TEST_BUILD, runStartupTests());
}

/**
 * The main Marlin program loop
 *
 *  - Call idle() to handle all tasks between G-code commands
 *      Note that no G-codes from the queue can be executed during idle()
 *      but many G-codes can be called directly anytime like macros.
 *  - Check whether SD card auto-start is needed now.
 *  - Check whether SD print finishing is needed now.
 *  - Run one G-code command from the immediate or main command queue
 *    and open up one space. Commands in the main queue may come from sd
 *    card, host, or by direct injection. The queue will continue to fill
 *    as long as idle() or manage_inactivity() are being called.
 */
void loop() {
  do {
    idle();

    #if ENABLED(SDSUPPORT)
      if (card.flag.abort_sd_printing) abortSDPrinting();
      if (m


定\\n[经] (按股或按规定)分配, 配(拨)给, 规(派)定",
"alloted":" 分配, 摊派给；分派, 派给；拨给；指定（款项等）作某种用途",
"alloted annual receipts":"[经] 岁入分配数",
"allotee":"n. (=allottee)受分配的人,接受分配物的人",
"allotelluric acid":"[化] 别碲酸",
"allotetrahydrocortisone":"[化] 别四氢可的松",
"allotetraploid":"异源四倍体",
"allotetraploidy":" 异源四倍性",
"allotheism":"n. 异神崇拜",
"allotherapy":"[医] 对抗疗法",
"Allotheria":"异兽亚纲",
"allotherm":"[医] 变温动物",
"allothigene":"[化] 他生的",
"allothimorph":"他形体",
"allothimorphic":"[化] 变生的",
"allothrconine":"[机] 别苏氨酸",
"allothreo configuration":"[化] 别苏型; 别苏型构型",
"allothreonine":"[化] 别苏氨酸",
"allotment":"n. 分配, 拨款, 命运\\n[经] 分配, 拨款, 分配额分派认购额",
"allotment certificate":"[法] 分配证书",
"allotment issue":"[经] 派定发行",
"allotment issued":"[法] 已拨款项",
"allotment ledger":"[经] 拨款分类帐, 预算分配分类帐",
"allotment letter":"[经] 分派认购额通知书",
"allotment note":"[法] 分配通知书",
"allotment notice":"[经] 分派认购书",
"allotment of shares":"[法] 股份的分配",
"allotment system":"[法] 分配制, 配给制",
"allotmenteer":"n. <英>小块园地经营(或租借)者",
"allotments":"n. 分配( allotment的复数形式 ); 份额; 份儿; 分配物",
"allotments for annual expenditures":"[经] 岁出分配额",
"allotone":"n. 调位变体",
"allotonic compound":"[化] 改变张力的化合物(能改变水的表面张力,可作水性涂料的流性改善剂)",
"allotopia":"异位, 错位",
"allotopic":"[医] 异位的, 错位的",
"allotoxin":"[化] 抗异毒素\\n[医] 防异毒素",
"allotransplant":"[医] vt.同种异体移植",
"allotransplantation":"[医] 异体移植术",
"allotransplanted":"vt. 【外科学】同种异体移植，同种异基因个体移植 —／，æ-ləu'trænsplɑ:nt；-plænt／\\nn. 同种异体移植物",
"allotrio-":"[医] 异",
"allotr


Text("显示推荐")
                },
                defaultValue = true,
            )
            switchPreference(
                key = SettingPreferences.HomePopularShow.name,
                title = {
                    Text("显示热门")
                },
                defaultValue = true,
            )

            preferenceCategory(
                key = "popular",
                title = {
                    Text("热门设置")
                }
            )
            switchPreference(
                key = SettingPreferences.HomePopularCarryToken.name,
                title = {
                    Text("个性化热门列表")
                },
                summary = {
                    Text("修改后需手动刷新列表")
                },
                defaultValue = true,
            )

            preferenceCategory(
                key = "recommend",
                title = {
                    Text("推荐设置")
                }
            )
            listStylePreference(
                key = SettingPreferences.HomeRecommendListStyle.name,
                defaultValue = 0,
            )

            item("bottom") {
                Spacer(
                    modifier = Modifier.height(
                        windowInsets.bottomDp.dp + windowStore.bottomAppBarHeightDp.dp
                    )
                )
            }
        }
    }
}package cn.a10miaomiao.bilimiao.compose.pages.mine

import android.app.Activity
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import cn.a10miaomiao.bilimiao.compose.common.entity.FlowPaginationInfo
import cn.a10miaomiao.bilimiao.compose.common.navigation.PageNavigation
import cn.a10miaomiao.bilimiao.compose.pages.user.FollowingItemInfo
import cn.a10miaomiao.bilimiao.compose.pages.user.FollowingListAction
import cn.a10miaomiao.bilimiao.compose.pages.user.SearchFollowPage
import cn.a10miaomiao.bilimiao.compose.pages.user.TagEditDialogState
import cn.a10miaomiao.bilimiao.compose.pages.user.TagInfo
import cn.a10miaomiao.bilimiao.compose.pages.user.UserTagSetDialogState
import com.a10miaomiao.bilimiao.comm.entity.MessageInfo
import com.a10miaomiao.bilimiao.comm.entity.ResponseData
import com.a10miaomiao.bilimiao.comm.network.BiliApiService
import com.a10miaomiao.bilimiao.comm.network.MiaoHttp.Companion.json
import com.a10miaomiao.bilimiao.comm.store.UserStore
import com.kongzue.dialogx.dialogs.PopTip
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.launch
import org.kodein.di.DI
import org.kodein.di.DIAware
import org.kodein.di.instance

internal class MyFollowViewModel(
    override val di: DI,
) : ViewModel(), DIAware {

    private val fragment by instance<Fragment>()
    private val pageNavigation by instance<PageNavigation>()
    private val activity by instance<Activity>()
    private val userStore by instance<UserStore>()

    val count = MutableStateFlow(1)
    val isRefreshing = MutableStateFlow(false)
    val tagList = FlowPaginationInfo<TagInfo>()

    val listActionFlow = MutableSharedFlow<FollowingListAction>()
    val tagEditDialogState = MutableStateFlow<TagEditDialogState?>(null)
    val userTagSetDialogState = MutableStateFlow<UserTagSetDialogState?>(null)

    val orderType = MutableStateFlow("attention")
    val orderTypeToNameMap = mapOf(
        "attention" to "最常访问",
        "" to "


/*
	This file is part of the OdinMS Maple Story NewServer
    Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
		       Matthias Butz <matze@odinms.de>
		       Jan Christian Meyer <vimes@odinms.de>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation version 3 as published by
    the Free Software Foundation. You may not use, modify or distribute
    this program under any other version of the GNU Affero General Public
    License.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

using tools;

namespace Application.Core.Channel.Net.Handlers;

/**
 * @author Xotic (XoticStory) & BubblesDev
 */

public class MobDamageMobFriendlyHandler : ChannelHandlerBase
{
    public override void HandlePacket(InPacket p, IChannelClient c)
    {
        int attacker = p.readInt();
        p.readInt();
        int damaged = p.readInt();

        var map = c.OnlinedCharacter.getMap();
        var monster = map.getMonsterByOid(damaged);

        if (monster == null || map.getMonsterByOid(attacker) == null)
        {
            return;
        }

        int damage = Randomizer.nextInt(((monster.getMaxHp() / 13 + monster.getPADamage() * 10)) * 2 + 500) / 10; // Formula planned by Beng.

        if (monster.getHp() - damage < 1)
        {     // friendly dies
            switch (monster.getId())
            {
                case MobId.WATCH_HOG:
                    map.broadcastMessage(PacketCreator.serverNotice(6, "The Watch Hog has been injured by the aliens. Better luck next time.


   inst.entity:SetPristine()

    if not TheWorld.ismastersim then
        return inst
    end

    inst:AddComponent("mapspotrevealer")
    inst.components.mapspotrevealer:SetGetTargetFn(getrevealtargetpos)
    inst.components.mapspotrevealer.postreveal = function(inst)
        inst.components.stackable:Get():Remove()
    end

    inst:AddComponent("stackable")
    inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM

    inst:AddComponent("inspectable")

    inst:AddComponent("fuel")
    inst.components.fuel.fuelvalue = TUNING.SMALL_FUEL

    inst:AddComponent("tradable")

    MakeSmallBurnable(inst, TUNING.SMALL_BURNTIME)
    MakeSmallPropagator(inst)
    MakeHauntableLaunchAndIgnite(inst)

    inst:AddComponent("inventoryitem")

    return inst
end

return Prefab("stash_map", fn, assets)


 Q_filelength (f);
	buffer = qmalloc (length+1);
	((char *)buffer)[length] = 0;
	SafeRead (f, buffer, length);
	fclose (f);

	*bufferptr = buffer;
	return length;
}

/*
==============
SaveFile
==============
*/
void    SaveFile (const char *filename, void *buffer, int count)
{
	FILE	*f;

	f = SafeOpenWrite (filename);
	SafeWrite (f, buffer, count);
	fclose (f);
}

void DefaultExtension (char *path, char *extension)
{
	char    *src;
//
// if path doesn't have a .EXT, append extension
// (extension should include the .)
//
	src = path + strlen(path) - 1;

	while (*src != PATHSEPERATOR && src != path)
	{
		if (*src == '.')
			return;                 // it has an extension
		src--;
	}

	strcat (path, extension);
}

void DefaultPath (char *path, char *basepath)
{
	char    temp[128];

	if (path[0] == PATHSEPERATOR)
		return;                   // absolute path location
	strcpy (temp,path);
	strcpy (path,basepath);
	strcat (path,temp);
}

void    StripFilename (char *path)
{
	int             length;

	length = strlen(path)-1;
	while (length > 0 && path[length] != PATHSEPERATOR)
		length--;
	path[length] = 0;
}

void    StripExtension (char *path)
{
	int             length;

	length = strlen(path)-1;
	while (length > 0 && path[length] != '.')
	{
		length--;
		if (path[length] == '/')
			return;		// no extension
	}
	if (length)
		path[length] = 0;
}

/*
====================
Extract file parts
====================
*/
void ExtractFilePath (const char *path, char *dest)
{
	const char *src;

	src = path + strlen(path) - 1;

//
// back up until a \ or the start
//
	while (src != path && *(src-1) != PATHSEPERATOR)
		src--;

	memcpy (dest, path, src-path);
	dest[src-path] = 0;
}

void ExtractFileName (const char *path, char *dest)
{
	const char *src;

	src = path + strlen(path) - 1;

//
// back up until a \ or the start
//
	while (src != path && *(src-1) != '/'
		 && *(src-1) != '\\' )
		src--;

	while (*src)
	{
		*dest++ = *src++;
	}
	*dest = 0;
}

void ExtractFileBase (const char *path, char *dest)
{
	const char *src;

	src = path + strlen(path) - 1;

//
// back up until a \ or the start
//
	while (src != path && *(src-1) != '/'
		 && *(src-1) != '\\' )
		src--;

	while (*src && *src != '.')
	{
		*dest++ = *src++;
	}
	*dest = 0;
}

void ExtractFileExtension (const char *path, char *dest)
{
	const char *src;

	src = path + strlen(path) - 1;

//
// back up until a . or the start
//
	while (src != path && *(src-1) != '.')
		src--;
	if (src == path)
	{
		*dest = 0;	/


 in attrs) {
			if (typeof this[key] !== "function") {
				this[key] = attrs[key];
			}
		}

		// Имена методов
		const methods = [].concat(this.methodsToPatch || []);
		// Имена полей
		const keys = [];
		let rawValue;

		for (const key in this) {
			// Только собственные имена
			if (!this.hasOwnProperty(key)) {
				continue;
			}

			rawValue = this[key];

			// Пропускаем декорированные асинхронные свойства
			if (
				rawValue &&
				typeof rawValue === "function" &&
				rawValue[ASYNC_ACTION_GETTER_KEY]
			) {
				continue;
			}

			keys.push(key);
		}

		delete (this as any).keys;

		// Превращаем нас в observable
		createObservable(this, keys);

		// Сохраняем имена полей
		(this as any).keys = keys;

		let prototype = Object.getPrototypeOf(this);
		let descriptors;
		let name;

		// Двигаемся по цепочке прототипов вверх, собираем все методы
		while (
			prototype &&
			prototype !== Object.prototype &&
			prototype !== Function.prototype &&
			prototype !== Model.prototype
		) {
			descriptors = Object.getOwnPropertyDescriptors(prototype);

			for (name in descriptors) {
				if (
					name !== "constructor" &&
					typeof this[name] === "function"
				) {
					methods.push(name);
				}
			}

			prototype = Object.getPrototypeOf(prototype);
		}

		let method;
		let descriptor;
		// Сюда бытем складывать имена пропатченных методов
		// Чтобы не пропатчить ничего дважды
		const patchedMethods = {};

		// Превращаем декорированные методы в action или view
		for (const key of methods) {
			if (patchedMethods[key]) {
				continue;
			}

			patchedMethods[key] = true;

			// На всякий случай возьмём дескриптор, чтобы отловить view
			descriptor = Object.getOwnPropertyDescriptor(this, key);

			if (
				descriptor &&
				descriptor.get &&
				!descriptor.get[ASYNC_ACTION_GETTER_KEY]
			) {
				// Это view
				method = descriptor.get;
			} else {
				// Это action
				method = (this as any)[key];
			}

			if (method[ACTION_FLAG_KEY]) {
				(this as any)[key] = createAction(this, method);
			} else if (method[ASYNC_ACTION_FLAG_KEY]) {
				(this as any)[key] = createAsyncAction(this, method);
			} else if (method[VIEW_FLAG_KEY]) {
				createObservableView(this, key, method);
			}
		}

		// Теперь инициализируем сеттеры для вложенных моделей
		const controlledModels = this.controlledModels || {};

		// tslint:disable-next-line:forin
		for (const key in controlledModels) {
			this.initControlledModel(key);
		}

		// Вызываем метод жизненного цикла
		if ((this as IModel).didCreate) {
			(this as IModel).didCreate();
		}
	}
}

/**
 * Декоратор, превращающий метод модели в Action
 */
export function Action(target, propertyKey: string) {
	const impl = target[propertyKey];

	if (typeof impl === "function") {
		impl[ACTION_FLAG_KEY] = true;
	}
}

/**
 * Декоратор, превращающий метод-генератор модели в Action
 */
export


th_filesystem_and_namedfile_open_and_renderer(
            fake_fs.clone(),
            |fs, path| {
                let ret = fs.read_file(path).and_then(|data| {
                    let metadata = actix_files::NamedFileMetadata {
                        modified: None,
                        len: data.len() as u64,
                        ino: None,
                    };
                    actix_files::NamedFile::from_readseek(io::Cursor::new(data), path, metadata)
                });
                trace!("got namedfile request for {} -> {:?}", path.display(), ret.is_ok());
                ret
            },
            Rc::new(|_, _, _| { panic!() }),
            "/",
            "".into(),
        ).index_file("index.html"));
        app
    };

    info!("Server starting on {}", addr);
    actix_rt::System::new("actix server").block_on(async {
        HttpServer::new(app_factory)
            .bind(addr)
            .unwrap()
            .run()
            .await
    }).unwrap()
}
<reponame>regexident/trybuild<filename>src/env.rs
use crate::error::{Error, Result};
use std::env;

#[derive(PartialEq, Debug)]
pub enum Update {
    Wip,
    Overwrite,
}

impl Default for Update {
    fn default() -> Self {
        Update::Wip
    }
}

impl Update {
    pub fn env() -> Result<Self> {
        let var = match env::var_os("TRYBUILD") {
            Some(var) => var,
            None => return Ok(Update::default()),
        };

        match var.as_os_str().to_str() {
            Some("wip") => Ok(Update::Wip),
            Some("overwrite") => Ok(Update::Overwrite),
            _ => Err(Error::UpdateVar(var)),
        }
    }
}
<filename>kernel/src/arch/riscv/syscall_ids.rs
// Generated by build.rs. DO NOT EDIT.
use numeric_enum_macro::numeric_enum;

numeric_enum! {
#[repr(u32)]
#[derive(Debug, Eq, PartialEq)]
#[allow(non_camel_case_types)]
pub enum SyscallType {
    IO_SETUP = 0,
    IO_DESTROY = 1,
    IO_SUBMIT = 2,
    IO_CANCEL = 3,
    IO_GETEVENTS = 4,
    SETXATTR = 5,
    LSETXATTR = 6,
    FSETXATTR = 7,
    GETXATTR = 8,
    LGETXATTR = 9,
    FGETXATTR = 10,
    LISTXATTR = 11,
    LLISTXATTR = 12,
    FLISTXATTR = 13,
    REMOVEXATTR = 14,
    LREMOVEXATTR = 15,
    FREMOVEXATTR = 16,
    GETCWD = 17,
    LOOKUP_DCOOKIE = 18,
    EVENTFD2 = 19,
    EPOLL_CREATE1 = 20,
    EPOLL_CTL = 21,
    EPOLL_PWAIT = 22,
    DUP = 23,
    DUP3 = 24,
    FCNTL = 25,
    INOTIFY_INIT1 = 26,
    INOTIFY_ADD_WATCH = 27,
    INOTIFY_RM_WATCH = 28,
    IOCTL = 29,
    IOPRIO_SET = 30,
    IOPRIO_GET = 31,
    FLOCK = 32,
    MKNODAT = 33,
    MKDIRAT = 34,
    UNLINKAT = 35,
    SYMLINKAT = 36,
    LINKAT = 37,
    UMOUNT2 = 39,
    MOUNT = 40,
    PIVOT_ROOT = 41,
    NFSSERVCTL = 42,
    STATFS = 43,
    FSTATFS = 44,
    TRUNCATE = 45,
    FTRUNCATE = 46,
    FALLOCATE = 47,
    FACCESSAT = 48,
    CHDIR = 49,
    FCHDIR = 50,
    CHROOT = 51,
    FCHMOD = 52,
    FCHMOD


o||A!==0)&&(v+=ET(t,e)),h=u[A],E=r[h],$g(t,e+1,h,!0,!0,!0)&&(I=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,I&&(t.dump&&$w===t.dump.charCodeAt(0)?v+="?":v+="? "),v+=t.dump,I&&(v+=ET(t,e)),$g(t,e+1,E,!0,I)&&(t.dump&&$w===t.dump.charCodeAt(0)?v+=":":v+=": ",v+=t.dump,a+=v));t.tag=n,t.dump=a||"{}"}function kK(t,e,r){var o,a,n,u,A,p;for(a=r?t.explicitTypes:t.implicitTypes,n=0,u=a.length;n<u;n+=1)if(A=a[n],(A.instanceOf||A.predicate)&&(!A.instanceOf||typeof e=="object"&&e instanceof A.instanceOf)&&(!A.predicate||A.predicate(e))){if(t.tag=r?A.tag:"?",A.represent){if(p=t.styleMap[A.tag]||A.defaultStyle,QK.call(A.represent)==="[object Function]")o=A.represent(e,p);else if(FK.call(A.represent,p))o=A.represent[p](e,p);else throw new tI("!<"+A.tag+'> tag resolver accepts not "'+p+'" style');t.dump=o}return!0}return!1}function $g(t,e,r,o,a,n){t.tag=null,t.dump=r,kK(t,r,!1)||kK(t,r,!0);var u=QK.call(t.dump);o&&(o=t.flowLevel<0||t.flowLevel>e);var A=u==="[object Object]"||u==="[object Array]",p,h;if(A&&(p=t.duplicates.indexOf(r),h=p!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(a=!1),h&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(A&&h&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),u==="[object Object]")o&&Object.keys(t.dump).length!==0?(H6e(t,e,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(_6e(t,e,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump));else if(u==="[object Array]"){var E=t.noArrayIndent&&e>0?e-1:e;o&&t.dump.length!==0?(U6e(t,E,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(M6e(t,E,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump))}else if(u==="[object String]")t.tag!=="?"&&N6e(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new tI("unacceptable kind of an object to dump "+u)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function q6e


ebar-border);--color-sidebar-ring:var(--sidebar-ring);--radius-sm:calc(var(--radius) - 4px);--radius-md:calc(var(--radius) - 2px);--radius-lg:var(--radius);--radius-xl:calc(var(--radius) + 4px);--shadow-2xs:var(--shadow-2xs);--shadow-xs:var(--shadow-xs);--shadow-sm:var(--shadow-sm);--shadow:var(--shadow);--shadow-md:var(--shadow-md);--shadow-lg:var(--shadow-lg);--shadow-xl:var(--shadow-xl);--shadow-2xl:var(--shadow-2xl);--font-sans:"DM Sans",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;--font-serif:"Lora",Georgia,Cambria,"Times New Roman",Times,serif;--font-mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}@keyframes suggestionFadeIn{0%{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.animate-suggestion-fade-in{animation:suggestionFadeIn .2s ease-out forwards}@keyframes cellFadeIn{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.cell-enter{animation:cellFadeIn .3s ease-out forwards}.cell-markdown{border-left-width:4px;--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.cell-sql{border-left-width:4px;--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.cell-python{border-left-width:4px;--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.cell-log{border-left-width:4px;--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity,1))}.cell-ai,.cell-ai_query{border-left-width:4px;--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity,1))}.dialog-overlay{background-color:rgb(0 0 0/.5)}.dialog-content{--tw-bg-opacity:1;--tw-shadow:0 10px 15px -3px rgb(0 0 0/0.1),0 4px 6px -4px rgb(0 0 0/0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.cell-creation-button,.dialog-content{border-width:1px;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.cell-creation-button{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1));--tw-bg-opacity:1;--tw-shadow:0 1px 2px 0 rgb(0 0 0/0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.cell-creation-button:hover{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.cell-creation-menu{border-width:1px;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));--tw-shadow:0 10px 15px -3px rgb(0 0 0/0


 4px 11px;
}

.kothing-editor .ke-selector-table {
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  display: none;
  float: left;
  font-size: 14px;
  left: 1px;
  list-style: none;
  margin: 2px 0 0;
  padding: 5px 0;
  position: absolute;
  text-align: left;
  top: 30px;
  z-index: 5;
}

.kothing-editor .ke-selector-table .ke-table-size {
  font-size: 18px;
  padding: 0 5px;
}

.kothing-editor .ke-selector-table .ke-table-size-picker {
  cursor: pointer;
  font-size: 18px;
  height: 10em;
  position: absolute !important;
  width: 10em;
  z-index: 3;
}

.kothing-editor .ke-selector-table .ke-table-size-highlighted {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAADJmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo4QTZCNzMzN0I3RUYxMUU4ODcwQ0QwMjM1NTgzRTJDNyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo4QTZCNzMzNkI3RUYxMUU4ODcwQ0QwMjM1NTgzRTJDNyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0MzYyNEUxRUI3RUUxMUU4ODZGQzgwRjNBODgyNTdFOS


      return props[treeNodeLabelProp];
    }
  }

  // Since value without entity will be in missValueList.
  // This code will never reached, but we still need this in case.
  return wrappedValue.value;
}

/**
 * Convert internal state `valueList` to user needed value list.
 * This will return an array list. You need check if is not multiple when return.
 *
 * `allCheckedNodes` is used for `treeCheckStrictly`
 */
function formatSelectorValue(valueList, props, valueEntities) {
  var treeNodeLabelProp = props.treeNodeLabelProp,
      treeCheckable = props.treeCheckable,
      treeCheckStrictly = props.treeCheckStrictly,
      showCheckedStrategy = props.showCheckedStrategy;

  // Will hide some value if `showCheckedStrategy` is set

  if (treeCheckable && !treeCheckStrictly) {
    var values = {};
    valueList.forEach(function (wrappedValue) {
      values[wrappedValue.value] = wrappedValue;
    });
    var hierarchyList = flatToHierarchy(valueList.map(function (_ref3) {
      var value = _ref3.value;
      return valueEntities[value];
    }));

    if (showCheckedStrategy === _strategies.SHOW_PARENT) {
      // Only get the parent checked value
      return hierarchyList.map(function (_ref4) {
        var node = _ref4.node;

        var value = (0, _propsUtil.getPropsData)(node).value;
        return {
          label: getLabel(values[value], valueEntities[value], treeNodeLabelProp),
          value: value
        };
      });
    }
    if (showCheckedStrategy === _strategies.SHOW_CHILD) {
      // Only get the children checked value
      var targetValueList = [];

      // Find the leaf children
      var traverse = function traverse(_ref5) {
        var node = _ref5.node,
            children = _ref5.children;

        var value = (0, _propsUtil.getPropsData)(node).value;
        if (!children || children.length === 0) {
          targetValueList.push({
            label: getLabel(values[value], valueEntities[value], treeNodeLabelProp),
            value: value
          });
          return;
        }

        children.forEach(function (entity) {
          traverse(entity);
        });
      };

      hierarchyList.forEach(function (entity) {
        traverse(entity);
      });

      return targetValueList;
    }
  }

  return valueList.map(function (wrappedValue) {
    return {
      label: getLabel(wrappedValue, valueEntities[wrappedValue.value], treeNodeLabelProp),
      value: wrappedValue.value
    };
  });
}

/**
 * Use `rc-tree` convertDataToTree to convert treeData to TreeNodes.
 * This will change the label to title value
 */
function processProps(props) {
  var title = props.title,
      label = props.label,
      value = props.value,
      cls = props['class'],
      style = props.style,
      _props$on = props.on,
      on = _props$on === undefined ? {} : _props$on;

  var key = props.key;
  if (!key && (key === undefined || key === null)) {
    key = value;
  }
  var p = {
    props: (0, _omit2['default'])(props, ['on', 'key', 'class', 'className', 'style']),
    on: on,
    'class': cls || props.className,
    style: style,
    key: key
  };
  // Warning user not to use deprecated label prop.
  if (label && !title) {
    if (!warnDeprecatedLabel) {
      (0, _warning2['default'])(false, "'label' in treeData is deprecated. Please use 'title' instead.");


ion;
            attribute vec4 aTextureCoord;
            varying vec2 vTextureCoord;
            void main() {
              gl_Position = uMVPMatrix * aPosition;
              vTextureCoord = (uSTMatrix * aTextureCoord).xy;
            }
            """
    private var mFragmentShader = """
            #extension GL_OES_EGL_image_external : require
            precision mediump float;
            varying vec2 vTextureCoord;
            uniform samplerExternalOES sTexture;
            void main() {
              gl_FragColor = texture2D(sTexture, vTextureCoord);
            }
            """
    private val mMVPMatrix = FloatArray(16)
    private val mProjMatrix = FloatArray(16)
    private val mMMatrix = FloatArray(16)
    private val mVMatrix = FloatArray(16)
    private val mSTMatrix = FloatArray(16)
    private var mProgram = 0
    private var mTextureID = 0
    private var muMVPMatrixHandle = 0
    private var muSTMatrixHandle = 0
    private var maPositionHandle = 0
    private var maTextureHandle = 0
    private var mRatio = 1.0f
    var surfaceTexture: SurfaceTexture? = null
        private set
    private var updateSurface = false
    // private var mLastTime: Long = -1
    // private var mRunTime: Long = 0

    private val handler = Handler()

    // 是否截屏
    var takeShotPic = false
    // true, 高清截图; false, 一般截图
    var highShot = false
    var videoShotListener: IRenderView.VideoShotListener ? = null

    var effect: ShaderInterface = NoEffect()
        set(value) {
            mFragmentShader = value.getShader(glRenderViewListener as GLRenderView)
            field = value
        }

    companion object {
        private const val TAG = "GLViewRender"
        private const val FLOAT_SIZE_BYTES = 4
        private const val VERTICES_DATA_STRIDE_BYTES = 5 * FLOAT_SIZE_BYTES
        private const val VERTICES_DATA_POS_OFFSET = 0
        private const val VERTICES_DATA_UV_OFFSET = 3

        // Magic key
        private const val GL_TEXTURE_EXTERNAL_OES = 0x8D65
    }

    init {
        mVertices = ByteBuffer.allocateDirect(mVerticesData.size
                * FLOAT_SIZE_BYTES).order(ByteOrder.nativeOrder()).asFloatBuffer()
        mVertices.put(mVerticesData).position(0)
        Matrix.setIdentityM(mSTMatrix, 0)
    }

    override fun onDrawFrame(gl: GL10?) {
        synchronized(this) {
            if (updateSurface) {
                surfaceTexture!!.updateTexImage()
                surfaceTexture!!.getTransformMatrix(mSTMatrix)
                updateSurface = false
            }
        }
        // Ignore the passed-in GL10 interface, and use the GLES20
        // class's static methods instead.
        GLES20.glClear(GLES20.GL_DEPTH_BUFFER_BIT or GLES20.GL_COLOR_BUFFER_BIT)
        GLES20.glUseProgram(mProgram)
        checkGlError("glUseProgram")
        GLES20.glActiveTexture(GLES20.GL_TEXTURE0)
        GLES20.glBindTexture(GL_TEXTURE_EXTERNAL_OES, mTextureID)
        mVertices.position(VERTICES_DATA_POS_OFFSET)
        GLES20.glVertexAttribPointer(maPositionHandle, 3, GLES20.GL_FLOAT, false,
                VERTICES_DATA_STRIDE_BYTES, mVertices)
        checkGlError("glVertexAttribPointer maPosition")
        GLES20.glEnableVertexAttribArray(maPositionHandle)
        checkGlError("glEnableVertexAttribArray maPositionHandle")
        mVertices.


// Open compass/character menu
        queryBuilder.then(QueryStep.useItemInHotbar(InventoryUtils.COMPASS_SLOT_NUM)
                .expectContainerTitle(ContainerModel.CHARACTER_INFO_NAME)
                .processIncomingContainer(this::parseCharacterContainer));

        // Scan guild container, if the player is in a guild
        Models.Guild.addGuildContainerQuerySteps(queryBuilder);

        queryBuilder.build().executeQuery();

        previousScanId = id;
    }

    public VehicleType getVehicle() {
        return vehicle;
    }

    public void setVehicle(VehicleType vehicle) {
        this.vehicle = vehicle;
    }

    @SubscribeEvent
    public void onVehicleSet(SetLocalPlayerVehicleEvent event) {
        if (event.getVehicle() == null) {
            setVehicle(VehicleType.NONE);
            return;
        }
        Entity vehicle = event.getVehicle();
        if (vehicle instanceof AbstractHorse) {
            setVehicle(VehicleType.HORSE);
        } else if (vehicle instanceof Display) {
            setVehicle(VehicleType.DISPLAY);
        } else {
            setVehicle(VehicleType.OTHER);
        }
    }

    private void parseCharacterContainer(ContainerContent container) {
        ItemStack characterInfoItem = container.items().get(CHARACTER_INFO_SLOT);
        ItemStack professionInfoItem = container.items().get(PROFESSION_INFO_SLOT);
        ItemStack guildInfoItem = container.items().get(GUILD_MENU_SLOT);

        Models.Profession.resetValueFromItem(professionInfoItem);
        Models.Guild.parseGuildInfoFromGuildMenu(guildInfoItem);

        parseCharacterFromCharacterMenu(characterInfoItem);
        hasCharacter = true;
        WynntilsMod.postEvent(new CharacterUpdateEvent());
        WynntilsMod.info("Deducing character " + getCharacterString());
    }

    private void updateCharacterId() {
        ItemStack compassItem = McUtils.inventory().items.get(CHARACTER_INFO_SLOT);
        List<StyledText> compassLore = LoreUtils.getLore(compassItem);
        StyledText idLine = compassLore.getFirst();

        if (idLine == null || !idLine.matches(CHARACTER_ID_PATTERN)) {
            WynntilsMod.warn("Compass item had unexpected character ID line: " + idLine);
            return;
        }

        id = idLine.getString();
        WynntilsMod.info("Selected character: " + id);
    }

    private String getCharacterString() {
        return "CharacterInfo{" + "classType="
                + classType + ", reskinned="
                + reskinned + ", level="
                + level + ", id="
                + id + '}';
    }

    private void parseCharacterFromCharacterMenu(ItemStack characterInfoItem) {
        List<StyledText> lore = LoreUtils.getLore(characterInfoItem);

        int foundLevel = 0;
        String className = "";

        for (StyledText line : lore) {
            Matcher levelMatcher = line.getMatcher(INFO_MENU_LEVEL_PATTERN);
            if (levelMatcher.matches()) {
                foundLevel = Integer.parseInt(levelMatcher.group(1));
                continue;
            }

            Matcher classMatcher = line.getMatcher(INFO_MENU_CLASS_PATTERN);

            if (classMatcher.matches()) {
                className = classMatcher.group(1);
            }
        }
        ClassType foundClassType = ClassType.fromName(className);

        updateCharacterInfo(foun


reak; case "k" : result += "𝑘"; break; case "l" : result += "𝑙"; break;
                case "m" : result += "𝑚"; break; case "n" : result += "𝑛"; break; case "o" : result += "𝑜"; break;
                case "p" : result += "𝑝"; break; case "q" : result += "𝑞"; break; case "r" : result += "𝑟"; break;
                case "s" : result += "𝑠"; break; case "t" : result += "𝑡"; break; case "u" : result += "𝑢"; break;
                case "v" : result += "𝑣"; break; case "w" : result += "𝑤"; break; case "x" : result += "𝑥"; break;
                case "y" : result += "𝑦"; break; case "z" : result += "𝑧"; break;

                case "A" : result += "𝐴"; break; case "B" : result += "𝐵"; break; case "C" : result += "𝐶"; break;
                case "D" : result += "𝐷"; break; case "E" : result += "𝐸"; break; case "F" : result += "𝐹"; break;
                case "G" : result += "𝐺"; break; case "H" : result += "𝐻"; break; case "I" : result += "𝐼"; break;
                case "J" : result += "𝐽"; break; case "K" : result += "𝐾"; break; case "L" : result += "𝐿"; break;
                case "M" : result += "𝑀"; break; case "N" : result += "𝑁"; break; case "O" : result += "𝑂"; break;
                case "P" : result += "𝑃"; break; case "Q" : result += "𝑄"; break; case "R" : result += "𝑅"; break;
                case "S" : result += "𝑆"; break; case "T" : result += "𝑇"; break; case "U" : result += "𝑈"; break;
                case "V" : result += "𝑉"; break; case "W" : result += "𝑊"; break; case "X" : result += "𝑋"; break;
                case "Y" : result += "𝑌"; break; case "Z" : result += "𝑍"; break;

                case "(" : result += "⟮"; break; case ")" : result += "⟯"; break;
                default  : result += char; break;
            }
        }
        return result;
    }

}import { Vec } from 'lib/primitives'
import { SpriteSheet } from 'lib/graphics'
import { DynamicObject } from 'lib/engine'

export default class Car extends DynamicObject {

	static VPOS = 0.8 // how far down the screen to draw
	static MAX_SPEED = 50
	static MAX_TURN = 0.7
	static ACCEL = 1
	static DECEL = 0.4 // percentage of acceleration
	static OFF_TRACK = 2 // percentage of acceleration

	// from -1 (far left) to 1 (far right)
	curveDiff = 0
	distance = 0
	acc = 0
	speed = 0
	curvature = 0

	private carSheet: SpriteSheet
	private turning = 0

	constructor(img: HTMLImageElement, private trackLength: number) {
		super()
		this.carSheet = new SpriteSheet(img, 9, 1)
	}

	update(trackCurvature: number) {
		this.curveDiff = this.curvature


https://github.com/postcss/autoprefixer
[plugins]:              https://github.com/postcss/postcss#plugins

## Docs
Read **[full docs](https://github.com/postcss/postcss#readme)** on GitHub.
# Cropper

[![Build Status](https://travis-ci.org/fengyuanchen/cropper.svg)](https://travis-ci.org/fengyuanchen/cropper) [![Downloads](https://img.shields.io/npm/dm/cropper.svg)](https://www.npmjs.com/package/cropper) [![Version](https://img.shields.io/npm/v/cropper.svg)](https://www.npmjs.com/package/cropper)

> A simple jQuery image cropping plugin. As of v4.0.0, the core code of Cropper is replaced with [Cropper.js](https://github.com/fengyuanchen/cropperjs).

- [Demo](https://fengyuanchen.github.io/cropper)
- [Cropper.js](https://github.com/fengyuanchen/cropperjs) - JavaScript image cropper (**recommended**)
- [jquery-cropper](https://github.com/fengyuanchen/jquery-cropper) - A jQuery plugin wrapper for Cropper.js (**recommended** for jQuery users to use this instead of Cropper)

## Main

```text
dist/
├── cropper.css
├── cropper.min.css   (compressed)
├── cropper.js        (UMD)
├── cropper.min.js    (UMD, compressed)
├── cropper.common.js (CommonJS, default)
└── cropper.esm.js    (ES Module)
```

## Getting started

### Installation

```shell
npm install cropper jquery
```

Include files:

```html
<script src="/path/to/jquery.js"></script><!-- jQuery is required -->
<link  href="/path/to/cropper.css" rel="stylesheet">
<script src="/path/to/cropper.js"></script>
```

### Usage

Initialize with `$.fn.cropper` method.

```html
<!-- Wrap the image or canvas element with a block element (container) -->
<div>
  <img id="image" src="picture.jpg">
</div>
```

```css
/* Limit image width to avoid overflow the container */
img {
  max-width: 100%; /* This rule is very important, please do not ignore this! */
}
```

```js
var $image = $('#image');

$image.cropper({
  aspectRatio: 16 / 9,
  crop: function(event) {
    console.log(event.detail.x);
    console.log(event.detail.y);
    console.log(event.detail.width);
    console.log(event.detail.height);
    console.log(event.detail.rotate);
    console.log(event.detail.scaleX);
    console.log(event.detail.scaleY);
  }
});

// Get the Cropper.js instance after initialized
var cropper = $image.data('cropper');
```

## Options

See the available [options](https://github.com/fengyuanchen/cropperjs#options) of Cropper.js.

```js
$().cropper(options);
```

## Methods

See the available [methods](https://github.com/fengyuanchen/cropperjs#methods) of Cropper.js.

```js
$().cropper('method', argument1, , argument2, ..., argumentN);
```

## Events

See the available [events](https://github.com/fengyuanchen/cropperjs#events) of Cropper.js.

```js
$().on('event', handler);
```

## No conflict

If you have to use other plugin with the same namespace, just call the `$.fn.cropper.noConflict` method to revert to it.

```html


			pwarn("CLEARING EXISTING JOURNAL\n");
			sblock->fs_flags &= ~FS_DOWAPBL;
			sblock->fs_journal_flags = UFS_WAPBL_FLAGS_CLEAR_LOG;
			sbdirty();
			ret = FSCK_EXIT_CHECK_FAILED;
		} else {
			switch(sblock->fs_journal_location) {
			case UFS_WAPBL_JOURNALLOC_END_PARTITION:
				addr =
				  sblock->fs_journallocs[UFS_WAPBL_EPART_ADDR];
				count =
				  sblock->fs_journallocs[UFS_WAPBL_EPART_COUNT];
				blksize =
				  sblock->fs_journallocs[UFS_WAPBL_EPART_BLKSZ];
				break;
			case UFS_WAPBL_JOURNALLOC_IN_FILESYSTEM:
				addr =
				  sblock->fs_journallocs[UFS_WAPBL_INFS_ADDR];
				count =
				  sblock->fs_journallocs[UFS_WAPBL_INFS_COUNT];
				blksize =
				  sblock->fs_journallocs[UFS_WAPBL_INFS_BLKSZ];
				break;
			default:
				pfatal("INVALID JOURNAL LOCATION %d",
				    sblock->fs_journal_location);
				if (reply("CONTINUE") == 0) {
					exit(FSCK_EXIT_CHECK_FAILED);
				}
				pwarn("CLEARING EXISTING JOURNAL\n");
				sblock->fs_flags &= ~FS_DOWAPBL;
				sblock->fs_journal_flags = UFS_WAPBL_FLAGS_CLEAR_LOG;
				sblock->fs_journal_location =
				    UFS_WAPBL_JOURNALLOC_NONE;
				sbdirty();
				ret = FSCK_EXIT_CHECK_FAILED;
				break;
			}
			if (sblock->fs_flags & FS_DOWAPBL) {
				error = wapbl_replay_start(
				    &wapbl_replay, 0, addr, count, blksize);
				if (error) {
					pfatal(
					   "UNABLE TO READ JOURNAL FOR REPLAY");
					if (reply("CONTINUE") == 0) {
						exit(FSCK_EXIT_CHECK_FAILED);
					}
					pwarn("CLEARING EXISTING JOURNAL\n");
					sblock->fs_flags &= ~FS_DOWAPBL;
					sblock->fs_journal_flags = UFS_WAPBL_FLAGS_CLEAR_LOG;
					sbdirty();
					ret = FSCK_EXIT_CHECK_FAILED;
				}
			}
		}
	}
	/*
	 * at this time fs_journal_flags can only be 0,
	 * UFS_WAPBL_FLAGS_CREATE_LOG or UFS_WAPBL_FLAGS_CLEAR_LOG.
	 * We can't have both flags at the same time.
	 */
	switch (sblock->fs_journal_flags) {
	case 0:
		break;
	case UFS_WAPBL_FLAGS_CREATE_LOG:
	case UFS_WAPBL_FLAGS_CLEAR_LOG:
		switch(sblock->fs_journal_location) {
		case UFS_WAPBL_JOURNALLOC_END_PARTITION:
		case UFS_WAPBL_JOURNALLOC_IN_FILESYSTEM:
			break;
		case UFS_WAPBL_JOURNALLOC_NONE:
			if (sblock->fs_journal_flags ==
			    UFS_WAPBL_FLAGS_CLEAR_LOG)
				break;
			/* FALLTHROUGH */
		default:
			pfatal("INVALID JOURNAL LOCATION %d",
			    sblock->fs_journal_location);
			if (reply("CONTINUE") == 0) {
				exit(FSCK_EXIT_CHECK_FAILED);
			}
			pwarn("CLEARING JOURNAL FLAGS\n");
			sblock->fs_journal_flags = 0;
			sblock->fs_journal_location =
			    UFS_WAPBL_JOURNALLOC_NONE;
			sbdirty();
			ret = FSCK_EXIT_CHECK_FAILED;
			break;
		}
		break;
	default:
		pfatal("INVALID JOURNAL FLAGS %d",
		    sblock->fs_journal_flags);
		if (reply("CONTINUE") == 0) {
			exit(FSCK_EXIT_CHECK_FAILED);
		}
		pwarn("CLEARING JOURNAL FLAGS\n");
		sblock->fs_journal_flags = 0;
		sblock->fs_journal_location =
		    UFS_WAPBL_JOURNALLOC_NONE;
		sbdirty();
		ret = FSCK_EXIT_CHECK_FAILED;
		break;
	}
	return ret;
}


 modify the *state* of the model components, it affects all the other pipelines that share the same components. For example, if you call [`~diffusers.loaders.IPAdapterMixin.unload_ip_adapter`] on the [`StableDiffusionSAGPipeline`], you won't be able to use IP-Adapter with the [`StableDiffusionPipeline`] because it's been removed from their shared components.

```py
pipe.sag_unload_ip_adapter()

generator = torch.Generator(device="cpu").manual_seed(33)
out_sd = pipe_sd(
    prompt="bear eats pizza",
    negative_prompt="wrong white balance, dark, sketches,worst quality,low quality",
    ip_adapter_image=image,
    num_inference_steps=50,
    generator=generator,
).images[0]
"AttributeError: 'NoneType' object has no attribute 'image_projection_layers'"
```

### Memory usage of from_pipe

The memory requirement of loading multiple pipelines with [`~DiffusionPipeline.from_pipe`] is determined by the pipeline with the highest memory-usage regardless of the number of pipelines you create.

| Pipeline | Memory usage (GB) |
|---|---|
| StableDiffusionPipeline | 4.400 |
| StableDiffusionSAGPipeline | 4.400 |
| AnimateDiffPipeline | 15.178 |

The [`AnimateDiffPipeline`] has the highest memory requirement, so the *total memory-usage* is based only on the [`AnimateDiffPipeline`]. Your memory-usage will not increase if you create additional pipelines as long as their memory requirements doesn't exceed that of the [`AnimateDiffPipeline`]. Each pipeline can be used interchangeably without any additional memory overhead.

## Safety checker

Diffusers implements a [safety checker](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/safety_checker.py) for Stable Diffusion models which can generate harmful content. The safety checker screens the generated output against known hardcoded not-safe-for-work (NSFW) content. If for whatever reason you'd like to disable the safety checker, pass `safety_checker=None` to the [`~DiffusionPipeline.from_pretrained`] method.

```python
from diffusers import DiffusionPipeline

pipeline = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", safety_checker=None, use_safetensors=True)
"""
You have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing `safety_checker=None`. Ensure that you abide by the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend keeping the safety filter enabled in all public-facing circumstances, disabling it only for use cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .
"""
```

## Checkpoint variants

A checkpoint variant is usually a checkpoint whose weights are:

- Stored in a different floating point type, such as [torch.float16](https://pytorch.org/docs/stable/tensors.html#data-types), because it only requires half the bandwidth and storage to download. You can't use this variant if you're continuing training or using a CPU.
- Non-exponential mean averaged (EMA) weights which shouldn't be used for inference. You should use this variant to continue finetuning a model.

> [!TIP]
> When the checkpoints have identical model structures, but they were trained on different datasets and with a different training setup, they should be stored in separate repositories. For example, [stabilityai/stable-diffusion-2](https://hf.co/stabilityai/stable-diffusion-2) and [stabilityai/