text stringlengths 9.08k 47.9k |
|---|
// 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 crate::{
identity::ComponentIdentity,
logs::{
budget::BudgetHandle,
buffer::{ArcList, LazyItem},
error::StreamError,
... |
use std::mem::MaybeUninit;
use ndarray::{prelude::*, Slice};
use rand::{distributions::uniform::Uniform, Rng};
use rubato::{FftFixedInOut, Resampler};
use thiserror::Error;
use crate::transforms::*;
pub use crate::util::seed_from_u64;
use crate::util::*;
use crate::*;
type Result<T> = std::result::Result<T, Augmenta... |
// Copyright (c) Facebook, Inc. and its affiliates.
// SPDX-License-Identifier: Apache-2.0
use crate::{
pacemaker::{Pacemaker, PacemakerState},
record::*,
};
use anyhow::{bail, ensure};
use bft_lib::{
base_types::*,
configuration::EpochConfiguration,
smr_context::{SignedValue, SmrContext},
};
use l... |
/*
* Copyright (c) 2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights ... |
#![allow(dead_code)]
use crate::player::{SideMovement, StraightMovement, TurnMovement};
use cache::Picture;
use core::slice::Iter;
use std::time::Instant;
use clap::Parser;
use minifb::{Key, KeyRepeat, Window, WindowOptions};
mod cache;
type ColorMap = [(u8, u8, u8); 256];
mod constants;
mod map;
mod player;
mod ray... |
// Copyright 2019-2020 Thales Inc.
// This file is part of Thales.
// Thales 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) any later version.
// Th... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - PIO Enable Register"]
pub pio_per: crate::Reg<pio_per::PIO_PER_SPEC>,
#[doc = "0x04 - PIO Disable Register"]
pub pio_pdr: crate::Reg<pio_pdr::PIO_PDR_SPEC>,
#[doc = "0x08 - PIO Status Register"]
pub pio_psr: crate::... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Control register 0"]
pub ctrlr0: CTRLR0,
#[doc = "0x04 - Master Control register 1"]
pub ctrlr1: CTRLR1,
#[doc = "0x08 - SSI Enable"]
pub ssienr: SSIENR,
#[doc = "0x0c - Microwire Control"]
pub mwcr: MWCR,
... |
//! # Decision Tree Regressor
//!
//! The process of building a decision tree can be simplified to these two steps:
//!
//! 1. Divide the predictor space \\(X\\) into K distinct and non-overlapping regions, \\(R_1, R_2, ..., R_K\\).
//! 1. For every observation that falls into the region \\(R_k\\), we make the same pre... |
pub mod commands;
pub mod tools;
use crate::{
architecture::arm::{
communication_interface::{ArmProbeInterface, DapProbe},
dp::{Abort, Ctrl, DebugPortError, DpAccess, DpRegister},
swo::poll_interval_from_buf_size,
ArmCommunicationInterface, DapAccess, DapError, PortType, Register, S... |
//! WebSocket protocol implementation based on [Tokio] runtime. For building
//! WebSocket server or client.
//!
//! yarws = Yet Another Rust WebSocket library
//!
//! Tls (wss:// enpoints) are supported in connect (since version 0.2.0).
//!
//! Lib is passing all [autobahn] tests. Including those for compressed
//! me... |
// use crate::errors::{ErrorKind, Result};
use crate::client::tx_types::{TXResultAsync, TXResultSync, TxFeeResult};
use crate::core_types::{Coin, StdFee, StdSignMsg, StdSignature};
use reqwest::header::{HeaderMap, CONTENT_TYPE, USER_AGENT};
use reqwest::{Client, RequestBuilder};
use serde::{Deserialize, Serialize};
pu... |
use crate::frontend::*;
use crate::function_translator::*;
use crate::sarus_std_lib;
use crate::sarus_std_lib::SConstant;
pub use crate::structs::*;
use crate::validator::ArraySizedExpr;
use crate::validator::ExprType;
pub use crate::variables::*;
use cranelift::codegen::ir::ArgumentPurpose;
use cranelift::prelude::*;
... |
use std::iter;
use anyhow::Context;
use once_cell::sync::Lazy;
use scroll::{Pread, LE};
static LOOKUP_TABLE: Lazy<Vec<u8>> = Lazy::new(|| {
iter::repeat(0)
.take(256)
.chain(0..=255)
.chain(iter::repeat(255).take(256))
.collect::<Vec<u8>>()
});
struct Jbp1 {
data_offset: u32,
... |
use std::convert::TryInto;
use std::io::{self, Error, Read};
use std::{error, fmt};
use super::decoder::{read_chunk, DecoderError::ChunkHeaderInvalid, WebPRiffChunk};
use super::lossless::{LosslessDecoder, LosslessFrame};
use super::vp8::{Frame as VP8Frame, Vp8Decoder};
use crate::error::DecodingError;
use crate::imag... |
// Copyright 2020 <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 writing, ... |
//! A pool that tries to find a minimal test case activating each sensor counter.
//!
//! # Policy for adding and removing inputs from the pool
//!
//! The pool will strive to keep as few inputs as possible, and will
//! prioritize small high-scoring inputs over large low-scoring ones. It does
//! so in a couple ways.
... |
use std::alloc::System;
use std::os::unix::prelude::OsStrExt as _;
use std::str;
use std::time::Duration;
use anyhow::{anyhow, Context, Result};
use http_req::request::{Method, Request};
use log::{error, info, warn};
use rand::RngCore as _;
use sgx_tcrypto::*;
use sgx_tse::*;
use sgx_tstd::io::{ErrorKind, Read as _, ... |
mod chip8timer;
mod graphics;
mod keypad;
mod opcode;
mod timer;
use arrayvec::ArrayVec;
use chip8timer::Chip8Timer;
use graphics::Graphics;
use keypad::KeyPad;
use opcode::Opcode;
use rand;
use timer::Timer;
const WIDTH: u8 = 64;
const HEIGHT: u8 = 32;
const PROGRAM_MEMORY_START: usize = 0x200;
const FONT_MEMORY_STA... |
use crate::support::Support;
use std::f32;
use t3m::prelude::*;
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug)]
pub enum ContactType {
Unknown,
PtPlane,
EdgeEdge,
PlanePt,
}
impl Default for ContactType {
#[inline]
fn default() -> ContactType {
ContactType::Unknown
}
... |
use crate::tables;
use doc::inference::{Exists, Shape};
use json::schema::types;
use protocol::{consumer, flow, labels, protocol as broker};
use serde_json::Value;
use std::collections::BTreeMap;
use std::time::Duration;
mod bundle;
pub use bundle::bundled_schema;
pub fn inference(shape: &Shape, exists: Exists) -> fl... |
//! # NFT image and metadata generator for Ethereum and Solana
//!
//! Inspired by hashlips 'nft_image_and_metada_generator' provides functionality to generate NFT images as well as their respective metadata
//! for both the Ethereum and Solana network. Note that this is the initial release, subsequent releases will co... |
//! Parser for the Usym format.
//!
//! This format can map il2cpp instruction addresses to managed file names and line numbers.
use std::borrow::Cow;
use std::error::Error;
use std::fmt;
use std::mem;
use std::ptr;
use std::str::FromStr;
use symbolic_common::Arch;
use symbolic_common::DebugId;
use thiserror::Error;
... |
use crate::{
app::{AppState, FullscreenState, GameBoyState, ShowMessage, WindowControlEvent},
config::{BootRom, Config, PaletteSelect, PersistentState},
file::state_data_date,
hotkey::{HotKey, HotKeys},
input::KeyConfig,
key_assign::{MultiKey, SingleKey, ToStringKey},
};
use bevy::{app::AppExit,... |
// Copyright (c) SimpleStaking, Viable Systems and Tezedge Contributors
// SPDX-License-Identifier: MIT
use std::{collections::HashMap, path::PathBuf};
use rusqlite::{named_params, Connection, OptionalExtension};
use serde::Serialize;
use crypto::hash::BlockHash;
use tezos_timing::{
hash_to_string, Protocol, Que... |
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
// Implementation note: one could imagine combining this module with Isolate to
// provide a more intuitive high-level API. However, due to the complexity
// inherent in asynchronous module loading, we would like the Isolate to remain
// small and s... |
#![allow(warnings, unused)]
use crate::types::{RevertContext, RevertWitness, VerifyContext, VerifyWitness};
use anyhow::{anyhow, Result};
use gw_common::h256_ext::H256Ext;
use gw_common::merkle_utils::{calculate_state_checkpoint, ckb_merkle_leaf_hash, CBMT};
use gw_common::smt::Blake2bHasher;
use gw_common::sparse_me... |
//! Support for the management of the schemas and tables we create in
//! the database for each deployment. The Postgres schemas for each
//! deployment/subgraph are tracked in the `deployment_schemas` table.
//!
//! The functions in this module are very low-level and should only be used
//! directly by the Postgres st... |
use either::Either;
use std::cell::RefCell;
use std::collections::{hash_map::Entry, HashMap};
use std::fmt;
use std::{isize, usize};
use crate::consts::{Flags, PGID};
use crate::db::DB;
use crate::errors::Error;
use crate::node::{Node, NodeBuilder, WeakNode};
use crate::page::{BranchPageElement, LeafPageElement, Owned... |
use std::env;
use std::ffi::OsString;
use std::fs::{self, File};
use std::io::{self, BufRead, Write};
use std::ops::Not;
use std::path::{Path, PathBuf};
use std::process::Command;
use rustc_version::VersionMeta;
const XARGO_MIN_VERSION: (u32, u32, u32) = (0, 3, 22);
const CARGO_MIRI_HELP: &str = r#"Interprets bin cr... |
// Copyright (c) SimpleStaking and Tezedge Contributors
// SPDX-License-Identifier: MIT
#![feature(test)]
extern crate test;
use std::time::{Duration, Instant};
use lazy_static::lazy_static;
use shell::peer_manager::P2p;
use shell::PeerConnectionThreshold;
use storage::tests_common::TmpStorage;
use tezos_identity::I... |
use std::collections::{VecDeque, HashSet};
use std::iter::Iterator;
use std::{i32, usize, u32};
use std::fs::File;
use std::io::BufReader;
use std::io::BufRead;
use std::cmp::min;
/// Alias type to usize for `VertexId` attributes.
pub type VertexId = usize;
#[derive(Debug)]
pub struct Triplet<T: Property>(pub VertexI... |
//! Unification and canonicalization logic.
use std::borrow::Cow;
use chalk_ir::{
cast::Cast, fold::Fold, interner::HasInterner, FloatTy, IntTy, TyVariableKind, UniverseIndex,
VariableKind,
};
use ena::unify::{InPlaceUnificationTable, NoError, UnifyKey, UnifyValue};
use super::{DomainGoal, InferenceContext};... |
// Copyright 2016 Google Inc.
// Copyright 2020 <NAME>
//
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/*!
A raster pipeline implementation.
Despite having a lot of changes compared to `SkRasterPipeline`,
the core principles are the same:
1. A pipeline consi... |
use crate::joints::b2_gear_joint::*;
use crate::b2_time_step::*;
use crate::b2_settings::*;
use crate::b2_math::*;
use crate::b2_joint::*;
// Gear Joint:
// C0 = (coordinate1 + ratio * coordinate2)_initial
// c = (coordinate1 + ratio * coordinate2) - C0 = 0
// J = [j1 ratio * j2]
// k = J * inv_m * JT
// = j1 * in... |
//! Sample dependency tracking.
#![allow(dead_code)]
use std::borrow::Borrow;
use crate::{
common::{
// smt::FullParser as Parser,
// var_to::vals::{ VarValsMap, VarValsSet },
var_to::vals::VarValsMap,
*,
},
unsat_core::*,
};
/// Maps term arguments to concrete ones.
pub ... |
// 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 {
crate::{
component_lifecycle, configs,
container::ComponentIdentity,
diagnostics,
error::Error,
events::{... |
use std::collections::hash_map::HashMap;
use super::parse_rule::{get_rule, Precedence, USIZE_TO_PRECEDENCE};
use super::CompileError;
use crate::chunk::Chunk;
use crate::compiler::Parser;
use crate::error::SSError;
use crate::opcode::OpCode;
use crate::scanner::Scanner;
use crate::token::Token;
use crate::token::Toke... |
// Copyright (c) 2021-present, Cruise LLC
//
// This source code is licensed under the Apache License, Version 2.0,
// found in the LICENSE-APACHE file in the root directory of this source tree.
// You may not use this file except in compliance with the License.
use crate::font::{Glyph, HorizontalMetrics, Outline, Out... |
// Copyright 2018 The Synthesizer IO 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 ... |
use std::num::NonZeroU32;
use rutabaga_gfx::{Rutabaga, ResourceCreate3D, RUTABAGA_PIPE_TEXTURE_2D, RUTABAGA_PIPE_BIND_RENDER_TARGET, RutabagaIovec, Transfer3D, RutabagaBuilder, RutabagaFenceData, VirglRendererFlags, RutabagaComponentType, RutabagaError};
use std::collections::BTreeMap;
use vm_memory::{GuestMemoryMmap, ... |
#[macro_use] extern crate conrod;
extern crate piston_window;
extern crate serial;
extern crate libc;
#[allow(unused_imports)]
use conrod::{
color,
Button,
Canvas,
Circle,
Color,
Colorable,
DropDownList,
EnvelopeEditor,
Frameable,
Labelable,
NumberDialer,
Point,
Posi... |
use std::collections::HashMap;
use std::path::PathBuf;
use uuid::Uuid;
use glib::{Cast, ToValue};
//use gtk::prelude::*, };
use gtk::{
prelude::{GtkListStoreExtManual, TreeSortableExtManual, TreeStoreExtManual},
Adjustment, CellLayoutExt, CellRendererText, ComboBoxExt, ComboBoxText, ComboBoxTextExt,
Cont... |
#![forbid(unsafe_code)]
// TODO: Investigate how cargo-clippy is implemented. Is it using syn?
// Is is using rustc? Is it implementing a compiler plugin?
extern crate cargo;
extern crate colored;
extern crate env_logger;
extern crate failure;
extern crate petgraph;
extern crate structopt;
extern crate syn;
extern cr... |
use std::cell::RefCell;
use std::collections::HashSet;
use std::ffi::CString;
use std::path::Path;
use std::rc::Rc;
use std::{thread, time};
use geomath::prelude::coordinates::Polar;
use ordered_float::NotNan;
use raylib::prelude::*;
use crate::problem::*;
use crate::solver::Solver;
use crate::transform::Transform;
u... |
//! `tor-circmgr`: circuits through the Tor network on demand.
//!
//! # Overview
//!
//! This crate is part of
//! [Arti](https://gitlab.torproject.org/tpo/core/arti/), a project to
//! implement [Tor](https://www.torproject.org/) in Rust.
//!
//! In Tor, a circuit is an encrypted multi-hop tunnel over multiple
//! re... |
/*!
This crate provides bindings and a rust friendly wrapper around the C API of [libsm64](https://github.com/libsm64/libsm64).
libsm64 extracts the logic for the movement and control of Mario from the Super Mario
64 ROM providing a interface to implement your own Mario in your own 3D engine.
**Note:** You will be req... |
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(crate_visibility_modifier)]
#![cfg_attr(bootstrap, feature(const_panic))]
#![feature(in_band_lifetimes)]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(map_try_insert)]
#![feature(min_specialization)]
#![feature(option_get_or_insert_default)]
#](https://crates.io/crates/axiom)
//! [](https://travis-ci.org/rsimmonsjr/axiom)
//! [![Average tim... |
// Copyright 2020 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::cell::RefCell;
use std::collections::BTreeMap as Map;
use std::num::NonZeroU32;
use std::rc::Rc;
use std::result::Result;
use std::sync::Arc;
... |
// Copyright (c) 2016 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// dis... |
#![allow(non_camel_case_types)]
extern crate libc;
use libc::{c_char, c_int, FILE, c_void, c_long, c_double};
// opaque pointers
pub enum gcc_jit_context {}
pub enum gcc_jit_result {}
pub enum gcc_jit_object {}
pub enum gcc_jit_location {}
pub enum gcc_jit_type {}
pub enum gcc_jit_field {}
pub enum gcc_jit_struct {}... |
use anyhow::{bail, Context};
use serde::Deserialize;
use std::collections::HashMap;
use std::fs;
use std::path::{Path, PathBuf};
use std::process::Command;
#[cfg(unix)]
use std::os::unix::fs::PermissionsExt;
mod symbols;
/// Re-export for the main function.
pub use anyhow::Result;
/// The base birectory for the bun... |
use super::line::*;
use super::{
block::*,
chunk::{Chunk, ChunkMap, ChunkState},
defrag::Defrag,
};
use crate::policy::gc_work::TraceKind;
use crate::policy::space::SpaceOptions;
use crate::policy::space::*;
use crate::policy::space::{CommonSpace, Space, SFT};
use crate::util::copy::*;
use crate::util::heap... |
use crate::error::ContractError;
use crate::staking::{query_staker, stake_voting_tokens, withdraw_voting_tokens};
use crate::state::{
bank_read, bank_store, config_read, config_store, poll_indexer_store, poll_read, poll_store,
poll_voter_read, poll_voter_store, read_poll_voters, read_polls, read_tmp_poll_id, st... |
// Copyright 2018-2019 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... |
mod round_success_meter;
#[cfg(test)]
mod tests;
use std::{
any::Any,
collections::{BTreeMap, HashMap, HashSet},
fmt::Debug,
iter,
path::PathBuf,
};
use datasize::DataSize;
use itertools::Itertools;
use num_traits::AsPrimitive;
use serde::{Deserialize, Serialize};
use tracing::{error, info, trace,... |
use std::fmt;
use std::mem;
use std::ops::Deref;
use std::sync::Arc;
use std::sync::atomic::{Ordering, AtomicUsize};
use take_mut::take;
use parking_lot::{RwLock, RwLockReadGuard};
use kailua_env::{Span, Spanned};
use kailua_syntax::ast::{M, MM};
use diag::Origin;
use super::{Dyn, Nil, T, Ty, TypeContext, Lattice, Uni... |
extern crate common;
extern crate gamenet_teeworlds_0_6 as gamenet;
use common::num::Cast;
use common::num::CastFloat;
use gamenet::msg::game::SvTuneParams;
use gamenet::snap_obj::CharacterCore;
use gamenet::snap_obj::PlayerInput;
use gamenet::snap_obj::Tick;
use std::f32::consts::PI;
use std::fmt;
use std::ops;
pub ... |
use crate::utils::check_if_meaningful_text;
use std::collections::HashMap;
pub mod frequency;
pub mod substitution_genetic_algorithm;
fn hack_ceaser(data: &[u8]) {
for i in 0..=255 {
println!("--------------------------------------- {}", i);
let res = data.iter().map(|c| c ^ i).collect::<Vec<u8>>(... |
// Copyright (c) 2021 The Lutino Projects
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
use nh_common::result::AssetResult;
use nh_common::stack_containers::SVec;
use crate::reader::BitStreamReader;
use crate::s... |
use std::collections::BTreeMap;
use std::pin::Pin;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use tokio::sync::mpsc;
use tokio::time;
use futures::{
future,
sink::Sink,
stream::{BoxStream, SelectAll, Stream, StreamExt},
task::{Context, Poll},
};
use futures_locks::RwLock;
use... |
//! An interpreter for MIR used in CTFE and by miri
#[macro_export]
macro_rules! err {
($($tt:tt)*) => { Err($crate::mir::interpret::EvalErrorKind::$($tt)*.into()) };
}
mod error;
mod value;
pub use self::error::{
EvalError, EvalResult, EvalErrorKind, AssertMessage, ConstEvalErr, struct_error,
FrameInfo,... |
// A runtime module Groups with necessary imports
// Feel free to remove or edit this file as needed.
// If you change the name of this file, make sure to update its references in
// runtime/src/lib.rs If you remove this file, you can remove those references
// For more guidance on Substrate modules, see the example ... |
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of Open Ethereum.
// Open 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 your o... |
/*!
# juniper_warp
This repository contains the [warp][warp] web server integration for
[Juniper][Juniper], a [GraphQL][GraphQL] implementation for Rust.
## Documentation
For documentation, including guides and examples, check out [Juniper][Juniper].
A basic usage example can also be found in the [Api documentatio... |
// Copyright 2019 MesaTEE 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 to... |
//! This module has everything to deal with WAL -- reading and writing to disk.
//!
//! Safekeeper WAL is stored in the timeline directory, in format similar to pg_wal.
//! PG timeline is always 1, so WAL segments are usually have names like this:
//! - 000000010000000000000001
//! - 000000010000000000000002.partial
//... |
use crate::{to_ptr, InterruptCfg};
use core::ptr::{read_volatile, write_volatile};
/*******************************************************************************
* GICv2 miscellaneous definitions
******************************************************************************/
// Interrupt IDs reported by the HPPIR... |
//! Implementation of the Attribute Protocol (ATT).
//!
//! ATT always runs over L2CAP channel `0x0004`, which is connected by default as soon as the
//! Link-Layer connection is established.
//!
//! ATT is used by GATT, the *Generic Attribute Profile*, which introduces the concept of *Services*
//! and *Characteristic... |
// 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 ... |
//!
//! The nexus is one of core components, next to the target services. With
//! the nexus a developer is able to construct a per application volume
//! optimized for the perceived intent. For example, depending on
//! application needs synchronous mirroring may be required.
//!
//! In order to create a nexus, it req... |
use glsp::{
arr, Arr, bail, Callable, CallableOps, Coro, CoroState, DequeOps, ensure,
EnvMode, eprn, Expander, Expansion, FromVal, GC_DEFAULT_RATIO, GC_MIN_RATIO, GFn,
GResult, macro_no_op, Num, rfn, RData, Root, stock_syms::*, str, Str, Sym, Val
};
use smallvec::SmallVec;
use std::{i32, str};
use std::char;
use s... |
///! Private key implementation supports secp256k1
#[cfg(feature = "key_import")]
use crate::mnemonic::Bip39Error;
#[cfg(feature = "key_import")]
use crate::mnemonic::Mnemonic;
use crate::public_key::PublicKey;
use crate::signature::Signature;
use crate::stdsignmsg::StdSignMsg;
use crate::stdtx::StdTx;
use crate::trans... |
use crate::identifier_issuer::IdentifierIssuer;
use crate::message_digest::MessageDigest;
use crate::nquads;
use crate::nquads::{Dataset, Quad, Term, TermType};
use crate::permuter::Permuter;
use lexical_sort::natural_lexical_cmp;
use sha2::Sha256;
use std::collections::HashMap;
// A Hex Encoded SHA2 Digest will alwa... |
//! Contains objects for proving queries about a game description. A description of the algorithms
//! used can be found [here](http://logic.stanford.edu/ggp/chapters/chapter_13.html).
//!
//! One addition in this code is the recursion checking. We check if we are asking about a relation
//! we have previously asked ab... |
//! This module defines exception handlers.
use atomic::{Atomic, Ordering};
use core::fmt::{self, Debug, Write};
use crate::{smc, uart, util::make_arithaddr};
use xenon_cpu::mfspr;
pub const EXCEPTION_VECTORS: [usize; 17] = [
0x00000000_00000100, // Reset
0x00000000_00000200, // Machine check
0x00000000... |
//! Rewrite a list some items with overflow.
use std::cmp::min;
use itertools::Itertools;
use rustc_ast::token::DelimToken;
use rustc_ast::{ast, ptr};
use rustc_span::Span;
use crate::config::lists::*;
use crate::formatting::{
closures,
expr::{
can_be_overflowed_expr, is_every_expr_simple, is_method_... |
//! An interpreter for MIR used in CTFE and by miri.
#[macro_export]
macro_rules! err_unsup {
($($tt:tt)*) => {
$crate::mir::interpret::InterpError::Unsupported(
$crate::mir::interpret::UnsupportedOpInfo::$($tt)*
)
};
}
#[macro_export]
macro_rules! err_unsup_format {
($($tt:tt)... |
// SPDX-License-Identifier: MIT
// Copyright (C) 2018-present iced project and contributors
use crate::iced_constants::*;
use crate::info::tests::constants::*;
use crate::info::tests::info_test_case::*;
use crate::test_utils::from_str_conv::*;
use crate::test_utils::get_default_ip;
use crate::*;
use alloc::string::Str... |
use anyhow::Result;
use maplit::btreeset;
use geom::{Circle, Distance, Time};
use map_gui::colors::ColorSchemeChoice;
use map_gui::load::MapLoader;
use map_gui::options::OptionsPanel;
use map_gui::render::{unzoomed_agent_radius, UnzoomedAgents};
use map_gui::tools::{ChooseSomething, Minimap, TurnExplorer};
use map_gui... |
//! Colorful and clean backtraces on panic.
//!
//! This library aims to make panics a little less painful by nicely colorizing
//! them, skipping over frames of functions called after the panic was already
//! initiated and printing relevant source snippets. Frames of functions in your
//! application are colored in a... |
use std::io::Read;
use anni_flac::FlacHeader;
use anni_repo::prelude::*;
use anni_repo::library::{album_info, disc_info, file_name};
use anni_repo::RepositoryManager;
use anni_common::fs;
use clap::{Args, Subcommand, ArgEnum, crate_version};
use crate::{fl, ll, ball};
use std::path::PathBuf;
use std::str::FromStr;
use ... |
mod builtin_options;
mod builtin_options_impl;
pub mod stl;
use std::ffi::c_void;
use std::fs;
use std::ops::{Deref, DerefMut};
use std::path::Path;
use std::{fmt, mem, slice};
use libc::size_t;
use stl::memory::UniquePtr;
use stl::string::String as StlString;
use stl::vector::{
VectorInsert, VectorOfBool, Vector... |
// Copyright (c) 2017-2018, The rav1e contributors. All rights reserved
//
// This source code is subject to the terms of the BSD 2 Clause License and
// the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
// was not distributed with this source code in the LICENSE file, you can
// obtain it at ... |
//! Client implementation for the HTTP/3 protocol
//!
//! # Overview
//!
//! Start by constructing a [`Client`] endpoint with a [`Builder`], then [`connect()`] to a server.
//! Before being able to issue requests, a handshake phase will need to be completed, waiting for
//! [`Connecting`] to resolve. You can also choos... |
use enum_map::Enum;
use std::cmp;
use strum::IntoEnumIterator;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[derive(Copy, Clone, PartialEq, PartialOrd)]
pub enum Version {
V1_8,
V1_9,
V1_11,
V1_11_1,
V1_13,
V1_14,
V1_14_3,
V1_16,
}
impl Version {
pub fn before(&self, other: Versi... |
#![allow(non_upper_case_globals)]
pub const antiquewhite: [u8; 3] = [250, 235, 215];
pub const aliceblue: [u8; 3] = [240, 248, 255];
pub const aqua: [u8; 3] = [0, 255, 255];
pub const aquamarine: [u8; 3] = [127, 255, 212];
pub const azure: [u8; 3] = [240, 255, 255];
pub const beige: [u8; 3] = [245, 245, 220];
pub const... |
// Copyright 2020-2021 <NAME> under the terms of the MIT License as detailed
// in the accompanying file README.md or <https://opensource.org/licenses/MIT>.
//! Rendering as terminal text. Why not? Turn cubes into rectangles.
use std::borrow::Cow;
use std::collections::HashMap;
use std::convert::TryInto;
use std::err... |
// 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.
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(dead_code)]
#[link(name = "tee-client-api")]
extern "... |
//! Implements a usable view of Tor network parameters.
//!
//! The Tor consensus document contains a number of 'network
//! parameters', which are integer-valued items voted on by the
//! directory authorities. They are used to tune the behavior of
//! numerous aspects of the network.
//! A set of Tor network paramet... |
// 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.