	return nil, err
		}
	}
	ownerPartitionCert, err := getIssuedCertificate(ownerRoot, ownerPartitionCerts, func(crt *x509.Certificate) bool {
		eq, ok := crt.PublicKey.(interface{ Equal(crypto.PublicKey) bool })
		if ok && eq.Equal(mfrPartitionCert) {
			return true
		}
		return false
	})
	if err != nil {
		return nil, err
	}

	// Get attestation data and signature
	offset := len(attestation) - attestationSignatureSize
	data := attestation[:offset]
	signature := attestation[offset:]

	// Validate with manufacturer certificate
	if err := verifySignature(mfrPartitionCert, data, signature); err != nil {
		return nil, fmt.Errorf("error verifying certificate: %w", err)
	}

	// Validate with google certificate. This certificate and the manufacturer
	// certificate use the same key.
	if err := verifySignature(ownerPartitionCert, data, signature); err != nil {
		return nil, fmt.Errorf("error verifying certificate: %w", err)
	}

	// Parse attestation attributes
	var pub, priv, sym []AttestationAttribute
	if att.Format == kmspb.KeyOperationAttestation_CAVIUM_V1_COMPRESSED {
		pub, priv, err = parseAttestationV1(data, isSymmetric(kv.Algorithm))
		if err != nil {
			return nil, fmt.Errorf("error parsing attestation data: %w", err)
		}
	} else {
		pub, priv, err = parseAttestation(data)
		if err != nil {
			return nil, fmt.Errorf("error parsing attestation data: %w", err)
		}
	}

	attributes := priv
	if len(attributes) == 0 {
		attributes = pub
		if isSymmetric(kv.Algorithm) {
			sym = attributes
			pub = nil
		}
	}

	var keyType string
	var keySize uint32
	var extractable, generated bool
	for _, v := range attributes {
		switch v.Type {
		case 0x0100:
			keyType = getKeyType(decodeUint32(v.Data, math.MaxUint32))
		case 0x0121:
			keySize = decodeUint32(v.Data, 0)
		case 0x0162:
			extractable = bytes.Equal([]byte{0x01}, v.Data)
		case 0x0163:
			generated = bytes.Equal([]byte{0x01}, v.Data)
		}
	}

	if keyType == "RSA" && keySize > 0 {
		keyType = "RSA " + strconv.FormatUint(uint64(keySize), 10)
	}

	return &Attestation{
		Valid:       true,
		Extractable: extractable,
		Generated:   generated,
		KeyType:     keyType,
		Algorithm:   kv.Algorithm.String(),
		Format:      att.Format.String(),
		Content:     att.Content,
		CertChain: &AttestationCertChain{
			ManufacturerRoot:          mfrRootPEM,
			ManufacturerCardCert:      serializeCertificate(mfrCardCert),
			ManufacturerPartitionCert: serializeCertificate(mfrPartitionCert),
			OwnerRoot:                 ownerRootPEM,
			OwnerCardCert:             serializeCertificate(ownerCardCert),
			OwnerPartitionCert:        serializeCertificate(ownerPartitionCert),
		},
		PublicKeyAttributes:    pub,
		PrivateKeyAttributes:   priv,
		SymmetricKeyAttributes: sym,
	}, nil
}

func getIssuedCertificate(issuer *x509.Certificate, certs []*x509.Certificate, validators ...func(*x509.Certificate) bool) (*x509.Certificate, error) {
	roots := x509.NewCertPool()
	roots.AddCert(issuer)

	for _, crt := range certs {
		if issuer.Equal(crt) {
			continue
		}
		if


        }

        println!("`{}` MB scanned", current_pos as f64 / 1024.0 / 1024.0);
    }

    fn scan_documents(&mut self) {
        println!("Scan Start ...");

        // No data to scan ...
        if self.page.data.len() == 0 {
            return;
        }

        let mut num = 0;
        let mut current_pos: u64 = 0;

        println!("Data Size: `{}` bytes", self.page.data.len());

        loop {
            if current_pos == self.page.data.len() as u64 {
                println!("DONE!");
                break;
            }

            if current_pos as u64 > self.page.data.len() as u64 {
                println!("WTF: Corrupt Page!");
                break;
            }

            let mut this_len = self.read_document_size(current_pos);
            current_pos += this_len as u64;
            num += 1;

            println!("[{}] {} bytes", num, this_len);
        }

        println!("`{}` MB scanned", current_pos as f64 / 1024.0 / 1024.0);
    }
    */
}use chrono::NaiveDateTime;
use diesel::{pg::PgConnection, prelude::*};

pub mod models;
pub mod schema;

use self::models::{
    APIScore, APIStatsUser, APIUser, DBScore, DBStatsUpdate, Map, NewDBStatsUpdate, NewDBUser,
};

pub fn store_maps(conn: &PgConnection, maps: &[Map]) -> Result<(), diesel::result::Error> {
    use schema::maps;

    diesel::insert_into(maps::table)
        .values(maps)
        .on_conflict_do_nothing()
        .execute(conn)
        .map(drop)
}

pub fn store_scores(
    conn: &PgConnection,
    user_id: i64,
    scores: Vec<APIScore>,
) -> Result<(Vec<Map>, Vec<DBScore>), diesel::result::Error> {
    use schema::scores;

    let score_count = scores.len();
    let (mut maps, db_scores): (Vec<Map>, Vec<DBScore>) = scores.into_iter().fold(
        (
            Vec::with_capacity(score_count),
            Vec::with_capacity(score_count),
        ),
        |(mut maps, mut db_scores), api_score| {
            let (map, db_score) = api_score.to_db(user_id);
            maps.push(map);
            db_scores.push(db_score);

            (maps, db_scores)
        },
    );

    maps.sort_unstable_by_key(|map| map.id);
    maps.dedup_by_key(|map| map.id);

    store_maps(conn, &maps)?;

    let new_scores: Vec<DBScore> = diesel::insert_into(scores::table)
        .values(&db_scores)
        .on_conflict_do_nothing()
        .returning(scores::all_columns)
        .get_results(conn)?;

    Ok((
        maps.into_iter()
            .filter(|map| new_scores.iter().any(|score| score.map_id == map.id))
            .collect(),
        new_scores,
    ))
}

pub fn store_stats_update(
    conn: &PgConnection,
    stats: APIStatsUser,
) -> Result<Vec<DBStatsUpdate>, diesel::result::Error> {
    use schema::stats_updates;

    let [update_4k, update_7k] = stats.to_db();
    let records: &[NewDBStatsUpdate] = &[update_4k, update_7k];

    diesel::insert_into(stats_updates::table)
        .values(records)
        .returning(stats_updates::all_columns)
        .get_results(conn)
}

pub fn get_stats_updates_for_user(
    conn: &PgConnection,
    user_id: i64,


bKey,
      samDesired,
      Reserved,
      hTransaction,
      pExtendedParameter,
    );
  }

  _dart_RegDeleteKeyTransactedW? _RegDeleteKeyTransactedW;

  int RegDisableReflectionKey(
    ffi.Pointer<HKEY__> hBase,
  ) {
    return (_RegDisableReflectionKey ??= _dylib.lookupFunction<
        _c_RegDisableReflectionKey,
        _dart_RegDisableReflectionKey>('RegDisableReflectionKey'))(
      hBase,
    );
  }

  _dart_RegDisableReflectionKey? _RegDisableReflectionKey;

  int RegEnableReflectionKey(
    ffi.Pointer<HKEY__> hBase,
  ) {
    return (_RegEnableReflectionKey ??= _dylib.lookupFunction<
        _c_RegEnableReflectionKey,
        _dart_RegEnableReflectionKey>('RegEnableReflectionKey'))(
      hBase,
    );
  }

  _dart_RegEnableReflectionKey? _RegEnableReflectionKey;

  int RegQueryReflectionKey(
    ffi.Pointer<HKEY__> hBase,
    ffi.Pointer<ffi.Int32> bIsReflectionDisabled,
  ) {
    return (_RegQueryReflectionKey ??= _dylib.lookupFunction<
        _c_RegQueryReflectionKey,
        _dart_RegQueryReflectionKey>('RegQueryReflectionKey'))(
      hBase,
      bIsReflectionDisabled,
    );
  }

  _dart_RegQueryReflectionKey? _RegQueryReflectionKey;

  int RegDeleteValueA(
    ffi.Pointer<HKEY__> hKey,
    ffi.Pointer<ffi.Int8> lpValueName,
  ) {
    return (_RegDeleteValueA ??=
        _dylib.lookupFunction<_c_RegDeleteValueA, _dart_RegDeleteValueA>(
            'RegDeleteValueA'))(
      hKey,
      lpValueName,
    );
  }

  _dart_RegDeleteValueA? _RegDeleteValueA;

  int RegDeleteValueW(
    ffi.Pointer<HKEY__> hKey,
    ffi.Pointer<ffi.Uint16> lpValueName,
  ) {
    return (_RegDeleteValueW ??=
        _dylib.lookupFunction<_c_RegDeleteValueW, _dart_RegDeleteValueW>(
            'RegDeleteValueW'))(
      hKey,
      lpValueName,
    );
  }

  _dart_RegDeleteValueW? _RegDeleteValueW;

  int RegEnumKeyA(
    ffi.Pointer<HKEY__> hKey,
    int dwIndex,
    ffi.Pointer<ffi.Int8> lpName,
    int cchName,
  ) {
    return (_RegEnumKeyA ??= _dylib
        .lookupFunction<_c_RegEnumKeyA, _dart_RegEnumKeyA>('RegEnumKeyA'))(
      hKey,
      dwIndex,
      lpName,
      cchName,
    );
  }

  _dart_RegEnumKeyA? _RegEnumKeyA;

  int RegEnumKeyW(
    ffi.Pointer<HKEY__> hKey,
    int dwIndex,
    ffi.Pointer<ffi.Uint16> lpName,
    int cchName,
  ) {
    return (_RegEnumKeyW ??= _dylib
        .lookupFunction<_c_RegEnumKeyW, _dart_RegEnumKeyW>('RegEnumKeyW'))(
      hKey,
      dwIndex,
      lpName,
      cchName,
    );
  }

  _dart_RegEnumKeyW? _RegEnumKeyW;

  int RegEnumKeyExA(
    ffi.Pointer<HKEY__> hKey,
    int dwIndex,
    ffi.Pointer<ffi.Int8> lpName,
    ffi.Pointer<ffi.Uint64> lpcchName,
    ffi.Pointer<ffi.Uint64> lpReserved,
    ffi.Pointer<ffi.Int8> lpClass,


 u32,
    pub serial_number: String,
}

impl Device {
    /// Creates an instance of `Device` from plist.
    pub fn from_plist(mut plist: Plist) -> Option<Device> {
        let mut dict = try_opt!(plist.as_dictionary_mut());
        Some(Device {
            device_id: try_opt!(dict.get("DeviceID").and_then(Plist::as_integer).map(|x| x as u32)),
            product_id: try_opt!(dict.get("ProductID").and_then(Plist::as_integer).map(|x| x as u32)),
            location_id: try_opt!(dict.get("LocationID").and_then(Plist::as_integer).map(|x| x as u32)),
            serial_number: try_opt!(dict.remove("SerialNumber").and_then(Plist::into_string)),
        })
    }
}

#[cfg(test)]
mod tests {
    use super::*;
    use expectest::prelude::*;
    use plist::Plist;
    use std::collections::BTreeMap;

    #[test]
    fn test_device_from_plist() {
        let mut map = BTreeMap::new();
        map.insert("ConnectionSpeed".to_owned(), Plist::Integer(480000000));
        map.insert("ConnectionType".to_owned(), Plist::String("USB".to_owned()));
        map.insert("DeviceID".to_owned(), Plist::Integer(3));
        map.insert("LocationID".to_owned(), Plist::Integer(336592896));
        map.insert("ProductID".to_owned(), Plist::Integer(4778));
        map.insert("SerialNumber".to_owned(),Plist::String("fffffffff".to_owned()));

        let device = Device {
            device_id: 3,
            product_id: 4778,
            location_id: 336592896,
            serial_number: "fffffffff".to_owned(),
        };

        expect!(Device::from_plist(Plist::Dictionary(map))).to(be_some().value(device));
    }
}use std::net::{Ipv4Addr, SocketAddr};
use tigray::{setup, tigray_app};
use tracing::debug;

#[tokio::main]
async fn main() -> anyhow::Result<(), anyhow::Error> {
  // read in .env file
  setup();

  // Set the RUST_LOG, if it hasn't been explicitly defined
  if std::env::var_os("RUST_LOG").is_none() {
    std::env::set_var("RUST_LOG", "tigray=debug,tower_http=debug")
  }
  if std::env::var_os("TIGRAY_PORT").is_none() {
    std::env::set_var("TIGRAY_PORT", "5051");
  }
  if std::env::var_os("TIGRAY_HOST").is_none() {
    std::env::set_var("TIGRAY_HOST", "127.0.0.1");
  }

  tracing_subscriber::fmt::init();

  let port_str = std::env::var("TIGRAY_PORT").expect("tigray_PORT is not set");
  let port_num = port_str.parse().expect("TIGRAY_PORT is not a valid number");
  let host_str = std::env::var("TIGRAY_HOST").expect("tigray_HOST is not configured");
  let host_addr: Ipv4Addr = host_str
    .parse()
    .expect("required a dot-notated IPv4 address");
  let addr = SocketAddr::from((host_addr, port_num));

  let app = tigray_app().await?;

  // run it
  debug!("listening on {}", addr);
  axum::Server::bind(&addr)
    .serve(app.into_make_service())
    .await
    .unwrap();
  Ok(())
}
<gh_stars>1-10
//! The snake game.
//!
//! This is not a properly designed game! Mainly game loop, input events
//! handling, UI separation, ... The main purpose of this example is to
//! test the `crossterm` crate and demonstrate some of the capabilities.
use std::convert::TryFrom;
use std::io::{stdout, Write};
use std::iter::Iterator;
use std:


```
PID User     Command                         Swap      USS      PSS      RSS
 6367 tecmint  cat                                0      100      139     1784
 6368 tecmint  cat                                0      100      141     1676
 9307 tecmint  sh -c { sudo /usr/lib/linux        0       96      158     1508
 2864 tecmint  /usr/bin/ck-launch-session         0      144      163     1780
 3544 tecmint  sh -c /usr/lib/linuxmint/mi        0      108      170     1540
 5758 tecmint  gnome-pty-helper                   0      156      176     1916
 7656 tecmint  gnome-pty-helper                   0      156      176     1832
 1441 root     /sbin/getty -8 38400 tty2          0      152      181     2052
 1434 root     /sbin/getty -8 38400 tty5          0      156      184     2060
 1444 root     /sbin/getty -8 38400 tty3          0      156      184     2060
 1432 root     /sbin/getty -8 38400 tty4          0      156      185     2124
 1452 root     /sbin/getty -8 38400 tty6          0      164      193     2064
 2619 root     /sbin/getty -8 38400 tty1          0      164      193     2136
 1504 root     acpid -c /etc/acpi/events -        0      220      232     1604
 3311 tecmint  syndaemon -i 0.5 -K -R             0      260      298     2564
 3143 rtkit    /usr/lib/rtkit/rtkit-daemon        0      300      324     2548
 1588 root     cron                               0      292      326     2344
 1589 avahi    avahi-daemon: chroot helpe         0      124      332     1632
 1523 root     /usr/sbin/irqbalance               0      316      340     2096
  585 root     upstart-socket-bridge --dae        0      328      349     1820
 3033 tecmint  /usr/bin/dbus-launch --exit        0      328      359     2160
 1346 root     upstart-file-bridge --daemo        0      348      370     1776
 2607 root     /usr/bin/xdm                       0      188      375     2368
 1635 kernoops /usr/sbin/kerneloops               0      352      384     2684
  344 root     upstart-udev-bridge --daemo        0      400      426     2132
.....
-------------------------------------------------------------------------------
  134 11                                          0  2171428  2376266  3587972
```

另外，smem 也提供了选项以图形的形


OST_ASIO_HAS_MOVE) && !defined(BOOST_ASIO_MOVE_CAST)
# define BOOST_ASIO_MOVE_ARG(type) type&&
# define BOOST_ASIO_MOVE_CAST(type) static_cast<type&&>
# define BOOST_ASIO_MOVE_CAST2(type1, type2) static_cast<type1, type2&&>
#endif // defined(BOOST_ASIO_HAS_MOVE) && !defined(BOOST_ASIO_MOVE_CAST)

// If BOOST_ASIO_MOVE_CAST still isn't defined, default to a C++03-compatible
// implementation. Note that older g++ and MSVC versions don't like it when you
// pass a non-member function through a const reference, so for most compilers
// we'll play it safe and stick with the old approach of passing the handler by
// value.
#if !defined(BOOST_ASIO_MOVE_CAST)
# if defined(__GNUC__)
#  if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
#   define BOOST_ASIO_MOVE_ARG(type) const type&
#  else // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
#   define BOOST_ASIO_MOVE_ARG(type) type
#  endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
# elif defined(BOOST_ASIO_MSVC)
#  if (_MSC_VER >= 1400)
#   define BOOST_ASIO_MOVE_ARG(type) const type&
#  else // (_MSC_VER >= 1400)
#   define BOOST_ASIO_MOVE_ARG(type) type
#  endif // (_MSC_VER >= 1400)
# else
#  define BOOST_ASIO_MOVE_ARG(type) type
# endif
# define BOOST_ASIO_MOVE_CAST(type) static_cast<const type&>
# define BOOST_ASIO_MOVE_CAST2(type1, type2) static_cast<const type1, type2&>
#endif // !defined(BOOST_ASIO_MOVE_CAST)

// Support variadic templates on compilers known to allow it.
#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
# if !defined(BOOST_ASIO_DISABLE_VARIADIC_TEMPLATES)
#  if defined(__clang__)
#   if __has_feature(__cxx_variadic_templates__)
#    define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1
#   endif // __has_feature(__cxx_variadic_templates__)
#  endif // defined(__clang__)
#  if defined(__GNUC__)
#   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
#     define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1
#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
#   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
#  endif // defined(__GNUC__)
# endif // !defined(BOOST_ASIO_DISABLE_VARIADIC_TEMPLATES)
#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)

// Support constexpr on compilers known to allow it.
#if !defined(BOOST_ASIO_HAS_CONSTEXPR)
# if !defined(BOOST_ASIO_DISABLE_CONSTEXPR)
#  if defined(__clang__)
#   if __has_feature(__cxx_constexpr__)
#    define BOOST_ASIO_HAS_CONSTEXPR 1
#   endif // __has_feature(__cxx_constexr__)
#  endif // defined(__clang__)
#  if defined(__GNUC__)
#   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
#    if defined(__GXX_EXPER


gress-bar">

				 /

<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <meta name="theme-color" content="#000000" />

    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
    <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />

    <title>React App</title>

      You need to enable JavaScript to run this app.

<!doctype html>

  <meta charset="utf-8">
  <title>Under Maintenance · Buildkite</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link rel="stylesheet" href="https://buildkite-maintenance-page.s3.amazonaws.com/css/normalize.css">
  <link rel="stylesheet" href="https://buildkite-maintenance-page.s3.amazonaws.com/css/main.css">
  <link rel="stylesheet" href="https://buildkite-maintenance-page.s3.amazonaws.com/css/fonts.css">

      <svg width="37" height="24" viewBox="0 0 37 24" fill="none" xmlns="http


314
    .train 122,3 << Mage
    .train 633,3 << Paladin
step << Mage/Paladin
    #xprate <1.5
    #optional
    #completewith next
    .goto Ironforge,49.11,56.02,30,0
    .goto Ironforge,44.08,46.60,20,0
    .goto Ironforge,40.84,44.59,20,0
    .goto Ironforge,35.30,32.76,20,0
    .goto Ironforge,27.17,12.58,20,0 << Paladin
    .goto Ironforge,27.60,11.06,20,0 << Mage
    .goto Ironforge,27.17,8.58,12 >>Travel toward |cRXP_FRIENDLY_Dink|r << Mage
    .goto Ironforge,23.131,6.143,12 >>Travel toward |cRXP_FRIENDLY_Brandur Ironhammer|r << Paladin
step << Mage
    #xprate <1.5
    .goto Ironforge,27.17,8.58
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Dink|r inside
    .train 122 >> Train your class spells
    .target Dink
--XX Alternative mage train if they didn't get 10 in Goldshire
step << Paladin
    #xprate <1.5
    .goto Ironforge,23.131,6.143
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Brandur Ironhammer|r inside
    .train 633 >> Train your class spells
    .target Brandur Ironhammer
--XX Alternative paladin train if they didn't get 10 in Goldshire
step << skip --logout skip << Mage/Paladin
    #xprate <1.5
    #ssf
    #optional
    .goto 1455,25.238,10.965,-1
    .goto 1455,24.300,8.708,-1
    .zone Dun Morogh >>|cRXP_WARN_Jump on top of either pillar above |cRXP_FRIENDLY_Toldren Deepiron|r or |cRXP_FRIENDLY_Braenna Flintcrag|r, position your character until it looks like they're floating, then perform a Logout Skip by logging out and back in|r
    .isQuestAvailable 314
    .train 122,3 << Mage
    .train 633,3 << Paladin
step
    #ah
    .goto Ironforge,25.800,75.500,-1
    .goto Ironforge,24.200,74.600,-1
    .goto Ironforge,23.800,71.800,-1
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to an |cRXP_FRIENDLY_Ironforge Auctioneer|r
    >>|cRXP_BUY_Buy|r |T133970:0|t|cRXP_LOOT_[Chunks of Boar Meat]|r |cRXP_BUY_and/or|r |T133970:0|t|cRXP_LOOT_[Stringy Wolf Meat]|r |cRXP_BUY_to level your|r |T133971:0|t[Cooking] |cRXP_BUY_with later|r
    >>|cRXP_WARN_You need 50|r |T133971:0|t[Cooking] |cRXP_WARN_for a quest in Darkshire later|r
    >>|cRXP_WARN_If you don't want to or can't do this, skip this step|r
    >>|cRXP_BUY_Buy the following items for a faster turn in at Loch Modan shortly and to level your|r |T133971:0|t[Cooking] |cRXP_BUY_skill with:|r
    >>|T134342:0|t[Boar Intestines]
    >>|T134027:0|t[Bear Meat]
    >>|T134437:0|t[Spider Ichor]
    >>|T133970:0|t|cRXP_LOOT_[


lettres",
  [186630] = "Forge",
  [186631] = "Enclume",
  [186633] = "Pièces d\'or",
  [186634] = "Pièces d\'or",
  [186648] = "Malle d\'Hazlek",
  [186658] = "Coffre de Norkani",
  [186667] = "Paquet de Norkani",
  [186668] = "Piège explosif",
  [186669] = "Piège givrant",
  [186670] = "Piège à serpents",
  [186671] = "Vase de Kasha",
  [186672] = "Sac de Kasha",
  [186680] = "Auvent de la fête des Brasseurs",
  [186681] = "Pavillon à nourriture de la fête des Brasseurs",
  [186682] = "Pavillon à boisson de la fête des Brasseurs",
  [186683] = "Wagon à bière vide",
  [186685] = "Taupe mécanique sombrefer",
  [186709] = "Tonneau de la fête des brasseurs debout",
  [186714] = "Mini-estrade",
  [186717] = "Bannière de la fête des Brasseurs",
  [186720] = "Effigie de feu",
  [186728] = "Portail massif",
  [186729] = "Buisson à baies de mana",
  [186730] = "Doodad_ET_Holographic_Stand01",
  [186731] = "Doodad_ET_Holographic_Stand02",
  [186733] = "La carte de Zul\'Aman",
  [186734] = "Boîte à charmes amani",
  [186736] = "Sac de pognon",
  [186737] = "Chariot de la fête des Brasseurs plein",
  [186738] = "Tonnelet de la fête des Brasseurs",
  [186739] = "Boîte à charmes amani",
  [186740] = "Boîte à charmes amani",
  [186741] = "Boîte à charmes amani",
  [186744] = "Boîte à trésors amani",
  [186745] = "Feu",
  [186748] = "Tonneau de bière de Bakkalzu",
  [186750] = "Artifices de Fudgerick",
  [186807] = "Chariot cassé",
  [186808] = "Tonneau brisé",
  [186809] = "Tonneau brisé",
  [186811] = "Portail à rafraîchissements",
  [186812] = "Table à rafraîchissements",
  [186846] = "Doodad_Cauldron01",
  [186847] = "Doodad_potbellystovewall01",
  [186853] = "Stove",
  [186858] = "Doodad_ZulAman_WindDoor01",
  [186859] = "Doodad_ZulAman_FireDoor01",
  [186860] = "Zul\'Aman - Torche de l\'autel - Dieu Ours",
  [186865] = "Tambour amani",
  [186880] = "Taupe mécanique sombrefer",
  [186881] = "Plans de sabotage des Sombrefers",
  [186887] = "Grosse citrouille de la Sanssaint",
  [186896] = "Banc",
  [186897] = "Banc",
  [186898] = "Banc",
  [186899] = "Banc",
  [186900] = "Banc",
  [186901] = "Banc",
  [186902] = "Banc",


) {
        div(this, this, b.x)
    }

    infix operator fun rem(b: Int) = rem(Vec1i(), this, b)
    infix operator fun rem(b: Vec1i) = rem(Vec1i(), this, b.x)

    fun rem(b: Int, res: Vec1i) = rem(res, this, b)
    fun rem(b: Vec1i, res: Vec1i) = rem(res, this, b.x)

    infix operator fun remAssign(b: Int) {
        rem(this, this, b)
    }
    infix operator fun remAssign(b: Vec1i) {
        rem(this, this, b.x)
    }

    // -- Specific bitwise operators --

    infix fun and(b: Int) = and(Vec1i(), this, b)
    infix fun and(b: Vec1i) = and(Vec1i(), this, b.x)

    fun and(b: Int, res: Vec1i) = and(res, this, b)
    fun and(b: Vec1i, res: Vec1i) = and(res, this, b.x)

    infix fun andAssign(b: Int) = and(this, this, b)
    infix fun andAssign(b: Vec1i) = and(this, this, b.x)

    infix fun or(b: Int) = or(Vec1i(), this, b)
    infix fun or(b: Vec1i) = or(Vec1i(), this, b.x)

    fun or(b: Int, res: Vec1i) = or(res, this, b)
    fun or(b: Vec1i, res: Vec1i) = or(res, this, b.x)

    infix fun orAssign(b: Int) = or(this, this, b)
    infix fun orAssign(b: Vec1i) = or(this, this, b.x)

    infix fun xor(b: Int) = xor(Vec1i(), this, b)
    infix fun xor(b: Vec1i) = xor(Vec1i(), this, b.x)

    fun xor(b: Int, res: Vec1i) = xor(res, this, b)
    fun xor(b: Vec1i, res: Vec1i) = xor(res, this, b.x)

    infix fun xorAssign(b: Int) = xor(this, this, b)
    infix fun xorAssign(b: Vec1i) = xor(this, this, b.x)

    infix fun shl(b: Int) = shl(Vec1i(), this, b)
    infix fun shl(b: Vec1i) = shl(Vec1i(), this, b.x)

    fun shl(b: Int, res: Vec1i) = shl(res, this, b)
    fun shl(b: Vec1i, res: Vec1i) = shl(res, this, b.x)

    infix fun shlAssign(b: Int) = shl(this, this, b)
    infix fun shlAssign(b: Vec1i) = shl(this, this, b.x)

    infix fun shr(b: Int) = shr(Vec1i(), this, b)
    infix fun shr(b: Vec1i) = shr(Vec1i(), this, b.x)

    fun shr(b: Int, res: Vec1i) = shr(res, this, b)
    fun shr(b: Vec1i, res: Vec1i) = shr(res, this, b.x)

    infix fun shrAssign(b: Int) = shr(this, this, b)
    infix fun shrAssign(b: Vec1i) = shr(this, this, b.x)

    companion object : opVec1i {
        const val length = Vec1t.LENGTH
        @JvmField
        val size = length * Int.BYTES
    }

    override fun size() = size

    override fun equals(other: Any?) = other is Vec1i && this[0] == other[0]
    fun equal(b: Vec1i, epsilon: Int = 0): Boolean = abs(x - b.x) <= epsilon
    fun notEqual(b: Vec1i, epsilon: Int = 0): Boolean = !equal(b, epsilon)

    override fun hashCode() = x.hashCode()

    //@formatter:off
    override inline var _x get() = x; set(value) { x = value }
    override inline var r get() = x; set(value) { x = value }
    override inline var s get() = x; set(value) { x = value }
    //@formatter:on

    override inline operator fun get(index: Int): Int {
        if (index == 0) return x
        throw IndexOutOfBoundsException()
    }

    override inline operator fun set(index: Int, value: Int) {
        if (index == 0) {


location := time.Now().Location()

	return &UI{
		In:                os.Stdin,
		Out:               color.Output,
		OutForInteraction: os.Stdout,
		Err:               os.Stderr,
		colorEnabled:      config.ColorEnabled(),
		translate:         translateFunc,
		terminalLock:      &sync.Mutex{},
		Exiter:            realExiter,
		fileLock:          &sync.Mutex{},
		Interactor:        realInteract,
		IsTTY:             config.IsTTY(),
		TerminalWidth:     config.TerminalWidth(),
		TimezoneLocation:  location,
	}, nil
}

// NewPluginUI will return a UI object where OUT and ERR are customizable.
func NewPluginUI(config Config, outBuffer io.Writer, errBuffer io.Writer) (*UI, error) {
	translateFunc, translationError := GetTranslationFunc(config)
	if translationError != nil {
		return nil, translationError
	}

	location := time.Now().Location()

	return &UI{
		In:                nil,
		Out:               outBuffer,
		OutForInteraction: outBuffer,
		Err:               errBuffer,
		colorEnabled:      configv3.ColorDisabled,
		translate:         translateFunc,
		terminalLock:      &sync.Mutex{},
		Exiter:            realExiter,
		fileLock:          &sync.Mutex{},
		Interactor:        realInteract,
		IsTTY:             config.IsTTY(),
		TerminalWidth:     config.TerminalWidth(),
		TimezoneLocation:  location,
	}, nil
}

// NewTestUI will return a UI object where Out, In, and Err are customizable,
// and colors are disabled
func NewTestUI(in io.Reader, out io.Writer, err io.Writer) *UI {
	translationFunc, translateErr := generateTranslationFunc([]byte("[]"))
	if translateErr != nil {
		panic(translateErr)
	}

	return &UI{
		In:                in,
		Out:               out,
		OutForInteraction: out,
		Err:               err,
		Exiter:            realExiter,
		colorEnabled:      configv3.ColorDisabled,
		translate:         translationFunc,
		Interactor:        realInteract,
		terminalLock:      &sync.Mutex{},
		fileLock:          &sync.Mutex{},
		TimezoneLocation:  time.UTC,
	}
}

// DeferText translates the template, substitutes in templateValues, and
// Enqueues the output to be presented later via FlushDeferred. Only the first
// map in templateValues is used.
func (ui *UI) DeferText(template string, templateValues ...map[string]interface{}) {
	s := fmt.Sprintf("%s\n", ui.TranslateText(template, templateValues...))
	ui.deferred = append(ui.deferred, s)
}

func (ui *UI) DisplayDeprecationWarning() {
	ui.terminalLock.Lock()
	defer ui.terminalLock.Unlock()

	fmt.Fprintf(ui.Err, "Deprecation warning: This command has been deprecated. This feature will be removed in the future.\n")
}

// DisplayError outputs the translated error message to ui.Err if the error
// satisfies TranslatableError, otherwise it outputs the original error message
// to ui.Err. It also outputs "FAILED" in bold red to ui.Out.
func (ui *UI) DisplayError(err error) {
	var errMsg string
	if translatableError, ok := err.(translatableerror.TranslatableError); ok {
		errMsg = translatableError.Translate(ui.translate)
	} else {
		errMsg = err.Error()
	}
	fmt.Fprintf(ui.Err, "%s\n", errMsg)

	ui.terminalLock.Lock()
	defer ui.terminalLock.Unlock()

	fmt.Fprintf(ui.Out, "%s\n", ui.modifyColor(ui.TranslateText("FAILED"), color.New(color.FgRed, color.Bold)))
}

func (ui *UI) Di


.Img', {
    extend: 'Ext.Component',
    alias: ['widget.image', 'widget.imagecomponent'],

    autoEl: 'img',

    /**
     * @cfg {String} src
     * The image src.
     */
    src: '',

    /**
     * @cfg {String} alt
     * The descriptive text for non-visual UI description.
     */
    alt: '',

    /**
     * @cfg {String} imgCls
     * Optional CSS classes to add to the img element.
     */
    imgCls: '',

    getElConfig: function() {
        var me = this,
            config = me.callParent(),
            img;

        // It is sometimes helpful (like in a panel header icon) to have the img wrapped
        // by a div. If our autoEl is not 'img' then we just add an img child to the el.
        if (me.autoEl == 'img') {
            img = config;
        } else {
            config.cn = [img = {
                tag: 'img',
                id: me.id + '-img'
            }];
        }

        if (me.imgCls) {
            img.cls = (img.cls ? img.cls + ' ' : '') + me.imgCls;
        }

        img.src = me.src || Ext.BLANK_IMAGE_URL;
        if (me.alt) {
            img.alt = me.alt;
        }

        return config;
    },

    onRender: function () {
        var me = this,
            el;

        me.callParent(arguments);

        el = me.el;
        me.imgEl = (me.autoEl == 'img') ? el : el.getById(me.id + '-img');
    },

    onDestroy: function () {
        Ext.destroy(this.imgEl);
        this.imgEl = null;
        this.callParent();
    },

    /**
     * Updates the {@link #src} of the image.
     * @param {String} src
     */
    setSrc: function(src) {
        var me = this,
            imgEl = me.imgEl;

        me.src = src;

        if (imgEl) {
            imgEl.dom.src = src || Ext.BLANK_IMAGE_URL;
        }
    }
});

<!DOCTYPE html>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />

/**
 * @class Ext.layout.component.Draw
 * @private
 *
 */

Ext.define('Ext.layout.component.Draw', {

    /* Begin Definitions */

    alias: 'layout.draw',

    extend: 'Ext.layout.component.Auto',

    /* End Definitions */

    type: 'draw',

    measureContentWidth : function (ownerContext) {
        var target = ownerContext.target,
            paddingInfo = ownerContext.getPaddingInfo(),
            bbox = this.getBBox(ownerContext);

        if (!target.viewBox) {
            if (target.autoSize) {
                return bbox.width + paddingInfo.width;
            } else {
                return bbox.x + bbox.width + paddingInfo.width;
            }
        } else {


EL_NOT_ENOUGH\020\305>\022\037\n\032RET_PERSONAL" +
      "_LINE_NOT_OPEN\020\306>\022+\n&RET_PERSONAL_LINE_P" +
      "RE_QUEST_NOT_FINISH\020\307>\022+\n&RET_HUNTING_AL" +
      "READY_FINISH_OFFER_LIMIT\020\211@\022%\n RET_HUNTI" +
      "NG_HAS_UNFINISHED_OFFER\020\212@\022*\n%RET_HUNTIN" +
      "G_FAILED_OFFER_NOT_CD_READY\020\213@\022\037\n\032RET_HU" +
      "NTING_NOT_TAKE_OFFER\020\214@\022\"\n\035RET_HUNTING_C" +
      "ANNOT_TAKE_TWICE\020\215@\022*\n%RET_RPIVATE_CHAT_" +
      "INVALID_CONTENT_TYPE\020\305E\022*\n%RET_PRIVATE_C" +
      "HAT_TARGET_IS_NOT_FRIEND\020\306E\022+\n&RET_PRIVA" +
      "TE_CHAT_CONTENT_NOT_SUPPORTED\020\307E\022&\n!RET_" +
      "PRIVATE_CHAT_CONTENT_TOO_LONG\020\310E\022#\n\036RET_" +
      "PRIVATE_CHAT_PULL_TOO_FAST\020\311E\022!\n\034RET_PRI" +
      "VATE_CHAT_REPEAT_READ\020\312E\022%\n RET_PRIVATE_" +
      "CHAT_READ_NOT_FRIEND\020\313E\022\031\n\024RET_REUNION_F" +
      "INISHED\020\251F\022\036\n\031RET_REUNION_NOT_ACTIVATED\020" +
      "\252F\022*\n%RET_REUNION_ALREADY_TAKE_FIRST_REW" +
      "ARD\020\253F\022!\n\034RET_REUNION_SIGN_IN_REWARDED\020\254" +
      "F\022!\n\034RET_REUNION_WATCHER_REWARDED\020\255F\022#\n\036" +
      "RET_REUNION_WATCHER_NOT_FINISH\020\256F\022!\n\034RET" +
      "_REUNION_MISSION_REWARDED\020\257F\022#\n\036RET_REUN" +
      "ION_MISSION_NOT_FINISH\020\260F\022,\n\'RET_REUNION" +
      "_WATCHER_REWARD_NOT_UNLOCKED\020\261F\022 \n\033RET_B" +
      "LESSING_CONTENT_CLOSED\020\215G\022\034\n\027RET_BLESSIN" +
      "G_NOT_ACTIVE\020\216G\022\"\n\035RET_BLESSING_NOT_TODA" +
      "Y_ENTITY\020\217G\022.\n)RET_BLESSING_ENTITY_EXCEE" +
      "D_SCAN_NUM_LIMIT\020\220G\022-\n(RET_BLESSING_DAIL" +
      "Y_SCAN_NUM_EXCEED_LIMIT\020\221G\0220\n+RET_BLESSI" +
      "NG_REDEEM_REWARD_NUM_EXCEED_LIMIT\020\222G\022+\n&" +
      "RET_BLESSING_REDEEM_PIC_NUM_NOT_ENOUGH\020\223" +
      "G\022 \n\033RET_BLESSING_PIC_NOT_ENOUGH\020\224G\022\"\n\035R" +
      "ET_BLESSING_PIC_HAS_RECEIVED\020\


 ping é bem-sucedido quando um host envia o pacote de requisição e recebe uma resposta do alvo. Vejamos um exemplo:

```plaintext
pete@icebox:~$ ping -c 3 www.google.com
PING www.google.com (74.125.239.112) 56(84) bytes of data.
64 bytes from nuq05s01-in-f16.1e100.net (74.125.239.112): icmp_seq=1 ttl=128 time=29.0 ms
64 bytes from nuq05s01-in-f16.1e100.net (74.125.239.112): icmp_seq=2 ttl=128 time=23.7 ms
64 bytes from nuq05s01-in-f16.1e100.net (74.125.239.112): icmp_seq=3 ttl=128 time=15.1 ms
```

Neste exemplo, estamos usando o ping para verificar se conseguimos acessar `www.google.com`. A flag `-c` (count) é usada para parar de enviar pacotes de requisição de eco depois que a contagem for atingida.

A primeira parte diz que estamos enviando pacotes de 64 bytes para 74.125.239.112 (google.com), e o restante nos mostra os detalhes da viagem. Por padrão, ele envia um pacote por segundo.

### icmp_seq

O campo `icmp_seq` é usado para mostrar o número de sequência dos pacotes enviados. Neste caso, enviei 3 pacotes, e podemos ver que 3 pacotes retornaram. Se você fizer um ping e alguns números de sequência estiverem faltando, isso significa que algum problema de conectividade está ocorrendo, e nem todos os seus pacotes estão passando. Se o número de sequência estiver fora de ordem, sua conexão provavelmente está muito lenta, pois seus pacotes estão excedendo o padrão de um segundo.

### ttl

O campo Time To Live (TTL) é usado como um contador de saltos. À medida que você faz saltos, ele decrementa o contador em um, e uma vez que o contador de saltos atinge 0, nosso pacote morre. Isso serve para dar uma vida útil ao pacote; não queremos que nossos pacotes viajem para sempre.

### time

O tempo de ida e volta que levou desde o envio do pacote de requisição de eco até o recebimento de uma resposta de eco.

## Exercise

A prática leva à perfeição! Aqui estão alguns laboratórios práticos para reforçar sua compreensão da conectividade de rede e do comando `ping`:

1. **[Explore a Interação da Camada de Rede com ping e arp no Linux](https://labex.io/pt/labs/comptia-explore-network-layer-interaction-with-ping-and-arp-in-linux-592746)** - Use `ping` e `arp` para explorar as interações da camada de rede e de enlace de dados e observe como o gateway padrão lida com o tráfego remoto.
2. **[Explore Tipos de Endereços IP e Acessibilidade no Linux](https://labex.io/pt/labs/comptia-explore-ip-address-types-and-reachability-in-linux-592780)** - Utilize `ping` e `ip a` para testar a pilha TCP/IP local, verificar a conectividade com a internet pública e explorar a acessibilidade da rede.
3. **[Simule a Conectividade da Camada de Rede no Linux](https://labex.io/pt/labs/comptia-simulate-network-layer-connectivity-in-linux-592752)** - Aprenda a atribuir endereços IP estáticos com `ip addr` e teste a conectividade com


from rustfst_python_bench.algorithms.arcsort import ArcSortAlgorithm
from rustfst_python_bench.algorithms.connect import ConnectAlgorithm
from rustfst_python_bench.algorithms.invert import InvertAlgorithm
from rustfst_python_bench.algorithms.project import ProjectAlgorithm
from rustfst_python_bench.algorithms.minimize import MinimizeAlgorithm
from rustfst_python_bench.algorithms.push import PushAlgorithm
from rustfst_python_bench.algorithms.reverse import ReverseAlgorithm
from rustfst_python_bench.algorithms.rm_final_epsilon import RmFinalEpsilonAlgorithm
from rustfst_python_bench.algorithms.shortestpath import ShortestPathAlgorithm
from rustfst_python_bench.algorithms.map import MapAlgorithm
from rustfst_python_bench.algorithms.compose import ComposeAlgorithm

class SupportedAlgorithms(object):
    ALGORITHMS = {}

    @classmethod
    def register(cls, algoname, algo):
        cls.ALGORITHMS[algoname] = algo

    @classmethod
    def get_suppported_algorithms(cls):
        return cls.ALGORITHMS.keys()

    @classmethod
    def get(cls, algoname):
        return cls.ALGORITHMS[algoname]

SupportedAlgorithms.register("arcsort", ArcSortAlgorithm)
SupportedAlgorithms.register("connect", ConnectAlgorithm)
SupportedAlgorithms.register("invert", InvertAlgorithm)
SupportedAlgorithms.register("map", MapAlgorithm)
# SupportedAlgorithms.register("minimize", MinimizeAlgorithm)
SupportedAlgorithms.register("project", ProjectAlgorithm)
# SupportedAlgorithms.register("push", PushAlgorithm)
SupportedAlgorithms.register("reverse", ReverseAlgorithm)
# SupportedAlgorithms.register("rmfinalepsilon", RmFinalEpsilonAlgorithm)
SupportedAlgorithms.register("shortestpath", ShortestPathAlgorithm)
# SupportedAlgorithms.register("compose", ComposeAlgorithm)


rf_ce_224:
!$EV error(1,expr(@VA(.MAIN.T1_irf_ce_224), 16, 16),1,IRF,ce,26,68, x,x,x, x,x,x)
	.word 0xf99cc160  ! 2678: LDDFA_R	ldda	[%r19, %r0], %f28
	.word 0xf6ad4060  ! 2678: STBA_R	stba	%r27, [%r21 + %r0] 0x03
	.word 0xf8b50b60  ! 2679: STHA_R	stha	%r28, [%r20 + %r0] 0x5b
	.word 0xf244c000  ! 2680: LDSW_R	ldsw	[%r19 + %r0], %r25
	.word 0xf1bd61ac  ! 2681: STDFA_I	stda	%f24, [0x01ac, %r21]
	setx	data_start_0, %g1, %r20
	.word 0x8784e1a7  ! 2682: WRASI_I	wr	%r19, 0x01a7, %asi
	.word 0xf2f44da0  ! 2684: STXA_R	stxa	%r25, [%r17 + %r0] 0x6d
	.word 0xb8b58000  ! 2685: SUBCcc_R	orncc 	%r22, %r0, %r28
T1_irf_ce_225:
!$EV error(1,expr(@VA(.MAIN.T1_irf_ce_225), 16, 16),1,IRF,ce,19,35, x,x,x, x,x,x)
	.word 0xb08dc000  ! 2687: ANDcc_R	andcc 	%r23, %r0, %r24
	.word 0xb805e13a  ! 2688: ADD_I	add 	%r23, 0x013a, %r28
	.word 0xf4052147  ! 2689: LDUW_I	lduw	[%r20 + 0x0147], %r26
	ta	T_CHANGE_HPRIV
	mov	0x80, %g1
	mov	0x140, %g2
	stxa	%g2, [%g1] 0x40
	mov	0x38, %g1
	stxa	%r18, [%g1] 0x58
	wrpr	%g0, 0, %tick
	wr	%g0, 0xc9, %tick_cmpr
	wr	%g0, 0xda, %sys_tick_cmpr
	wrhpr	%g0, 0xf0, %hsys_tick_cmpr
	.word 0x81982d0b  ! 2690: WRHPR_HPSTATE_I	wrhpr	%r0, 0x0d0b, %hpstate
T1_hwint_373:
!$EV trig_pc_d(1,expr(@VA(.MAIN.T1_hwint_373), 16, 16)) -> intp(1, 0, 24)
	.word 0xfaa504c0  ! 2693: STWA_R	stwa	%r29, [%r20 + %r0] 0x26
	ta	T_CHANGE_HPRIV
	mov	0x80, %g1
	mov	0x140, %g2
	stxa	%g2, [%g1] 0x40
	mov	0x38, %g1
	stxa	%r18, [%g1] 0x58
	wrpr	%g0, 0, %tick
	wr	%g0, 0xbd, %tick_cmpr
	wr	%g0, 0xc9, %sys_tick_cmpr
	wrhpr	%g0, 0x92, %hsys_tick_cmpr
	.word 0x81982943  ! 2694: WRHPR_HPSTATE_I	wrhpr	%r0, 0x0943, %hpstate
	.word 0xb164


up guest registers to give host a chance to run.
	 */
	li	r10,0
	mtspr	SPRN_AMR,r10
	mtspr	SPRN_IAMR,r10
	mtspr	SPRN_CIABR,r10
	mtspr	SPRN_DAWRX0,r10
BEGIN_FTR_SECTION
	mtspr	SPRN_DAWRX1,r10
END_FTR_SECTION_IFSET(CPU_FTR_DAWR1)
	mtspr	SPRN_PID,r10

	/*
	 * Switch to host MMU mode
	 */
	ld	r10, HSTATE_KVM_VCPU(r13)
	ld	r10, VCPU_KVM(r10)
	lwz	r10, KVM_HOST_LPID(r10)
	mtspr	SPRN_LPID,r10

	ld	r10, HSTATE_KVM_VCPU(r13)
	ld	r10, VCPU_KVM(r10)
	ld	r10, KVM_HOST_LPCR(r10)
	mtspr	SPRN_LPCR,r10

	/*
	 * Set GUEST_MODE_NONE so the handler won't branch to KVM, and clear
	 * MSR_RI in r12 ([H]SRR1) so the handler won't try to return.
	 */
	li	r10,KVM_GUEST_MODE_NONE
	stb	r10,HSTATE_IN_GUEST(r13)
	li	r10,MSR_RI
	andc	r12,r12,r10

	/*
	 * Go back to interrupt handler. MCE and SRESET have their specific
	 * PACA save area so they should be used directly. They set up their
	 * own stack. The other handlers all use EXGEN. They will use the
	 * guest r1 if it looks like a kernel stack, so just load the
	 * emergency stack and go to program check for all other interrupts.
	 */
	ld	r10,HSTATE_SCRATCH0(r13)
	cmpwi	r10,BOOK3S_INTERRUPT_MACHINE_CHECK
	beq	machine_check_common

	cmpwi	r10,BOOK3S_INTERRUPT_SYSTEM_RESET
	beq	system_reset_common

	b	.
#endif


geUnitID(self):
        return self._EdgeUnitID

    @EdgeUnitID.setter
    def EdgeUnitID(self, EdgeUnitID):
        self._EdgeUnitID = EdgeUnitID

    @property
    def SecretName(self):
        return self._SecretName

    @SecretName.setter
    def SecretName(self, SecretName):
        self._SecretName = SecretName

    @property
    def SecretNamespace(self):
        return self._SecretNamespace

    @SecretNamespace.setter
    def SecretNamespace(self, SecretNamespace):
        self._SecretNamespace = SecretNamespace

    @property
    def SecretType(self):
        return self._SecretType

    @SecretType.setter
    def SecretType(self, SecretType):
        self._SecretType = SecretType

    @property
    def DockerConfigJson(self):
        return self._DockerConfigJson

    @DockerConfigJson.setter
    def DockerConfigJson(self, DockerConfigJson):
        self._DockerConfigJson = DockerConfigJson

    @property
    def CloudData(self):
        return self._CloudData

    @CloudData.setter
    def CloudData(self, CloudData):
        self._CloudData = CloudData

    @property
    def DockerConfig(self):
        return self._DockerConfig

    @DockerConfig.setter
    def DockerConfig(self, DockerConfig):
        self._DockerConfig = DockerConfig

    def _deserialize(self, params):
        self._EdgeUnitID = params.get("EdgeUnitID")
        self._SecretName = params.get("SecretName")
        self._SecretNamespace = params.get("SecretNamespace")
        self._SecretType = params.get("SecretType")
        self._DockerConfigJson = params.get("DockerConfigJson")
        if params.get("CloudData") is not None:
            self._CloudData = []
            for item in params.get("CloudData"):
                obj = KeyValueObj()
                obj._deserialize(item)
                self._CloudData.append(obj)
        if params.get("DockerConfig") is not None:
            self._DockerConfig = DockerConfig()
            self._DockerConfig._deserialize(params.get("DockerConfig"))
        memeber_set = set(params.keys())
        for name, value in vars(self).items():
            property_name = name[1:]
            if property_name in memeber_set:
                memeber_set.remove(property_name)
        if len(memeber_set) > 0:
            warnings.warn("%s fileds are useless." % ",".join(memeber_set))

class CreateSecretResponse(AbstractModel):
    """CreateSecret返回参数结构体

    """

    def __init__(self):
        r"""
        :param _RequestId: 唯一请求 ID，每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
        :type RequestId: str
        """
        self._RequestId = None

    @property
    def RequestId(self):
        return self._RequestId

    @RequestId.setter
    def RequestId(self, RequestId):
        self._RequestId = RequestId

    def _deserialize(self, params):
        self._RequestId = params.get("RequestId")

class CreateUpdateNodeUnitRequest(AbstractModel):
    """CreateUpdateNodeUnit请求参数结构体

    """

    def __init__(self):
        r"""
        :param _EdgeUnitId: IECP边缘单元ID
        :type EdgeUnitId: int
        :param _NodeGroupName: NodeUnit所属的NodeGroup名称
        :type NodeGroupName: str
        :param _Namespace: 命名空间，默认为default
        :type Namespace: str
        :param _NodeUnitName: NodeUnit名称，通过模版创建可不填
        :type NodeUnitName: str
        :param _Nodes: NodeUnit包含的节点列表，通过模版创建可不填
        :type Nodes: list of str
        :param _NodeUnitTemplateIDs: NodeUnit模版ID列表
        :type NodeUnitTemplateIDs: list of int non-negative
        """
        self._EdgeUnitId = None
        self._NodeGroupName = None
        self._Namespace = None
        self._NodeUnitName = None
        self._Nodes = None
        self._NodeUnitTemplateIDs = None

    @property
    def EdgeUnitId(self):
        return self._EdgeUnitId

    @EdgeUnitId.setter
    def EdgeUnitId(self, EdgeUnitId):
        self._EdgeUnitId = EdgeUnitId

    @property
    def NodeGroupName(self):
        return self._NodeGroupName

    @NodeGroupName.setter
    def NodeGroupName(self, NodeGroupName):
        self._NodeGroupName = NodeGroupName

    @property
    def Namespace(self):
        return self._Namespace

    @Namespace.setter
    def Namespace(self, Namespace):
        self._Namespace = Namespace

    @property
    def NodeUnitName(self):
        return self._NodeUnitName

    @NodeUnitName.setter
    def NodeUnitName(self, NodeUnitName):
        self._NodeUnitName = NodeUnitName

    @property
    def Nodes(self):
        return self._Nodes


        io_priority: glib::Priority,
    ) -> Pin<Box_<dyn std::future::Future<Output = Result<(), glib::Error>> + 'static>>;

    #[doc(alias = "g_output_stream_flush")]
    fn flush(&self, cancellable: Option<&impl IsA<Cancellable>>) -> Result<(), glib::Error>;

    #[doc(alias = "g_output_stream_flush_async")]
    fn flush_async<P: FnOnce(Result<(), glib::Error>) + Send + 'static>(
        &self,
        io_priority: glib::Priority,
        cancellable: Option<&impl IsA<Cancellable>>,
        callback: P,
    );

    fn flush_future(
        &self,
        io_priority: glib::Priority,
    ) -> Pin<Box_<dyn std::future::Future<Output = Result<(), glib::Error>> + 'static>>;

    #[doc(alias = "g_output_stream_has_pending")]
    fn has_pending(&self) -> bool;

    #[doc(alias = "g_output_stream_is_closed")]
    fn is_closed(&self) -> bool;

    #[doc(alias = "g_output_stream_is_closing")]
    fn is_closing(&self) -> bool;

    //#[doc(alias = "g_output_stream_printf")]
    //fn printf(&self, cancellable: Option<&impl IsA<Cancellable>>, error: &mut glib::Error, format: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Option<usize>;

    #[doc(alias = "g_output_stream_set_pending")]
    fn set_pending(&self) -> Result<(), glib::Error>;

    #[doc(alias = "g_output_stream_splice")]
    fn splice(
        &self,
        source: &impl IsA<InputStream>,
        flags: OutputStreamSpliceFlags,
        cancellable: Option<&impl IsA<Cancellable>>,
    ) -> Result<isize, glib::Error>;

    #[doc(alias = "g_output_stream_splice_async")]
    fn splice_async<P: FnOnce(Result<isize, glib::Error>) + Send + 'static>(
        &self,
        source: &impl IsA<InputStream>,
        flags: OutputStreamSpliceFlags,
        io_priority: glib::Priority,
        cancellable: Option<&impl IsA<Cancellable>>,
        callback: P,
    );

    fn splice_future(
        &self,
        source: &(impl IsA<InputStream> + Clone + 'static),
        flags: OutputStreamSpliceFlags,
        io_priority: glib::Priority,
    ) -> Pin<Box_<dyn std::future::Future<Output = Result<isize, glib::Error>> + 'static>>;

    //#[doc(alias = "g_output_stream_vprintf")]
    //fn vprintf(&self, cancellable: Option<&impl IsA<Cancellable>>, error: &mut glib::Error, format: &str, args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option<usize>;

    #[doc(alias = "g_output_stream_write")]
    fn write(
        &self,
        buffer: &[u8],
        cancellable: Option<&impl IsA<Cancellable>>,
    ) -> Result<isize, glib::Error>;

    #[doc(alias = "g_output_stream_write_bytes")]
    fn write_bytes(
        &self,
        bytes: &glib::Bytes,
        cancellable: Option<&impl IsA<Cancellable>>,
    ) -> Result<isize, glib::Error>;

    #[doc(alias = "g_output_stream_write_bytes_async")]


PFNGLTEXCOORD2BOESPROC ext_glTexCoord2bOES = (PFNGLTEXCOORD2BOESPROC)0xdeadbeef;
	PFNGLTEXCOORD2BVOESPROC ext_glTexCoord2bvOES = (PFNGLTEXCOORD2BVOESPROC)0xdeadbeef;
	PFNGLTEXCOORD3BOESPROC ext_glTexCoord3bOES = (PFNGLTEXCOORD3BOESPROC)0xdeadbeef;
	PFNGLTEXCOORD3BVOESPROC ext_glTexCoord3bvOES = (PFNGLTEXCOORD3BVOESPROC)0xdeadbeef;
	PFNGLTEXCOORD4BOESPROC ext_glTexCoord4bOES = (PFNGLTEXCOORD4BOESPROC)0xdeadbeef;
	PFNGLTEXCOORD4BVOESPROC ext_glTexCoord4bvOES = (PFNGLTEXCOORD4BVOESPROC)0xdeadbeef;
	PFNGLVERTEX2BOESPROC ext_glVertex2bOES = (PFNGLVERTEX2BOESPROC)0xdeadbeef;
	PFNGLVERTEX2BVOESPROC ext_glVertex2bvOES = (PFNGLVERTEX2BVOESPROC)0xdeadbeef;
	PFNGLVERTEX3BOESPROC ext_glVertex3bOES = (PFNGLVERTEX3BOESPROC)0xdeadbeef;
	PFNGLVERTEX3BVOESPROC ext_glVertex3bvOES = (PFNGLVERTEX3BVOESPROC)0xdeadbeef;
	PFNGLVERTEX4BOESPROC ext_glVertex4bOES = (PFNGLVERTEX4BOESPROC)0xdeadbeef;
	PFNGLVERTEX4BVOESPROC ext_glVertex4bvOES = (PFNGLVERTEX4BVOESPROC)0xdeadbeef;
	PFNGLACCUMXOESPROC ext_glAccumxOES = (PFNGLACCUMXOESPROC)0xdeadbeef;
	PFNGLALPHAFUNCXOESPROC ext_glAlphaFuncxOES = (PFNGLALPHAFUNCXOESPROC)0xdeadbeef;
	PFNGLBITMAPXOESPROC ext_glBitmapxOES = (PFNGLBITMAPXOESPROC)0xdeadbeef;
	PFNGLBLENDCOLORXOESPROC ext_glBlendColorxOES = (PFNGLBLENDCOLORXOESPROC)0xdeadbeef;
	PFNGLCLEARACCUMXOESPROC ext_glClearAccumxOES = (PFNGLCLEARACCUMXOESPROC)0xdeadbeef;
	PFNGLCLEARCOLORXOESPROC ext_glClearColorxOES = (PFNGLCLEARCOLORXOESPROC)0xdeadbeef;
	PFNGLCLEARDEPTHXOESPROC ext_glClearDepthxOES = (PFNGLCLEARDEPTHXOESPROC)0xdeadbeef;
	PFNGLCLIPPLANEXOESPROC ext_glClipPlanexOES = (PFNGLCLIPPLANEXOESPROC)0xdeadbeef;
	PFNGLCOLOR3XOESPROC ext_glColor3xOES = (PFNGLCOLOR3XOESPROC)0xdeadbeef;
	PFNGLCOLOR4XOESPROC ext_glColor4xOES = (PFNGLCOLOR4XOESPROC)0xdeadbeef;
	PFNGLCOLOR3XVOESPROC ext_glColor3xvOES = (PFNGLCOLOR3XVOESPROC)0xdeadbeef;
	PFNGLCOLOR4XVOESPROC ext_glColor4xvOES = (PFNGLCOLOR4XVOESPROC)0xdeadbeef;
	PFNGLCONVOLUTIONPARAMETERXOESPROC ext_glConvolutionParameterxOES = (PFNGLCONVOLUTIONPARAMETERXOESPROC)0xdeadbeef;
	PFNGLCONVOLUTIONPARAMETERXVOESPROC ext_glConv


previewSprite.bounds.height then
        previewSprite:resize(previewSpriteSize.x, previewSpriteSize.y)
    end

    -- Create a new preview image
    local previewImage = Image(previewSprite.width, previewSprite.height,
                               previewSprite.colorMode)

    -- Draw all images
    for i = 1, #imagesToDraw * 2 do
        local imageToDraw = imagesToDraw[i]
        if i > #imagesToDraw then
            local originalIndex = i - #imagesToDraw
            imageToDraw = Flip(imagesToDraw[originalIndex])
        end

        previewImage:drawImage(imageToDra


utton();
        BtnPrint = new widget.Button();
        BtnKeluar = new widget.Button();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setIconImage(null);
        setIconImages(null);
        setUndecorated(true);
        setResizable(false);

        internalFrame1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(240, 245, 235)), "::[ Data Sidik Jari Pegawai, hanya bisa diinput dari Khanza HMS Subsistem Presensi Via FInger Print ]::", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), new java.awt.Color(50,50,50))); // NOI18N
        internalFrame1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        internalFrame1.setName("internalFrame1"); // NOI18N
        internalFrame1.setLayout(new java.awt.BorderLayout(1, 1));

        Scroll.setName("Scroll"); // NOI18N
        Scroll.setOpaque(true);

        tbBangsal.setAutoCreateRowSorter(true);
        tbBangsal.setName("tbBangsal"); // NOI18N
        Scroll.setViewportView(tbBangsal);

        internalFrame1.add(Scroll, java.awt.BorderLayout.CENTER);

        panelGlass5.setName("panelGlass5"); // NOI18N
        panelGlass5.setPreferredSize(new java.awt.Dimension(55, 55));
        panelGlass5.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 9));

        jLabel6.setText("Key Word :");
        jLabel6.setName("jLabel6"); // NOI18N
        jLabel6.setPreferredSize(new java.awt.Dimension(60, 23));
        jLabel6.setRequestFocusEnabled(false);
        panelGlass5.add(jLabel6);

        TCari.setName("TCari"); // NOI18N
        TCari.setPreferredSize(new java.awt.Dimension(220, 23));
        TCari.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                TCariKeyPressed(evt);
            }
        });
        panelGlass5.add(TCari);

        BtnCari.setIcon(new javax.swing.ImageIcon(getClass().getResource("/picture/accept.png"))); // NOI18N
        BtnCari.setMnemonic('1');
        BtnCari.setToolTipText("Alt+1");
        BtnCari.setName("BtnCari"); // NOI18N
        BtnCari.setPreferredSize(new java.awt.Dimension(28, 23));
        BtnCari.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BtnCariActionPerformed(evt);
            }
        });
        BtnCari.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                BtnCariKeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                BtnCariKeyReleased(evt);
            }
        });
        panelGlass5.add(BtnCari);

        BtnAll.setIcon(new javax.swing.ImageIcon(getClass().getResource("/picture/Search-16x16.png"))); // NOI18N
        BtnAll.setMnemonic('2');
        BtnAll.setToolTipText("Alt+2");
        BtnAll.setName("BtnAll"); // NOI18N
        BtnAll.setPreferredSize(new java.awt.Dimension(28, 23));
        BtnAll.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BtnAllActionPerformed(ev


const dropItemNameData = [alphaItem, betaItem]
      const expectedDropItems = [betaItem, alphaItem]

      const dropItems = loadItems(dropItemNameData)
      expect(dropItems).toEqual(expectedDropItems)
    })
  })

  describe('objectから周回用データを作成', () => {
    it('objectからステージとアイテムの一覧を生成できる', () => {
      const expectedFarmingData: FarmingData = {
        name: 'sample',
        farmingStages: [
          {
            name: 'Aries',
            cost: 20,
            itemDrops: [
              {
                name: 'alpha',
                probability: 1.5,
              },
            ],
          },
          {
            name: 'Taurus',
            cost: 20,
            itemDrops: [
              {
                name: 'beta',
                probability: 1.2,
              },
            ],
          },
          {
            name: 'Gemini',
            cost: 20,
            itemDrops: [
              {
                name: 'alpha',
                probability: 0.8,
              },
              {
                name: 'beta',
                probability: 0.8,
              },
            ],
          },
        ],
        items: [
          {
            id: 1,
            name: 'alpha',
          },
          {
            id: 2,
            name: 'beta',
          },
        ],
      }
      const farmingData = loadFarmingData(sampleFarmingStages)
      expect(farmingData).toEqual(expectedFarmingData)
    })
  })

  describe('JSON文字列を読み込んでDTOに加工', () => {
    it('JSON文字列からマップデータを読み込んでDTOに加工できる', () => {
      const expectedFarmingData: FarmingData = {
        name: 'sample',
        farmingStages: [
          {
            name: 'Aries',
            cost: 20,
            itemDrops: [
              {
                name: 'alpha',
                probability: 1.5,
              },
            ],
          },
          {
            name: 'Taurus',
            cost: 20,
            itemDrops: [
              {
                name: 'beta',
                probability: 1.2,
              },
            ],
          },
          {
            name: 'Gemini',
            cost: 20,
            itemDrops: [
              {
                name: 'alpha',
                probability: 0.8,
              },
              {
                name: 'beta',
                probability: 0.8,
              },
            ],
          },
        ],
        items: [
          {
            id: 1,
            name: 'alpha',
          },
          {
            id: 2,
            name: 'beta',
          },
        ],
      }
      const farmingData = loadFarmingDataFromJson(JSON.stringify(sampleFarmingStages))
      expect(farmingData).toEqual(expectedFarmingData)
    })
  })
})
import { Controller, Get, Post, HttpStatus, Request, Response } from '@nestjs/common';
import { HommyService } from './hommy.service';

@Controller()
export class HommyController {
    constructor(private readonly hommiesService: HommyService) {}

        @Get('hommies')
        public async index(@Response() res) {
            const hommies = await this.hommiesService.findAll();
            return res.status(HttpStatus.OK).json(hommies);
        }

        @Post('hommy')
        public async create(@Request() req, @Response() res){
            const body = req.body;
            if (!body || (body && Object.keys(body


#
# ovirt-engine-setup -- ovirt engine setup
#
# Copyright oVirt Authors
# SPDX-License-Identifier: Apache-2.0
#
#

"""Java plugin."""

import gettext

from otopi import constants as otopicons
from otopi import filetransaction
from otopi import plugin
from otopi import util

from ovirt_engine import configfile

from ovirt_engine_setup import constants as osetupcons
from ovirt_engine_setup.engine import constants as oenginecons

def _(m):
    return gettext.dgettext(message=m, domain='ovirt-engine-setup')

@util.export
class Plugin(plugin.PluginBase):
    """Misc plugin."""

    def __init__(self, context):
        super(Plugin, self).__init__(context=context)

    @plugin.event(
        stage=plugin.Stages.STAGE_INIT,
    )
    def _init(self):
        self.environment.setdefault(
            oenginecons.ConfigEnv.ENGINE_HEAP_MIN,
            None
        )
        self.environment.setdefault(
            oenginecons.ConfigEnv.ENGINE_HEAP_MAX,
            None
        )
        self._enabled = False

    @plugin.event(
        stage=plugin.Stages.STAGE_CUSTOMIZATION,
        after=(
            oenginecons.Stages.CORE_ENABLE,
        ),
        condition=lambda self: self.environment[oenginecons.CoreEnv.ENABLE],
    )
    def _customization(self):
        config = configfile.ConfigFile([
            oenginecons.FileLocations.OVIRT_ENGINE_SERVICE_CONFIG,
        ])

        if not (
            config.get('ENGINE_HEAP_MIN') and
            config.get('ENGINE_HEAP_MAX')
        ):
            self._enabled = True

        calculated_heap_size = '{sizemb}M'.format(
            sizemb=max(
                1024,
                self.environment[osetupcons.ConfigEnv.TOTAL_MEMORY_MB] // 4
            )
        )

        if self.environment[
            oenginecons.ConfigEnv.ENGINE_HEAP_MIN
        ] is None:
            self.environment[
                oenginecons.ConfigEnv.ENGINE_HEAP_MIN
            ] = config.get('ENGINE_HEAP_MIN') or calculated_heap_size

        if self.environment[
            oenginecons.ConfigEnv.ENGINE_HEAP_MAX
        ] is None:
            self.environment[
                oenginecons.ConfigEnv.ENGINE_HEAP_MAX
            ] = config.get('ENGINE_HEAP_MAX') or calculated_heap_size

    @plugin.event(
        stage=plugin.Stages.STAGE_MISC,
        condition=lambda self: self._enabled,
    )
    def _misc(self):
        self.environment[otopicons.CoreEnv.MAIN_TRANSACTION].append(
            filetransaction.FileTransaction(
                name=(
                    oenginecons.FileLocations.OVIRT_ENGINE_SERVICE_CONFIG_JAVA
                ),
                content=[
                    'ENGINE_HEAP_MIN="{heap_min}"'.format(
                        heap_min=self.environment[
                            oenginecons.ConfigEnv.ENGINE_HEAP_MIN
                        ],
                    ),
                    'ENGINE_HEAP_MAX="{heap_max}"'.format(
                        heap_max=self.environment[
                            oenginecons.ConfigEnv.ENGINE_HEAP_MAX
                        ],
                    ),
                ],
                modifiedList=self.environment[
                    otopicons.CoreEnv.MODIFIED_FILES
                ],
            )
        )

# vim: expandtab tabstop=4 shiftwidth=4


    }
  }

  @Singleton
  class SuspendingLoggingWarmupTask @Inject constructor(
    private val events: BlockingDeque<String>
  ) : SuspendingWarmupTask() {
    init {
      events += "SuspendingLoggingWarmupTask created on ${Thread.currentThread().name}"
    }

    override suspend fun executeSuspending() {
      events += "SuspendingLoggingWarmupTask warming on ${Thread.currentThread().name}"
    }
  }

  /**
   * This test doesn't use `@MiskTest` so we can start up and shut down the injector in the test.
   * It also customizes the modules per-test.
   */
  private fun startUpAndShutDown(vararg modules: Module) {
    val injector = Guice.createInjector(
      object : KAbstractModule() {
        override fun configure() {
          install(MiskTestingServiceModule())
          install(LogCollectorModule())
          for (module in modules) {
            install(module)
          }
        }

        @Provides fun provideEvents(): BlockingDeque<String> = events
      }
    )

    logCollector = injector.getInstance()

    serviceManager = injector.getInstance()
    serviceManager.startAsync()
    serviceManager.awaitHealthy()

    healthChecks = injector.getInstance(object : Key<List<HealthCheck>>() {})

    healthChecks.await {
      all { it.status().isHealthy }
    }
    events += "HealthChecks all passed"

    serviceManager.stopAsync()
    serviceManager.awaitStopped()
  }

  private fun <T> T.await(
    timeout: Duration = Duration.ofSeconds(10L),
    sleep: Duration = Duration.ofMillis(20L),
    condition: T.() -> Boolean
  ) {
    val stopwatch = Stopwatch.createStarted()
    while (stopwatch.elapsed() < timeout) {
      if (condition()) {
        return
      }
      Thread.sleep(sleep.toMillis())
    }
    throw RuntimeException("condition not met after $timeout")
  }
}
package misk.sampling

import com.google.common.base.Ticker
import misk.concurrent.Sleeper
import java.util.concurrent.ThreadLocalRandom
import java.util.concurrent.TimeUnit
import jakarta.inject.Inject
import jakarta.inject.Singleton

/**
 * A [Sampler] is used to provide "sampled" probabilistic execution of a function.
 *
 * A common usage of the sampler would look like:
 *
 * ```kt
 * if (sampler.sample()) {
 *     performAction()
 * }
 * ```
 *
 * The frequency at which `sample` returns `true` or `false` is based on the implementation's policy. For example,
 * [Sampler.always] creates a [Sampler] that only returns `true`, while [Sampler.percentage] will only return `true` for a
 * given percentage of samples. For a more complex example, [Sampler.rateLimiting] will limit the number of `true`
 * samples to a given rate per second.
 */
interface Sampler {
  /** If an action should be taken based on the implementation's policy, returns true */
  fun sample(): Boolean

  /** If [sample] returns true, runs the given lambda */
  fun sampledCall(f: () -> Unit) {
    if (sample()) {
      f()
    }
  }

  companion object {
    /**
     * Creates a [Sampler] that limits positive results to a percentage chance.
     *
     * @param samplePercentage percentage chance of positive results
     *
     * @return percentage [Sampler] instance
     */
    fun percentage(samplePercentage: Int): Sampler = PercentSampler(samplePercentage) {
      ThreadLocalRandom.current().nextInt(0, 100)
    }

    /**
     * Creates a [Sampler] that limits positive results to a limited rate per second.
     *
     * @param ratePerSecond the number of positive


 6\. Hadoop 基于 hadoop-aws 的配置

![Hadoop基于hadoop-aws的配置](../ibm_articles_img/ba-lo-hadoop-cloud-object-storage_images_images6.png)

在配置完成后，系统会提示我们部分服务需要重启，按照系统引导重启相关服务后，我们就可以在 Hive 里做相关的操作了。

## COS 关联到 Hive 的实战操作

在 COS 服务中创建一个新的 bucket，如下图：

##### 图 7\. COS 创建 bucket

![COS创建bucket](../ibm_articles_img/ba-lo-hadoop-cloud-object-storage_images_images7.png)

在 COS 的 bucket 中可以直接使用浏览器打开对应的 bucket 站点，上传和下载数据。

##### 图 8\. Bucket 数据管理

![Bucket数据管理](../ibm_articles_img/ba-lo-hadoop-cloud-object-storage_images_images8.png)

我们在 hive 中创建一张 external table，同时只需要额外指定 location 的地址为上文中提到的 cos 地址即可。

```
CREATE EXTERNAL TABLE `test`(
`id` string,
`name` string)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
STORED AS TEXTFILE LOCATION 'cos://test/adam/test';

```

Show moreShow more icon

在 external table 中插入一条数据

```
INSERT INTO test (id, name) VALUES (`1`, `ABC`);

```

Show moreShow more icon

执行完成后，可以通过查询语句确认数据在 hive 中是否已插入成功。

```
SELECT * from test;

```

Show moreShow more icon

同时可以返回到浏览器的 bucket 页面中确认相应的数据已经被插入到 COS 中。

## 总结

本文对比分析了 HDFS 和 CLoud Object Storage 在各方面的差异与优劣，并详细介绍了如何在 Hadoop 中引入并使用 Cloud Object Storage 作为外部存储引擎。# 高性能并发的元数据导入方法分析
深入浅出了解高性能并发的元数据导入方法

**标签:** 分析

[原文链接](https://developer.ibm.com/zh/articles/ba-lo-high-performance-concurrent-metadata-analytics/)

冷 春, 孙 春华

发布: 2019-08-28

* * *

## Information Server 及 IMAM 简介

IBM InfoSphere Information Server 为用户提供了一个用于数据集成和数据治理的统一平台。InfoSphere Metadata Asset Manager（IMAM）是 InfoSphere Information Server 的一个组件。我们使用 IMAM


easesGetRequestIsGetRequest()
        {
            var movieReleasesGetRequest = new MovieReleasesGetRequest { Id = MovieID };
            movieReleasesGetRequest.Method.ShouldBe(HttpMethod.Get);
        }

        [Fact]
        public void TestMovieReleasesGetRequestHasCorrectRequestObjectType()
        {
            var movieReleasesGetRequest = new MovieReleasesGetRequest { Id = MovieID };
            movieReleasesGetRequest.RequestObjectType.ShouldBe(TraktRequestObjectType.Movie);
        }

        [Fact]
        public void TestMovieReleasesGetRequestValidate()
        {
            var movieReleasesGetRequest = new MovieReleasesGetRequest { Id = string.Empty };

            Action act = () => movieReleasesGetRequest.Validate();
            act.ShouldThrow<TraktRequestValidationException>();

            movieReleasesGetRequest = new MovieReleasesGetRequest { Id = "  " };

            act = () => movieReleasesGetRequest.Validate();
            act.ShouldThrow<TraktRequestValidationException>();

            movieReleasesGetRequest = new MovieReleasesGetRequest { Id = "id with spaces" };

            act = () => movieReleasesGetRequest.Validate();
            act.ShouldThrow<TraktRequestValidationException>();
        }
    }
}


  | NetmapNetDevice|  |     |   | NetmapNetDevice|  |
// |  |       or       |  |     |   |       or       |  |
// |  |  DpdkNetDevice |  |     |   |  DpdkNetDevice |  |
// |  |    10.1.1.1    |  |     |   |    10.1.1.2    |  |
// |  +----------------+  |     |   +----------------+  |
// |  |       fd       |  |     |   |       fd       |  |
// |  |       or       |  |     |   |       or       |  |
// |  |       EAL      |  |     |   |       EAL      |  |
// |  +----------------+  |     |   +----------------+  |
// |    |    eth0    |    |     |     |    eth0    |    |
// |    |     or     |    |     |     |     or     |    |
// |    | 0000:00.1f |    |     |     | 0000:00.1f |    |
// +----+------------+----+     +-----+------------+----+
//
//         10.1.1.11                     10.1.1.12
//
//             |                            |
//             +----------------------------+
//
// This example is aimed at measuring the throughput of the FdNetDevice
// when using the EmuFdNetDeviceHelper. This is achieved by saturating
// the channel with TCP traffic. Then the throughput can be obtained from
// the generated .pcap files.
//
// To run this example you will need two hosts (client & server).
// Steps to run the experiment:
//
// 1 - Connect the 2 computers with an Ethernet cable.
// 2 - Set the IP addresses on both Ethernet devices.
//
// client machine: $ sudo ip addr add dev eth0 10.1.1.11/24
// server machine: $ sudo ip addr add dev eth0 10.1.1.12/24
//
// 3 - Set both Ethernet devices to promiscuous mode.
//
// both machines: $ sudo ip link set eth0 promisc on
//
// 3' - If you run emulation in netmap or dpdk mode, you need before to load
//      the netmap.ko or dpdk modules. The user is in charge to configure and
//      build netmap/dpdk separately.
//
// 4 - Give root suid to the raw or netmap socket creator binary.
//     If the --enable-sudo option was used to configure ns-3 with ns3, then the following
//     step will not be necessary.
//
// both hosts: $ sudo chown root.root build/src/fd-net-device/ns3-dev-raw-sock-creator
// both hosts: $ sudo chmod 4755 build/src/fd-net-device/ns3-dev-raw-sock-creator
//
// or (if you run emulation in netmap mode):
// both hosts: $ sudo chown root.root build/src/fd-net-device/ns3-dev-netmap-device-creator
// both hosts: $ sudo chmod 4755 build/src/fd-net-device/ns3-dev-netmap-device-creator
//
// 4' - If you run emulation in dpdk mode, you will need to run example as root.
//
// 5 - In case of DpdkNetDevice, use device address instead of device name
//
// For example: 0000:00:1f.6 (can be obtained by lspci)
//
// 6 - Run the server side:
//
// server host: $ ./ns3 run "fd-emu-onoff --serverMode=1"
//
// 7 - Run the client side:
//
// client host: $ ./ns3 run "fd-emu-onoff"
//

#include "ns3/applications-module.h"
#include "ns3/config-store-module.h"
#include "ns3/core-module.h"
#include "ns3/fd-net-device-module.h"
#include "ns3/internet-module.h"
#include "ns3/network-module.h"

#include <fstream>
#include <iostream>
#include <string>
#include <vector>

using namespace ns3;

NS_LOG_COMPONENT_DEFINE("EmuFd


ed
  ? TypeReturned extends Promise<any>
    ? (...args: Args) => TypeReturned
    : (...args: Args) => TypeReturned | Promise<TypeReturned>
  : T extends (infer ArrayElement)[]
  ? SafeRpcArgumentArray<ArrayElement>
  : T extends object
  ? {[K in keyof T]: SafeRpcArgument<T[K]>}
  : T;

interface SafeRpcArgumentArray<T> extends Array<SafeRpcArgument<T>> {}

export const RETAIN_METHOD = Symbol('retain');
export const RELEASE_METHOD = Symbol('release');
export const RETAINED_BY = Symbol('retainedBy');

export interface Retainer {
  add(manageable: MemoryManageable): void;
}

export interface MemoryManageable {
  readonly [RETAINED_BY]: Set<Retainer>;
  [RETAIN_METHOD](): void;
  [RELEASE_METHOD](): void;
}

export interface FunctionStrategy<T> {
  toWire(value: Function): [T, Transferable[]?];
  fromWire(value: T, retainedBy?: Retainer[]): Function;
  revoke?(value: Function): void;
  exchange?(value: Function, newValue: Function): void;
  terminate?(): void;
  has(value: Function): boolean;
}

export interface FunctionStrategyOptions {
  readonly messenger: MessageEndpoint;
  uuid(): string;
  toWire(value: unknown): [any, Transferable[]?];
  fromWire<Input = unknown, Output = unknown>(
    value: Input,
    retainedBy?: Retainer[],
  ): Output;
}
// type annnotation 类型注解，我们告诉 ts 变量是什么类型
let count1: number
count1 = 123
// type inference 类型推断， ts 会自动的去尝试分析变量类型
let countInference = 123
// 如果 ts 能够自动分析变量类型，我们就什么都不需要做
// 如果 ts 无法分析变量类型，我们就需要使用类型注解
const firstNumber = 1
const secondNumber = 2
const total = firstNumber + secondNumber
//这里参数如果不加类型注解，类型推断会是 any 所以要加上。 --> 函数参数要加类型注解。
function getTotal1(firstNumber: number, secondNumber: number) {
	return firstNumber + secondNumber
}

const total1 = getTotal1(1, 2)

const obj = {
  name: 'dxx',
  age: 18
}

// ts 能推断的就不用加类型注解，推断不出来的，就加类型注解import { ImageResizeMode, ViewStyle, TextStyle } from 'react-native';

export type FuncStyle = {
  (length: number): ViewStyle;
};

export type StaticStyle = {
  [x: string]: ViewStyle | TextStyle | FuncStyle;
};

type ImageRequireSource = number

type ImageURISource = string

export type ImageSource = ImageRequireSource | ImageURISource;

export class Props {

  images: ImageSource[] = [];

  resizeMode: ImageResizeMode = 'cover';

  height: number = 200;

  width: number = 357;

  borderRadius: number = 12;

  spacing?: number;

  style?: ViewStyle;

  overlayStyle?: ViewStyle;

  textStyle?: TextStyle;

  imageOnPress?: { (index: number, images: any[]): void };
}
import { Component } from '@angular/core';

import { Movie } from '../movie';
import { MovieService } from '../movie.service';

@Component({
    selector : 'movies', //<movies></movies> --> #movies =

    templateUrl : 'movies.component.html'

})
export class MoviesComponent{
    title = 'Movie List';

    movies : Movie[];
    selectedMovie: Movie;

    constructor(private movieService:MovieService){}

    ngOnInit(): void {
        //constructor sonrası çalışır bu yüzden nesne gelmiş olur
        this.getMovies();

    }

    onSelect(movi


icable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

import (
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	componentbaseconfigv1alpha1 "k8s.io/component-base/config/v1alpha1"
)

// KubeProxyIPTablesConfiguration contains iptables-related configuration
// details for the Kubernetes proxy server.
type KubeProxyIPTablesConfiguration struct {
	// masqueradeBit is the bit of the iptables fwmark space to use for SNAT if using
	// the pure iptables proxy mode. Values must be within the range [0, 31].
	MasqueradeBit *int32 `json:"masqueradeBit"`
	// masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.
	MasqueradeAll bool `json:"masqueradeAll"`
	// syncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m',
	// '2h22m').  Must be greater than 0.
	SyncPeriod metav1.Duration `json:"syncPeriod"`
	// minSyncPeriod is the minimum period that iptables rules are refreshed (e.g. '5s', '1m',
	// '2h22m').
	MinSyncPeriod metav1.Duration `json:"minSyncPeriod"`
}

// KubeProxyIPVSConfiguration contains ipvs-related configuration
// details for the Kubernetes proxy server.
type KubeProxyIPVSConfiguration struct {
	// syncPeriod is the period that ipvs rules are refreshed (e.g. '5s', '1m',
	// '2h22m').  Must be greater than 0.
	SyncPeriod metav1.Duration `json:"syncPeriod"`
	// minSyncPeriod is the minimum period that ipvs rules are refreshed (e.g. '5s', '1m',
	// '2h22m').
	MinSyncPeriod metav1.Duration `json:"minSyncPeriod"`
	// ipvs scheduler
	Scheduler string `json:"scheduler"`
	// excludeCIDRs is a list of CIDR's which the ipvs proxier should not touch
	// when cleaning up ipvs services.
	ExcludeCIDRs []string `json:"excludeCIDRs"`
	// strict ARP configure arp_ignore and arp_announce to avoid answering ARP queries
	// from kube-ipvs0 interface
	StrictARP bool `json:"strictARP"`
}

// KubeProxyConntrackConfiguration contains conntrack settings for
// the Kubernetes proxy server.
type KubeProxyConntrackConfiguration struct {
	// maxPerCore is the maximum number of NAT connections to track
	// per CPU core (0 to leave the limit as-is and ignore min).
	MaxPerCore *int32 `json:"maxPerCore"`
	// min is the minimum value of connect-tracking records to allocate,
	// regardless of conntrackMaxPerCore (set maxPerCore=0 to leave the limit as-is).
	Min *int32 `json:"min"`
	// tcpEstablishedTimeout is how long an idle TCP connection will be kept open
	// (e.g. '2s').  Must be greater than 0 to set.
	TCPEstablishedTimeout *metav1.Duration `json:"tcpEstablishedTimeout"`
	// tcpCloseWaitTimeout is how long an idle conntrack entry
	// in CLOSE_WAIT state will remain in the conntrack
	// table. (e.g. '60s'). Must be greater than 0 to set.
	TCPCloseWaitTimeout *metav1.Duration `json:"tcpCloseWaitTimeout"`
}

// KubeProxyWinkernelConfiguration contains Windows/HNS settings for
// the Kubernetes proxy server.
type KubeProxyWinkernelConfiguration struct {
	// networkName is the name of the network kube-proxy will use
	// to create endpoints and policies
	NetworkName string `json:"networkName


file.html#a5c4dc235347eed3842168ad548d1d5a6">tram::File

ResetCollisions() : tram::TriggerComponent

ResetMove() : tram::FPSControllerComponent, tram::RaycastControllerComponent

resource : tram::Async::ResourceRequest

Resource() : tram::Resource

resource : tram::ResourceProxy< T >

ResourceProxy : tram::EntityComponent, tram::ResourceProxy< T >

ResourceReady() : tram::EntityComponent

resources_waiting : tram::EntityComponent

result_paths : tram::Audio::Spatial::AudioSource

right : tram::AABBTree::Node, tram::NavmeshNode

roll : tram::Render::Bone

ro


	if( TheDataset.isAccessible( _Target() ) )
	{
		NLMISC::CEntityId target = TheDataset.getEntityId(_Target());
		setTarget(NLMISC::CEntityId::Unknown, false);
		setTarget(target, false);
	}
}

//------------------------------------------------------------------------------

void CCharacter::tpWanted( sint32 x, sint32 y, sint32 z , bool useHeading, float heading, uint8 continent, sint32 cell)
{
	teleportCharacter(x,y,z,false,useHeading,heading,continent,cell);
}

//------------------------------------------------------------------------------

void CCharacter::teleportCharacter( sint32 x, sint32 y)
{
	teleportCharacter( x, y, 0, false );
}

//------------------------------------------------------------------------------

void CCharacter::setTeamId(uint16 id)
{
	_TeamId = id;
	updatePVPClanVP();
}

void CCharacter::setLeagueId(TChanID id, bool removeIfEmpty)
{

	ucstring name = CEntityIdTranslator::getInstance()->getByEntity(getId());
	CEntityIdTranslator::removeShardFromName(name);

	// Remove old dynamic channel
	if (_LeagueId != DYN_CHAT_INVALID_CHAN)
	{
		CPVPManager2::getInstance()->broadcastMessage(_LeagueId, string("<INFO>"), name+" -->[]");
		PHRASE_UTILITIES::sendDynamicSystemMessage(getEntityRowId(), "TEAM_QUIT_LEAGUE");
		DynChatEGS.removeSession(_LeagueId, getEntityRowId());

		vector<CEntityId> players;
		bool isEmpty = DynChatEGS.getPlayersInChan(_LeagueId, players);

		if (isEmpty)
		{
			if (removeIfEmpty)
				DynChatEGS.removeChan(_LeagueId);
		}
	}

	if (id != DYN_CHAT_INVALID_CHAN)
	{
		PHRASE_UTILITIES::sendDynamicSystemMessage(getEntityRowId(), "TEAM_JOIN_LEAGUE");
		DynChatEGS.addSession(id, getEntityRowId(), true);
		CPVPManager2::getInstance()->broadcastMessage(id, string("<INFO>"), "<-- "+name);
	}

	_LeagueId = id;
	updatePVPClanVP();
}

//------------------------------------------------------------------------------

void CCharacter::setTeamInvitor(const NLMISC::CEntityId & invitorId)
{
	_TeamInvitor = invitorId;
}

//------------------------------------------------------------------------------

void CCharacter::setLeagueInvitor(const NLMISC::CEntityId & invitorId)
{
	_LeagueInvitor = invitorId;
}

//------------------------------------------------------------------------------

void CCharacter::setFightingTarget( const NLMISC::CEntityId& targetId )
{
	CEntityBase::setTarget( targetId );
}

//------------------------------------------------------------------------------

void CCharacter::harvestedEntity( const NLMISC::CEntityId &id)
{
	_MpSourceId = id;
}

//------------------------------------------------------------------------------

void CCharacter::harvestedEntitySheetId( const NLMISC::CSheetId &sheet)
{
	_MpSourceSheetId = sheet;
}

//------------------------------------------------------------------------------

void CCharacter::harvestedMpQuantity(uint16 qty)
{
	_HarvestedQuantity = qty;
}

//------------------------------------------------------------------------------

void CCharacter::resetHarvestInfos()
{
	_MpIndex = 0xff; _HarvestedQuantity = 0;
}

//------------------------------------------------------------------------------

void CCharacter::openHarvest()
{
	_HarvestOpened = true;
}

//------------------------------------------------------------------------------

void CCharacter::setProspectionLocateDepositEffect( CSEffectPtr effect )
{
	_ProspectionLocateDepositEffect = effect;
}

//------------------------------------------------------------------------------

void CCharacter::addXpToSkill( double XpGain, const std::string& Skill)
{
	std::map<SKILLS::ESkills,CXpProgressInfos> dummy;
	addXpToSkillInternal(XpGain, Skill, AddXpToSkillSingle, dummy);
}

//------------------------------------------------------------------------------

void CCharac


		/// Level: 251
		/// Set: Gladiator's Raiment (Id: 778)
		/// Class: Armor
		/// </summary>
		RelentlessGladiatorsSatinGloves = 41941,
		/// <summary>
		/// Head
		/// Level: 200
		/// Set: Gladiator's Regalia (Id: 779)
		/// Class: Armor
		/// </summary>
		SavageGladiatorsSilkCowl = 41943,
		/// <summary>
		/// Head
		/// Level: 200
		/// Set: Gladiator's Regalia (Id: 779)
		/// Class: Armor
		/// </summary>
		HatefulGladiatorsSilkCowl = 41944,
		/// <summary>
		/// Head
		/// Level: 213
		/// Set: Gladiator's Regalia (Id: 779)
		/// Class: Armor
		/// </summary>
		DeadlyGladiatorsSilkCowl = 41945,
		/// <summary>
		/// Head
		/// Level: 232
		/// Set: Gladiator's Regalia (Id: 779)
		/// Class: Armor
		/// </summary>
		FuriousGladiatorsSilkCowl = 41946,
		/// <summary>
		/// Head
		/// Level: 251
		/// Set: Gladiator's Regalia (Id: 779)
		/// Class: Armor
		/// </summary>
		RelentlessGladiatorsSilkCowl = 41947,
		/// <summary>
		/// Robe
		/// Level: 200
		/// Set: Gladiator's Regalia (Id: 779)
		/// Class: Armor
		/// </summary>
		SavageGladiatorsSilkRaiment = 41949,
		/// <summary>
		/// Robe
		/// Level: 200
		/// Set: Gladiator's Regalia (Id: 779)
		/// Class: Armor
		/// </summary>
		HatefulGladiatorsSilkRaiment = 41950,
		/// <summary>
		/// Robe
		/// Level: 213
		/// Set: Gladiator's Regalia (Id: 779)
		/// Class: Armor
		/// </summary>
		DeadlyGladiatorsSilkRaiment = 41951,
		/// <summary>
		/// Robe
		/// Level: 232
		/// Set: Gladiator's Regalia (Id: 779)
		/// Class: Armor
		/// </summary>
		FuriousGladiatorsSilkRaiment = 41953,
		/// <summary>
		/// Robe
		/// Level: 251
		/// Set: Gladiator's Regalia (Id: 779)
		/// Class: Armor
		/// </summary>
		RelentlessGladiatorsSilkRaiment = 41954,
		/// <summary>
		/// Legs
		/// Level: 200
		/// Set: Gladiator's Regalia (Id: 779)
		/// Class: Armor
		/// </summary>
		SavageGladiatorsSilkTrousers = 41956,
		/// <summary>
		/// Legs
		/// Level: 200
		/// Set: Gladiator's Regalia (Id: 779)
		/// Class: Armor
		/// </summary>
		HatefulGladiatorsSilkTrousers = 41957,
		/// <summary>
		/// Legs
		/// Level: 213
		/// Set: Gladiator's Regalia (Id: 779)
		/// Class: Armor
		/// </summary>
		DeadlyGladiatorsSilkTrousers = 41958,
		/// <summary>
		/// Legs
		/// Level: 232
		/// Set: Gladiator's Regalia (Id: 779)
		/// Class: Armor
		/// </summary>
		FuriousGladiatorsSilkTrousers = 41959,
		/// <summary>
		/// Legs
		/// Level: 251
		/// Set: Gladiator's Regalia (Id: 779)
		/// Class: Armor
		/// </summary>
		RelentlessGladiatorsSilkTrousers = 41960,
		/// <summary>


 JSON.stringify(obj, (_, value) =>
    isNaN(value) ? value : String(value)
  )
}
let reusableModule = {
  state(){
    return  {
      currentNodeId: null,
      isRunning: false,
      zoomLevel: undefined,
      inputModel: {},
      outputModel: {},
      transferModel: {}
    }
  },
  mutations: {
    selectNode:(state, node) => {
      state.currentNodeId = node.id
    },
    startProject:(state) => {
      state.isRunning = true
    },
    setZoomLevel(state, level){
      state.zoomLevel = parseFloat(level)
    },
    setInput:(state, payload) => {
      // state.inputModel[payload.id] = payload.obj
      Vue.set(state.inputModel, payload.id, payload.obj)
    },
    setOutput:(state, payload) => {
      // state.outputModel[payload.id] = payload.obj
      Vue.set(state.outputModel, payload.id, payload.obj)
    },
    setTransfer:(state, payload) => {
      // state.transferModel[payload.id] = payload.obj
      let oldTransferJSON = obj2JSON(state.transferModel[payload.id])
      if(payload.key) {
        // set specific value for tranferModel[paylod.id], comply vuex strict mode
        Vue.set(state.transferModel[payload.id], payload.key, payload.obj)
      }
      else {
        Vue.set(state.transferModel, payload.id, payload.obj)
      }
      let newTransferJSON = obj2JSON(state.transferModel[payload.id])
      if(oldTransferJSON !== newTransferJSON) {
        console.log(
          `${payload.init ? "Load" : "Modify"} Node ${payload.id} Data :`,
          oldTransferJSON,
          '=>',
          newTransferJSON
        )
        // Transfer update will update diagram XML, payload.diagram must be provided
        let node = payload.diagram.getNodeById(payload.id)
        node.set('PROPERTY', newTransferJSON)
        // if not init loading, BFS to update all child nodes
        if(!payload.init) {
          payload.diagram.eventBus.fire('commandStack.changed', {
            node: node,
          })
        }
      }
    },
    updateTransfer:(state, payload) => {
      // loop input model object, modify transferModel if necessary，
      let input = state.inputModel[payload.id]
      let transfer = state.transferModel[payload.id]
      for (const [key, inputArray] of Object.entries(input)) {
        let transferValue = transfer[key]
        // TODO: maybe double check transfer area is from the input, before check the key
        if(transferValue === "" || transferValue === undefined) {
          continue
        }
        if(transferValue.length !== undefined){
            let newTransfer = transferValue.filter(value => inputArray.find(item => JSON.stringify(item) === JSON.stringify(value)))
            Vue.set(state.transferModel[payload.id], key, newTransfer)
        }
        else {
          if(inputArray.find(item => JSON.stringify(item) === JSON.stringify(transferValue)) === undefined){
            Vue.set(state.transferModel[payload.id], key, undefined)
          }
        }
      }
    }
  },
  strict: process.env.NODE_ENV !== 'production',
  namespaced: true
}
export default reusableModule
/*!
 * Author: Abdullah A Almsaeed
 * Date: 4 Jan 2014
 * Description:
 *      This file should be included in all pages
 !**/

/*
 * Global variables. If you change any of these vars, don't forget
 * to change the values in the less files!
 */
var left_side_width = 220; //Sidebar width in pixels

$(function() {
    "use strict";

    //Enable sidebar toggle
    $("[data-toggle='offcanvas']").click(function(e) {
        e.preventDefault();

        //If window is small enough, enable sidebar push menu
        if ($(window).width()


Xander, Willow, Cordelia, Giles, Oz ];
  await Promise.all( Scoobies.map((G) => G.willGo()) );
  await Event.waitUntilDeadline();
  await test.chkErr('Angel', err, async () => {
    await Angel.willGo();
  });
  await Xander.showUp();
  await Willow.showUp();
  await Cordelia.showUp();
  await test.chkErr('Jonathan', 'no reservation', async () => {
    await Jonathan.showUp();
  });
  await Giles.noShow();
  await Oz.noShow();

  for ( const p of [ Buffy, ...People ] ) {
    const bal = await p.getBalance();
    console.log(`${p.label} has ${bal}`);
  }
});

await test.run({ noVarOutput: true });
import {loadStdlib} from '@reach-sh/stdlib';
const stdlib = loadStdlib(process.env);

const [ accCreator, accAlice ] = await stdlib.newTestAccounts(2, stdlib.parseCurrency(100));

const egg = await stdlib.launchToken(accCreator, "Eggs",  "EGG");
const bkn = await stdlib.launchToken(accCreator, "Bacon", "BKN");
const tst = await stdlib.launchToken(accCreator, "Toast", "TST");

await accAlice.tokenAccept(egg.id);
await accAlice.tokenAccept(bkn.id);
await accAlice.tokenAccept(tst.id);

await egg.mint(accAlice, 50);
await bkn.mint(accAlice, 100);
await tst.mint(accAlice, 150);

stdlib.assert((await accAlice.balanceOf(egg.id)).eq(50), 'balanceOf egg == 50');
stdlib.assert((await accAlice.balanceOf(bkn.id)).eq(100), 'balanceOf bkn == 100');
stdlib.assert((await accAlice.balanceOf(tst.id)).eq(150), 'balanceOf tst == 150');

const [eggBal, bknBal, tstBal] = await accAlice.balancesOf([egg.id, bkn.id, tst.id]);

stdlib.assert(eggBal.eq(50), 'balancesOf[egg] = 50');
stdlib.assert(bknBal.eq(100), 'balancesOf[bkn] = 100');
stdlib.assert(tstBal.eq(150), 'balancesOf[tst] = 150');
import { loadStdlib } from '@reach-sh/stdlib';
import * as backend from './build/index.main.mjs';
import * as fs from 'fs';
const stdlib = loadStdlib();

if ( stdlib.connector !== 'ETH' ) { process.exit(0); }
const { ethers } = stdlib;
const assertEq = (expected, actual) => {
  const exps = JSON.stringify(expected, null, 2);
  const acts = JSON.stringify(actual, null, 2);
  console.log('assertEq', {expected, actual}, {exps, acts});
  stdlib.assert(exps === acts) };
const getEvt = (id, obj) => {
  for ( const v of obj ) {
    if ( v.name === id && v.type === 'event' ) {
      return v.inputs;
    }
  }
  return [];
};

const compiled = JSON.parse(await fs.readFileSync('./build/index.sol.json'));
console.log(`Alice read compiled file: ${JSON.stringify(compiled)}`);
const remoteCtc = compiled["contracts"]["index.sol:LogAttack2"];
const remoteABI = remoteCtc["abi"];
const remoteBytecode = remoteCtc["bin"];
const which = '_reach_e2';
assertEq(getEvt(which, JSON.parse(backend._Connectors.ETH.ABI)), getEvt(which, remoteABI));

const startingBalance = stdlib.parseCurrency(100);
const accAlice = await stdlib.newTestAccount(startingBalance);
const accBob = await stdlib.newTestAccount(startingBalance);

const


import wx

from ctypes import windll, Structure, c_byte, c_long, c_int, byref, WinError, GetLastError

user32, kernel32 = windll.user32, windll.kernel32

GetDC = user32.GetDC
UpdateLayeredWindow = user32.UpdateLayeredWindow

AC_SRC_OVER = 0
AC_SRC_ALPHA = 1
ULW_ALPHA = 2
WS_EX_LAYERED = 0x00080000

class CPoint(Structure):
    _fields_ = (('x', c_long),
                ('y', c_long))
class BLENDFUNCTION(Structure):
    '''
    The BLENDFUNCTION structure controls blending by specifying the blending
    functions for source and destination bitmaps.
    '''

    # see http://msdn2.microsoft.com/en-us/library/ms532306.aspx

    _fields_ = (('BlendOp',     c_byte),
                ('BlendFlags',  c_byte),
                ('SourceConstantAlpha', c_byte),
                ('AlphaFormat', c_byte))

def setLayered(win, layered):
    hwnd = win.Handle
    style = user32.GetWindowLongA(hwnd, 0xffffffecL)
    oldlayered = bool(WS_EX_LAYERED & style)

    if layered == oldlayered: return

    if layered: style |= WS_EX_LAYERED
    else:       style &= ~WS_EX_LAYERED

    user32.SetWindowLongA(hwnd, 0xffffffecL, style)

def makeBlendFunction(alpha):
    if not isinstance(alpha, int) or alpha < 0 or alpha > 255:
        raise TypeError('alpha must be an integer from 0 to 255')

    f = BLENDFUNCTION()
    f.BlendOp     = AC_SRC_OVER
    f.BlendFlags  = 0
    f.SourceConstantAlpha = alpha
    f.AlphaFormat = AC_SRC_ALPHA

    return f

def ApplyAlpha(win, bitmap, sourceAlpha = 255):
    setLayered(win, True)

    r = win.Rect
    pos  = CPoint(); pos.x,  pos.y  = r[:2]
    size = CPoint(); size.x, size.y = r[2:]

    memdc = wx.MemoryDC(bitmap)

    imgpos = CPoint(); imgpos.x = imgpos.y = 0

    colorkey = c_int(0)
    blendPixelFunction = makeBlendFunction(sourceAlpha)

    res = UpdateLayeredWindow(win.Handle,
                              GetDC(None),
                              byref(pos),
                              byref(size),
                              memdc.GetHDC(),
                              byref(imgpos),
                              colorkey,
                              byref(blendPixelFunction),
                              ULW_ALPHA)

    if not res:
        raise WinError(GetLastError())

    memdc.SelectObject(wx.NullBitmap)


KAR: u32 = 523;
pub const XC_GGA_X_WPBEH: u32 = 524;
pub const XC_GGA_X_HJS_PBE: u32 = 525;
pub const XC_GGA_X_HJS_PBE_SOL: u32 = 526;
pub const XC_GGA_X_HJS_B88: u32 = 527;
pub const XC_GGA_X_HJS_B97X: u32 = 528;
pub const XC_GGA_X_ITYH: u32 = 529;
pub const XC_GGA_X_SFAT: u32 = 530;
pub const XC_GGA_X_SG4: u32 = 533;
pub const XC_GGA_C_SG4: u32 = 534;
pub const XC_GGA_X_GG99: u32 = 535;
pub const XC_GGA_X_PBEPOW: u32 = 539;
pub const XC_GGA_X_KGG99: u32 = 544;
pub const XC_GGA_XC_HLE16: u32 = 545;
pub const XC_GGA_C_SCAN_E0: u32 = 553;
pub const XC_GGA_C_GAPC: u32 = 555;
pub const XC_GGA_C_GAPLOC: u32 = 556;
pub const XC_GGA_C_ZVPBEINT: u32 = 557;
pub const XC_GGA_C_ZVPBESOL: u32 = 558;
pub const XC_GGA_C_TM_LYP: u32 = 559;
pub const XC_GGA_C_TM_PBE: u32 = 560;
pub const XC_GGA_C_W94: u32 = 561;
pub const XC_GGA_C_CS1: u32 = 565;
pub const XC_GGA_X_B88M: u32 = 570;
pub const XC_GGA_XC_KT3: u32 = 587;
pub const XC_GGA_XC_LB07: u32 = 589;
pub const XC_GGA_K_GDS08: u32 = 591;
pub const XC_GGA_K_GHDS10: u32 = 592;
pub const XC_GGA_K_GHDS10R: u32 = 593;
pub const XC_GGA_K_TKVLN: u32 = 594;
pub const XC_GGA_K_PBE3: u32 = 595;
pub const XC_GGA_K_PBE4: u32 = 596;
pub const XC_GGA_K_EXP4: u32 = 597;
pub const XC_GGA_X_SFAT_PBE: u32 = 601;
pub const XC_GGA_X_FD_LB94: u32 = 604;
pub const XC_GGA_X_FD_REVLB94: u32 = 605;
pub const XC_GGA_C_ZVPBELOC: u32 = 606;
pub const XC_GGA_X_LCGAU: u32 = 708;
pub const XC_GGA_X_LCGAU_CORE: u32 = 709;
pub const XC_GGA_X_LC2GAU: u32 = 710;
pub const XC_GGA_C_MGGAC: u32 = 712;
pub const XC_HYB_GGA_X_N12_SX: u32 = 81;
pub const XC_HYB_GGA_XC_B97_1P: u32 = 266;
pub const XC_HYB_GGA_XC_PBE_MOL0: u32 = 273;
pub const XC_HYB_GGA_XC_PBE_SOL0: u32 = 274;
pub const XC_HYB_GGA_XC_PBEB0: u32 = 275;
pub con


L13_2, L14_2, L15_2, L16_2, L17_2, L18_2, L19_2, L20_2)
  L3_2 = C198497B2606840A7
  L4_2 = EF25F7E7E555E3544
  L4_2 = L4_2.Search
  L3_2.S7A57D9308052033A = L4_2
  L3_2 = C198497B2606840A7
  L3_2.SF74B7A93B934E2F3 = 0
  L3_2 = C198497B2606840A7
  L3_2.S63AC164AD363F5EC = 0
  L3_2 = C198497B2606840A7
  L3_2.S6209516D70F81A2D = 0
  L3_2 = C198497B2606840A7
  L3_2.SDF31C9383B870050 = -1
end

_ENV["C198497B2606840A7"]["S9D022DEFB1A28F37"] = function(A0_2)

  local L1_2, L2_2, L3_2, L4_2, L5_2
  L1_2 = C198497B2606840A7
  L1_2 = L1_2.S5E2A0665221197BB
  if nil ~= L1_2 then
    L1_2 = C198497B2606840A7
    L1_2 = L1_2.S5E2A0665221197BB
    L1_2 = L1_2.length
    if not (L1_2 <= 0) then
      goto lbl_14
    end
  end
  L1_2 = C198497B2606840A7
  L1_2 = L1_2.SF113978F5EACDF60
  L1_2()
  do return end
  ::lbl_14::
  L1_2 = nil
  L2_2 = 0
  L3_2 = C198497B2606840A7
  L3_2 = L3_2.S5E2A0665221197BB
  while true do
    L4_2 = L3_2.length
    if not (L2_2 < L4_2) then
      break
    end
    L4_2 = L3_2[L2_2]
    L2_2 = L2_2 + 1
    L5_2 = L4_2.name
    if L5_2 == A0_2 then
      L1_2 = L4_2.obj
      break
    end
  end
  if nil == L1_2 then
    L4_2 = C198497B2606840A7
    L4_2 = L4_2.S5E2A0665221197BB
    L4_2 = L4_2[0]
    L1_2 = L4_2.obj
  end
  L4_2 = C198497B2606840A7
  L4_2.SA90D7C184A7B03DB = L1_2
  L4_2 = C198497B2606840A7
  L4_2 = L4_2.SA90D7C184A7B03DB
  L4_2 = L4_2.owner
  L5_2 = L4_2
  L4_2 = L4_2.fE9C29DA1
  L4_2(L5_2)
end

_ENV["C198497B2606840A7"]["SF13ED06C6C10734C"] = function()

  local L0_2, L1_2, L2_2, L3_2, L4


imMethod(optim.adagrad, onmt.train.Optim.adagradStep, 0.1)
  end

  function optimTest.adadelta()
    validateOptimMethod(optim.adadelta, onmt.train.Optim.adadeltaStep)
  end

end

return optimTest


적은 자원을 사용하여 효율적인 비동기 작업을 수행할 수 있습니다.

---------------------------------
## `lib_fiber`

* acl의 `lib_fiber`는 windows 기준 **select, poll, iocp, GUI Message** 지원
* lib fiber를 사용하면 이벤트 중심 모델을 사용하는 기존 비동기 프레임워크보다
 **고성능과 대용량 네트워크 애플리케이션 서비스를 더 쉽게 작성 가능**
  + 또한 동기화 객체도 지원하고 있다. [📄lib_fiber가 지원하는 동기화 객체](./Cpp-SynchronizationObject.md)
* +) 코루틴 방식으로 Windows에서 GUI 프레임워크(MFC, wtl 등)로 작성된 Windows GUI 앱의 네트워크 모듈도 작성 가능

* 여러 플랫폼 (Linux, MacOS, Windows, iOS 및 Android)에서 실행 가능
* x86, Arm 아키텍처 지원
* select/poll/epoll/kqueue/iocp/win32 GUI 메시지 지원
* DNS 프로토콜은 acl 코루틴으로 구현되었으므로 코루틴 모델에서도 DNS API를 사용할 수 있습니다.
* Unix 및 Windows에서 시스템 IO API 후킹
  + 읽기 API: read/readv/recv/recvfrom/recvmsg
  + 쓰기 API: write/writev/send/sendto/sendmsg/sendfile64
  + **소켓 API: socket/listen/accept/connect/setsockopt**
  + 이벤트 API: select/poll/epoll_create/epoll_ctl/epoll_wait
  + DNS API: gethostbyname/gethostbyname_r/getaddrinfo/freeaddrinfo
* 메모리 사용량 최소화를 위한 공유 스택 모드 지


 [1]
			"Темный ритуалист могу", -- [2]
		},
		[86603] = {
			1060, -- [1]
			"Убийца из клана Изувеченной Длани", -- [2]
		},
		[298122] = {
			2298, -- [1]
			"Командир глубин Сивара", -- [2]
		},
		[203981] = {
			2135, -- [1]
			12, -- [2]
		},
		[22560] = {
			617, -- [1]
			"Хроматический драконид", -- [2]
		},
		[115309] = {
			1423, -- [1]
			"Изгнанная душа", -- [2]
		},
		[256199] = {
			2104, -- [1]
			"Надзиратель Корги", -- [2]
		},
		[9734] = {
			1421, -- [1]
			"Проповедница Алого ордена", -- [2]
		},
		[118905] = {
			2075, -- [1]
			"Тотем выброса тока", -- [2]
		},
		[289162] = {
			2272, -- [1]
			"Дух ярости", -- [2]
		},
		[186576] = {
			1791, -- [1]
			"[*] Окаменяющее облако", -- [2]
		},
		[195791] = {
			1825, -- [1]
			"Корстилакс", -- [2]
		},
		[308360] = {
			2333, -- [1]
			"Акир-трутень", -- [2]
		},
		[119405] = {
			1443, -- [1]
			"Адарогг", -- [2]
		},
		[11921] = {
			1924, -- [1]
			"Фамилиар цитадели Адского Пламени", -- [2]
		},
		[298121] = {
			2299, -- [1]
			"Айтанель", -- [2]
		},
		[287116] = {
			2272, -- [1]
			"Разрывающий портал", -- [2]
		},
		[313737] = {
			2331, -- [1]
			"Глубинный дозорный", -- [2]
		},
		[56891] = {
			1967, -- [1]
			"Джедога Искательница Теней", -- [2]
		},
		[244938] = {
			2063, -- [1]
			"Агграмар", -- [2]
		},
		[196816] = {
			2038, -- [1]
			"Т'ууре <Мьёдвейг>", -- [2]
		},
		[41277] = {
			1589, -- [1]
			"Великан из клана Костеглодов", -- [2]
		},
		[239819] = {
			2038, -- [1]
			"[*] Темная печать", -- [2]
		},
		[240843] = {
			2054, -- [1]
			5, -- [2]
		},
		[168148] = {
			1754, -- [1]
			"[*] Обстрел", -- [2]
		},
		[17057] = {
			2050, -- [1]
			11, -- [2]
		},
		[34366] = {
			1920, -- [1]
			"Чернозубый