text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use super::error::ApiError;
use crate::blockcfg;
use async_graphql::{Enum, InputValueError, InputValueResult, Scalar, ScalarType, SimpleObject};
use chain_crypto::bech32::Bech32;
use chain_impl_mockchain::vote;
use std::convert::{TryFrom, TryInto};
#[derive(Clone)]
pub struct EpochNumber(pub blockcfg::Epoch);
#[Scala... | the_stack |
use {
anyhow::{format_err, Context as _, Error},
fidl_fuchsia_media::*,
fidl_fuchsia_mediacodec::*,
fidl_fuchsia_sysmem::*,
fuchsia_stream_processors::*,
futures::{
future::{maybe_done, MaybeDone},
io::{self, AsyncWrite},
ready,
stream::{FusedStream, Stream},
... | the_stack |
#![cfg(feature = "serde")]
use intern::Interner;
use serde::de::*;
use std::cell::RefCell;
use std::fmt;
/// Wrapper of a deserializable object together with a string interner.
///
/// The interner is ready to intern deserialized strings as symbols on demand.
#[derive(Debug)]
pub struct WithInterner<'si, T> {
/... | the_stack |
use std::mem;
use sgx_alloc::alignbox::*;
use sgx_types::*;
impl_struct! {
pub struct user_struct {
pub a: u8,
pub b: [u16; 2],
pub c: u32,
pub d: [u64; 6],
}
}
impl_struct! {
pub struct struct_align_128_t {
pub key: sgx_key_128bit_t,
}
}
impl_struct! {
pu... | the_stack |
use crate::randfile::RandFile;
use std::io::{Read, Result, Seek, Write};
use std::num::NonZeroI64;
#[repr(packed)]
#[derive(Default, Clone, Copy)]
pub(crate) struct FrameHeader {
pub(crate) linked_frame: Option<NonZeroI64>,
pub(crate) linked_frame_size: u64,
}
impl FrameHeader {
fn new(relative_offset: i... | the_stack |
use super::{
task_common::{
at_preload_init_common, clone_task_common, compute_trap_reasons_common,
destroy_buffers_common, destroy_common, detect_syscall_arch_common, on_syscall_exit_common,
post_exec_for_exe_common, post_exec_syscall_common, post_vm_clone_common,
post_wait_clone_co... | the_stack |
use super::{
super::pipelines,
functions::{collect_arguments, parse_function},
Error,
};
use crate::{
builtins::BuiltinMap,
parser::lexers::{assignment_lexer, ArgumentSplitter},
shell::{
flow_control::{Case, ElseIf, ExportAction, IfMode, LocalAction, Statement},
variables::Variab... | the_stack |
#[cfg(feature = "runtime")]
use std::fmt;
#[cfg(feature = "runtime")]
use std::future::Future;
#[cfg(feature = "runtime")]
use std::pin::Pin;
use std::sync::{Arc, Mutex};
use std::task::{self, Poll};
use std::time::Duration;
#[cfg(not(feature = "runtime"))]
use std::time::Instant;
use h2::{Ping, PingPong};
#[cfg(featu... | the_stack |
//! # Diffie–Hellman (DH) Session Establishment Functions
//!
//! These functions allow an ISV to establish secure session between two enclaves using the EC DH Key exchange protocol.
//!
use crate::ecp::*;
use alloc::boxed::Box;
use alloc::slice;
use alloc::vec::Vec;
use core::mem;
use core::ptr;
use sgx_tcrypto::*;
us... | the_stack |
use crate::model::traits::*;
use crate::prelude::*;
use crate::model::execution_context;
use crate::model::execution_context::synchronized::Notification as ExecutionUpdate;
use crate::model::execution_context::VisualizationUpdateData;
use crate::model::module;
use crate::model::SuggestionDatabase;
use crate::notificat... | the_stack |
use std::convert::From;
use std::path::Path;
use std::process::abort;
use std::sync::Arc;
use std::thread::sleep;
use std::time::{Duration, Instant};
use failure::{format_err, Error};
use futures::future::{ExecuteErrorKind, Executor};
use futures::{Future, Stream};
use hyper::client::connect::dns::GaiResolver;
use hyp... | the_stack |
use std::borrow::Borrow;
use std::iter::FromIterator;
use crate::device::*;
use crate::error::*;
use crate::pool::*;
use zerocopy::*;
// what follows is a bunch of convenience functions for constructing DeviceBox<T>
impl<T: ?Sized> DeviceBox<T> {
//
// FUNCTIONS TO CREATE CONST BOXES
//
/// Create ... | the_stack |
use std::sync::{Arc, Mutex};
use bonsaidb_core::{
custom_api::{CustomApi, CustomApiResult},
networking::{Payload, Response},
};
use bonsaidb_utils::fast_async_lock;
use flume::Receiver;
use url::Url;
use wasm_bindgen::{closure::Closure, JsCast, JsValue};
use web_sys::{CloseEvent, ErrorEvent, MessageEvent, WebS... | the_stack |
use crate::common::Server;
use ::time::format_description::well_known::Rfc3339;
use maplit::hashmap;
use once_cell::sync::Lazy;
use serde_json::{json, Value};
use std::collections::HashMap;
use time::{Duration, OffsetDateTime};
use super::authorization::{ALL_ACTIONS, AUTHORIZATIONS};
fn generate_tenant_token(
par... | the_stack |
use std::borrow::Borrow;
use std::convert::{TryFrom, TryInto};
use std::fmt;
use miniscript::bitcoin::hashes::{self, hex::FromHex, hex::ToHex, Hash};
use miniscript::bitcoin::{Address, Network, Script};
use miniscript::descriptor::DescriptorPublicKey;
use crate::ast::{self, Expr, Stmt};
use crate::builtins::fns;
use ... | the_stack |
use crate::errors::{ConnectorXPythonError, Result};
use anyhow::anyhow;
use connectorx::{
sources::{
bigquery::BigQueryDialect,
mssql::{mssql_config, FloatN, IntN, MsSQLTypeSystem},
mysql::{MySQLSourceError, MySQLTypeSystem},
oracle::{connect_oracle, OracleDialect},
postgres:... | the_stack |
use crate::pairing::ff::{Field};
use crate::pairing::{Engine, CurveProjective};
use std::marker::PhantomData;
use crate::sonic::cs::{Backend};
use crate::sonic::cs::{Coeff, Variable, LinearCombination};
use crate::sonic::util::*;
use crate::sonic::util::*;
use crate::sonic::cs::{SynthesisDriver};
use crate::Circuit as... | the_stack |
use failure;
use gl;
use nalgebra as na;
use crate::render_gl::{self, buffer, data};
use crate::resources::Resources;
#[derive(VertexAttribPointers, Copy, Clone, Debug)]
#[repr(C, packed)]
struct Vertex {
#[location = "0"]
pos: data::f32_f32_f32,
#[location = "1"]
clr: data::u2_u10_u10_u10_... | the_stack |
use std::{
ffi::CStr,
fmt::{Debug, Display},
};
use cust::error::CudaError;
use crate::sys;
/// Any error which may occur when executing an OptiX function.
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum OptixError {
InvalidValue,
HostOutOfMemory,
InvalidOperation,
... | the_stack |
use crate::coroutine::*;
use crate::*;
use num::BigInt;
use std::borrow::Cow;
/// Heap-allocated objects.
#[derive(Debug)]
pub struct RValue {
class: Module,
var_table: Option<Box<ValueTable>>,
pub kind: ObjKind,
}
#[derive(Debug)]
pub enum ObjKind {
Invalid,
Ordinary,
BigNum(BigInt),
Floa... | the_stack |
use super::super::*;
extern crate byteorder;
use self::byteorder::{ByteOrder, BigEndian, ReadBytesExt, WriteBytesExt};
use std::fmt::{Debug, Formatter};
//TODO checksum calculation
///The minimum size of the tcp header in bytes
pub const TCP_MINIMUM_HEADER_SIZE: usize = 5*4;
///The minimum data offset size (size of ... | the_stack |
use std::fs::{File, OpenOptions};
use std::io::{SeekFrom, ErrorKind, Seek, Write, Read, BufReader};
use chrono::Local;
use std::io::Error;
use std::io;
use byteorder::{WriteBytesExt, ReadBytesExt, NetworkEndian};
use std::str::from_utf8;
use num::FromPrimitive;
use std::cmp::*;
use super::FileEndian;
use su... | the_stack |
use std::{
cell::Cell,
cmp::{max, min},
iter::once,
ops::RangeInclusive,
};
use hir_def::{EnumVariantId, HasModule, LocalFieldId, VariantId};
use smallvec::{smallvec, SmallVec};
use stdx::never;
use syntax::SmolStr;
use crate::{infer::normalize, AdtId, Interner, Scalar, Ty, TyExt, TyKind};
use super:... | the_stack |
use crate::{
BaseElement, FieldElement, BASE_CYCLE_LENGTH as CYCLE_LENGTH, HASHER_DIGEST_SIZE,
HASHER_NUM_ROUNDS as NUM_ROUNDS, HASHER_STATE_CAPACITY, HASHER_STATE_RATE as STATE_RATE,
};
// PUBLIC CONSTANTS
// ================================================================================================
pub... | the_stack |
#![allow(clippy::manual_range_contains)]
mod actor_picker;
use crate::actor_picker::ActorPicker;
mod actor_creator_window;
use crate::actor_creator_window::ActorCreatorWindow;
mod area_editor;
use crate::area_editor::AreaEditor;
mod area_model;
use crate::area_model::AreaModel;
mod elev_picker;
use crate::elev_pic... | the_stack |
use anyhow::{bail, ensure, Result};
use bitvec::prelude::*;
use bitvec_helpers::{bitvec_reader::BitVecReader, bitvec_writer::BitVecWriter};
use crc::{Crc, CRC_32_MPEG_2};
use hevc_parser::utils::{
add_start_code_emulation_prevention_3_byte, clear_start_code_emulation_prevention_3_byte,
};
#[cfg(feature = "serde_fe... | the_stack |
#![allow(dead_code)]
use crate::cx_win32::*;
use crate::*;
use std::ffi;
use std::mem;
use std::ptr;
use winapi::shared::guiddef::GUID;
use winapi::shared::minwindef::{FALSE, TRUE};
use winapi::shared::{dxgi, dxgi1_2, dxgiformat, dxgitype, winerror};
use winapi::um::{d3d11, d3dcommon, d3dcompiler};
use winapi::Interfa... | the_stack |
use anyhow::Result;
use itertools::Itertools;
use quote::{format_ident, quote, TokenStreamExt};
use std::{array::IntoIter, fs::File, io::Write};
use syn::{Ident, Index};
use crate::{features::Serial, Configuration};
struct InputPinTokens {
bank: char,
index: Index,
mode: Ident,
}
struct SerialPinTokens {
... | the_stack |
mod api;
mod efuse_api;
mod efuse_ecc;
use api::*;
use num_traits::*;
use xous::{msg_blocking_scalar_unpack, msg_scalar_unpack};
use xous_ipc::Buffer;
use efuse_api::*;
use crate::implementation::JtagPhy;
pub enum JtagState {
TestReset,
RunIdle,
Select,
Capture,
Shift,
Exit1,
Pause,
Ex... | the_stack |
#[macro_use]
extern crate log;
use minilp::{ComparisonOp, LinearExpr, OptimizationDirection, Variable};
use std::io;
#[derive(Clone, Copy, Debug)]
struct Point {
x: f64,
y: f64,
}
impl Point {
fn sqr_dist(self, other: Self) -> f64 {
(self.x - other.x) * (self.x - other.x) + (self.y - other.y) * (... | the_stack |
pub mod api;
pub mod serde;
pub mod types;
use crate::{
core::{
CallSignatureElem, ConstructorParam, ContractAddress, ContractAddressSalt, Fee,
StarknetTransactionHash, StarknetTransactionIndex, TransactionVersion,
},
rpc::{
api::RpcApi,
serde::{CallSignatureElemAsDecimalStr... | the_stack |
extern crate crypto;
extern crate byteorder;
extern crate rustc_serialize;
use self::crypto::digest::Digest;
use self::crypto::mac::Mac;
use self::crypto::symmetriccipher::SynchronousStreamCipher;
use self::crypto::sha2::{Sha256, Sha512};
use self::crypto::blake2b::Blake2b;
use self::crypto::blake2s::Blake2s;
use self... | the_stack |
use std::cell::{Cell, RefCell};
use std::convert::Into;
use std::ffi::{CStr, CString};
use std::mem::MaybeUninit;
use std::ptr;
use anyhow::anyhow;
use fxhash::FxHashMap;
use liblumen_session::{Options, Sanitizer};
use crate::sys as llvm_sys;
use crate::sys::prelude::LLVMBuilderRef;
use crate::sys::LLVMIntPredicate;... | the_stack |
use std::mem;
use std::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Sub, SubAssign};
use retain_mut::RetainMut;
use crate::bitmap::container::Container;
use crate::bitmap::Pairs;
use crate::RoaringBitmap;
impl RoaringBitmap {
/// Computes the len of the intersection with the specified ot... | the_stack |
use std::{cmp, error, fmt, fs, io};
use std::convert::TryFrom;
use std::path::Path;
use std::str::FromStr;
use std::sync::Arc;
use log::error;
use rpki::repository::resources::AsId;
use serde::{Deserialize, Deserializer};
use crate::config::Config;
use crate::error::Failed;
use crate::payload::{AddressPrefix, RouteOrig... | the_stack |
use std::cmp::Ordering;
use std::ops::{Add, Div, Mul, Rem, Sub};
use ndarray::{ArrayD, Axis};
use ndarray_stats::interpolate;
use ndarray_stats::QuantileExt;
use noisy_float::types::n64;
use num::{FromPrimitive, ToPrimitive};
use smartnoise_validator::{Float, proto};
use smartnoise_validator::base::{Array, IndexKey, ... | the_stack |
use crate::crypto::rng::CryptoRng;
use crate::error::Error;
use ed25519_dalek::ed25519::signature::Signature as SigTrait;
use ed25519_dalek::Verifier;
/// The canonical instantiation of the ed25519 `SignatureScheme`. Things that use this algorithm
/// should use `&'static` references to this.
pub const ED25519_IMPL: ... | the_stack |
use assert_cmd::{crate_name, Command};
use color_eyre::Result;
use copy_dir::copy_dir;
use indoc::{formatdoc, indoc};
use predicates::prelude::*;
use std::{
fs,
io::Write,
path::{Path, PathBuf},
};
use tempfile::TempDir;
fn copy_example_to_tmpdir() -> Result<(TempDir, PathBuf)> {
let base_dir = Path::n... | the_stack |
use gdbmi;
use gdbmi::commands::{BreakPointLocation, BreakPointNumber, MiCommand};
use gdbmi::output::{BreakPointEvent, JsonValue, Object, ResultClass};
use gdbmi::ExecuteError;
use std::collections::{HashMap, HashSet};
use std::fmt;
use std::ops::{Add, Sub};
use std::path::PathBuf;
use unsegen::base::LineNumber;
#[de... | the_stack |
use std::io::Write;
use std::os::unix::io::{AsRawFd, RawFd};
use std::sync::{Arc, Mutex};
use std::{cmp, usize};
use address_space::AddressSpace;
use devices::legacy::{Chardev, InputReceiver};
use error_chain::ChainedError;
use machine_manager::{
config::{ChardevType, VirtioConsole},
event_loop::EventLoop,
};
... | the_stack |
use crate::errors::*;
use crate::geometry::{Aabb, CellUnion, Frustum, Obb, WebMercatorRect};
use crate::math::{AllPoints, ClosedInterval, PointCulling};
use crate::read_write::{Encoding, NodeIterator};
use crate::{match_1d_attr_data, AttributeData, PointsBatch};
use crossbeam::deque::{Injector, Steal, Worker};
use num_... | the_stack |
use super::doc::*;
use crate::stepper::*;
fn apply_add_inner<M: DocMutator<S>, S: Schema>(
bc: &mut M,
spanvec: &DocSpan<S>,
addvec: &AddSpan<S>,
) -> (DocSpan<S>, DocSpan<S>) {
let mut span = &spanvec[..];
let mut del = &addvec[..];
let mut first = None;
if !span.is_empty() {
firs... | the_stack |
use crate::prelude::*;
use crate::{AsFormat, TextRange};
use rome_formatter::{format_args, write, Argument, Arguments, GroupId, PreambleBuffer, VecBuffer};
use rome_js_syntax::{JsLanguage, JsSyntaxNode, JsSyntaxToken};
use rome_rowan::syntax::SyntaxTriviaPiecesIterator;
use rome_rowan::{AstNode, Language, SyntaxTriviaP... | the_stack |
use std::collections::VecDeque;
use std::io;
use std::vec;
use TendrilSliceExt;
use ByteTendril;
mod integer;
mod string;
/// An arbitrary decode error. No details are retained on account of how all such errors are
/// unrecoverable and I’m not interested in lowering my efficiency so you can debug a bad HPACK
/// imp... | the_stack |
use std::rc::Rc;
use glium::backend::Context;
use lexpr::Value;
use crate::{
graph::{
NodeId,
ShaderGraph,
},
reload::ShaderDir,
};
mod env;
mod load;
mod val;
pub use env::{
Env,
External,
};
pub use load::load_shaders;
pub use val::Val;
/// Takes a source string of lisp that r... | the_stack |
use std::env;
use std::error::Error;
use std::fs;
use std::io::prelude::*;
use std::io::{self, BufReader, BufWriter, Read, SeekFrom, Write};
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};
use structopt::StructOpt;
/// Search for a pattern in a file and display the lines that contain it.
#[derive(S... | the_stack |
use std::collections::VecDeque;
use std::cmp::max;
use std::mem;
use std::net::SocketAddr;
use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, AtomicBool, Ordering};
use std::time::Instant;
use tk_bufstream::{IoBuf, WriteBuf, ReadBuf};
use tokio_core::net::TcpStream;
use tokio_core::reactor::{Handle, Timeout};
us... | the_stack |
use kailua_env::{Span, Spanned, WithLoc};
use kailua_diag::report::ReportMore;
use kailua_diag::message::{Locale, Localize, Localized};
use message as m;
use l10nutils::{Ordinal, QuotedList};
use ty::{TypeContext, Display, Key};
/// Type-level report.
///
/// This is used to collect hierarchical information about type... | the_stack |
use cortex_m_rt::entry;
use embedded_time::{self as time};
use panic_rtt as _;
use time::{duration::*, Clock as _};
pub mod nrf52 {
pub use nrf52832_hal::{
gpio,
pac::{self, Peripherals},
prelude::*,
};
}
pub struct SysClock {
low: nrf52::pac::TIMER0,
high: nrf52::pac::TIMER1,
... | the_stack |
use std::time::Duration;
use reqwest::ClientBuilder;
use reqwest::header::{ HeaderMap, HeaderValue };
/// Configuration for instantiating RiotApi.
///
///
#[derive(Debug)]
pub struct RiotApiConfig {
pub(crate) base_url: String,
pub(crate) retries: u8,
pub(crate) app_rate_usage_factor: f32,
pub(crate) ... | the_stack |
use crate::metadata::{
header::{CLIHeader, SectionHeader},
token::*,
};
use rustc_hash::FxHashMap;
#[derive(Debug, Clone)]
pub struct CLIInfo {
pub cli_header: CLIHeader,
pub sections: Vec<SectionHeader>,
}
/// #~ Stream
#[derive(Debug, Clone)]
pub struct MetaDataStream {
/// Major version of tabl... | the_stack |
use super::{input::ProcessedInput, ThirdPersonCameraState, ThirdPersonControlConfig};
use voxel_mapper::{
collision::{floor_translation::translate_over_floor, VoxelBVT},
geometry::{project_point_onto_line, upgrade_ray, Line, UP},
voxel::{
search::greedy_path_with_l1_and_linear_heuristic, voxel_cent... | the_stack |
use crate::error::AgentError;
use serde::Deserialize;
use std::hash::Hash;
#[derive(Deserialize, Debug, Clone, Copy, Hash)]
pub enum ModbusFormat {
// 16 bit
#[serde(rename = "i16_be")]
I16Be,
#[serde(rename = "u16_be")]
U16Be,
// 32 bit
#[serde(rename = "i32_be")]
I32Be,
#[serde(re... | the_stack |
use std::{convert::TryFrom, mem};
use crate::{
env::WritableFile,
log_format::{RecordType, BLOCK_SIZE, HEADER_SIZE, MAX_RECORD_TYPE},
result::Result,
slice::Slice,
util::{coding, crc32c},
};
pub struct Writer {
// The destination file to store the logs
dest: Box<WritableFile>,
// The ... | the_stack |
mod rev;
use crate::bitnum::Modnum;
use crate::checksum::{CheckBuilderErr, Digest, LinearCheck};
use crate::endian::{Endian, WordSpec};
use crate::keyval::KeyValIter;
pub(crate) use rev::find_largest_mod;
pub use rev::reverse_modsum;
use std::fmt::Display;
use std::str::FromStr;
/// A builder to set the various parame... | the_stack |
use error::*;
use types::*;
//#[link(name = "sgx_tstdc")]
extern {
//
// sgx_cpuid.h
//
pub fn sgx_cpuid(cpuinfo: * mut [::int32_t; 4], leaf: ::int32_t) -> sgx_status_t;
pub fn sgx_cpuidex(cpuinfo: * mut [::int32_t; 4], leaf: ::int32_t, subleaf: ::int32_t) -> sgx_status_t;
//
// sgx_spinlo... | the_stack |
//! This crate gives small utilities for casting between plain data types.
//!
//! ## Basics
//!
//! Data comes in five basic forms in Rust, so we have five basic casting
//! functions:
//!
//! * `T` uses [`cast`]
//! * `&T` uses [`cast_ref`]
//! * `&mut T` uses [`cast_mut`]
//! * `&[T]` uses [`cast_slice`]
//! * `&mut... | the_stack |
use crate::{commands::gdb_server::GdbServer, kernel_metadata::errno_name};
use backtrace::Backtrace;
use libc::pid_t;
use nix::{
errno::{errno, Errno},
sys::signal::{sigaction, SaFlags, SigAction, SigHandler, SigSet, Signal},
};
use std::{
collections::HashMap,
env,
env::var_os,
fs::{File, OpenO... | the_stack |
use whitebox_common::algorithms::triangulate;
use whitebox_common::structures::Point2D;
use crate::tools::*;
use whitebox_vector::ShapefileGeometry;
use whitebox_vector::*;
use kdtree::distance::squared_euclidean;
use kdtree::KdTree;
use std::env;
use std::f64;
use std::io::{Error, ErrorKind};
use std::path;
const EPSI... | the_stack |
use crate::chunked_array::iterator::{
BooleanIterManyChunk, BooleanIterManyChunkNullCheck, BooleanIterSingleChunk,
BooleanIterSingleChunkNullCheck, SomeIterator,
};
use crate::prelude::*;
use arrow::array::Array;
use rayon::iter::plumbing::*;
use rayon::iter::plumbing::{Consumer, ProducerCallback};
use rayon::p... | the_stack |
//! Random number generation traits
//!
//! This crate is mainly of interest to crates publishing implementations of
//! [`RngCore`]. Other users are encouraged to use the [`rand`] crate instead
//! which re-exports the main traits and error types.
//!
//! [`RngCore`] is the core trait implemented by algorithmic pseudo... | the_stack |
//! Benchmark derived from TPC-H. This is not an official TPC-H benchmark.
use futures::future::join_all;
use rand::prelude::*;
use std::ops::Div;
use std::{
fs,
iter::Iterator,
path::{Path, PathBuf},
sync::Arc,
time::Instant,
};
use ballista::context::BallistaContext;
use ballista::prelude::{Ball... | the_stack |
pub const DYLD_MACOSX_VERSION_10_4: u32 = 0x000A_0400;
pub const DYLD_MACOSX_VERSION_10_5: u32 = 0x000A_0500;
pub const DYLD_MACOSX_VERSION_10_6: u32 = 0x000A_0600;
pub const DYLD_MACOSX_VERSION_10_7: u32 = 0x000A_0700;
pub const DYLD_MACOSX_VERSION_10_8: u32 = 0x000A_0800;
pub const DYLD_MACOSX_VERSION_10_9: u32 = 0x0... | the_stack |
use std::collections::VecDeque;
use std::collections::{HashMap, HashSet};
use std::sync::Arc;
use std::time::{Duration, Instant};
use serde_json::map::Entry;
use chromiumoxide_cdp::cdp::browser_protocol::network::LoaderId;
use chromiumoxide_cdp::cdp::browser_protocol::page::{
AddScriptToEvaluateOnNewDocumentParam... | the_stack |
use crate::user_info::UserInfo;
use rusty_leveldb::LdbIterator;
use rusty_leveldb::DB;
use std::path::Path;
use std::prelude::v1::*;
use std::sync::mpsc::{channel, Sender};
use std::thread;
use thiserror::Error;
#[derive(Error, Debug)]
pub(crate) enum DbError {
#[error("user not exist")]
UserNotExist,
#[er... | the_stack |
mod mem_map;
use sinks::*;
use self::mem_map::*;
// Docs claim the sample rate is 41.7khz, but my calculations indicate it should be 41666.66hz repeating
// (see SAMPLE_CLOCK_PERIOD calculation below), so we take the nearest whole-number sample rate to that.
// Note that the documentation rounds values in a lot of... | the_stack |
use crate::{
bundle::BundleId,
component::{ComponentId, StorageType},
entity::{Entity, EntityLocation},
storage::{Column, SparseArray, SparseSet, SparseSetIndex, TableId},
};
use std::{
borrow::Cow,
collections::HashMap,
hash::Hash,
ops::{Index, IndexMut},
};
#[derive(Debug, Copy, Clone... | the_stack |
#![deny(rust_2018_idioms)]
use std::path::Path;
use anyhow::Context;
pub use anyhow::Result;
use url::Url;
mod errors;
pub use crate::errors::*;
#[derive(Debug, Copy, Clone)]
pub enum Backend {
Curl,
Reqwest(TlsBackend),
}
#[derive(Debug, Copy, Clone)]
pub enum TlsBackend {
Rustls,
Default,
}
#[de... | the_stack |
use super::TestClient;
use log::info;
use parsec_client::core::interface::requests::{Opcode, ResponseStatus};
use rand::Rng;
use rand::{
distributions::{Alphanumeric, Distribution, Standard},
thread_rng,
};
use std::convert::TryInto;
use std::sync::mpsc::{channel, Receiver};
use std::thread;
use std::time::Dura... | the_stack |
use crate::error::{CudaResult, DropResult, ToResult};
use crate::memory::device::AsyncCopyDestination;
use crate::memory::device::CopyDestination;
use crate::memory::malloc::{cuda_free, cuda_malloc};
use crate::memory::DevicePointer;
use crate::memory::{cuda_free_async, cuda_malloc_async, DeviceCopy};
use crate::stream... | the_stack |
use crate::{
ActivateError, EpollHelper, EpollHelperError, EpollHelperHandler, GuestMemoryMmap,
GuestRegionMmap, Queue, VirtioInterrupt, EPOLL_HELPER_EVENT_LAST, VIRTIO_F_IN_ORDER,
VIRTIO_F_NOTIFICATION_DATA, VIRTIO_F_ORDER_PLATFORM, VIRTIO_F_RING_EVENT_IDX,
VIRTIO_F_RING_INDIRECT_DESC, VIRTIO_F_VERSION... | the_stack |
use glsp::{stock_syms::*, DequeAccess, DequeOps, Engine, SymKind, Val};
use proc_macro::{TokenStream, TokenTree, TokenTree::Literal};
use std::char;
use std::collections::{hash_map::Entry, HashMap};
use std::fmt::Write;
use std::str::FromStr;
#[doc(hidden)]
#[proc_macro]
pub fn lazy_key(input: TokenStream) -> TokenStr... | the_stack |
clippy::cast_possible_wrap,
clippy::derive_partial_eq_without_eq,
clippy::let_underscore_drop,
clippy::match_same_arms,
clippy::similar_names,
clippy::too_many_lines
)]
mod name;
mod parse;
mod render;
use crate::name::Crate;
use crate::render::render;
use anyhow::{ensure, Result};
use flate2::rea... | the_stack |
use std::cell::RefCell;
use std::collections::HashMap;
use std::mem;
use std::ops::Index;
use std::path::{self, PathBuf};
use std::rc::Rc;
use std::char;
use dtoa;
use failure::{err_msg, Fail};
use indexmap::{IndexMap, IndexSet};
use rustc_parse::parse_stream_from_source_str;
use syntax::attr;
use syntax::ast::*;
us... | the_stack |
use crate::stats::{StatKey, Stats};
use crate::Entropy;
use persistent_store::{
BufferOptions, BufferStorage, Store, StoreDriver, StoreDriverOff, StoreDriverOn,
StoreInterruption, StoreInvariant, StoreOperation, StoreUpdate,
};
use rand_core::{RngCore, SeedableRng};
use rand_pcg::Pcg32;
use std::collections::Ha... | the_stack |
//! Defines a YAML backed implementation of the `AdminServiceStore`. The goal of this
//! implementation is to support Splinter v0.4 YAML state files.
//!
//! The public interface includes the struct [`YamlAdminServiceStore`].
//!
//! [`YamlAdminServiceStore`]: struct.YamlAdminServiceStore.html
use std::collections::B... | the_stack |
use std::fs::{File};
use std::io::Read;
use std::time::Duration;
use std::path::{Path, PathBuf};
use std::collections::HashMap;
use std::sync::{atomic::{AtomicBool, Ordering}, mpsc::{Receiver, channel}};
use notify::{Watcher, RecommendedWatcher, RecursiveMode, watcher, DebouncedEvent};
use crate::Error;
use... | the_stack |
use crate::distribution::{Discrete, DiscreteCDF};
use crate::statistics::*;
use crate::{Result, StatsError};
use rand::Rng;
use std::f64;
/// Implements the
/// [Categorical](https://en.wikipedia.org/wiki/Categorical_distribution)
/// distribution, also known as the generalized Bernoulli or discrete
/// distribution
/... | the_stack |
/// Most of the code for this module comes from `rust-libp2p` and `go-libp2p`.
///
/// Some panic logic has been removed, some error handling has been removed, and an error has been added.
///
use log::{debug, trace};
use std::cmp::Ordering;
use futures::{AsyncRead, AsyncWrite, AsyncWriteExt};
use crate::{
codec:... | the_stack |
use crate::graph_proxy::from_fn;
use crate::structure::{
DefaultDetails, Details, Direction, DynDetails, Edge, Label, LabelId, PropKey, QueryParams,
Statement, Vertex, ID_BITS,
};
use crate::{filter_limit, filter_limit_ok, limit_n};
use crate::{register_graph, DynResult, GraphProxy, ID};
use dyn_type::BorrowObj... | the_stack |
use ResultExt;
use super::common;
use super::settings::Settings;
use cab;
use msi;
use std;
use std::collections::{BTreeMap, HashMap, HashSet};
use std::ffi::OsStr;
use std::fs;
use std::io::{self, Write};
use std::path::{Path, PathBuf};
use uuid::Uuid;
type Package = msi::Package<fs::File>;
// Don't add more files t... | the_stack |
// 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 terms.
pub extern crate ad... | the_stack |
use crate::datatypes::CategoricalChunked;
use crate::prelude::*;
use crate::utils::CustomIterTools;
use arrow::array::*;
use std::convert::TryFrom;
#[cfg(feature = "dtype-categorical")]
use std::ops::Deref;
type LargeStringArray = Utf8Array<i64>;
type LargeListArray = ListArray<i64>;
// If parallel feature is enable,... | the_stack |
use super::Error;
#[derive(Debug, Clone, Copy, Hash, Eq, PartialEq)]
enum LogicalOp {
And,
Or,
None,
}
#[derive(Debug, PartialEq, Clone, Copy)]
pub enum StatementVariant<'a> {
And(&'a str),
Or(&'a str),
Default(&'a str),
}
/// Split an input data into a set of statements
#[derive(Debug)]
pub ... | the_stack |
//! A simple quadtree-based texture allocator.
use crate::gpu_data::{TextureLocation, TexturePageId};
use pathfinder_geometry::rect::RectI;
use pathfinder_geometry::vector::{Vector2F, Vector2I, vec2f, vec2i};
const ATLAS_TEXTURE_LENGTH: u32 = 1024;
#[derive(Clone, Debug)]
pub struct TextureAllocator {
pages: Vec... | the_stack |
use std::path::Path;
pub trait PathExt {
/// Compare this path with another path, ignoring
/// the differences between Verbatim and Non-Verbatim paths.
fn normalised_equals(&self, other: &Path) -> bool;
/// Determine if this path starts wit with another path fragment, ignoring
/// the differences b... | the_stack |
extern crate gl;
extern crate glutin;
extern crate libc;
extern crate clap;
extern crate native_dialog;
#[cfg(feature = "debugger")]
extern crate rustyline;
#[macro_use]
extern crate log;
extern crate oxidgb_core;
#[cfg(feature = "enable_sound")]
extern crate rodio;
#[cfg(feature = "debugger")]
mod debugger;
mod l... | the_stack |
#[cfg(not(armv6m))]
use volatile_register::WO;
use volatile_register::{RO, RW};
use crate::peripheral::DWT;
use bitfield::bitfield;
/// Register block
#[repr(C)]
pub struct RegisterBlock {
/// Control
pub ctrl: RW<Ctrl>,
/// Cycle Count
#[cfg(not(armv6m))]
pub cyccnt: RW<u32>,
/// CPI Count
... | the_stack |
use super::*;
use counters::Counters;
use crossbeam_queue::ArrayQueue;
use packet::{PacketPool, PktsHeap};
use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::Arc;
const PKTSZ: usize = 256;
const DATA: [u8; PKTSZ] = [0; PKTSZ];
// Time in nano seconds to send one packet
const PKT_TIME: u64 = PKTSZ as u64 * 8 ... | the_stack |
use byteorder::{ByteOrder, LittleEndian};
use core::marker::Unpin;
use miscreant::{generic_array::GenericArray, Aes128PmacSiv};
use rand_core::{CryptoRng, RngCore};
use curve25519_dalek::constants::RISTRETTO_BASEPOINT_POINT;
use curve25519_dalek::ristretto::{CompressedRistretto, RistrettoPoint};
use curve25519_dalek::... | the_stack |
// observable document model
// x OO-like api (auto-upcast, on-demand downcast)
// x holds the data/truth (tree of nodes)
// x allows changes
// x notifies listener
// x provides query_selector()
use crate::css::{CssStyleDeclaration, CssStyleSheet, Selector};
use crate::util::{Atom, Edge, IdTree};
use fnv::FnvHashMap;... | the_stack |
use std::{cmp::max, collections::VecDeque, mem};
use datasize::DataSize;
use tracing::trace;
use crate::{
components::consensus::{
highway_core::{finality_detector::FinalityDetector, state, State, Weight},
traits::Context,
},
types::Timestamp,
};
pub(crate) mod config;
use config::*;
#[d... | the_stack |
use super::Lab;
use std::f64;
// The code below is adapted from https://github.com/elliotekj/DeltaE
//
// Original license:
//
// The MIT License (MIT)
//
// Copyright (c) 2017 Elliot Jackson
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documenta... | the_stack |
use super::hash_to_binary_tree::InitializeH10;
use super::constants::{BROTLI_WINDOW_GAP, BROTLI_CONTEXT_LUT, BROTLI_CONTEXT,
BROTLI_NUM_HISTOGRAM_DISTANCE_SYMBOLS, BROTLI_MAX_NPOSTFIX, BROTLI_MAX_NDIRECT};
use super::backward_references::{BrotliCreateBackwardReferences, Struct1, UnionHasher,
... | the_stack |
use libc::{c_void, c_uint, c_int, c_char, c_short};
use ffi;
use types::*;
use sound;
use sound::Sound;
use sound_group;
use std::mem;
use channel_group;
use channel;
use dsp;
use dsp::Dsp;
use vector;
use reverb_properties;
use geometry;
use reverb;
use dsp_connection;
use std::default::Default;
use callbacks::*;
use ... | the_stack |
use ast::AdtExposing;
use ast::Exposing;
use ast::Import;
use ast::Module;
use ast::ModuleExposing;
use ast::ModuleHeader;
use parsers::input::Input;
use parsers::ParseError;
use parsers::statement::parse_statement;
use parsers::util::*;
use tokenizer::Token;
use util::create_vec;
pub fn parse_module(input: Input) -> ... | the_stack |
extern crate winapi;
use crate::encryption::encrypt;
use std::ffi::CString;
use std::ptr::null_mut;
use std::str;
use winapi::shared::minwindef::FILETIME;
use winapi::um::fileapi::WriteFile;
use winapi::um::fileapi::{CreateFileA, OPEN_ALWAYS};
use winapi::um::fileapi::{DeleteFileA, FindFirstFileA, FindNextFileA};
use ... | the_stack |
//! Tokenizer for the EndBASIC language.
use crate::ast::{VarRef, VarType};
use crate::reader::CharReader;
use std::io;
use std::iter::Peekable;
/// Collection of valid tokens.
///
/// Of special interest are the `Eof` and `Bad` tokens, both of which denote exceptional
/// conditions and require special care. `Eof` ... | the_stack |
// Coding conventions
#![recursion_limit = "256"]
#![deny(dead_code, missing_docs, warnings)]
//! LNPBP library defining chain parameters.
//!
//! Chains are bitcoin-enabled or aware blockchains, which include:
//! - Bitcoin Mainnet
//! - Different bitcoin testnets and signets
//! - Bitcoin sidechains
//! - Independen... | the_stack |
use std::{
collections::{btree_map, BTreeMap, HashSet},
iter::{Iterator, Peekable},
};
use anyhow::{Error, Result};
use io_context::Context;
use crate::{
common::{crypto::hash::Hash, namespace::Namespace},
storage::mkvs::{self, tree::*},
};
/// A key-value tree overlay that holds all updates in memor... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.