text
stringlengths
9.08k
47.9k
#![feature(test)] #![feature(cfg_target_feature)] extern crate test; extern crate simd; use test::black_box as bb; use test::Bencher as B; use simd::f32x4; #[cfg(target_feature = "avx")] use simd::x86::avx::{f32x8, f64x4}; // #[cfg(target_feature = "avx2")] // use simd::x86::avx2::Avx2F32x8; #[bench] fn multiply_nai...
/// === Two body Problem === /// Provides functions and methods for computing a simple keplerian, 2-body orbit /// Also provides a set of higher order perturbations that can be added to the basic /// two body problem /// /// The following perturbations are provided for testing: /// - Drag (exponential model) /// - J2...
mod functions; mod types; use std::{ collections::{HashMap, HashSet}, fmt::Display, path::{Path, PathBuf}, str::FromStr, sync::Arc, }; use anyhow::{anyhow, Context}; use chrono::{prelude::*, Duration}; use chrono_tz::Tz; use music_queue::EnqueuedItem; use notify::{ event::{CreateKind, ModifyKi...
extern crate sdl2; extern crate cgmath; extern crate lodepng; extern crate rgb; extern crate freetype; use sdl2::pixels::Color; use sdl2::event::Event; use sdl2::keyboard::Keycode; use sdl2::pixels::PixelFormatEnum; use std::collections::HashSet; use cgmath::*; use rgb::*; use std::time::Instant; fn perpendicular<T :...
#![doc(html_root_url = "https://docs.rs/bme280")] #![doc(issue_tracker_base_url = "https://github.com/VersBinarii/bme280/issues/")] #![deny( missing_docs, missing_debug_implementations, missing_copy_implementations, trivial_casts, trivial_numeric_casts, unsafe_code, unstable_features, un...
#![cfg_attr(not(feature = "std"), no_std)] #![recursion_limit="256"] use sp_std::prelude::*; use frame_system::{self as system, ensure_root, ensure_signed}; pub use frame_support::{ construct_runtime, decl_event, decl_module, decl_storage, decl_error, dispatch::{DispatchResult}, ensure, parameter_types, P...
use std::convert::TryInto; use std::collections::BTreeSet; use std::time::Instant; use rewind_core::mem::{self, VirtMemError}; use rewind_core::trace::{self, ProcessorState, Context, Params, Tracer, Trace, EmulationStatus, TracerError}; use rewind_core::snapshot::Snapshot; use bochscpu::cpu::{Cpu, RunState,...
use crate::msgs::enums::{ContentType, HandshakeType, ProtocolVersion}; use crate::msgs::enums::{Compression, NamedGroup, ECPointFormat, CipherSuite}; use crate::msgs::enums::{ExtensionType, AlertDescription}; use crate::msgs::enums::{ClientCertificateType, SignatureScheme}; use crate::msgs::message::{Message, MessagePa...
use ark_crypto_primitives::merkle_tree::Config as MTConfig; use ark_ff::PrimeField; use ark_sponge::{Absorb, CryptographicSponge, FieldElementSize}; use ark_std::{boxed::Box, collections::BTreeSet, vec, vec::Vec}; use tracing::info; use crate::{ bcs::MTHashParameters, iop::{ bookkeeper::{MessageBookkee...
use crate::snapshots; use byteorder::{self, LittleEndian, ReadBytesExt, WriteBytesExt}; use std::fs; use std::io::{BufReader, BufWriter}; use std::path; use crate::storage::LocalStorage; use crate::snapshots::RepositorySnapshots; use crate::snapshots::{SnapshotId, Snapshot}; use crate::error::{ Error, UnderlyingError }...
use codec::{Decode, Encode}; use futures::{ channel::{mpsc, oneshot}, StreamExt, }; use log::{debug, error}; use rand::Rng; use crate::{ alerts, alerts::{Alert, AlertConfig, ForkProof, ForkingNotification}, config::Config, consensus, network::{NetworkHub, Recipient}, signed::{Signature,...
//! # Deip Module //! A module for managing digital assets. //! //! - [`multisig::Config`](./trait.Config.html) //! - [`Call`](./enum.Call.html) //! //! ## Overview //! //! This module contains functionality for managing different types of digital assets. //! //! It provides a hierarchy to simply operate digital asset...
//! A platform agnostic driver to interface with the ENC28J60 (Ethernet controller) //! //! This driver is built on top of the [`embedded-hal`] traits. //! //! [`embedded-hal`]: https://docs.rs/embedded-hal/~0.2 //! //! # Examples //! //! You should find some examples in the [`stm32f103xx-hal`] crate. //! //! [`stm32f1...
#![allow(clippy::identity_op)] use alloc::vec::Vec; use crate::encoder::JpegColorType; /// Conversion from RGB to YCbCr #[inline] pub fn rgb_to_ycbcr(r: u8, g: u8, b: u8) -> (u8, u8, u8) { // To avoid floating point math this scales everything by 2^16 which gives // a precision of approx 4 digits. // ...
// Copyright 2020 ChainSafe Systems // SPDX-License-Identifier: Apache-2.0, MIT #[cfg(test)] mod peer_test; use super::bad_block_cache::BadBlockCache; use super::bucket::{SyncBucket, SyncBucketSet}; use super::sync_state::SyncState; use super::sync_worker::SyncWorker; use super::{network_context::SyncNetworkContext, ...
//! DES(Data Encryption Standard) //! FIPS 46-3 //! https://www.cnblogs.com/mengsuenyan/p/12905365.html //! use crate::des::const_tables as mct; use crate::{Cipher, CryptoError, CryptoErrorKind}; /// DES #[derive(Clone)] pub struct DES { ks: [u64; 16], } impl DES { pub fn new(key: [u8; 8]) -> DES { ...
//! Module containing [`Registry`]. use bitcoinsuite_bitcoind::{rpc_client::BitcoindRpcClient, BitcoindError}; use bitcoinsuite_core::{lotus_txid, Hashed, LotusAddress, Net, Sha256d}; use bitcoinsuite_ecc_secp256k1::EccSecp256k1; use bitcoinsuite_error::{ErrorMeta, Result}; use cashweb_payload::payload::{BurnTx, Signe...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - RTC time register"] pub tr: TR, #[doc = "0x04 - RTC date register"] pub dr: DR, #[doc = "0x08 - RTC control register"] pub cr: CR, #[doc = "0x0c - RTC initialization and status register"] pub isr: ISR, #...
use crate::error::{RecoverableError, TestError}; use crate::line_writer::{blocking_writer, MsgType}; use crate::providers; use crate::TestEndReason; use crate::{RunConfig, RunOutputFormat}; use channel::ChannelStatsReader; use chrono::{DateTime, Duration as ChronoDuration, Local, NaiveDateTime, Utc}; use ether::Either...
use anyhow::{self, Context}; use log::debug; use nix::fcntl::{self, FcntlArg, OFlag}; use nix::sys::stat::SFlag; use nix::sys::stat::{self, Mode}; use nix::unistd; use smol::blocking; use std::collections::BTreeMap; use std::ffi::{OsStr, OsString}; use std::os::unix::{ffi::OsStrExt, io::RawFd}; use std::path::Path; use...
extern crate common; extern crate rand; use common::*; use common::Projection::*; use rand::{Rng, SeedableRng, StdRng}; #[cfg(debug_assertions)] #[no_mangle] pub fn new_state() -> State { println!("debug on"); let seed: &[_] = &[42]; let rng: StdRng = SeedableRng::from_seed(seed); make_state(rng) }...
use std::cell::RefCell; use std::path::PathBuf; use std::rc::{Rc, Weak}; use std::sync::{Arc, Mutex}; use std::time::{Duration, Instant}; use gelatin::cgmath::{Matrix4, Vector3}; use gelatin::glium::glutin::event::{ElementState, ModifiersState, MouseButton}; use gelatin::glium::{program, texture::SrgbTexture2d, unifor...
use std::str::FromStr; use astroport::asset::{Asset, AssetInfo}; #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ attr, to_binary, CosmosMsg, DepsMut, Env, MessageInfo, Response, StdResult, Storage, Uint128, WasmMsg, }; use cw20::Cw20ExecuteMsg; use cluster_math::FPDecimal; ...
// Copyright Materialize, Inc. and contributors. All rights reserved. // // Use of this software is governed by the Business Source License // included in the LICENSE file. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by ...
// TODO: STACK // There are two different stacks, the interpreter level stack (push and pop) // and the user space stack (stack vs heap). // How are aggregates saved on the stac? e.g. `let x = (1, 2);` // TODO: Hack an output function. use std::collections::BTreeMap; pub use rustc::mir::repr::BorrowKind; pub use ...
/// chapter 8 collect /// mengsen /// 2020-11-30 10:39:41 fn main() { { learning_str(); } { leaning_vec(); } { map_learning(); } } fn learning_str() { { let tao = '道'; let tao_u32 = tao as u32; assert_eq!(36947, tao_u32); assert_eq!(f...
use amcl_wrapper::field_elem::{FieldElement, FieldElementVector}; use amcl_wrapper::univar_poly::UnivarPolynomial; use amcl_wrapper::group_elem::GroupElement; use amcl_wrapper::group_elem_g1::{G1, G1Vector}; use amcl_wrapper::commitment::commit_to_field_element; use std::iter; use rayon::prelude::*; use crate::rayon::i...
// Copyright 2020 TiKV Project Authors. Licensed under Apache-2.0. use crate::server::metrics::*; use crate::server::snap::Task as SnapTask; use crate::server::{self, Config, StoreAddrResolver}; use crossbeam::queue::{ArrayQueue, PushError}; use engine_rocks::RocksEngine; use futures::channel::oneshot; use futures::co...
use archive::FailedToArchiveBlocks; use candid::candid_method; use dfn_candid::{candid, candid_one, CandidOne}; use dfn_core::{ api::{caller, data_certificate, print, set_certified_data, trap_with}, over, over_async, over_init, printer, setup, stable, BytesS, }; use dfn_protobuf::protobuf; use ic_types::Caniste...
//! Support for Mach Objects, used on macOS and iOS. use std::borrow::Cow; use std::error::Error; use std::fmt; use std::io::Cursor; use std::sync::Arc; use goblin::mach; use smallvec::SmallVec; use thiserror::Error; use symbolic_common::{Arch, AsSelf, CodeId, DebugId, Uuid}; use crate::base::*; use crate::dwarf::{...
use futures::future; use futures::prelude::*; use futures::sync::oneshot; use http::StatusCode; use hyper::body::Payload; use hyper::server::conn::AddrIncoming; use hyper::service::Service; use hyper::{Body, Request, Response, Server}; use hyperx::header::{ContentLength, ContentType}; use serde::Serialize; use std::col...
#![no_std] #![allow(dead_code)] // to suppress warnings for unused functions/methods #![allow(safe_packed_borrows)] // temporary, just to suppress unsafe packed borrows #![feature(rustc_private)] #![feature(abi_x86_interrupt)] #[macro_use] extern crate log; #[macro_use] extern crate lazy_static; extern crate volati...
use std::mem; use libc::{c_int, c_float}; use std::ptr; use rand::Rng; use std::slice; use std::ffi::CString; use std::path::Path; use Rect; use get_error; pub use self::Color::{RGB, RGBA}; pub mod ll { #![allow(non_camel_case_types)] use Rect; use libc::{c_void, c_uint, c_int, c_float, c_uchar, uint8_...
/* * @file uniform.rs * @author <NAME> * @copyright 2020-2022 Rambus Inc. * * Nonuniform sparse linear map implementation. */ use crate::uniform::{MapCore,CompressedRandomMap,BuildOptions, choose_key,BLOCKSIZE,STD_BINCODE_CONFIG,encode_u48,decode_u48, DefaultHasher,KeyedHasher128}; use crate::tilematrix:...
//! This module mainly contains functionality replicating the miniz higher level API. use std::{cmp, mem, ptr, slice, usize}; use std::io::Cursor; use libc::{self, c_char, c_int, c_uint, c_ulong, c_void, size_t}; use miniz_oxide::deflate::core::{CompressionStrategy, TDEFLFlush, TDEFLStatus, compress, c...
//! Unicode to Bijoy 2000 encoding conversion. use matches::matches; use phf::phf_map; use crate::chars::*; use crate::utility::{is_base_line_right_char, is_front_facing, is_front_kar, is_kar, last}; static MAP: phf::Map<&'static str, &'static str> = phf_map![ "০" => "0", "১" => "1", "২" => "2", "৩" ...
use crate::characters::{JongseongCharacter::*, *}; use crate::constants::*; use crate::syllable::*; use std::convert::TryFrom; #[derive(Clone, Debug, PartialEq, PartialOrd)] pub enum Jongseong { Normal(JongseongCharacter), Compat(JongseongCharacter), } fn to_code(code: u32) -> u32 { if code.is_syllable() ...
#![allow( clippy::needless_question_mark, clippy::too_many_arguments, clippy::type_complexity, clippy::module_inception )] /* Pretty much the same as bevy_winit, but organized to use vulkano renderer backend. This allows you to create your own pipelines for rendering. */ mod converters; mod pipeline_s...
//! # Simple matrix data //! //! A combination of a sparse matrix of constraints and a list of upper bounds for variables. use std::fmt::{Display, Formatter}; use std::fmt; use crate::algorithm::two_phase::matrix_provider::column::{Column as ColumnTrait, OrderedColumn}; use crate::algorithm::two_phase::matrix_provider...
/* * Copyright (c) Meta Platforms, Inc. and its affiliates. * * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ //! Provides a more rustic interface to a minimal set of `perf` functionality. //! //! Expli...
//! Unix specific definitions use std; use std::io::{self, Read, Write}; use std::os::unix::io::AsRawFd; use std::sync; use std::sync::atomic; use libc; use nix; use nix::poll::{self, EventFlags}; use nix::sys::signal; use nix::sys::termios; use nix::sys::termios::SetArg; use unicode_segmentation::UnicodeSegmentation;...
// Whtcorps Inc 2022 Apache 2.0 License; All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use // this file 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 applica...
#![cfg_attr( not(any( feature = "vulkan", feature = "dx11", feature = "dx12", feature = "metal", feature = "gl" )), allow(dead_code, unused_extern_crates, unused_imports) )] extern crate env_logger; #[cfg(feature = "dx11")] extern crate gfx_backend_dx11 as back; #[cf...
// Copyright 2020 The Druid Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
// 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...
//! Simple plotting library. #![allow(clippy::comparison_chain)] use color::Hsva; use crate::*; // ---------------------------------------------------------------------------- /// A value in the value-space of the plot. /// /// Uses f64 for improved accuracy to enable plotting /// large values (e.g. unix time on x...
// Copyright 2016 The xi-editor 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 ag...
//! functionality around bit manipulations specific to the Anvil file format. use bit_field::{BitArray, BitField}; use fastnbt::LongArray; use serde::Deserialize; // Various data versions for the anvil format const V1_17_0: i32 = 2724; const V1_17_1: i32 = 2730; const SNAPSHOT_21W44A: i32 = 2845; /// PackedBits can ...
//! Text layout logic. //! //! Currently, this crate is used primarily by the `draw.text()` API but will also play an //! important role in future GUI work. pub mod cursor; pub mod font; pub mod glyph; pub mod layout; pub mod line; pub mod rt { //! Re-exported RustType geometric types. pub use rusttype::{gpu_c...
//! Block tree implementation with generic storage backend. //! //! *Handles block import, chain selection, difficulty calculation and block storage.* //! #![warn(missing_docs)] #[cfg(test)] pub mod test; use std::cmp::Ordering; use std::collections::{BTreeMap, BTreeSet, HashMap, VecDeque}; use nakamoto_common::bitc...
//!Minimal `no_std` UUID implementation. //! //!## Features: //! //!- `md5` - Enables v3; //!- `prng` - Enables v4 using pseudo random, allowing unique, but predictable UUIDs; //!- `orng` - Enables v4 using OS random, allowing unique UUIDs; //!- `sha1` - Enables v5; //!- `serde` - Enables `serde` support; //!- `st...
// 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 in the LICENSE-APACHE file or at: // https://www.apache.org/licenses/LICENSE-2.0 //! Event manager — public API use instant::Instant; use l...
// Copyright 2016 oauth-client-rs Developers // // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // http://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 acco...
/* * Copyright 2018 Intel Corporation * * 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 agre...
use crate::attribute::{ Attribute, LosslessAttribute, LosslessAttributeDecoder, LosslessAttributeEncoder, RawAttribute, }; use crate::constants::MAGIC_COOKIE; use crate::convert::TryAsRef; use crate::{Method, TransactionId}; use bytecodec::bytes::{BytesEncoder, CopyableBytesDecoder}; use bytecodec::combinator::{Col...
#![allow(dead_code)] #![allow(unused_imports)] /* Copyright © 2013 Free Software Foundation, Inc See licensing in LICENSE file File: ll.rs Author: Jesse 'Jeaye' Wilkerson Description: Low-level interface to foreign ncurses functions. */ use libc::{ c_char, c_int, c_short, c_uint, c_ulong, c_void, FILE }; pub type c...
// Copyright (c) Facebook, Inc. and its affiliates. // // This source code is licensed under the MIT license found in the // LICENSE file in the "hack" directory of this source tree. use hhbc_gen::{ImmType, Inputs, InstrFlags, OpcodeData}; use proc_macro2::{Ident, Punct, Spacing, Span, TokenStream}; use quote::{quote,...
use std::{cmp::Ordering, sync::Arc}; use eyre::Report; use futures::stream::{FuturesUnordered, TryStreamExt}; use rosu_pp::{Beatmap as Map, OsuPP, TaikoPP, CatchStars, CatchPP}; use rosu_v2::prelude::{GameMode, OsuError, Score}; use twilight_model::{ application::{ command::CommandOptionChoice, int...
#[cfg(test)] mod utils; use exmex::format_exerr; #[cfg(test)] use exmex::{ eval_str, literal_matcher_from_pattern, ops_factory, parse, prelude::*, ExError, ExResult, MatchLiteral, {BinOp, FloatOpsFactory, MakeOperators, Operator}, }; #[cfg(test)] use std::{ iter::once, ops::{BitAnd, BitOr}, str:...
// Copyright (c) 2022 Espresso Systems (espressosys.<EMAIL>) // This file is part of the Jellyfish library. // You should have received a copy of the MIT License // along with the Jellyfish library. If not, see <https://mit-license.org/>. //! Circuits for the building blocks in Plonk verifiers. use crate::{ circu...
//! Type inference, i.e. the process of walking through the code and determining //! the type of each expression and pattern. //! //! For type inference, compare the implementations in rustc (the various //! check_* methods in librustc_typeck/check/mod.rs are a good entry point) and //! IntelliJ-Rust (org.rust.lang.cor...
//! SIP2 Specification as a collection of static values. use std::fmt; pub const SIP_PROTOCOL_VERSION: &str = "2.00"; pub const LINE_TERMINATOR: &str = "\r"; pub const SIP_DATE_FORMAT: &str = "%Y%m%d %H%M%S"; /// Fixed field definition with label and field length pub struct FixedField { /// For documentation ...
// Copyright 2015-2020 Parity Technologies (UK) Ltd. // This file is part of Parity Ethereum. // Parity Ethereum 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 yo...
//! Desugarable implementations for AST elements use super::{ desugarable::Desugarable, desugarer::Desugarer, disembed::core_from_embedding, literal::desugar_literal, }; use crate::{ common::sourcemap::HasSmid, core::{ anaphora::{self, BLOCK_ANAPHORA, EXPR_ANAPHORA}, error::CoreError, ...
use crate::editing::ShapeStack; use crate::shapes::{Path, PathBundle, Poly, PolyBundle, Rect, RectBundle, ShapeBundle}; use crate::ui::{LayersUIState, LibInfoUIDropdownState}; use crate::{InLayer, UpdateViewportEvent, ViewportDimensions, ALPHA, WIDTH}; use std::collections::HashMap; use bevy::prelude::*; use bevy::t...
use cocoa::{self, appkit, foundation}; use cocoa::appkit::{NSApplication, NSEvent, NSView, NSWindow}; use events::{self, ElementState, Event, MouseButton, TouchPhase, WindowEvent, ModifiersState, KeyboardInput}; use super::window::Window; use std; use super::DeviceId; pub struct EventsLoop { pub windows: std::syn...
// Copyright © 2019 <NAME> // CS 510 RUST Course Project // Connect Four extern crate colored; extern crate ndarray; extern crate rand; extern crate ears; use ears::{AudioController, Sound}; use colored::*; use ndarray::Array2; use rand::Rng; use std::io; fn main() { println!( "{}", "Hello, and ...
use super::prelude::*; use crate::util::{Align16, ConstTransmuter}; use std::arch::x86_64::{self as sse, __m128}; static _QUAT_SIMD_ALIGN: [(); std::mem::align_of::<Quat>()] = [(); std::mem::align_of::<__m128>()]; static _V3_SIMD_ALIGN: [(); std::mem::align_of::<V3>()] = [(); std::mem::align_of::<__m128>()]; static _V...
//! Hold our game state. use actors::{Body, Bullet, Panda}; use color_picker::*; use gameboard_controller::InputState; use ggez::event::{self, Keycode, Mod}; use ggez::{graphics, timer, Context, GameResult}; use rayon::prelude::*; use fnv::FnvHashMap; use fluffy_penguin::genetic_algorithm::Specimen; use fluffy_pengui...
use evm::backend::Log; use primitive_types::{H160, H256, U256}; use rlp::{Decodable, DecoderError, Encodable, Rlp, RlpStream}; use serde::{Deserialize, Serialize}; use sha3::{Digest, Keccak256}; use std::str::FromStr; use crate::error::*; use secp256k1::{ recovery::{RecoverableSignature, RecoveryId}, Message, ...
use yaxpeax_arch::Arch; use std::collections::{HashMap, HashSet, VecDeque}; use std::hash::Hash; use std::cmp::Eq; use petgraph::graphmap::GraphMap; use petgraph; use petgraph::visit::Bfs; use std::cell::RefCell; use std::rc::Rc; use std::fmt::Debug; use analyses::control_flow::{BasicBlock, ControlFlowGraph}; use me...
// Copyright 2020 TiKV Project Authors. Licensed under Apache-2.0. use std::cell::Cell; use std::cmp::Ordering as CmpOrdering; use std::ffi::CString; use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::{Arc, Mutex}; use super::{GcConfig, GcWorkerConfigManager}; use crate::storage::mvcc::{GC_DELETE_VERSIONS_H...
// Copyright 2022 Alibaba Cloud. All Rights Reserved. // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // // Portions Copyright 2017 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be //...
use std::collections::{BTreeSet, HashSet}; use std::iter::FromIterator; use super::types::*; use crate::error::Result; use crate::services::helpers::*; use crate::ursa::cl::{ issuer::Issuer as CryptoIssuer, RevocationRegistryDelta as CryptoRevocationRegistryDelta, Witness, }; use indy_data_types::anoncreds::{ ...
// pathfinder/renderer/src/tiles.rs // // Copyright © 2019 The Pathfinder Project Developers. // // 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...
// 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 { crate::key_util::get_input_sequence_for_key_event, crate::pty::Pty, crate::ui::{PointerEventResponse, ScrollContext, TerminalScene}, ...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - 16-bit operand one multiply"] pub mpy: MPY, #[doc = "0x02 - 16-bit operand one signed multiply"] pub mpys: MPYS, #[doc = "0x04 - 16-bit operand one multiply accumulate"] pub mac: MAC, #[doc = "0x06 - 16-bit oper...
use ethereum::chain::{EthereumAdapterSelector, EthereumStreamBuilder}; use ethereum::{ BlockIngestor as EthereumBlockIngestor, EthereumAdapterTrait, EthereumNetworks, RuntimeAdapter, }; use git_testament::{git_testament, render_testament}; use graph::blockchain::firehose_block_ingestor::FirehoseBlockIngestor; use g...
// Copyright 2018 The Chromium OS 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 std::alloc::Layout; use std::cell::{Cell, RefCell}; use std::cmp::min; use std::cmp::{self, Ord, PartialEq, PartialOrd}; use std::collections::btre...
//! Types for directing the execution of Solana programs. //! //! Every invocation of a Solana program executes a single instruction, as //! defined by the [`Instruction`] type. An instruction is primarily a vector of //! bytes, the contents of which are program-specific, and not interpreted by //! the Solana runtime. ...
/// This file is a stripped down version of WinAPI with just the parts relevant to kapp. /// https://github.com/retep998/winapi-rs /// /// WinAPI is licensed under Apache 2.0 or MIT: /// /// Copyright (c) 2015-2018 The winapi-rs Developers /// /// Permission is hereby granted, free of charge, to any person obtaining a ...
// This file is part of the SORA network and Polkaswap app. // Copyright (c) 2020, 2021, Polka Biome Ltd. All rights reserved. // SPDX-License-Identifier: BSD-4-Clause // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: ...
// Copyright (c) SimpleStaking, Viable Systems and Tezedge Contributors // SPDX-License-Identifier: MIT use std::{ borrow::Cow, collections::hash_map::DefaultHasher, convert::TryInto, hash::Hasher, io::Write, }; #[cfg(test)] use std::sync::Arc; use blake2::{ digest::{Update, VariableOutput}, VarBlake2b, ...
//! Contains types and traits to use on authoritative server. //! //! ## Usage //! //! ``` //! # use {evoke::server::{ServerSystem, DummyRemotePlayer}, core::marker::PhantomData}; //! # async fn server<'a>(world: &'a mut edict::World, scope: &'a scoped_arena::Scope<'a>) -> eyre::Result<()> { //! let listener = tokio::n...
// Copyright 2015 The Gfx-rs Developers. // // 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 ag...
use crate::subgraph::context::IndexingContext; use crate::subgraph::error::BlockProcessingError; use crate::subgraph::inputs::IndexingInputs; use crate::subgraph::metrics::RunnerMetrics; use crate::subgraph::state::IndexingState; use crate::subgraph::stream::new_block_stream; use crate::subgraph::SubgraphInstance; use ...
use crate::cstore::{self, LoadedMacro}; use crate::encoder; use crate::link_args; use crate::native_libs; use crate::foreign_modules; use crate::schema; use rustc::ty::query::QueryConfig; use rustc::middle::cstore::{CrateStore, DepKind, EncodedMetadata, NativeLibraryKind}; use rustc::middle...
// Copyright 2021 The Chromium OS 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 std::sync::Arc; use sync::Mutex; use crate::bus::{HostHotPlugKey, HotPlugBus}; use crate::pci::msix::{MsixCap, MsixConfig}; use crate::pci::pci_con...
use crate::{models::borrower_data::BorrowerData, types::AccruedInterest, weights::WeightInfo, *}; use crate::{ types::InitializeBlockCallCounters, validation::{ AssetIsSupportedByOracle, BalanceGreaterThenZero, CurrencyPairIsNotSame, MarketModelValid, UpdateInputValid, }, }; use composable_support::{ math::saf...
//! Replacement of zcash_primitives::transaction::builder::Builder. use crypto_api_chachapoly::ChachaPolyIetf; use ff::{Field, PrimeField}; use group::GroupEncoding; use keys::Address; use lazy_static::lazy_static; use rand::{rngs::OsRng, CryptoRng, RngCore}; use sha2::{Digest, Sha256}; use types::U256; use zcash_prim...
use crate::constants::*; /*----------------------------------------------------------------------------- * * procedure sgp4init * * this procedure initializes variables for sgp4. * * author : <NAME> 719-573-2600 28 jun 2005 * author : <NAME> ...
use bitarray::{MultiBitArray, SingleBitArray}; use bitfiddling::BitFiddling; use std; pub const BITS_PER_SLOT: usize = 9; //corresponds to false positive rate of 1/(2^9) == 1/512 const BLOCK_OFFSET_BITS: usize = (6); //6 seems fastest; corresponds to max offset 2^6-1 or 63 pub const SLOTS_PER_BLOCK: usize = (1 << BLOC...
#![cfg_attr(not(feature = "std"), no_std)] use frame_support::{decl_error, decl_event, decl_module, decl_storage, dispatch, ensure, sp_std, Parameter}; use frame_support::dispatch::DispatchResult; use frame_support::sp_std::convert::TryInto; use frame_support::sp_std::fmt::Debug; use frame_support::traits::{Existenc...
use crate::*; use crate::{ composite_collections::{ SmallStartLen as StartLen, SmallCompositeVec as CompositeVec, }, impl_interfacetype::impl_interfacetype_tokenizer, lifetimes::LifetimeIndex, literals_constructors::{rslice_tokenizer,rstr_tokenizer}, }; use as_derive_utils::{ ...
use std::mem; use std::os::raw::{c_short, c_ulong}; use std::ptr::null_mut; use libc::{ blkcnt_t, blksize_t, c_char, c_int, c_uint, c_void, dev_t, flock, fsblkcnt_t, fsfilcnt_t, gid_t, ino_t, mode_t, nlink_t, off_t, pid_t, size_t, stat, statvfs, time_t, uid_t, S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFLNK, S...
use crate::error::{ChunkReadError, ChunkWriteError}; use crate::position::{RegionChunkPosition, RegionPosition}; use bitvec::prelude::*; use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; use log::debug; use nbt::decode::{read_gzip_compound_tag, read_zlib_compound_tag}; use nbt::encode::write_zlib_compound_tag; u...
//! An operation to 'apply' a CloudFormation template to an AWS environment. use std::{fmt, future::Future, pin::Pin, task}; use async_stream::try_stream; use chrono::{DateTime, Utc}; use futures_util::{Stream, TryFutureExt, TryStreamExt}; use rusoto_cloudformation::{ CloudFormation, CreateChangeSetInput, Describ...
//! # PolkaBTC Replace Module //! Based on the [specification](https://interlay.gitlab.io/polkabtc-spec/spec/replace.html). #![deny(warnings)] #![cfg_attr(test, feature(proc_macro_hygiene))] #![cfg_attr(not(feature = "std"), no_std)] #[cfg(any(feature = "runtime-benchmarks", test))] mod benchmarking; mod default_wei...
use std::cmp; use std::fs; use std::io::{self, Read, Seek, SeekFrom, Write}; use std::path::{Path, PathBuf}; use std::process; use std::sync::Arc; use std::time::Duration; #[rustfmt::skip] use ::sentry::configure_scope; #[rustfmt::skip] use ::sentry::integrations::failure::capture_fail; use bytes::Bytes; use failure:...
use async_trait::async_trait; use futures::TryFutureExt; use interledger_errors::BalanceStoreError; use interledger_packet::{ErrorCode, RejectBuilder}; use interledger_service::*; use interledger_settlement::core::{ types::{SettlementAccount, SettlementStore}, SettlementClient, }; use std::marker::PhantomData; ...