text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use cast;
use common_failures::prelude::*;
use num::rational::Ratio;
use pbr::ProgressBar;
use regex::Regex;
use serde::{Deserialize, Deserializer};
use serde::de;
use serde_json;
use std::collections::BTreeMap;
use std::ffi::OsStr;
use std::path::{Path, PathBuf};
use std::process::Command;
use std::result;
use std::st... | the_stack |
use std::fmt;
use std::mem;
use std::sync::{Condvar, Mutex};
use std::sync::atomic::{AtomicPtr, Ordering};
use coroutine::{Coroutine, Handle};
use runtime::Processor;
use scheduler::Scheduler;
enum State {
Empty,
Ready,
Thread,
Coroutine(Handle),
}
pub struct MonoBarrier {
lock: Mutex<State>,
... | the_stack |
macro_rules! lisp {
// bool
(false) => (false);
(true) => (true);
(self $(. $e:tt)* ) => (self $(. $e)* );
// defstruct
( $(#[$m:meta])* defstruct $struct_name:ident < $($generic:ident),+ >
(pub $( ($name:ident $typ:ty) )* )
( $( ($name2:ident $typ2:ty) )* )
) => (
$... | the_stack |
use crate::types::{CharacterCodes, SyntaxKind};
use num_traits::FromPrimitive;
use wasm_bindgen::prelude::*;
const ABSTRACT: &'static str = "abstract";
const ANY: &'static str = "any";
const AS: &'static str = "as";
const BIGINT: &'static str = "bigint";
const BOOLEAN: &'static str = "boolean";
const BREAK: &'static s... | the_stack |
//! Module containing public traits.
//!
//! This exists as a separate module solely so that it can be wildcard imported
//! where necessary.
use std::char;
use std::cmp::Ord;
use std::ffi::CStr;
use std::mem;
use std::num::Wrapping;
use std::rc::Rc;
use std::slice;
use std::str;
use std::sync::Arc;
use supercow::Sup... | the_stack |
use proc_macro2::TokenStream;
use quote::{quote, quote_spanned, ToTokens};
use syn::punctuated::Punctuated;
use syn::spanned::Spanned;
use syn::{DeriveInput, Fields, Ident, LitStr, Token, Variant};
use crate::parser::route;
use crate::parser::RoutePathAst;
use crate::parser::SegmentAst;
pub fn route_impl(input: Deriv... | the_stack |
use ckb_vm_definitions::instructions::{self as insts};
use ckb_vm_definitions::registers::{RA, ZERO};
use crate::instructions::{
b, extract_opcode, i, instruction_length, m, rvc, set_instruction_length_n, Instruction,
InstructionFactory, Itype, R4type, Register, Rtype, Utype,
};
use crate::memory::Memory;
use ... | the_stack |
use std::cmp;
use bstr::ByteSlice;
use crate::line_buffer::BinaryDetection;
use crate::lines::{self, LineStep};
use crate::searcher::{Config, Range, Searcher};
use crate::sink::{
Sink, SinkContext, SinkContextKind, SinkError, SinkFinish, SinkMatch,
};
use grep_matcher::{LineMatchKind, Matcher};
#[derive(Debug)]
... | the_stack |
mod common;
use common::ShortCode;
use std::path::PathBuf;
use templates::ZOLA_TERA;
macro_rules! test_scenario {
($in_str:literal, $out_str:literal, [$($shortcodes:ident),*]) => {
let config = config::Config::default_for_test();
#[allow(unused_mut)]
let mut tera = tera::Tera::default();
... | the_stack |
use ast::contract::desc::*;
use ast::types::*;
use bridge::file::*;
use errors::*;
use proc_macro2::{Ident, Punct, Spacing, Span, TokenStream};
use quote::TokenStreamExt;
pub struct CCallbackStrategy {}
impl CallbackGenStrategy for CCallbackStrategy {
fn arg_convert(
&self,
arg: &ArgDesc,
... | the_stack |
use crate::cgroup::{self, init_cgroup, parse_cgroup, CgroupCfg};
use crate::{capability, namespace, syscall, ErrorKind, Result, ResultExt};
use std::process::Command;
use std::{
fs::{canonicalize, read_dir},
os::unix::prelude::CommandExt,
path::{Path, PathBuf},
process::Stdio,
};
use util::arg_parser:... | the_stack |
use super::*;
use rand::distributions::Alphanumeric;
use rand::Rng;
use std::collections::HashMap;
use uuid::Uuid;
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub enum GenMethod {
FullyInformed,
VSelf,
RandomInformed,
Random,
}
fn convert(bits: Vec<u8>) -> i16 {
bits.iter()
... | the_stack |
use crate::flavour::SqlFlavour;
use indoc::indoc;
use migration_connector::{
migrations_directory::MigrationDirectory, BoxFuture, ConnectorError, ConnectorParams, ConnectorResult,
};
use quaint::{
connector::Sqlite as Connection,
prelude::{ConnectionInfo, Queryable},
};
use sql_schema_describer::{SqlSchema,... | the_stack |
use std::net::{TcpListener, TcpStream, UdpSocket, SocketAddr, Shutdown};
use std::sync::{mpsc, Arc, Mutex};
use std::{time, thread};
use crate::hubmsg::*;
use crate::hubclient::*;
use crate::hubrouter::*;
use serde::{Serialize, Deserialize};
#[derive(Debug, Serialize, Deserialize)]
pub enum HubServerConfig {
Offli... | the_stack |
extern crate libc;
extern crate time;
use gc::strategy::Strategy;
use gc::os::Memory;
use gc::{GcRootWalker, GcOpts, GcMemHeader, GcWalker, GcWalk, GcFinalize, ptr_t};
use std::ptr;
use std::mem::{size_of, transmute, swap};
use std::cmp::max;
const PAGE_SIZE : usize = 4 * 1024;
struct Header {
forwa... | the_stack |
use async_trait::async_trait;
use ssi::did::{DIDMethod, Document};
use ssi::did_resolve::{
DIDResolver, DocumentMetadata, ResolutionInputMetadata, ResolutionMetadata, ERROR_INVALID_DID,
ERROR_NOT_FOUND, TYPE_DID_LD_JSON,
};
use ssi::USER_AGENT;
// For testing, enable handling requests at localhost.
#[cfg(test... | the_stack |
// Copyright (C) 2020-2022 Metaverse.Network & Bit.Country .
// SPDX-License-Identifier: Apache-2.0
// 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/LIC... | the_stack |
use super::action::*;
use super::view_type::*;
use super::actions_from::*;
use flo_ui::*;
use std::sync::*;
///
/// The state of a view in the Cocoa UI
///
pub struct ViewState {
/// The identifier that has been assigned to this view
view_id: usize,
/// The name of the controller that should be applied ... | the_stack |
macro_rules! simulate_explore {
($step:expr, $state:expr) => {{
let mut s = $state;
let mut state = s.as_state_mut();
let n_step: u64 = $step;
let mut results: Vec<(f32, f32)> = Vec::new();
let mut schedule: Schedule = Schedule::new();
state.init(&mut schedule);
... | the_stack |
use ide_db::helpers::FamousDefs;
use itertools::Itertools;
use stdx::format_to;
use syntax::{
ast::{self, HasGenericParams, HasName, HasTypeBounds, Impl},
AstNode,
};
use crate::{
assist_context::{AssistContext, Assists},
AssistId,
};
// Assist: generate_default_from_new
//
// Generates default implem... | the_stack |
// Note that most of the code for L5 and U5 is feature-gated due to different
// register names, differentiating secure and non-secure. We keep them in the same file
// as the other families, to demonstrate that the code is still mostly the same; this
// makes it easier to maintain than separate files.
// todo: Betwee... | the_stack |
use std::collections::HashMap;
use crate::error::{InternalError, InvalidStateError};
use crate::state::merkle::{node::Node, MerkleRadixLeafReadError, MerkleRadixLeafReader};
use crate::state::{
Prune, Read, StateChange, StatePruneError, StateReadError, StateWriteError, Write,
};
use super::backend;
use super::enc... | the_stack |
use crate::cybershake::PublicKey;
use crate::peer::PeerAddr;
use crate::{PeerID, PeerMessage};
use bytes::{Buf, BufMut, BytesMut};
use curve25519_dalek::ristretto::CompressedRistretto;
use readerwriter::Codable;
use std::io;
use std::marker::PhantomData;
use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, Sock... | the_stack |
use std::io;
use std::mem;
use std::result;
use std::slice;
use crate::x86_64::mpspec;
use libc::c_char;
use vm_memory::{Address, ByteValued, Bytes, GuestAddress, GuestMemory};
// This is a workaround to the Rust enforcement specifying that any implementation of a foreign
// trait (in this case `ByteValued`) where:
//... | the_stack |
use std::borrow::Cow;
use kurbo::{Affine, BezPath, PathEl, Point, Vec2};
#[cfg(feature = "serde")]
use serde_::{Deserialize, Serialize};
use crate::hyperbezier::{self, HyperBezier, ThetaParams};
use crate::simple_spline;
use crate::util;
/// The specification of a spline curve.
///
/// Currently this represents a si... | the_stack |
//! Module for project handling.
use crate::{
configfiles::{self, ConfigFile, ConfigFileImpl},
errors::*,
layouts::Layout as ManagedLayout,
types::*,
};
use i3ipc::I3Connection;
use lazy_static::lazy_static;
use std::{
ffi::{OsStr, OsString},
fs::File,
io::{prelude::*, BufReader},
ops::... | the_stack |
#![deprecated(
since = "0.16.0",
note = "The wrappers of the array iterator API are deprecated, please use ndarray's iterators like `Lanes` and `Zip` instead."
)]
#![allow(missing_debug_implementations)]
use std::marker::PhantomData;
use std::os::raw::{c_char, c_int};
use std::ptr;
use ndarray::Dimension;
use... | the_stack |
use crate as neli;
use neli_proc_macros::neli_enum;
/// Internet address families
#[neli_enum(serialized_type = "libc::c_uchar")]
pub enum Af {
Inet = libc::AF_INET as libc::c_uchar,
Inet6 = libc::AF_INET6 as libc::c_uchar,
}
/// General address families for sockets
#[neli_enum(serialized_type = "u8")]
pub e... | the_stack |
use super::prelude::*;
use crate::ffi;
use crate::{
Bin, Buffer, BufferList, Element, Event, FlowReturn, Message, MiniObject, Object, Pad,
PadLinkReturn, Query, StateChange, StateChangeReturn, Tracer,
};
use glib::{prelude::*, subclass::prelude::*, translate::*};
#[allow(unused_variables)]
pub trait TracerImpl... | the_stack |
use crate::cx::*;
use crate::cx_xlib::*;
use makepad_glx_sys as glx_sys;
use makepad_x11_sys as X11_sys;
use std::ffi::{CStr, CString};
use std::os::raw::{c_ulong, c_void};
use std::ptr;
use std::mem;
use makepad_live_compiler::generate_glsl;
use makepad_live_compiler::analyse::ShaderCompileOptions;
use makepad_live_co... | the_stack |
use crate::ui_log;
use crate::utils::escape::FwSlashPipeEscape;
use crate::Configuration;
use crate::Renderer;
use crate::WavData;
use crate::CONFIG;
use fltk::{
app,
button::{CheckButton, LightButton},
enums::{Align, Color, Event, FrameType},
frame::Frame,
group::{Pack, PackType},
image::SvgIma... | the_stack |
use crate::drivers::led::matrix::*;
use crate::kernel::{actor::Actor, actor::Address, actor::Inbox};
use core::future::Future;
use embassy::time::{with_timeout, Duration, Instant, TimeoutError};
use embedded_hal::digital::v2::OutputPin;
pub trait LedMatrixAddress<const ROWS: usize, const COLS: usize> {
fn apply(&m... | the_stack |
use indicatif::{ProgressBar, ProgressStyle};
use log::{debug, trace};
use openssl::ssl::{SslConnector, SslMethod, SslVerifyMode};
use postgres::{fallible_iterator::FallibleIterator, types::ToSql, Client};
use postgres_openssl::MakeTlsConnector;
use rand::{distributions::Alphanumeric, thread_rng, Rng};
use std::{borrow:... | the_stack |
extern crate base64;
use base64::{decode, encode};
use bytes::{BufMut, Bytes, BytesMut};
use serde::{Deserialize, Serialize};
use std::char;
use std::convert::TryFrom;
use std::convert::TryInto;
use std::ops::Index;
use crate::error::{Error, Result};
/// Enumeration of the `engine.io` `Packet` types.
#[derive(Copy, Cl... | the_stack |
use amethyst::{
core::SystemDesc,
ecs::{
Entities, Join, Read, ReaderId, System, SystemData, World, Write, WriteExpect, WriteStorage,
},
network::simulation::{
DeliveryRequirement, NetworkSimulationEvent, TransportResource, UrgencyRequirement,
},
shrev::EventChannel,
};
use std:... | the_stack |
//! Integration tests using a `Biome` client to validate `Biome`'s management of users,
//! credentials, and keys.
use splinter::biome::client::{Authorization, Credentials, Key, NewKey, UpdateUser};
use splinterd::node::RestApiVariant;
use crate::framework::network::Network;
#[test]
/// This test validates `Biome`'s... | the_stack |
use std::str::Chars;
use crate::library::lexeme::definition::{TokenKind, TokenType, BLACK_HOLE};
use crate::library::lexeme::token::Token;
use crate::library::lexer::helper::*;
pub struct Tokenizer<'a> {
line_no: u32,
id: u32,
position: usize,
current_char: char,
token: Vec<char>,
length: usiz... | the_stack |
use super::{SequenceNumber, UdpConnectionState, UdpConnectionVars, UdpPacket, UdpPacketType};
use anyhow::{Context, Error, Result};
use log::*;
use rand::Rng;
use std::net::{IpAddr, SocketAddr};
use std::time::{Duration, Instant};
use tokio::net::UdpSocket;
use tokio::time::delay_for;
/// This magic string is exchange... | the_stack |
use hex_literal::hex;
use pcap_parser::pcapng::*;
use pcap_parser::traits::*;
use pcap_parser::*;
use std::fs::File;
use std::io::BufReader;
static TEST001_BE: &[u8] = include_bytes!("../assets/test001-be.pcapng");
static TEST001_LE: &[u8] = include_bytes!("../assets/test001-le.pcapng");
static TEST010_LE: &[u8] = inc... | the_stack |
pub use super::win::file_traits::*;
use super::RawDescriptor;
use crate::descriptor::AsRawDescriptor;
use std::{
fs::File,
io::{Error, ErrorKind, Result},
};
use data_model::VolatileSlice;
/// A trait for flushing the contents of a file to disk.
/// This is equivalent to File's `sync_all` method, but
/// wra... | the_stack |
use crate::{
iter, sys, to_result::ToResult, utils, Discord, Lobby, LobbyID, LobbyMemberTransaction,
LobbyTransaction, NetworkChannelID, Reliability, Result, SearchQuery, UserID,
};
use std::{
borrow::Cow,
convert::{TryFrom, TryInto},
mem::size_of,
};
/// # Lobbies
///
/// Provides the ability to g... | the_stack |
use std::{
fs,
os::raw::c_uint,
path::{
Path,
PathBuf,
},
};
#[cfg(any(feature = "db-dup-sort", feature = "db-int-key"))]
use crate::backend::{
BackendDatabaseFlags,
DatabaseFlags,
};
use crate::{
backend::{
BackendEnvironment,
BackendEnvironmentBuilder,
... | the_stack |
use crate::http_token_utils::{http_token, HttpToken};
use crate::request_analyzer::{HttpRequestData, RequestAnalysisResult};
use crate::ultralight_rate_limiter::UltraLightRateLimiter;
use crate::{
ClassificationReason, ExtClassificationMetricsSettings, ExtLoggingSettings,
ExtRequestAnalysisMetricsUnit, ExtStrin... | the_stack |
use std::sync::Arc;
use serde::{Deserialize, Serialize};
use tokio::sync::Notify;
use tracing::{debug, error, info, Instrument};
use crate::{
chat, error,
noalbs::{self, ChatSender},
state::ClientStatus,
stream_servers,
};
pub struct Switcher {
pub state: noalbs::UserState,
pub chat_sender: C... | the_stack |
//! An *abstract* implementation of `VecDeque` useful for verification results.
//!
//! We use the ideas of use *parametricity* and *abstraction* to soundly
//! over-approximate the real implementation. This means that we "throwaway"
//! the underlying storage buffer and only model its `capacity`.
//!
//! This is usefu... | the_stack |
const DOUBLE_POW5_INV_TABLE_SIZE: usize = 342;
const DOUBLE_POW5_TABLE_SIZE: usize = 326;
pub static DOUBLE_POW5_INV_SPLIT: [(u64, u64); DOUBLE_POW5_INV_TABLE_SIZE] = [
(1, 2305843009213693952),
(11068046444225730970, 1844674407370955161),
(5165088340638674453, 1475739525896764129),
(782141948725284988... | the_stack |
use crate::io::kbio::driver::{io_uring_sqe, CQEFuture, IORING_OP_CONNECT};
use crate::io::kbio::driver::{
IORING_OP_RECV, IORING_OP_SHUTDOWN, IORING_OP_WRITE, IORING_OP_WRITEV,
};
use crate::io::kbio::{cqeres2rust, syscall2rust, OwnedFd};
use crate::io::{AsyncRead, AsyncWrite, ReadBuf};
use crate::net::tinymio::{ne... | the_stack |
use std::collections::HashMap;
use std::hash::Hash;
use std::hash::Hasher;
#[derive(Clone, Copy, Debug)]
pub struct Vertex {
_pos: [f32; 2],
_mip: f32,
}
impl PartialEq for Vertex {
fn eq(&self, other: &Vertex) -> bool {
self.canonicalize() == other.canonicalize()
}
}
impl Eq for Vertex {}
im... | the_stack |
use std::{convert::TryInto, io::Write};
use crate::components::{self, Style};
use crate::components::{
Colors, EntityDepth, Position, PreviousEntityDetails, PreviousPosition, PreviousSize,
PreviousWindowColors, Sprite, StyleMap, Visible,
};
use crate::{CrosstermWindow, Cursor};
use bevy::utils::HashSet;
use ... | the_stack |
use crate::{Curve, Field};
use crossbeam_utils::thread;
use num_cpus;
pub fn parallel_generator_collapse<C: Curve>(
g: &mut [C],
challenge: C::Scalar,
challenge_inv: C::Scalar,
) {
let l = g.len() / 2;
let (g_lo, g_hi) = g.split_at_mut(l);
let num_cpus = num_cpus::get();
let mut chunk = l... | the_stack |
use clap::{
crate_authors, crate_description, crate_name, crate_version, value_t_or_exit, App, AppSettings,
Arg,
};
use fuse::{
FileAttr, FileType, Filesystem, ReplyAttr, ReplyData, ReplyDirectory, ReplyEntry, Request,
};
use lazy_static::lazy_static;
use libc::ENOENT;
use serde_json::Value;
use std::cmp::m... | the_stack |
use super::{Environment, FilterInput, Runner};
use ast::*;
use std::borrow::Cow;
use std::cell::RefCell;
use std::fmt::Debug;
use std::io::Write;
use std::ops::DerefMut;
use tokenizer::Operator;
#[cfg(feature = "rayon")]
use rayon::prelude::*;
#[allow(unused)]
#[derive(Debug)]
enum Instr<NumEnum, StrEnum, FilterEnum>... | the_stack |
use std::cell::RefCell;
use std::ffi::{OsString, OsStr};
use std::fmt;
use std::os::unix::ffi::{OsStringExt, OsStrExt};
use std::os::unix::io::RawFd;
use std::rc::Rc;
use super::ast::*;
#[cfg(windows)]
type ParseInput<'a> = ::std::os::windows::ffi::EncodeWide<'a>;
#[cfg(unix)]
type ParseInput<'a> = ::std::slice::Iter... | the_stack |
pub const PT_LOAD: u32 = 1;
pub const PT_NOTE: u32 = 4;
pub const EI_MAG0: u32 = 0;
pub const EI_MAG1: u32 = 1;
pub const EI_MAG2: u32 = 2;
pub const EI_MAG3: u32 = 3;
pub const EI_DATA: u32 = 5;
pub const ELFMAG0: u32 = 127;
// The values for the following definitions have been edited
// to use their equivalent byt... | the_stack |
use std::{env, ffi::OsStr, fs, io::{Seek, SeekFrom, Write}, path::{Path, PathBuf}, process::{Command, Stdio}};
mod port;
#[macro_use]
extern crate clap;
const DEFAULT_TARGET: &'static str = "riscv64imac-unknown-none-elf";
const DD: &'static str = "dd";
const KERNEL_OFFSET: u64 = 0x2_0000;
const SCHEDULER_OFFSET: u64... | the_stack |
use crate::{session::Session, ControlCode, Error};
use std::{
borrow::Cow,
collections::HashMap,
io::{self, Write},
};
#[cfg(unix)]
use crate::{stream::Stream, WaitStatus};
#[cfg(unix)]
use nix::{
libc::STDIN_FILENO,
sys::termios,
unistd::{dup, isatty},
};
#[cfg(unix)]
use ptyprocess::set_raw;
... | the_stack |
//! The audio policy handler intercepts and modifies requests going into and out of the audio
//! setting in order to apply audio policies that have been added through the
//! fuchsia.settings.policy.Audio FIDL interface.
//!
//! # Role of the audio policy handler
//!
//! From the audio policy handler perspective, ther... | the_stack |
//! Enums, traits and functions for working with
//! [`signal`](http://man7.org/linux/man-pages/man7/signal.7.html).
use libc::{
c_int, c_void, pthread_kill, pthread_sigmask, pthread_t, sigaction, sigaddset, sigemptyset,
sigfillset, siginfo_t, sigismember, sigpending, sigset_t, sigtimedwait, timespec, EAGAIN,
... | the_stack |
/// Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).
#[derive(Clone, Debug, Default, PartialEq)]
pub struct Node {
/// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
pub metadata: crate::... | the_stack |
use std::marker::PhantomData;
pub trait Aml {
fn to_aml_bytes(&self) -> Vec<u8>;
}
pub const ZERO: Zero = Zero {};
pub struct Zero {}
impl Aml for Zero {
fn to_aml_bytes(&self) -> Vec<u8> {
vec![0u8]
}
}
pub const ONE: One = One {};
pub struct One {}
impl Aml for One {
fn to_aml_bytes(&self... | the_stack |
use nalgebra::DMatrix;
use nalgebra_sparse::csc::CscMatrix;
use nalgebra_sparse::{SparseEntry, SparseEntryMut, SparseFormatErrorKind};
use proptest::prelude::*;
use proptest::sample::subsequence;
use crate::assert_panics;
use crate::common::csc_strategy;
use std::collections::HashSet;
#[test]
fn csc_matrix_valid_da... | the_stack |
//! Provides types for the Interrupt Descriptor Table and its entries.
//!
//! # For the builds without the `abi_x86_interrupt` feature
//! The following types are opaque and non-constructable instead of function pointers.
//!
//! - [`DivergingHandlerFunc`]
//! - [`DivergingHandlerFuncWithErrCode`]
//! - [`HandlerFunc`... | the_stack |
use std::{
borrow::Cow,
collections::HashSet,
fmt,
fs::File,
io::{self, BufRead, BufReader, Error, ErrorKind},
net::{IpAddr, SocketAddr},
path::Path,
str,
};
use ipnet::{IpNet, Ipv4Net, Ipv6Net};
use iprange::IpRange;
use log::{trace, warn};
use once_cell::sync::Lazy;
use regex::bytes::... | the_stack |
use crate::exporters::*;
use crate::sensors::{RecordGenerator, Sensor, Topology};
use clap::Arg;
use std::time::Duration;
use std::{env, thread};
use utils::get_scaphandre_version;
//use warp10::data::Format;
/// An exporter that sends power consumption data of the host and its processes to
/// a [Warp10](https://warp... | the_stack |
use crate::binary::wifi::__va_list_tag;
use crate::timer::TimerID;
use crate::{fwprintln, wprintln};
use alloc::boxed::Box;
use alloc::collections::BTreeMap;
use alloc::raw_vec::RawVec;
use cty::c_void;
use esp32_hal::alloc::{Allocator, DEFAULT_ALLOCATOR, DRAM_ALLOCATOR};
use esp32_hal::prelude::*;
static mut ALLOCATI... | the_stack |
use async_trait::async_trait;
use chrono::{DateTime, Duration, Utc};
use interledger_packet::{hex::HexString, ErrorCode, RejectBuilder};
use interledger_service::*;
use ring::digest::{digest, SHA256};
use std::marker::PhantomData;
use tokio::time::timeout;
use tracing::error;
/// # Validator Service
///
/// Incoming o... | the_stack |
use crate::diff::SummaryDiff;
use camino::Utf8PathBuf;
use semver::Version;
use serde::{Deserialize, Serialize};
use std::{
collections::{BTreeMap, BTreeSet},
fmt,
};
use toml::{Serializer, Value};
/// A type representing a package map as used in `Summary` instances.
pub type PackageMap = BTreeMap<SummaryId, P... | the_stack |
//! External iterators for generic mathematics
//!
//! ## Compatibility
//!
//! The `num-iter` crate is tested for rustc 1.8 and greater.
#![doc(html_root_url = "https://docs.rs/num-iter/0.1")]
#![no_std]
#[cfg(feature = "std")]
extern crate std;
extern crate num_traits as traits;
extern crate num_integer as integer... | the_stack |
use std::collections::HashMap;
use std::io::{Cursor, Read, Write};
use std::iter::once;
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use crate::error::Error;
use crate::tag::Tag;
///
/// A Roughtime protocol message; a map of u32 tags to arbitrary byte-strings.
///
#[derive(Debug, Clone)]
pub struct R... | the_stack |
use crate::core::sstorage::ImmutableString;
use crate::{
asset::Resource,
core::{
algebra::{Matrix4, Vector2, Vector4},
color::Color,
math::Rect,
parking_lot::Mutex,
scope_profile,
},
gui::{
brush::Brush,
draw::{CommandTexture, DrawingContext, Shar... | the_stack |
extern crate libc;
use nom::IResult;
use log::*;
use smb::smb::*;
use smb::smb2::*;
use smb::dcerpc_records::*;
use smb::events::*;
pub const DCERPC_TYPE_REQUEST: u8 = 0;
pub const DCERPC_TYPE_PING: u8 = 1;
pub const DCERPC_TYPE_RESPONSE: u8 = 2;
pub const DCERPC_TYPE_FAULT: ... | the_stack |
use super::*;
/// A slice-backed vector-like data structure.
///
/// This is a very similar concept to `ArrayVec`, but instead
/// of the backing memory being an owned array, the backing
/// memory is a unique-borrowed slice. You can thus create
/// one of these structures "around" some slice that you're
/// working w... | the_stack |
extern crate iron;
extern crate matrix_rocketchat;
extern crate matrix_rocketchat_test;
extern crate router;
extern crate ruma_client_api;
extern crate ruma_events;
extern crate ruma_identifiers;
use std::convert::TryFrom;
use std::sync::mpsc::channel;
use std::thread;
use iron::{status, Iron, Listening};
use matrix_... | the_stack |
use std::path::{Path, PathBuf};
use std::{
convert::{TryFrom, TryInto},
env,
};
use anyhow::Error;
use slog::{Drain, Level, Logger};
use crypto::hash::{chain_id_from_block_hash, BlockHash, ContextHash, ProtocolHash};
use storage::chain_meta_storage::ChainMetaStorageReader;
use storage::tests_common::TmpStorag... | the_stack |
use crate::{
Color, ContentMode, CornerRounding, DrawWithTooltips, EdgeInsets, EventCtx, GeomBatch,
JustDraw, RewriteColor, ScreenDims, ScreenPt, Text, Widget,
};
use geom::{Bounds, Polygon, Pt2D};
use std::borrow::Cow;
/// A stylable UI component builder which presents vector graphics from an [`ImageSource`]... | the_stack |
use {
crate::{
core::CoreLib,
error::unexpected_type_error,
external::{self, Args, ExternalFunction},
frame::Frame,
meta_map::meta_id_to_key,
runtime_error,
value::{self, FunctionInfo, RegisterSlice, SimpleFunctionInfo},
value_iterator::{IntRange, Valu... | the_stack |
use winapi::shared::guiddef::GUID;
use winapi::shared::minwindef::{ATOM, FALSE, LPARAM, LRESULT, UINT, WPARAM};
use winapi::shared::windef::{HWND, RECT};
use winapi::um::combaseapi::CoCreateGuid;
use winapi::um::winuser::{
AdjustWindowRectEx, CreateWindowExW, DefWindowProcW, DestroyWindow, DispatchMessageW,
Get... | the_stack |
//! WebAssembly Node functionality.
use crate::{
node::{ConfigurationError, NodeIsolation},
Downgrading, LabelReadStatus, NodeMessage, NodePrivilege, NodeReadStatus, RuntimeProxy,
SignatureTable,
};
use byteorder::{ByteOrder, LittleEndian};
use log::{debug, error, info, trace, warn};
use maplit::hashset;
u... | the_stack |
//! Analysis which computes an annotation for each function on whether this function should be
//! verified or inlined. It also calculates the set of global invariants that are applicable to
//! each function as well as collect information on how these invariants should be handled (i.e.,
//! checked after bytecode, che... | the_stack |
use std::cmp::{max, min};
use std::collections::{BTreeMap, HashSet, VecDeque};
use std::fmt::{self, Display};
use std::io::{Error, ErrorKind, Result};
use std::ops::Bound::Included;
use std::time::Duration;
use super::Timer;
/// Represents the max distance of u32 values between packets in an u32 window.
const MAX_U32... | the_stack |
use std::collections::HashSet;
use std::fs::{read_dir, read_link, remove_file, metadata};
use std::io::{self, stdout, stderr};
use std::ffi::OsStr;
use std::path::Path;
use std::str::FromStr;
use std::time::{SystemTime, UNIX_EPOCH, Duration};
use std::os::unix::fs::MetadataExt;
use argparse::{ArgumentParser, PushConst... | the_stack |
use std::convert::TryInto;
use std::process::{Child, Command};
use anyhow::{bail, Result};
use log::{debug, info, warn};
use nix::{
sys::signal::{self, Signal},
unistd::Pid,
};
use procfs::process::{all_processes, Process};
use crate::task_handler::ProcessAction;
use pueue_lib::network::message::Signal as Int... | the_stack |
use std::{
cell::UnsafeCell,
fmt,
marker::PhantomData,
num::Wrapping,
ops::{Add, AddAssign, Sub, SubAssign},
ptr,
sync::mpsc::{self, Receiver, Sender},
};
use crate::util::{InstanceId, NoSharedAccess, Reference};
use std::fmt::Debug;
#[derive(Clone, Copy, Debug)]
struct CircularIndex {
... | the_stack |
use crate::epipolar;
use cv_core::{
nalgebra::{zero, Matrix3x4, Matrix4, RowVector4, UnitVector3, Vector3},
CameraPoint, CameraToCamera, Pose, Projective, TriangulatorObservations, TriangulatorRelative,
WorldPoint, WorldToCamera,
};
/// This is a very quick triangulator to execute, but it is not particular... | the_stack |
use std::collections::VecDeque;
use wayland_client::protocol::wl_pointer;
use wayland_client::protocol::wl_surface::WlSurface;
use wayland_client::{self as wl};
use wayland_cursor::CursorImageBuffer;
use wayland_cursor::CursorTheme;
use crate::keyboard::Modifiers;
use crate::kurbo::{Point, Vec2};
use crate::mouse;
us... | the_stack |
use crate::{
compact_trivia::{CompactTrivia, TriviaKinds},
lexable_token::LexableToken,
source_text::SourceText,
token_factory::SimpleTokenFactory,
token_kind::TokenKind,
trivia_kind::TriviaKind,
};
/// A compact version of parser_core_types::PositionedToken. Most tokens will be
/// represented... | the_stack |
use std::borrow::Borrow;
use std::marker::PhantomData;
use std::io::Cursor;
use std::mem;
use tokio_io::codec::Decoder;
use tokio_io::codec::Encoder;
use bytes::BytesMut;
use bytes::BufMut;
use dataframe::DataFrame;
use message::OwnedMessage;
use ws::dataframe::DataFrame as DataFrameTrait;
use ws::message::Message as... | the_stack |
use gl;
use gl::types::{GLchar, GLenum, GLint, GLsizeiptr, GLuint, GLvoid};
use std::ffi::{CStr, CString};
use crate::vector::*;
pub struct Shader {
id: GLuint,
}
impl Shader {
pub fn from_source(source: &CStr, shader_type: GLenum) -> Result<Shader, String> {
let id = unsafe { gl::CreateShader(shader... | the_stack |
pub mod executor;
// This module contains execution logger's implementation.
mod execution_logger;
// This module contains process's implementation.
pub mod process;
// This module contains client's implementation.
pub mod client;
// This module contains periodic's implementation.
pub mod periodic;
// This module ... | the_stack |
use std::{
borrow::{Borrow, BorrowMut},
collections::HashMap,
};
use eventually::{aggregate, aggregate::Root as AggregateRoot, message};
use rust_decimal::Decimal;
pub type BankAccountRepository<S> =
aggregate::EventSourcedRepository<BankAccount, BankAccountRoot, S>;
pub type TransactionId = String;
#[d... | the_stack |
use platform::macos::mach_sys::{kern_return_t, mach_msg_body_t, mach_msg_header_t};
use platform::macos::mach_sys::{mach_msg_ool_descriptor_t, mach_msg_port_descriptor_t};
use platform::macos::mach_sys::{mach_msg_timeout_t, mach_port_limits_t, mach_port_msgcount_t};
use platform::macos::mach_sys::{mach_port_right_t, ma... | the_stack |
//! Esplora by way of `ureq` HTTP client.
use std::collections::{HashMap, HashSet};
use std::io;
use std::io::Read;
use std::time::Duration;
#[allow(unused_imports)]
use log::{debug, error, info, trace};
use ureq::{Agent, Proxy, Response};
use bitcoin::consensus::{deserialize, serialize};
use bitcoin::hashes::hex::... | the_stack |
use whitebox_raster::Raster;
use crate::tools::*;
use num_cpus;
use std::env;
use std::f64;
use std::io::{Error, ErrorKind};
use std::path;
use std::sync::mpsc;
use std::sync::Arc;
use std::thread;
/// This tool calculates the horizon angle (*Sx*), i.e. the maximum slope along a specified azimuth (0-360 degrees) for
/... | the_stack |
extern crate sgx_types;
extern crate sgx_urts;
extern crate nan_preserving_float;
extern crate wabt;
use sgx_types::*;
use sgx_urts::SgxEnclave;
mod wasm_def;
use wasm_def::{RuntimeValue, Error as InterpreterError};
use wabt::script::{Action, Command, CommandKind, ScriptParser, Value};
extern crate serde;
extern c... | the_stack |
use super::{
inode::{DirEntry, Directory, FileLike, INode},
path::PathBuf,
};
use crate::ctypes::c_int;
use crate::fs::inode::PollStatus;
use crate::prelude::*;
use crate::user_buffer::UserBufferMut;
use crate::{net::*, user_buffer::UserBuffer};
use atomic_refcell::AtomicRefCell;
use bitflags::bitflags;
use cro... | the_stack |
use crate::protocols_handler::{
IntoProtocolsHandler, KeepAlive, ProtocolsHandler, ProtocolsHandlerEvent,
ProtocolsHandlerUpgrErr, SubstreamProtocol,
};
use crate::upgrade::{InboundUpgradeSend, OutboundUpgradeSend, SendWrapper};
use either::Either;
use libp2p_core::either::{EitherError, EitherOutput};
use libp2... | the_stack |
use crate::{
context::{
self,
inverse::{Inversible, LangSelection, TypeSelection},
Loader, Local,
},
object,
syntax::{ContainerType, Keyword, Term},
util::{AsAnyJson, AsJson, JsonFrom},
ContextMut, Error, Id, Indexed, Loc, Object, ProcessingMode, Value,
};
use futures::future::{BoxFuture, FutureExt};
use ge... | the_stack |
use device_types::{devices::Device, mount::Mount};
use futures::{TryFutureExt, TryStreamExt};
use im::HashSet;
use iml_change::GetChanges as _;
use iml_device::{
build_device_index, client_mount_content_id, create_cache, create_target_cache, find_targets,
linux_plugin_transforms::{
build_device_lookup, ... | the_stack |
use std::fs::File;
use std::io::{stdout, BufReader, BufWriter, Read, Write};
use std::path::PathBuf;
use anyhow::{bail, ensure, Result};
use indicatif::{ProgressBar, ProgressStyle};
use rayon::prelude::*;
use hevc_parser::hevc::*;
use hevc_parser::HevcParser;
//use crate::dovi::get_aud;
use super::{input_format, par... | the_stack |
use serde::{
de::{Deserializer, Error},
Deserialize, Serialize,
};
use serde_repr::{Deserialize_repr, Serialize_repr};
use uuid::Uuid;
use crate::payment_command::Actor;
/// A header set with a unique UUID (according to RFC4122 with "-"'s included) for the request,
/// used for tracking requests and debugging... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.