text
stringlengths
7.05k
33.9k
use alloc::vec::Vec; use core::mem::size_of; use core::ops::Range; use hashbrown::HashSet; use phf::phf_map; use sqpack::{Package, Result}; use util::{cast, cast_array, SliceByteOrderExt, StrExt}; #[repr(C)] struct MdlHeader { _unk1: u32, mesh_count: u16, attribute_count: u16, part_count: u16, ma...
use chrono::Utc; use failure::{ bail, Fallible, }; use std::{ convert::TryInto, str::FromStr, string::ToString, }; use iota_constants::HASH_TRINARY_SIZE as HASH_LENGTH; use iota_conversion::Trinary; use iota_lib_rs::prelude::{ iota_client, iota_constants, iota_conversion, iota_crypt...
/// Represents the metadata of the long-running operation. #[derive(Clone, PartialEq, ::prost::Message)] pub struct OperationMetadata { /// Output only. The time the operation was created. #[prost(message, optional, tag = "1")] pub create_time: ::core::option::Option<::prost_types::Timestamp>, /// Outpu...
///!* API to configure the clocks. ///! ///! This is very incomplete (e.g., no support for PLL clocks). ///! It is also likely buggy, and more complex than needed ///! ///! It is currently used to prepare for using the USBFSD and ///! Flexcomm peripherals. use core::cmp::min; use crate::typestates::{ main_clock::M...
use crate::logical_plan::optimizer::ALogicalPlanBuilder; use crate::logical_plan::{optimizer, Context}; use crate::prelude::*; use crate::utils::rename_aexpr_root_name; use crate::utils::{ aexpr_to_root_column_name, aexpr_to_root_names, aexprs_to_schema, check_down_node, has_aexpr, }; use polars_core::datatypes::{P...
use crate::artos::client::channel::{ClientResponseHandler, Event, EventType}; use crate::artos::client::query::{NullQueryProtocol, QueryProtocol}; use crate::artos::client::{ClientStore, CompletionHandler}; use crate::artos::common::Error; use crate::artos::common::{FlowController, FlowType}; use crate::artos::common::...
use base::KNOWN_BASE_TYPES; use calamine; use error::{ Error, Result, }; use inflector::Inflector; use itertools::Itertools; use proc_macro2::{ Ident, Literal, Span, TokenStream, }; use std::{ collections::HashMap, iter, }; use util; /// The worksheet what we want. static WORKSHEET_NAME...
use crate::{ data_io::{proposal::UnvalidatedKumandraProposal, KumandraData, MAX_DATA_BRANCH_LEN}, metrics::Checkpoint, BlockHashNum, Metrics, SessionBoundaries, }; use async_trait::async_trait; use futures::channel::oneshot; use log::{debug, warn}; use sc_client_api::HeaderBackend; use sp_consensus::SelectC...
use reeves; use anyhow::{Context, Result, bail}; use either::Either; use futures::executor::ThreadPool; use futures::stream::{FuturesUnordered, StreamExt}; use futures::task::SpawnExt; use isahc::prelude::*; use log::{debug, info, warn}; use serde::{Serialize, Deserialize}; use std::cmp; use std::env; use std::fs; use...
//! The algorithm based on the ideas //! from the [article](https://habr.com/ru/post/433330/) #![allow(clippy::filter_map)] use std::{ collections::{HashMap, HashSet}, iter::{from_fn, once}, ops::{Deref, Range}, }; use log::{debug, info, warn}; use varisat::{solver::Solver, CnfFormula, ExtendFormula, Lit,...
use std::cmp; /// This is the address for the staking contract in user-friendly format. pub const STAKING_CONTRACT_ADDRESS: &str = "NQ38 STAK 1NG0 0000 0000 C0NT RACT 0000 0000"; /// This is the address for the coinbase in user-friendly format. Note that this is not a real /// account, it is just the address we use t...
use std::{ collections::{BTreeMap, HashSet}, fs::{self, File}, path::Path, }; use base64::encode; use comfy_table::{Attribute, Cell, CellAlignment, Color, ContentArrangement, Table}; use html5ever::{LocalName, Namespace, QualName}; use indicatif::{ProgressBar, ProgressStyle}; use kuchiki::{traits::*, NodeR...
use std::net::{SocketAddr, TcpListener, TcpStream}; use std::path::PathBuf; use std::sync::Arc; use std::thread; use std::time::Duration; use crate::channel; use crate::core::{ config::{ServerConfig, ViewEngine, ViewEngineDefinition}, conn::{self, StreamHandler}, http, router::{self, Callback, RequestP...
use std::{ collections::{hash_map::Entry, HashMap}, convert::Infallible, fmt::{self, Display, Formatter}, marker::PhantomData, }; use datasize::DataSize; use derive_more::From; use itertools::Itertools; use prometheus::{IntGauge, Registry}; use tracing::{debug, error, info, warn}; use casper_types::{E...
use super::change_list::ChangeListPersistentState; use super::RootRender; use crate::cached::TemplateId; use crate::cached_set::{CacheId, CachedSet}; use crate::events::EventsRegistry; use crate::node::{Node, NodeKey}; use crate::RenderContext; use bumpalo::Bump; use futures::future::Future; use fxhash::FxHashMap; use ...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Control Register"] pub ssc_cr: SSC_CR, #[doc = "0x04 - Clock Mode Register"] pub ssc_cmr: SSC_CMR, _reserved2: [u8; 8usize], #[doc = "0x10 - Receive Clock Mode Register"] pub ssc_rcmr: SSC_RCMR, #[doc = "0x1...
#![allow(non_camel_case_types)] #![allow(raw_pointer_derive)] extern crate libc; #[macro_use] extern crate bitflags; extern crate curl_sys; use libc::{ c_char, c_double, c_int, c_uint, c_uchar, c_void, int64_t, size_t, uint16_t, uint32_t, }; #[repr(C)] #[derive(Clone, Copy)] p...
#![cfg_attr(feature = "clippy", feature(plugin))] #![cfg_attr(feature = "clippy", plugin(clippy))] extern crate nalgebra; extern crate order_stat; extern crate users; extern crate wifiscanner; use nalgebra::clamp; use order_stat::median_of_medians_by; use std::io::Write; use std::process::Command; use std::{cmp, env}...
use crate::ast::{ BinaryOp, CallTarget, Constant, Function, Ident, IntRange, Params, Path, Typ, TypX, UnaryOp, UnaryOpr, VirErr, }; use crate::ast_util::err_str; use crate::ast_visitor::map_expr_visitor; use crate::context::Ctx; use crate::def::{ check_decrease_int, height, prefix_recursive, suffix_rename, ...
//! This crate provides to an interface into the linux `procfs` filesystem, usually mounted at //! `/proc`. //! //! This is a pseudo-filesystem which is available on most every linux system and provides an //! interface to kernel data structures. //! //! //! # Kernel support //! //! Not all fields/data are available in...
//! //! From the [UCI Machine Learning Repository](<http://archive.ics.uci.edu/ml/machine-learning-databases/iris/>): /*! 1. Title: Iris Plants Database Updated Sept 21 by C.Blake - Added discrepency information 2. Sources: (a) Creator: <NAME> (b) Donor: <NAME> (<EMAIL>) (c) Date: July, 1988 3. Pa...
//! A `NodeDictionary` maintains a correspondance between terms and indexes. //! //! Property indexes are u32 values; //! resource (node) indexes are u64 ≥ 2^32. //! Properties are indexed from 2^32-2, decreasing; //! resources are indexed from 2^32, increasing. //! This layout allows for efficient sorting using bucket...
pub type clock_t = ::c_uint; pub type suseconds_t = ::c_int; pub type dev_t = u64; pub type blksize_t = ::int32_t; pub type fsblkcnt_t = ::uint64_t; pub type fsfilcnt_t = ::uint64_t; s! { pub struct dirent { pub d_fileno: ::ino_t, pub d_reclen: u16, pub d_namlen: u16, pub d_type: u8...
use crate::error::{Error, Result}; use crate::source::{Page, Source, SourceAllocator}; use crate::utils::{crc, crc_slice, math, unsafe_utils, OptionExt}; use memoffset::offset_of; use parking_lot::RwLock; use std::collections::{hash_map::Entry, BTreeMap, HashMap}; use std::mem::size_of; use std::ops::{Bound::Included, ...
//! Diagnostics. use std::char; use std::str; use std::cmp; use std::result; use std::cell::{Cell, RefCell}; use std::rc::Rc; use std::sync::Arc; use unicode_width::UnicodeWidthChar; use kailua_env::{Source, SourceSlice, Span, Pos}; use dummy_term::{stderr_or_dummy}; use term::{color, StderrTerminal}; use message::{L...
use classic_crypto::{ error::{Error, Result}, lang::Language, Affine, Asymmetric, Atbash, Autokey, Beaufort, Bellaso, BlockTransposition, Caesar, ClassicVigenere, ColumnTransposition, Enigma, Keyed, KeyedVigenere, Morse, Porta, Railfence, Rot13, Scytale, SimpleSubstitution, Solve, Symmetric, }; use ...
// Copyright 2022 <NAME>. // // Licensed under the Apache License, Version 2.0 (the "License"); you // may not use this file except in compliance with the License. You may // obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writ...
use std::collections::HashMap; use std::fmt::Debug; use std::path::Path; use std::sync::Arc; use std::time::Duration; use std::time::Instant; use hdrhistogram::Histogram; use rune::runtime::{AnyObj, Args, RuntimeContext, Shared, VmError}; use rune::termcolor::{ColorChoice, StandardStream}; use rune::{Any, Diagnostics,...
// Copyright 2017 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ...
use failure::{bail, ensure, err_msg, Error, ResultExt}; use ffmpeg::frame::Video as VideoFrame; use ffmpeg::{format, Rational}; use lazy_static::lazy_static; use std::ops::Deref; use std::result; use std::sync::mpsc::{channel, Receiver, Sender, TryRecvError}; use std::sync::{Mutex, Once, RwLock, ONCE_INIT}; use std::th...
#![recursion_limit = "128"] use env_logger; use futures::Future; use interledger::{ cli, node::{AccountDetails, InterledgerNode}, }; use interledger_packet::Address; use serde_json::json; use std::str::FromStr; use tokio::runtime::Builder as RuntimeBuilder; mod redis_helpers; use redis_helpers::*; mod test_h...
//! Room buffer module. //! //! This module implements creates buffers that processes and prints out all the //! user visible events //! //! Care should be taken when handling events. Events can be state events or //! timeline events and they can come from a sync response or from a room //! messages response. //! //! E...
//! Register structures used to pass registers from the server to the hypervisor use crate::{print, vga_print}; #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] #[repr(packed, C)] pub struct VmRegs { pub rax: u64, // 0 pub rcx: u64, // 1 pub rdx: u64, // 2 pub rbx: u64, // 3 pub cr2: u64, // 4 ...
use std::sync::Arc; use anyhow::{Error, Result}; use serde::Serialize; use tantivy::collector::{Count, TopDocs}; use tantivy::query::{ BooleanQuery, BoostQuery, EmptyQuery, FuzzyTermQuery, MoreLikeThisQuery, Occur, Query, QueryParser, TermQuery, }; use tantivy::schema::{Field, Field...
// Copyright 2020, Collabora Ltd. // SPDX-License-Identifier: MIT use crate::interface::Interface; use anyhow::Error; use libloading::{Library, Symbol}; use spa_sys::{ spa_handle, spa_handle_factory, spa_interface, spa_interface_info, SPA_HANDLE_FACTORY_ENUM_FUNC_NAME, }; use std::{ alloc, borrow::Cow, ...
use serde_derive::{Deserialize, Serialize}; use std::collections::HashMap; use std::net::SocketAddr; use std::time::{Duration, Instant}; use crate::actor::prelude::*; use crate::crypto::hash::H256; use crate::crypto::keypair::{PrivateKey, PublicKey}; use crate::primitives::functions::get_default_storage_path; use crat...
//! This module contains incoming requests handling logic of Iroha. //! `Torii` is used to receive, accept and route incoming instructions, queries and messages. use std::{convert::Infallible, fmt::Debug, net::ToSocketAddrs, sync::Arc}; use eyre::Context; use iroha_config::Configurable; use iroha_data_model::prelude:...
use base64; use bitcoin::blockdata::block::{Block, BlockHeader}; use bitcoin::blockdata::transaction::Transaction; use bitcoin::network::serialize::BitcoinHash; use bitcoin::network::serialize::{deserialize, serialize}; use bitcoin::util::hash::Sha256dHash; use glob; use hex; use serde_json::{from_str, from_value, Valu...
#![no_std] #![feature(generic_associated_types)] #![feature(type_alias_impl_trait)] //! Implements HID functionality for a usb-device device. // This mod MUST go first, so that the others see its macros. pub(crate) mod fmt; use core::mem::MaybeUninit; use core::ops::Range; use core::sync::atomic::{AtomicUsize, Order...
use crate::poe::{CurvePair, FieldPair, NIZK}; use crate::util::{multiexp, Split}; use ff::{Field, ScalarEngine}; use group::{CurveAffine, CurveProjective}; use pairing::{Engine, PairingCurveAffine}; use rand::distributions::{Distribution, Standard}; use rand::{CryptoRng, Rng}; use rayon::iter::once; use rayon::prelude:...
//! I2C Demo for SSD1306 OLED (Adafruit PiOLED) with MSP430G2553 Launchpad //! Connect via P1.6 and P1.7. Needs to be power cycled on every flash, as the //! PiOLED has the reset pin pulled high. #![no_main] #![no_std] #![feature(abi_msp430_interrupt)] extern crate panic_msp430; use msp430::asm; use msp430_rt::entry...
use std::{ net::{IpAddr, SocketAddr, ToSocketAddrs}, ops::Deref, path::Path, pin::Pin, process::exit, task::{Context, Poll}, time::{Duration, Instant}, }; use anyhow::{bail, format_err, Error}; use bytes::Bytes; use clap::{App, Arg}; use url::{Host, Url}; use futures::{ future, pre...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - SAI Transmit Control Register"] pub tcsr: TCSR, #[doc = "0x04 - SAI Transmit Configuration 1 Register"] pub tcr1: TCR1, #[doc = "0x08 - SAI Transmit Configuration 2 Register"] pub tcr2: TCR2, #[doc = "0x0c - SAI...
//! `glTF` loading sub-module. //! //! ### Implementation Notes //! //! * The order of function declarations matches the order of usage. //! * The entry point is `Factory::load_gltf`, at the end of the file. use animation; use color; use geometry; use gltf; use material; use mint; use std::collections::HashMap; use c...
//! Logic and data structures related to impl specialization, explained in //! greater detail below. //! //! At the moment, this implementation support only the simple "chain" rule: //! If any two impls overlap, one must be a strict subset of the other. //! //! See the [rustc guide] for a bit more detail on how special...
// Copyright (c) 2019, Facebook, Inc. // All rights reserved. // // This source code is licensed under the MIT license found in the // LICENSE file in the "hack" directory of this source tree. // Module containing conversion methods between the Rust Facts and // Rust/C++ shared Facts (in the compile_ffi module) mod co...
pub use crate::beacon_chain::{ BEACON_CHAIN_DB_KEY, ETH1_CACHE_DB_KEY, FORK_CHOICE_DB_KEY, OP_POOL_DB_KEY, }; pub use crate::persisted_beacon_chain::PersistedBeaconChain; use crate::{ builder::{BeaconChainBuilder, Witness}, eth1_chain::CachingEth1Backend, events::NullEventHandler, AttestationProcess...
// Copyright (c) The Libra Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Convenience structs and functions for generating configuration for a swarm of libra nodes use crate::util::gen_genesis_transaction_bytes; use failure::prelude::*; use libra_config::{ config::{ BaseConfig, ConsensusConfi...
/// Video annotation request. #[derive(Clone, PartialEq, ::prost::Message)] pub struct AnnotateVideoRequest { /// Input video location. Currently, only /// [Google Cloud Storage](<https://cloud.google.com/storage/>) URIs are /// supported, which must be specified in the following format: /// `gs://bucke...
use std::collections::HashSet; use std::time::Instant; use async_trait::async_trait; use graph::blockchain::Blockchain; use graph::blockchain::BlockchainKind; use graph::blockchain::BlockchainMap; use graph::components::store::{DeploymentId, DeploymentLocator, SubscriptionManager}; use graph::data::subgraph::schema::D...
use winapi::shared::windef::{HFONT, HBITMAP}; use winapi::ctypes::c_int; use winapi::um::winnt::HANDLE; use crate::resources::OemImage; use super::base_helper::{get_system_error, to_utf16}; #[allow(unused_imports)] use std::{ptr, mem}; #[allow(unused_imports)] use crate::NwgError; #[cfg(feature = "file-dialog")] use...
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause // We're only providing virtio over MMIO devices for now, but we aim to add PCI support as well. pub mod block; pub mod net; use std::convert::TryFrom; use std::io; use std::ops::DerefMut...
// Address Buses A and B, and DMA operation. use crate::{ common::Interrupt, constants::timing::*, video::{PPU, PPUSignal, RenderTarget}, audio::APU, joypad::{JoypadMem, Button} }; use super::{ MemBus, RAM, dma::{ DMAChannel, DMAControl }, rom::* }; // A bus to ...
use crate::parser::{expected_token, RecoveryResult}; use crate::syntax::binding::{ is_nth_at_identifier_binding, parse_binding, parse_identifier_binding, }; use crate::syntax::class::parse_initializer_clause; use crate::syntax::expr::{is_nth_at_identifier, parse_name, ExpressionContext}; use super::ts_parse_error:...
#[cfg(test)] mod message_test; use crate::agent::*; use crate::attributes::*; use crate::error::*; use anyhow::Result; use rand::Rng; use std::fmt; use std::io::{Read, Write}; // MAGIC_COOKIE is fixed value that aids in distinguishing STUN packets // from packets of other protocols when STUN is multiplexed with thos...
// The code of this file is modified from https://github.com/kdl-org/kdl-rs // (mainly from https://github.com/kdl-org/kdl-rs/blob/v3.0.0/src/parser.rs) use kdl::KdlValue; use nom::branch::alt; use nom::bytes::complete::{tag, take_until, take_until1, take_while_m_n}; use nom::character::complete::{anychar, char, none_o...
// Copyright 2019 <NAME> // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those...
use crate::hal; use embedded_hal::blocking::delay::DelayMs; use smart_leds::{SmartLedsWrite, RGB, gamma}; use stm32f4xx_hal::delay::Delay; use stm32f4xx_hal::gpio::{ gpioa::{PA5, PA6, PA7}, Alternate, AF5, }; use stm32f4xx_hal::spi::Spi; use stm32f4xx_hal::stm32::SPI1; use ws2812_spi::Ws2812; use rand_chacha::C...
use std::collections::BTreeMap; use std::mem; use std::time::Instant; use bit_manager::BitWriter; use shred::{Fetch, RunNow}; use hooks_game::net::protocol::{ClientGameMsg, ServerCommMsg}; use hooks_game::net::transport::PeerId; use hooks_game::registry::Registry; use hooks_game::repl::{player, tick}; use hooks_game...
// External imports use std::rc::Rc; // Local imports use crate::graphics::AABB; use crate::graphics::ray::Tracable; use crate::math::Vec3; /// A node in a 2-way BVH /// /// It represents both internal nodes and leaves. It is an internal node when /// `count` is 0; it is a leaf otherwise (where it represents the numb...
// Copyright (C) 2021 <NAME> <<EMAIL>> // SPDX-License-Identifier: MIT OR Apache-2.0 //! Codec-specific logic (for audio, video, and application media types). //! //! Currently this primarily consists of RTP depacketization logic for each //! codec, as needed for a client during `PLAY` and a server during `RECORD`. //...
#![cfg(feature = "std")] //! An in-memory rate limiter that can keep track of rates for //! multiple keys, e.g. per-customer or per-IC rates. use crate::lib::*; use evmap::{self, ReadHandle, WriteHandle}; use parking_lot::Mutex; use crate::{ algorithms::{Algorithm, DefaultAlgorithm, KeyableRateLimitState, RateLi...
// Copyright 2018-2019 Parity Technologies (UK) Ltd // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
// std use std::cell::Cell; use std::f32::consts::PI; use std::io::BufReader; use std::sync::{Arc, RwLock}; // others #[cfg(feature = "openexr")] use half::f16; #[cfg(feature = "openexr")] use openexr::{FrameBufferMut, InputFile, PixelType}; // pbrt use crate::core::geometry::{spherical_phi, spherical_theta, vec3_coord...
use crate::challenges::HighScore; use crate::colors::ColorScheme; use crate::helpers::ID; use crate::layer::Layer; use crate::options::Options; use crate::render::{AgentCache, DrawMap, DrawOptions, Renderable, UnzoomedAgents}; use crate::sandbox::{GameplayMode, TutorialState}; use abstutil::{MeasureMemory, Timer}; use ...
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use anyhow::{format_err, Context as _, Error}; use fdio; use fidl_fuchsia_hardware_gpu_clock as fidl_gpu; use fidl_fuchsia_hardware_thermal as fidl_thermal...
use std::{ fs::{self, create_dir_all, File}, io::{Seek, SeekFrom}, path::{Path, PathBuf}, }; use crate::{need_to_binarize, to_local_path, ExtensionHandler}; use gltf::{ accessor::{DataType, Dimensions}, buffer::{Source, View}, camera::Projection, image::Source as ImageSource, khr_lights...
// Copyright 2019, The Tari Project // // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the // following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following // disclai...
//! USDT implementation on platforms with linker support (macOS). //! //! On systems with linker support for the compile-time construction of DTrace //! USDT probes we can lean heavily on those mechanisms. Rather than interpreting //! the provider file ourselves, we invoke the system's `dtrace -h` to generate a C //! h...
use std::cmp; use std::collections::vec_deque::VecDeque; use std::io::{Cursor, Read}; use std::mem::size_of; use std::time::Duration; use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; use slog; use u2f_core; pub const MAJOR_DEVICE_VERSION_NUMBER: u8 = 0; pub const MINOR_DEVICE_VERSION_NUMBER: u8 = 1; pub const...
// 0.3 and before #[cfg(feature = "0.3")] #[macro_use] mod detail { use stm32f1xx_hal::gpio::gpioa::*; use stm32f1xx_hal::gpio::gpiob::*; use stm32f1xx_hal::gpio::gpioc::*; use stm32f1xx_hal::gpio::gpiod::*; use stm32f1xx_hal::gpio::{Input, Output, PullUp, PushPull}; pub struct InputPins { pub stick_do...
//! Reading and writing of Bifrost simulation data in NetCDF format. mod mesh; mod param; use super::{ super::{ utils::{self, AtomicOutputPath}, Endianness, OverwriteMode, Verbose, }, fdt, ParameterValue, SnapshotParameters, SnapshotProvider3, COORDINATE_NAMES, FALLBACK_SNAP_NUM, PRIMA...
use std::{ mem, }; use syntax::{ Pos, Range, Result, SyntaxError, token::*, }; /// A named character class with a predicate to check against. /// /// The generic function type that comes with this type is cumbersome to type, so this type should /// not be used directly. Use the `CharClass` type...
#[derive(Clone, PartialEq, ::prost::Message)] pub struct C2s { ///股票 #[prost(message, repeated, tag="1")] pub security_list: ::prost::alloc::vec::Vec<super::qot_common::Security>, } /// 正股类型额外数据 #[derive(Clone, PartialEq, ::prost::Message)] pub struct EquitySnapshotExData { /// 发行股本,即总股本 #[prost(int...
extern crate dirs; use crate::character; use crate::character::Character; use crate::event::Event; use crate::item::{Item, Potion}; use crate::location::Location; use crate::quest::QuestList; use crate::randomizer::random; use crate::randomizer::Randomizer; use serde::{Deserialize, Serialize}; use std::collections::{H...
use chrono::{DateTime, Utc}; use lazy_static::lazy_static; use regex::{Regex, RegexBuilder}; use rusqlite::{ self, params, types::{FromSql, FromSqlResult}, Connection, }; use serde::Serialize; use slugify::slugify; use std::fmt; use std::io::Write; use std::path::PathBuf; use std::str::FromStr; lazy_static...
use crate::pb::*; use serde_json::json; #[test] fn test_listpeers() { let j: serde_json::Value = json!({ "peers": [ { "id": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", "connected": true, "netaddr": [ "127.0.0.1:39152" ], ...
// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // Transformation injection specifications into the bytecode. use crate::{ function_data_builder::FunctionDataBuilder, function_target::FunctionData, function_target_pipeline::{FunctionTargetProcessor, FunctionTargetsHolder...
// Copyright 2017-2020 Parity Technologies (UK) Ltd. // This file is part of Substrate. // Substrate is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) a...
use byteorder::{BigEndian, ReadBytesExt}; use oot_explorer_game_data::gbi::{ AlphaCombine, ColorCombine, CombinerReference, GeometryMode, OtherModeH, OtherModeHMask, OtherModeL, OtherModeLMask, Qu0_16, Qu10_2, Qu1_11, TextureDepth, TextureFormat, }; use oot_explorer_vrom::VromAddr; use std::io::{self, Read}; us...
use libc::{ c_int, c_uint, size_t, c_char, c_uchar, c_void, pthread_t, mqd_t }; use dlt_types::{ DltReturnValue, DltLogLevelType, DltFormatType, DltNetworkTraceType, DltUserLogMode, DltTraceStatusType }; use dlt_common::{ DltBuffer, DltReceiver, DLT_ID_SIZE }; /// Maximum size of each user buffer, also used for injec...
use anyhow::bail; use bitcoin::{ consensus::{Decodable, Encodable}, hashes::Hash, BlockHeader, PubkeyHash, PublicKey, Script, ScriptHash, VarInt, }; use db_key::Key; use leveldb::{ database::Database, iterator::Iterable, kv::KV, options::{Options, ReadOptions}, }; use mdbx::{DatabaseFlags, G...
use std::hash::Hash; use std::collections::HashMap; use petgraph::visit::{ IntoEdgeReferences, NodeIndexable, IntoNodeIdentifiers, EdgeRef }; pub use petgraph::algo::FloatMeasure; /// An algorithm error: a cycle of negative weights was found in the graph. // In the current version of petgraph, the NegativeCycle stru...
use crate::fp::Fp; use crate::representation::ElementRepr; use crate::field::*; use crate::extension_towers::fp2::{Extension2, Fp2}; use crate::traits::FieldElement; use crate::traits::ZeroAndOne; #[derive(Clone, Copy, Debug)] pub struct SqrtContext<'a>{ pub t_repr: &'a [u64], pub t_minus_1_over_2_repr: &'a [u...
use crate::{ wgpu_type_converter::{OwnedWgpuVertexBufferDescriptor, WgpuInto}, WgpuBindGroupInfo, WgpuResources, }; use bevy_asset::{Assets, Handle, HandleUntyped}; use bevy_render::{ pipeline::{ BindGroupDescriptor, BindGroupDescriptorId, BindingShaderStage, PipelineDescriptor, }, renderer...
use std::env; use std::fs; use std::io::Write; use std::path::Path; extern crate bit; use bit::BitIndex; // copied and slightly adjusted from src/core/arm7tdmi/thumb/mod.rs fn thumb_decode(i: u16) -> (&'static str, String) { let offset5 = i.bit_range(6..11) as u8; let load = i.bit(11); if i & 0xf800 == 0x...
extern crate itertools; extern crate libc; extern crate rand; extern crate twox_hash; use std::collections::HashSet; use std::hash::{BuildHasherDefault, Hash, Hasher}; use std::io; use std::mem; use std::os::unix::io::RawFd; use std::path::Path; use std::sync::{Arc, Condvar, Mutex}; use std::thread; use std::thread::J...
use core::cell::Cell; use kernel::common::cells::{OptionalCell, TakeCell}; use kernel::common::registers::interfaces::{ReadWriteable, Readable, Writeable}; use kernel::common::registers::{register_bitfields, ReadWrite}; use kernel::common::StaticRef; use kernel::hil; use kernel::hil::i2c::{self, Error, I2CHwMasterClie...
// Copyright 2017, <NAME> <<EMAIL>>. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT> /*! *color-thief-rs* is a [color-thief](https://github.com/lokesh/color-thief) algorithm reimplementation in Ru...
#![cfg_attr(target_os = "none", no_std)] #![cfg_attr(target_os = "none", no_main)] mod api; mod backend; use backend::XousDisplay; mod op; mod logo; mod poweron; mod sleep_note; use api::{DrawStyle, PixelColor, Rectangle, TextBounds, RoundedRectangle, Point, TextView, Line, Circle}; use api::{Opcode, ClipObject, C...
//! This module implements import-resolution/macro expansion algorithm. //! //! The result of this module is `CrateDefMap`: a data structure which contains: //! //! * a tree of modules for the crate //! * for each module, a set of items visible in the module (directly declared //! or imported) //! //! Note that...
#![allow(non_snake_case)] use std::iter::FromIterator; use crate::misc::{padding::bit_padding, to_bytes::ToBytes}; fn F(X: u32, Y: u32, Z: u32) -> u32 { X & Y | !X & Z } fn G(X: u32, Y: u32, Z: u32) -> u32 { X & Z | Y & !Z } fn H(X: u32, Y: u32, Z: u32) -> u32 { X ^ Y ^ Z } fn I(X: u32, Y: u32, Z: u32...
use crate::config::{ClientConfig, ClientServiceConfig, Config, ServiceType, TransportType}; use crate::config_watcher::ServiceChange; use crate::helper::udp_connect; use crate::protocol::Hello::{self, *}; use crate::protocol::{ self, read_ack, read_control_cmd, read_data_cmd, read_hello, Ack, Auth, ControlChannelCm...
#[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ to_binary, Addr, Binary, CosmosMsg, Deps, DepsMut, Empty, Env, MessageInfo, Reply, Response, StdResult, SubMsg, WasmMsg, }; use cw1::CanExecuteResponse; use cw2::set_contract_version; use schemars::JsonSchema; use std::fmt; use ...
// Copyright 2020 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use { super::ssh::build_ssh_command, crate::target::Target, crate::RETRY_DELAY, anyhow::{anyhow, Context, Result}, async_io::Async, ...
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
// Copyright 2020 The OctoSQL Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
/// Transaction log writer & reader use crate::common::errors::Error; use crate::common::errors::ErrorKind; use crate::common::misc::SliceToIntConverter; use crate::common::crc32; use crate::common::defs::Sequence; use crate::common::defs::Vector; use crate::common::defs::VECTOR_DATA_LENGTH; use crate::log_mgr::fs::Bu...
use serde::{Deserialize, Serialize}; use std::convert::From; use std::fmt; #[derive(Clone, Debug, Serialize, Deserialize)] pub struct Card { pub name: String, pub id: String, pub cost: u32, pub card_type: CardType, pub deck: Deck, pub requirements: Requirements, pub tags: Vec<Tags>, pub...
use anyhow::Result; use border::try_from; use border_core::{ record::{BufferedRecorder, Record, RecordValue, TensorboardRecorder}, shape, util::eval_with_recorder, Agent, Shape, TrainerBuilder, }; use border_py_gym_env::{ newtype_act_c, newtype_obs, to_pyobj, PyGymEnv, PyGymEnvActFilter, PyGymEnvBui...