text stringlengths 9.08k 47.9k |
|---|
// Copyright 2018 <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, distribu... |
//! See docs in build/expr/mod.rs
use crate::build::expr::category::Category;
use crate::build::ForGuard::{OutsideGuard, RefWithinGuard};
use crate::build::{BlockAnd, BlockAndExtension, Builder};
use crate::thir::*;
use rustc_hir::def_id::DefId;
use rustc_hir::HirId;
use rustc_middle::middle::region;
use rustc_middle:... |
use std::collections::{HashMap, HashSet, VecDeque};
use std::process;
use std::result::Result;
use std::str::FromStr;
use console::Term;
use structopt::clap;
use crate::bat_utils::assets::HighlightingAssets;
use crate::bat_utils::output::PagingMode;
use crate::cli;
use crate::config;
use crate::env;
use crate::errors... |
use conrod_core::{
image,
mesh::{self, Mesh},
render,
text::rt,
Rect, Scalar,
};
use std::collections::{HashMap, HashSet};
use wgpu::util::DeviceExt;
/// A loaded wgpu texture and it's width/height
pub struct Image {
/// The immutable image type, represents the data loaded onto the GPU.
///... |
use rafx_assets::distill_impl::AssetResource;
use rafx_assets::{image_upload, AssetManagerRenderResource, GpuImageDataColorSpace};
use rafx_assets::{AssetManager, GpuImageData};
use rafx_framework::render_features::render_features_prelude::*;
use rafx_framework::visibility::{VisibilityConfig, VisibilityRegion};
use raf... |
//! This module implements Plonk circuit constraint primitive.
use crate::circuits::domain_constant_evaluation::DomainConstantEvaluations;
use crate::circuits::{
domains::EvaluationDomains,
gate::{CircuitGate, GateType},
polynomial::{WitnessEvals, WitnessOverDomains, WitnessShifts},
wires::*,
};
use ar... |
use crate::{
config::CONFIGURATION,
extractor::get_links,
filters::{
FeroxFilter, LinesFilter, SizeFilter, StatusCodeFilter, WildcardFilter, WordsFilter,
},
heuristics,
scan_manager::{FeroxScans, PAUSE_SCAN},
utils::{format_url, get_current_depth, make_request},
FeroxChannel, Fer... |
// Copyright 2022 <NAME>.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you
// may not use this file except in compliance with the License. You may
// obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... |
//! Writes a flight parsed from a `.flt` file into a `.vhs` file
use std::io;
use std::io::prelude::*;
use anyhow::*;
use log::*;
use rayon::prelude::*;
use rustc_hash::FxHashMap;
use crate::flt::{self, Flight};
use crate::primitives::*;
/// The header is 80 bytes long; entities start after.
const ENTITY_OFFSET: u3... |
use super::abloom;
use super::acache;
use super::address::*;
use super::chunk_storage;
use super::compression;
use super::dir_chunk_storage;
use super::external_chunk_storage;
use super::fstx;
use super::fsutil;
use super::htree;
use super::migrate;
use super::oplog;
use super::protocol;
use super::xid::*;
use serde::{... |
#![allow(improper_ctypes, non_snake_case, non_camel_case_types, unused_imports)]
//! This library provides bindings to the squirrel language.
//!
//! In addition, two cargo features are present:
//! `double-precision` and `wide-chars`
//! which require compilation of the squirrel library
//! with `SQUSEDOUBLE` and `SQ... |
// Copyright 2018 Parity Technologies (UK) Ltd.
//
// 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, mer... |
#![allow(dead_code)]
//##############################################################################
// TYPES
pub type Mat4 = [f32; 16];
//##############################################################################
// MAIN
pub trait Mat4Trait{
////////////////////////////////////////////////////////////
// St... |
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use std::collections::hash_map::{Entry, HashMap, VacantEntry};
use std::env::set_var;
use std::fs::File;
use std::io::{IoSlice, Write};
use std::mem::t... |
use crate::cpu::addressing_mode::AddressingMode;
use crate::Byte;
use once_cell::sync::Lazy;
use std::collections::HashMap;
#[derive(Debug)]
pub struct Opcode {
pub code: Byte,
pub name: &'static str,
pub bytes: Byte,
pub cycles: Byte,
pub addressing_mode: AddressingMode,
pub needs_page_cross_c... |
#![allow(dead_code)]
use na::{
Isometry3, Matrix3, Matrix4, Point3, Quaternion, Rotation3, Translation3, Unit, UnitQuaternion,
Vector3,
};
use physx::cooking::{
ConvexMeshCookingResult, PxConvexMeshDesc, PxCooking, PxCookingParams, PxHeightFieldDesc,
PxTriangleMeshDesc, TriangleMeshCookingResult,
};
us... |
use loupe::MemoryUsage;
use wasmer::wasmparser::Operator;
use wasmer::{
FunctionMiddleware, LocalFunctionIndex, MiddlewareError, MiddlewareReaderState,
ModuleMiddleware,
};
/// A middleware that ensures only deterministic operations are used (i.e. no floats)
#[derive(Debug, MemoryUsage)]
pub struct Determinist... |
use crate::analyzer::{Analyzer, AnalyzerBuilder};
use crate::packet2::{EntityMethodPacket, Packet, PacketType};
use crate::unpack_rpc_args;
use modular_bitfield::prelude::*;
use serde_derive::Serialize;
use std::collections::HashMap;
pub struct DecoderBuilder {
silent: bool,
no_meta: bool,
path: Option<Str... |
use std::convert::TryInto;
use std::marker::PhantomData;
use std::mem::{self, size_of};
use std::sync::{
atomic::{AtomicU64, Ordering::SeqCst},
Arc, MutexGuard,
};
use std::thread;
use std::time::Duration;
use anyhow::{Context, Result};
use byte_slice_cast::{AsByteSlice, AsMutSliceOf};
use filecoin_hashers::Ha... |
//! Certificate Transparency Log client suitable for monitoring, quick
//! SCT validation, gossiping, etc.
//!
//! The source code of this project contains some best-effort explanation
//! comments for others trying to implement such a client. As of 2019,
//! the documentation that exists out there are (in my opinion) ... |
#[macro_use]
extern crate criterion;
use criterion::{Criterion, Fun};
use sauron_core::{
diff,
html::{attributes::*, *},
Node,
};
use std::{
collections::hash_map::DefaultHasher,
hash::{Hash, Hasher},
};
const LOREM: &str = "
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Phase... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Control A"]
pub ctrla: CTRLA,
#[doc = "0x01 - Control B"]
pub ctrlb: CTRLB,
_reserved2: [u8; 2usize],
#[doc = "0x04 - Unknown Register 0x42004C04"]
pub unk4c04: UNK4C04,
#[doc = "0x05 - Control C"]
pub c... |
use std::env;
use std::fs::File;
use std::fs::{read_link, rename, remove_dir, remove_file};
use std::ffi::OsString;
use std::io::{self, Read, Write};
use std::io::{stdout, stderr};
use std::io::ErrorKind::NotFound;
use std::path::{Path, PathBuf};
use std::time::Instant;
use std::os::unix::fs::symlink;
use std::os::unix... |
//! Command line interface.
use chrono::{Duration, Utc};
use colored::Colorize;
use std::{cmp::Reverse, error::Error, fmt::Display, iter::once, path::PathBuf};
use structopt::StructOpt;
use unicode_width::UnicodeWidthStr;
use crate::{
config::Config,
filter::TaskDescriptionFilter,
metadata::{Metadata, Priority}... |
#![feature(
stdsimd,
option_zip,
let_chains,
new_uninit,
try_blocks,
cell_update,
inline_const,
entry_insert,
array_chunks,
drain_filter,
array_windows,
slice_ptr_get,
slice_ptr_len,
str_internals,
portable_simd,
adt_const_params,
hash_drain_filter,
... |
//! ###############################################################################
//! # Coldsnap-rust is a "Hello World" example of a snapshot fuzzer built in rust #
//! ###############################################################################
//!
//! Author: <NAME>
//!
//! This module contain a target ... |
use crate::{
bstr::Bstr,
config::{Config, HtpServerPersonality},
connection::{Connection, Flags},
error::Result,
hook::DataHook,
log::Logger,
transaction::Transaction,
transactions::Transactions,
util::{File, FlagOperations},
HtpStatus,
};
use chrono::{DateTime, Utc};
use std::{a... |
use crate::error;
use crate::pe::{optional_header, section_table, symbol};
use crate::strtab;
use alloc::vec::Vec;
use log::debug;
use scroll::{IOread, IOwrite, Pread, Pwrite, SizeWith};
/// DOS header present in all PE binaries
#[repr(C)]
#[derive(Debug, PartialEq, Copy, Clone, Default)]
pub struct DosHeader {
//... |
use log::debug;
use proc_macro2::{Ident, Span, TokenStream};
use quote::ToTokens;
use rustc_hash::FxHashSet;
use smol_str::SmolStr;
use std::convert::{TryFrom, TryInto};
use syn::{
braced, parenthesized,
parse::{Parse, ParseStream},
parse_quote,
punctuated::Punctuated,
spanned::Spanned,
Token, T... |
mod error;
mod formatters;
mod guard;
mod transformers;
pub use error::*;
pub use formatters::*;
pub use transformers::*;
use crate::{
interpreter::ExpressionResult, FilteredQuery, ManyRecordsQuery, Query, QueryGraphBuilderResult, ReadQuery,
};
use connector::{IdFilter, QueryArguments};
use guard::*;
use petgraph... |
use raw_window_handle::{HasRawWindowHandle, RawWindowHandle, Win32Handle};
use winapi::shared::minwindef::{BOOL, DWORD};
use winapi::shared::ntdef::{NTSTATUS, PVOID, ULONG, WCHAR};
use winapi::shared::windef::{HWINEVENTHOOK, HWND};
use winapi::shared::winerror::S_OK;
use winapi::um::dwmapi::DwmExtendFrameIntoClientArea... |
// Copyright (c) Facebook, Inc. and its affiliates.
use anyhow::{bail, Result};
use log::{debug, info, trace, warn};
use rustbus::{
message_builder::{self, MarshalledMessage},
params, signature, standard_messages, DuplexConn, MessageType, RpcConn,
};
use std::cell::RefCell;
use std::collections::HashMap;
use st... |
// Copyright 2019-2021 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
use std::{
cell::RefCell,
collections::VecDeque,
rc::Rc,
sync::atomic::{AtomicBool, AtomicI32, Ordering},
};
use gdk::{WindowEdge, WindowState};
use gdk_pixbuf::{Colorspace, Pixbuf};
use gtk::{prelude:... |
// Copyright 2021-2022 <NAME>
//
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those ... |
// 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 ... |
use crate::bitstream::bitread::*;
use crate::maths::*;
little_endian_reader!{ ReverseBitReadLE }
impl<'a> ReverseBitReadLE<'a> {
#[inline(always)]
fn fill(&self, count: usize) -> u64 {
let len = self.buffer.len();
let end = len - self.index;
let start = end.saturating_sub(count);
... |
// Copyright 2019 CoreOS, Inc.
//
// 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... |
///////////////////////////////////////////////////////////////////////////////
//
// Copyright 2018-2020 Airalab <<EMAIL>>
//
// 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
//
// ... |
use log::debug;
use smallvec::{smallvec, SmallVec};
use media::{
AudioBuffer, AudioChannel, AudioChannelSide, SampleIndex, SampleIndexRange, INLINE_CHANNELS,
};
use std::sync::{Arc, Mutex};
use super::{super::Image, Dimensions};
pub const BACKGROUND_COLOR: (f64, f64, f64) = (0.2f64, 0.2235f64, 0.2314f64);
pub c... |
use std::cmp;
/// Compression Codebook
///
/// This is in the format: `[length of string][string][opcode for string]`
pub static SMAZ_COMPRESSION_CB: [&[u8]; 254] = [b"\x01 \x00", b"\x03the\x01",
b"\x01e\x02", b"\x01t\x03", b"\x01a\x04", b"\x02of\x05", b"\x01o\x06",
b"\x03and\x07", b"\x01i\x08", b"\x01n\x09", b"\x01... |
use crate::builtins::InternalCommandError;
use crate::expand::*;
use crate::parser::{
self, Assignment, Ast, BinaryExpr, CondExpr, Expr, HereDoc, Initializer, LocalDeclaration,
RunIf, Word,
};
use crate::pattern::{match_pattern, match_pattern_all, NoMatchesError};
use crate::process::*;
use crate::shell::Shell;... |
//! This is the main meat of this crate, the dungeon generators.
//!
//! There are two kinds of Dungeon Generators in this crate.
//!
//! The first are the 'simple' Room Generators
//!
//! Both kinds implement [DungeonConfigurer](trait.DungeonConfigurer.html) and
//! [DungeonBuilder].
//! The last trait, [DungeonCombin... |
// 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>.
//! Mathematical utilities and decisions.
use std::fmt;
use std::iter::FusedIterator;
use cgmath::{EuclideanSpace as _, Point3, Vector3};
use noise::NoiseFn;
us... |
// Copyright 2016 Huton. See the COPYRIGHT
// file at the top-level directory of this distribution.
//
// 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 fi... |
//! CATCHUp query algorithm.
use super::*;
pub use crate::algo::customizable_contraction_hierarchy::ftd_cch::customize;
use floating_td_stepped_elimination_tree::{QueryProgress, *};
use crate::algo::customizable_contraction_hierarchy::*;
use crate::datastr::clearlist_vector::ClearlistVector;
use crate::datastr::gra... |
pub mod back;
pub mod fetcher;
pub mod front;
pub mod init;
pub mod redirect;
use crate::com::create_reuse_port_listener;
use crate::com::{gethostbyname, AsError};
use crate::com::{ClusterConfig, CODE_PORT_IN_USE};
use crate::protocol::redis::{new_read_only_cmd, new_auth_cmd, RedisHandleCodec, RedisNodeCodec};
use cra... |
pub mod processing;
#[cfg(feature = "monstermos")]
pub mod monstermos;
#[cfg(feature = "putnamos")]
pub mod putnamos;
#[cfg(feature = "katmos")]
pub mod katmos;
use crate::gas::Mixture;
use auxtools::*;
use crate::constants::*;
use crate::GasArena;
use dashmap::DashMap;
use fxhash::FxBuildHasher;
use rayon;
... |
//! Driver for a PS/2 keyboard.
//!
//! Only supports PS/2 Scan Code Set 2, on a UK English keyboard. See [the
//! OSDev Wiki](https://wiki.osdev.org/PS/2_Keyboard).
//!
//! Requires that you sample a pin in an interrupt routine and shift in the
//! bit. We don't sample the pin in this library, as that makes testing
//... |
//! Module for creating a `Texture` from an image
use {
crate::{
core::{cast_cow, cast_slice},
factory::{Factory, ImageState, UploadError},
memory::Data,
pixel::AsPixel,
resource::{
Escape, Handle, Image, ImageCreationError, ImageInfo, ImageView,
Image... |
use libc::c_int;
use llvm_sys::execution_engine::{
LLVMAddGlobalMapping, LLVMAddModule, LLVMDisposeExecutionEngine, LLVMExecutionEngineRef, LLVMFindFunction,
LLVMFreeMachineCodeForFunction, LLVMGenericValueRef, LLVMGetExecutionEngineTargetData, LLVMGetFunctionAddress,
LLVMLinkInInterpreter, LLVMLinkInMCJIT,... |
/*!
A tree-view control is a window that displays a hierarchical list of items
*/
use winapi::shared::minwindef::{WPARAM, LPARAM};
use winapi::um::winuser::{WS_VISIBLE, WS_DISABLED, WS_TABSTOP};
use winapi::um::commctrl::{HIMAGELIST, HTREEITEM, TVIS_EXPANDED, TVIS_SELECTED, TVS_SHOWSELALWAYS, TVITEMW};
use crate::win3... |
//! `SecretConnection`: Transport layer encryption for Tendermint P2P connections.
use std::{
cmp,
convert::{TryFrom, TryInto},
io::{self, Read, Write},
marker::{Send, Sync},
slice,
};
use chacha20poly1305::{
aead::{generic_array::GenericArray, AeadInPlace, NewAead},
ChaCha20Poly1305,
};
u... |
#![allow(clippy::unwrap_used)]
//! Signature tests
use super::super::crypto;
use super::super::test_utils::select_n;
use super::super::types::{
polynomial::arbitrary::poly, CombinedSignature, IndividualSignature, Polynomial,
PublicCoefficients, SecretKey,
};
use crate::crypto::hash_message_to_g1;
use crate::ty... |
// Copyright 2021 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::{
ie::{self, write_wmm_param, IeType},
mac,
test_utils::fake_frames::{
fake_eap_rsne, fake_wpa1_ie, fa... |
use super::Modules;
use crate::{id::Id, util::MapWithMut};
use indexmap::IndexSet;
use petgraph::EdgeDirection::Incoming as Dependants;
use petgraph::EdgeDirection::Outgoing as Dependancies;
use retain_mut::RetainMut;
use std::collections::HashMap;
use std::collections::HashSet;
use std::collections::VecDeque;
use std:... |
//! Functions for handling page server configuration options
//!
//! Configuration options can be set in the pageserver.toml configuration
//! file, or on the command line.
//! See also `settings.md` for better description on every parameter.
use anyhow::{anyhow, bail, ensure, Context, Result};
use toml_edit;
use toml... |
use chrono::{NaiveDate, NaiveDateTime, NaiveTime};
use codepage_437::{FromCp437, CP437_WINGDINGS};
use log::{debug, warn};
use phf::{phf_map, Map};
use std::{
convert::TryInto,
error::Error,
fmt::{Display, Formatter, Result as FmtResult},
io::{Read, Seek, SeekFrom},
};
use crate::errors::ImageError;
p... |
use super::memory::Memory;
use super::ppu::Ppu;
use super::opcodes::INSTRUCTIONS;
use super::opcodes::AddressingMode;
use super::opcodes::Operation;
use super::opcodes::Instruction;
use super::opcodes::operation_requires_fetched_argument;
use bitflags::bitflags;
bitflags!
{
#[derive(Default)]
pub struct Proces... |
// Copyright (c) 2021 Quark Container Authors / 2018 The gVisor 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 ... |
use std::borrow::Cow;
use std::collections::HashSet;
use std::ops::Deref;
use std::str::FromStr;
use regex::Regex;
use reqwest::Url;
use select::document::Document;
use select::node::Node;
use select::predicate::{Attr, Class, Name, Predicate};
use url::Host;
use lazy_static::lazy_static;
use crate::article::{
... |
//! List actually used crates.
//!
//! ```no_run
//! use cargo_linked::{CargoLinked, LinkedPackages};
//!
//! let mut config = cargo::Config::default()?;
//!
//! let LinkedPackages { used, unused } = CargoLinked {
//! demonstrate: todo!(),
//! lib: todo!(),
//! debug: todo!(),
//! all_features: todo!(),... |
use std::path::{PathBuf, Path};
use structopt::StructOpt;
use std::fs::File;
use std::io::BufReader;
use url::Url;
use serde_yaml::Value;
use tempfile::{Builder, TempDir};
use std::io::copy;
use anyhow::{Context, Result};
use rand::{thread_rng, Rng};
use rand::distributions::Alphanumeric;
use flate2::read::GzDecoder;
u... |
#![deny(missing_docs)]
#![doc(html_root_url = "http://docs.rs/ddc-hi-rs/0.3.0")]
//! High level DDC/CI monitor controls.
//!
//! # Example
//!
//! ```rust,no_run
//! use ddc_hi::{Ddc, Display};
//!
//! for mut display in Display::enumerate() {
//! display.update_capabilities().unwrap();
//! println!("{:?} {}: ... |
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2019-2022 Intel Corporation.
*/
use pnet::datalink::{channel, Channel, MacAddr, NetworkInterface};
use pnet::packet::arp::{ArpHardwareTypes, ArpOperations};
use pnet::packet::arp::{ArpPacket, MutableArpPacket};
use pnet::packet::ethernet::{EtherTypes, MutableEt... |
/*
Copyright 2022 Adobe
All Rights Reserved.
NOTICE: Adobe permits you to use, modify, and distribute this file in
accordance with the terms of the Adobe license agreement accompanying
it.
*/
use super::user::get_cached_expiry;
use super::SignatureSpecifier;
use adlu_base::u64decode;
use eyre::{eyre, Result, WrapErr};... |
//! Expressions, symbols, and variables for symbolic execution.
use std::convert::TryInto;
use std::fmt;
use std::num::NonZeroU16;
/// A variable.
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub struct Var(NonZeroU16);
impl Var {
pub(crate) fn with_id<T>(id: T) -> Self
where
T: TryInto<NonZeroU... |
#![feature(once_cell)]
use anyhow::anyhow;
use app::{
dispatcher::Dispatcher, dns_client::DnsClient, inbound::manager::InboundManager,
nat_manager::NatManager, outbound::manager::OutboundManager, router::Router,
};
use indexmap::IndexMap;
use lazy_static::lazy_static;
use std::io;
use std::pin::Pin;
use std::s... |
use std::path::Path;
use std::sync::{Arc, Mutex};
use rand::prelude::*;
use rayon::prelude::*;
use serde::{Deserialize, Serialize};
use crate::boundingshape::BoundingShape;
use crate::bounds::Bounds;
use crate::linspace::floatrange;
use crate::planck::planck_integral;
use crate::solar_ccfs::CCF_LEN;
use crate::spot::... |
use crate::shapes::{GeoKind, Scratchpad};
use crate::util::SQRT_2;
use crate::StrError;
use russell_lab::{mat_mat_mul, mat_t_mat_mul, Matrix};
use russell_tensor::LinElasticity;
/// Performs analytical integrations on a Tet4
pub struct AnalyticalTet4 {
/// Holds the volume of the tetrahedron
pub volume: f64,
... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
//! Module with shared runtime internals.
use std::cell::{RefCell, RefMut};
use std::num::NonZeroUsize;
use std::rc::Rc;
use std::sync::Arc;
use std::time::{Duration, Instant};
use std::{fmt, io};
use crossbeam_channel::Receiver;
use log::{debug, info, trace};
use mio::{Events, Poll, Token};
use crate::actor_ref::{A... |
use crate::constants::{MAX_PRECISION_I32, POWERS_10};
use crate::decimal::{CalculationResult, Decimal};
use crate::ops::common::{Buf12, Buf16, Dec64};
use core::cmp::Ordering;
use core::ops::BitXor;
impl Buf12 {
// Returns true if successful, else false for an overflow
fn add32(&mut self, value: u32) -> Resul... |
pub type c_char = i8;
pub type c_long = i64;
pub type c_ulong = u64;
pub type wchar_t = i32;
pub type blkcnt_t = ::c_ulong;
pub type blksize_t = ::c_long;
pub type clock_t = ::c_long;
pub type clockid_t = ::c_int;
pub type dev_t = ::c_long;
pub type fsblkcnt_t = ::c_ulong;
pub type fsfilcnt_t = ::c_ulong;
pub type ino... |
use crate::core::pbrt::{Float, quadratic, INFINITY, lerp};
use crate::core::geometry::bounds::{Bounds2f};
use crate::core::transform::{AnimatedTransform, Transform};
use bumpalo::core_alloc::sync::Arc;
use crate::core::film::Film;
use crate::core::medium::Mediums;
use log::{info, warn, error};
use crate::core::geometry... |
//! Run a GraphQL query and fetch all the entitied needed to build the
//! final result
use graphql_parser::query as q;
use graphql_parser::schema as s;
use lazy_static::lazy_static;
use std::collections::{BTreeMap, HashMap, HashSet};
use std::ops::Deref;
use std::rc::Rc;
use std::sync::Arc;
use std::time::Instant;
u... |
use ic_config::subnet_config::{SubnetConfig, SubnetConfigs};
use ic_cycles_account_manager::CyclesAccountManager;
pub use ic_error_types::{ErrorCode, UserError};
use ic_execution_environment::ExecutionServices;
use ic_ic00_types::{self as ic00, CanisterIdRecord, InstallCodeArgs, Method, Payload};
pub use ic_ic00_types:... |
extern crate uuid;
extern crate std;
extern crate byteorder;
extern crate num;
use super::def::*;
use super::def::CqlValue::*;
use super::def::CqlValueType::*;
use super::def::CqlResponseBody::*;
use super::def::RCErrorType::*;
use super::def::CqlBytesSize::*;
use super::def::KindResult::*;
use super::def::OpcodeRespo... |
#![no_std]
use core::convert::TryInto;
/// Digest length in bytes (256-bits)
pub const DIGEST_LEN: usize = 32;
// Number of words used in block processing
const WORK_LEN: usize = 64;
// Length of a word in bytes
const WORD_BYTES_LEN: usize = 4;
// Length of message block in bytes
const BLOCK_BYTES_LEN: usize = 64;... |
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use std::error::Error;
use std::fmt;
const NANOS_PER_SECOND: u32 = 1_000_000_000;
#[non_exhaustive]
#[derive(Debug, Eq, PartialEq)]
pub enum DateParseError {
Invalid(&'static str),
IntParseErr... |
// Copyright 2021 <NAME> <<EMAIL>>
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except accord... |
//! Dutch Auction
//!
//! Ask to sell on auction.
//! Initial price can start from price above market.
//! Diminishes with time.
//! Takers can take for price same or higher.
//! Higher takers take first.
//! Sell(ask) orders stored on chain. Sell takes deposit from seller, returned during take or
//! liquidation. Take... |
// Copyright (c) 2019 <NAME>
// Copyright (c) 2016 The vulkano developers
// Licensed under the Apache License, Version 2.0
// <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT
// license <LICENSE-MIT or http://opensource.org/licenses/MIT>,
// at your option. All files in the project carrying... |
use super::*;
// On-disk file system format.
// Both the kernel and user programs use this header file.
pub const ROOTINO: usize = 1; // root i-number
pub const BSIZE: usize = 512; // block size
// Disk layout:
// [ boot block | super block | log | inode blocks |
// free bit ... |
use super::{Int, ParseError};
use std::{fmt, str::FromStr};
#[rustfmt::skip]
#[derive(Eq, Ord, Copy, Clone, Debug, PartialEq, PartialOrd)]
pub enum UnitPrefix {
Kilo, Kibi,
Mega, Mebi,
Giga, Gibi,
Tera, Tebi,
Peta, Pebi,
Exa , Exbi,
#[cfg(feature = "u128")] Zetta,
#[cfg(feature = "u128"... |
use crate::r1cs_nark_as::CHALLENGE_SIZE;
use crate::ConstraintF;
use ark_ec::AffineCurve;
use ark_ff::{BigInteger, Field, PrimeField, Zero};
use ark_poly_commit::trivial_pc::PedersenCommitment;
use ark_relations::r1cs::{
ConstraintSynthesizer, ConstraintSystem, Matrix, OptimizationGoal, SynthesisError,
Synthes... |
// [#protodoc-title: Socket Option ]
/// Generic socket option message. This would be used to set socket options that
/// might not exist in upstream kernels or precompiled Envoy binaries.
/// [#next-free-field: 7]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SocketOption {
/// An optional name to give... |
use std::cmp::Ordering;
use std::collections::HashMap;
use std::fmt;
use std::io;
use std::sync::{Arc, Condvar, Mutex};
use std::thread;
use std::time::{Duration, Instant};
use anyhow::Error;
use cpal::traits::{DeviceTrait, EventLoopTrait, HostTrait};
use cpal::StreamData;
use hound::WavReader;
use log::info;
use midi... |
// use std::any::Any;
use super::operand::OperandValue;
use super::{FunctionCx, LocalRef};
use crate::common::IntPredicate;
use crate::glue;
use crate::traits::*;
use crate::MemFlags;
use rustc_middle::mir;
use rustc_middle::mir::tcx::PlaceTy;
use rustc_middle::ty::layout::{HasTyCtxt, TyAndLayout};
use rustc_middle:... |
use super::{
super::{
config::Config,
json::{self, GatewayEventParsingError},
stage::Stage,
ShardStream,
},
emitter::{EmitJsonError, Emitter},
inflater::Inflater,
session::{Session, SessionSendError},
socket_forwarder::SocketForwarder,
};
use crate::{event::EventT... |
// 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, software
// distributed unde... |
// Copyright 2018 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.
#![recursion_limit = "512"]
use {
anyhow::{format_err, Context as _, Error},
argh::FromArgs,
async_helpers::component_lifecycle::ComponentLife... |
// Std
#[cfg(all(feature = "debug", any(target_os = "windows", target_arch = "wasm32")))]
use osstringext::OsStrExt3;
use std::cell::Cell;
use std::ffi::{OsStr, OsString};
use std::io::{self, BufWriter, Write};
use std::iter::Peekable;
use std::mem;
#[cfg(all(
feature = "debug",
not(any(target_os = "windows", t... |
/* ----------------------------------------------------------------------------
Copyright (c) 2018, Microsoft Research, <NAME>
This is free software; you can redistribute it and/or modify it under the
terms of the MIT license. A copy of the license can be found in the file
"LICENSE" at the root of this distribution.
--... |
// Copyright 2017 Parity Technologies (UK) Ltd.
//
// 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, mer... |
// Copyright 2018 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::integrity::{self, integrity_algorithm};
use crate::key::exchange::Key;
use crate::keywrap::{self, keywrap_algorithm};
use crate::Error;
use cra... |
// <NAME>, 2017. Multilinear method for hydraulic analysis of pipe networks.
// Journal of Irrigation and Drainage Engineering. Volume 143, number 8, pages={04017020, 2017,
// publisher: American Society of Civil Engineers.
//********************************************************************************************... |
use actix::prelude::*;
use config;
use histogram::Histogram;
use serde_derive::{Deserialize, Serialize};
use serde_json as json;
use std::cell::RefCell;
use std::collections::hash_map::DefaultHasher;
use std::collections::BTreeMap;
use std::fs;
use std::hash::{Hash, Hasher};
use std::time::Instant;
use crate::common:... |
// Copyright 2018 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.
//! Parsing and serialization of UDP packets.
use std::convert::TryInto;
#[cfg(test)]
use std::fmt::{self, Debug, Formatter};
use std::num::NonZeroU16;
u... |
use git2::build::CheckoutBuilder;
use git2::{BranchType, Oid, Remote, Repository, Revwalk, Sort};
use std::collections::HashSet;
use std::iter::FromIterator;
use errors::*;
use nonce::{HasNonce, Nonce};
use nonce_bag::{HasNonceBag, NonceBag};
use push_entry::PushEntry;
use utils::*;
const RSL_BRANCH: &str = "RSL";
c... |
//! I2C Interface based on flexcomm
//!
//!
use crate::pac::{
FLEXCOMM0, FLEXCOMM1, FLEXCOMM2, FLEXCOMM3, FLEXCOMM4, FLEXCOMM5, FLEXCOMM6, FLEXCOMM7,
FLEXCOMM8, I2C0, I2C1, I2C2, I2C3, I2C4, I2C5, I2C6, I2C7, I2C8,
};
#[cfg(feature = "flexcomm-10")]
use crate::pac::{FLEXCOMM9, I2C9};
use crate::flexcomm::*;
u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.