text stringlengths 9.08k 47.9k |
|---|
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Copyright 2017 The Chromium OS Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause
use std::io::{self, ErrorKind};
use std::sync::{Arc, Barrier, Mutex};
use std::thread::{self, JoinHandle};
use kvm_bindings:... |
// Rust-oracle - Rust binding for Oracle database
//
// URL: https://github.com/kubo/rust-oracle
//
//-----------------------------------------------------------------------------
// Copyright (c) 2017-2018 <NAME> <<EMAIL>>. All rights reserved.
// This program is free software: you can modify it and/or redistribute it... |
// Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use std::cell::RefCell;
use std::rc::Rc;
use std::sync::Arc;
use std::thread;
use futures::{channel::mpsc, pin_mut, StreamExt};
use remain::sorted;
us... |
#![warn(clippy::pedantic)]
mod de;
pub mod error;
mod se;
use crate::error::Result;
use chrono::{DateTime, Utc};
use parse_datetime::parse_offset;
use semver::Version;
use serde::{Deserialize, Serialize};
use snafu::{ensure, OptionExt, ResultExt};
use std::cmp::Ordering;
use std::collections::BTreeMap;
use std::fs;
u... |
use image::{self, GenericImageView};
use rayon::prelude::*;
use std::f32::consts::*;
use std::*;
const TAU: f32 = PI * 2.0;
#[inline(always)]
fn clamp<T: PartialOrd>(f: T, lo: T, hi: T) -> T {
debug_assert!(lo < hi);
if f > hi {
hi
} else if f < lo {
lo
} else {
f
}
}
/// ... |
use self::input_buffer::*;
use self::message::*;
use crate::{
input::FrameInput,
time_sync::{TimeSync, UnixMillis},
Config, Frame, NetworkStats, TaskPool,
};
use async_channel::TrySendError;
use backroll_transport::Peer as TransportPeer;
use bincode::config::Options;
use futures::FutureExt;
use futures_time... |
use crate::util::conversions::*;
use crate::util::metadata::side_metadata::{SideMetadataContext, SideMetadataSanity};
use crate::util::Address;
use crate::util::ObjectReference;
use crate::util::heap::layout::vm_layout_constants::{AVAILABLE_BYTES, LOG_BYTES_IN_CHUNK};
use crate::util::heap::layout::vm_layout_constants... |
use crate::result::Result;
use anyhow::anyhow;
use derive_more::Display;
use hibitset::{AtomicBitSet, BitSet};
use once_cell::sync::Lazy;
use parking_lot::Mutex;
#[cfg(all(test, feature = "device_tests"))]
use smol::lock::SemaphoreGuard;
use std::{
fmt::{self, Debug},
mem::size_of,
sync::Arc,
};
#[cfg(feat... |
/*!
This module describes the intermediate representation of a specification.
*/
pub(crate) mod lowering;
mod print;
mod schedule;
pub use crate::ast::StreamAccessKind;
pub use crate::ast::WindowOperation;
pub use crate::ir::schedule::{Deadline, Schedule};
pub use crate::ty::{Activation, FloatTy, IntTy, UIntTy, Value... |
/*
* Created on Wed May 05 2021
*
* Copyright (c) 2021 <NAME> <<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
* http://www.apache.org/licenses/LICENSE-2.0
* Unless requi... |
// Copyright 2019 TiKV Project Authors. Licensed under Apache-2.0.
use super::client::Client;
use super::config::Config;
use super::metrics::*;
use super::waiter_manager::Scheduler as WaiterMgrScheduler;
use super::{Error, Lock, Result};
use crate::server::resolve::StoreAddrResolver;
use futures::{Future, Sink, Stream... |
//! A pure rust MQTT client which strives to be robust, efficient and easy to use.
//! This library is backed by an async (tokio) eventloop which handles all the
//! robustness and and efficiency parts of MQTT but naturally fits into both sync
//! and async worlds as we'll see
//!
//! Let's jump into examples right awa... |
//!
//! A safe and user friendly R extension interface.
//!
//! * Build rust extensions to R.
//! * Convert R packages to Rust crates.
//!
//! This library aims to provide an interface that will be familiar to
//! first-time users of Rust or indeed any compiled language.
//!
//! See [Robj] for much of the content of th... |
use serde::Deserialize;
use std::{iter, mem};
use swc_common::{chain, util::take::Take, Mark, Spanned, DUMMY_SP};
use swc_ecma_ast::*;
use swc_ecma_transforms_base::{
helper, helper_expr,
perf::{Check, Parallel},
};
use swc_ecma_transforms_macros::{fast_path, parallel};
use swc_ecma_utils::{
alias_ident_for... |
//! This module implements lowering (instruction selection) from Cranelift IR
//! to machine instructions with virtual registers. This is *almost* the final
//! machine code, except for register allocation.
use crate::entity::SecondaryMap;
use crate::inst_predicates::has_side_effect;
use crate::ir::instructions::Branc... |
//! Modio provides a set of building blocks for interacting with the [mod.io](https://mod.io) API.
//!
//! The client uses asynchronous I/O, backed by the `futures` and `tokio` crates, and requires both
//! to be used alongside.
//!
//! # Authentication
//!
//! To access the API authentication is required and can be do... |
extern crate gluon_completion as completion;
use std::{borrow::Cow, error::Error as StdError, path::PathBuf, str::FromStr, sync::Mutex};
use futures::{
future::{self, Either},
sync::mpsc,
{Future, Sink, Stream},
};
use crate::base::{
ast::{Expr, Pattern, SpannedPattern, Typed, TypedIdent},
error:... |
use std::collections::{BTreeMap, HashSet};
use crate::code_move::fix_path;
use crate::collector::{
collect_from_pat, new_ident_from_id, GlobalCollect, Id, IdentCollector, ImportKind,
};
use crate::entry_strategy::EntryPolicy;
use crate::parse::PathData;
use crate::words::*;
use path_slash::PathExt;
use anyhow::{b... |
/*
Copyright 2014 Google Inc. All rights reserved.
Copyright 2017 <NAME>. All rights reserved.
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... |
// Copyright 2021 the Tectonic Project
// Licensed under the MIT License.
//! "Dynamic" enumerations have version-dependent variants and values that
//! depend on other symbols.
use std::collections::BTreeMap;
use tectonic_errors::prelude::*;
use super::HasPrimitive;
use crate::{
symbols::{HasSymbol, SymbolCateg... |
// Copyright (c) 2020-2022 <NAME> <<EMAIL>>,
// <NAME> <<EMAIL>>,
// <NAME> <<EMAIL>>
//
// 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/lice... |
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of Open Ethereum.
// Open Ethereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your o... |
// region: lmake_md_to_doc_comments include README.md A //!
//! # reader for microXml
//!
//! **reader for microXml - the simplified subset of xml**
//! ***[repo](https://github.com/LucianoBestia/reader_for_microxml); version: 2.0.2 date: 2021-01-13 authors: <NAME>***
//!
//! [.
use super::{
segment::{Payload, Segment},
seqnum::{SeqNum, WindowSize},
... |
#[allow(dead_code)]
mod opengl;
mod program;
mod color;
mod vertex;
#[allow(dead_code)]
mod renderer;
mod image;
mod texture;
mod canvas;
mod font;
mod texture_ref;
mod params;
use opengl::BufferUsage;
use renderer::{Renderer, RendererBuilder};
pub use opengl::{PrimitiveType, FilterMode, Filter, WrapMode, Wrap};
pub ... |
#![allow(dead_code)] // TODO: remove me
#![allow(unused_macros)]
#![allow(unused_variables)] // TODO: remove me
macro_rules! error {
($($arg:tt)*) => (eprintln!("\x1b[31m{}:{} {}\x1b[0m", file!(), line!(), format_args!($($arg)*)));
}
macro_rules! warn {
($($arg:tt)*) => (eprintln!("\x1b[33m{}:{} {}\x1b[0m", f... |
use crate::diagnostics::Diagnostic;
use crate::stack::Stack;
use crate::terms::{Constant, Field, Kind, Record, Term};
use crate::types::{MutTypeVisitor, TyField, TyKind, Type};
use util::span::Span;
/// A typing context, Γ
#[derive(Debug)]
pub struct Context {
stack: Stack<Type>,
kstack: Stack<TyKind>,
}
impl ... |
#![doc = include_str!("../README.md")]
#![warn(
missing_docs,
rustdoc::missing_crate_level_docs,
missing_debug_implementations,
rust_2018_idioms,
unreachable_pub
)]
use parking_lot::RwLock;
use std::borrow::Cow;
use std::collections::{HashMap, HashSet};
use std::fmt::{Debug, Formatter};
use std::i... |
use crate::http::{Client, StatusError};
use anyhow::{anyhow, bail, Context as _, Result};
use chrono::{DateTime, Utc};
use itertools::Itertools as _;
use regex::Regex;
use scraper::{element_ref::ElementRef, Html, Selector};
use std::fmt;
use std::path::Path;
use url::Url;
const ATCODER_ENDPOINT: &str = "https://atcode... |
// Copyright 2019 Intel Corporation. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//
// Copyright 2019 Alibaba Cloud Computing. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
use std::error;
use std::fs::File;
use std::io;
use std::num::Wrapping;
use std::os::unix::io::{AsRawFd, FromRawFd, ... |
use std::collections::HashMap;
use der_parser::oid::Oid;
#[derive(Debug, PartialEq)]
pub enum ExtensionType<'a> {
/// Section 4.2.1.3 of rfc 5280
KeyUsage(KeyUsage),
/// Section 4.2.1.4 of rfc 5280
CertificatePolicies(CertificatePolicies<'a>),
/// Section 4.2.1.5 of rfc 5280
PolicyMappings(Pol... |
/*
* Copyright (c) 2020-2021 <NAME>, <NAME>, <NAME>, <NAME>, <NAME>.
*
* This file is part of alevin-fry
* (see https://github.com/COMBINE-lab/alevin-fry).
*
* License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause
*/
// scroll now, explore nom later
extern crate needletail;
extern crate num;
e... |
#![allow(dead_code)]
use std::io::Read;
use std::fs::File;
use std::collections::HashMap;
#[allow(unused_imports)]
// region Use Nom
use nom::{
character::complete::{anychar, line_ending, multispace0, crlf, space0},
AsChar,
branch::alt,
bytes::{
complete::{
escaped,
is_a,
take_while,
... |
// Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
// Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE fil... |
use std::{
cell::RefCell,
fs::File,
io::{BufWriter, Read, Write},
os::unix::prelude::{AsRawFd, FromRawFd},
rc::Rc,
sync::atomic::{AtomicBool, AtomicUsize, Ordering},
time::Duration,
};
use libdecor::{Capabilities, Context, FrameRef, State, WindowState};
use wayland_client::{
protocol::{... |
use std::fs::{self};
use std::io::Write;
use std::ops::{Deref, DerefMut};
use std::path::{Path, PathBuf};
use std::{env, str};
use semver::{Version, VersionReq};
use termcolor::{BufferWriter, Color, ColorChoice, ColorSpec, WriteColor};
use crate::dependency::Dependency;
use crate::errors::*;
const MANIFEST_FILENAME:... |
use crate::{
comparison::personal_best, platform::prelude::*, AtomicDateTime, Run, Segment, Time, TimeSpan,
TimeStamp, TimerPhase, TimerPhase::*, TimingMethod,
};
use core::{mem, ops::Deref};
#[cfg(test)]
mod tests;
/// A Timer provides all the capabilities necessary for doing speedrun attempts.
///
/// # Exa... |
#[macro_use]
pub mod attrs;
use std::cell::Cell;
use std::collections::HashMap;
use std::str::Chars;
use attrs::{BindgenAttr, BindgenAttrs};
use convert_case::{Case, Casing};
use napi_derive_backend::{
BindgenResult, CallbackArg, Diagnostic, FnKind, FnSelf, Napi, NapiEnum, NapiEnumVariant, NapiFn,
NapiFnArgKind,... |
use super::{GraphPath, GraphEdge, GraphEdgeRef, GraphPathPoint, GraphPathEdge};
use crate::bezier::curve::*;
use crate::bezier::intersection::*;
use crate::geo::*;
use crate::consts::*;
use smallvec::*;
use std::mem;
use std::ops::Range;
use std::cmp::Ordering;
use std::collections::HashMap;
///
/// Struct describin... |
// Copyright 2019 The Exonum Team
//
// 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 i... |
use itertools::{
Either,
EitherOrBoth::{Both, Left, Right},
Itertools,
};
use std::sync::atomic::Ordering::Relaxed;
use atomic_float::AtomicF32;
use tinyvec::TinyVec;
use crate::reaction::ReactionIdentifier;
use super::{
constants::*, gas_visibility, total_num_gases, with_reactions, with_specific_heats, GasIDX... |
#![allow(non_upper_case_globals)]
#![allow(dead_code)]
//! list of opcodes with their id's and hex code
pub const aci: (&'static str, u16) = ("aci", 0xCE);
pub const adc_a: (&'static str, u16) = ("adc a", 0x8F);
pub const adc_b: (&'static str, u16) = ("adc b", 0x88);
pub const adc_c: (&'static str, u16) = ("adc c", 0... |
use std::ffi::CString;
use std::os::raw::c_char;
use std::os::unix::ffi::OsStringExt;
use std::{char, env, ptr, slice, str};
#[cfg(feature = "wayland")]
use memmap2::MmapOptions;
#[cfg(feature = "wayland")]
pub use sctk::seat::keyboard::RMLVO;
#[cfg(feature = "x11")]
use xcb_dl::ffi::xcb_connection_t;
#[cfg(feature =... |
// Copyright 2017 Google Inc. All rights reserved.
//
// 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... |
pub mod assertions;
pub mod reporters;
use anyhow::Result;
use handlebars::Handlebars;
use httpstat::{httpstat, Config as HttpstatConfig};
use httpstat::{Header, StatResult as HttpstatResult, Timing as HttpstatTiming};
use serde::de::value::SeqAccessDeserializer;
use serde::de::{Deserializer, IntoDeserializer, SeqAcce... |
#[cfg(debug_assertions)]
extern crate console_error_panic_hook;
extern crate hashers;
extern crate nalgebra as na;
extern crate poisson;
extern crate rand;
extern crate wee_alloc;
use std::collections::HashMap;
use std::convert::TryInto;
use std::hash::BuildHasherDefault;
use na::{Point2, Vector2};
use noise::{NoiseF... |
extern crate openssl;
extern crate rusqlite;
extern crate rustyline;
extern crate synac;
extern crate xdg;
use synac::State;
use synac::common::{self, Packet};
use rusqlite::Connection as SqlConnection;
use std::collections::HashMap;
use std::env;
use std::fs;
use std::net::SocketAddr;
use std::sync::mpsc;
use std::sy... |
use std::fmt;
use std::rc::Rc;
use std::cell::RefCell;
use bitfield::BitRange;
use crate::memory::Memory;
bitfield! {
struct Status(u8);
impl Debug;
u8;
c, set_c: 0, 0; // Carry (0=No Carry, 1=Carry)
z, set_z: 1, 1; // Zero (0=Nonzero, 1=Zero)
i, set_i: 2, 2; // IRQ Disable ... |
//! Split reduplicate functions in this share module
pub mod v1;
pub mod v2;
use ash;
use ash::vk;
use ash::version::{ V1_0, InstanceV1_0, EntryV1_0, DeviceV1_0 };
use ash::vk::types::uint32_t;
use winit;
use tobj;
type EntryV1 = ash::Entry<V1_0>;
use std::ptr;
use std::ffi::CString;
use std::path::Path;
use ::ut... |
// Copyright 2019 Zhizhesihai (Beijing) Technology Limited.
//
// 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 a... |
use std::time::Duration;
use bavy_balls::shapes::{mesh_to_collider_shape, HalfCylinderPath};
use bevy::{
input::system::exit_on_esc_system, math::const_vec3, prelude::*, render::primitives::Aabb,
ui::CAMERA_UI, utils::Instant,
};
use bevy_rapier3d::{
na::{Isometry3, Vector3},
physics::TimestepMode,
... |
use crate::controller::security::SecurityConfig;
use crate::controller::sql::SqlIncorporator;
use crate::controller::Migration;
use crate::ReuseConfigType;
use dataflow::ops::trigger::Trigger;
use dataflow::ops::trigger::TriggerEvent;
use dataflow::prelude::DataType;
use nom_sql::parser as sql_parser;
use nom_sql::SqlQ... |
/*! The version of LLVM that rust depends on should be equal to or less than
the version of system LLVM. For example, this combination is invalid.
- `rustc v1.56` that relies on `LLVM 13`
- `LLVM 12` installed in the system
But this combination is valid.
- `rustc v1.55` depending on `LLVM 12` or `rustc v1.51` relyin... |
// Copyright 2016 Mozilla Foundation
//
// 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... |
// SPDX-License-Identifier: MIT
pub use netlink_packet_core::constants::*;
// ==========================================
// 1000 - 1099 are for commanding the audit system
// ==========================================
/// Get status
pub const AUDIT_GET: u16 = 1000;
/// Set status (enable/disable/auditd)
pub const AU... |
use advent::helpers;
use boolinator::Boolinator;
use itertools::{Either, Itertools};
use nom::{
branch::alt,
bytes::complete::{tag, take_while_m_n},
character::complete::{alphanumeric0, alphanumeric1, digit1, one_of},
combinator::{all_consuming, map, map_res, recognize},
multi::separated_list0,
... |
// This file is part of Webb.
// Copyright (C) 2021 Webb Technologies Inc.
// 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.o... |
pub type c_char = u8;
pub type wchar_t = i32;
s! {
pub struct ipc_perm {
pub __key: ::key_t,
pub uid: ::uid_t,
pub gid: ::gid_t,
pub cuid: ::uid_t,
pub cgid: ::gid_t,
pub mode: ::c_ushort,
__pad1: ::c_ushort,
pub __seq: ::c_ushort,
__pad2: ::c... |
extern crate clap;
#[macro_use]
extern crate prettytable;
extern crate nvapi_hi as nvapi;
#[macro_use]
extern crate quick_error;
#[macro_use]
extern crate log;
extern crate env_logger;
extern crate result;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
extern crate csv;
mod auto;
mod human;
mod conv;... |
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//! The Neighboor Discovery Protocol (NDP).
//!
//! Neighboor Discovery for IPv6 as defined in [RFC 4861] defines mechanisms for
//! solving the following ... |
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// 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 ... |
use errors::*;
use roblox::{api, RobloxUserID};
use std::collections::{HashSet, HashMap, VecDeque};
use std::fmt;
use std::str::from_utf8;
const DEFAULT_RULE_DEFS: &[(&str, &str)] = &[
("Verified", "true"),
("Banned", "is_banned()"),
("NotBanned", "not is_banned()"),
("FormerBC", "builtin_rule(NotBC) a... |
#![deny(missing_docs)]
//! This module provides basic support for converting inline assembly statements.
use super::*;
use proc_macro2::{TokenStream, TokenTree};
use syn::__private::ToTokens;
/// An argument direction specifier for a Rust asm! expression
enum ArgDirSpec {
In,
Out,
InOut,
LateOut,
... |
//! ACPI parsing functionality for relevant topology information.
use libacpica::*;
use core::fmt;
use core::mem;
use core::ptr;
use crate::alloc::alloc;
use crate::alloc::vec::Vec;
use core::alloc::Layout;
use crate::acpi_types::*;
use cstr_core::CStr;
use log::{debug, info, trace, warn};
use x86::current::paging... |
//! Snapshot testing tools for [`Transcript`]s.
//!
//! # Examples
//!
//! Simple scenario in which the tested transcript calls to one or more Cargo binaries / examples
//! by their original names.
//!
//! ```
//! use term_transcript::{
//! ShellOptions, Transcript,
//! test::{MatchKind, TestConfig, TestOutputC... |
use crate::{
graph::{
nodes::ThetaEffects, Add, Bool, Byte, EdgeKind, End, Eq, Gamma, GammaData, Input,
InputParam, Int, Load, Mul, Neg, Neq, Node, Not, Output, OutputParam, OutputPort, Rvsdg,
Scan, ScanDirection, Start, Store, Sub, Subgraph, Theta, ThetaData,
},
ir::Const,
utils... |
// Copyright 2019 Zhizhesihai (Beijing) Technology Limited.
//
// 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 a... |
use super::{
difficulty_range_ar, difficulty_range_od,
math_util::{logistic, PoissonBinomial},
roots::{expand_find_root_brent, find_root_bisection, find_root_brent},
ArrayVec, DifficultyAttributes, HitProbabilities, Movement, OsuObject, SliderState,
};
use rosu_pp::{Beatmap, Mods};
use std::cmp::Orderi... |
//! Provides the SVG template for rendering terminal output in a visual format.
//!
//! # Examples
//!
//! See [`Template`] for examples of usage.
use handlebars::{Handlebars, RenderError};
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::{
error::Error as StdError,
fmt::{self, Write as... |
//! The FAT library
//! This crate currently supports FAT12/FAT16/FAT32 with a sector size >= 512 bytes.
#![no_std]
pub mod attribute;
mod cluster;
mod datetime;
pub mod directory;
pub mod filesystem;
mod name;
mod offset_iter;
mod table;
mod utils;
use byteorder::{ByteOrder, LittleEndian};
use storage_device::Block;... |
use std::io::Read;
use crate::model::{Release, Genre, Dictionary, EntryContent, PartOfSpeech,BackendError,Agent};
use crate::BackendImpl;
use std::collections::HashMap;
use std::iter::Peekable;
use crate::rdf::turtle::parse_turtle;
use crate::rdf::model::{NamedNode,Value,Resource,Triple,Namespace,Literal};
use crate::c... |
//! Logical device
//!
//! # Device
//!
//! This module exposes the `Device` trait, which provides methods for creating
//! and managing graphics resources such as buffers, images and memory.
//!
//! The `Adapter` and `Device` types are very similar to the Vulkan concept of
//! "physical devices" vs. "logical devices";... |
use std::sync::Arc;
use tokio::sync::mpsc;
use tokio::sync::oneshot;
use tokio::sync::Notify;
use tokio::select;
use tokio::time;
use futures::future;
use futures::future::FutureExt;
// use rand;
// use rand::distributions::{Distribution, Uniform};
use std::cmp;
use std::collections::HashMap;
use std::collections::... |
use backend::util::{ident_ty, leading_colon_path_ty, raw_ident, rust_ident};
use proc_macro2::{Ident, Span};
use syn;
use weedle::common::Identifier;
use weedle::term;
use weedle::types::*;
use first_pass::FirstPassRecord;
use util::{array, camel_case_ident, option_ty, shared_ref, snake_case_ident, TypePosition};
#[d... |
#![allow(clippy::module_inception)]
use std::path::PathBuf;
use std::str::FromStr;
use std::sync::Arc;
use anyhow::Result;
use druid::piet::{PietTextLayout, Text, TextLayout, TextLayoutBuilder};
use druid::{Command, KbKey};
use druid::{
Env, EventCtx, ExtEventSink, FontFamily, KeyEvent, Modifiers, PaintCtx, Point... |
//! This module contains helper structures to deal with 2D data.
//! [`Array2D`] and [`Array2DChunk`] take care of splitting up the 2D array into chunks
//! that can be sent to the node in order to process them.
use std::slice::{Chunks, ChunksMut};
use serde::{Serialize, Deserialize};
use crate::nc_node_info::NodeID... |
//! Initializes and runs a simulation
use crate::boundary_conditions::*;
use crate::constants::Constants;
use crate::lbm_algorithm::*;
use crate::simulation_parsing::*;
use crate::vessels::*;
use crate::vessels_parsing::*;
use itertools_num::linspace;
use nalgebra::{Matrix2, Matrix3, Vector2, Vector3};
use serde::{Des... |
// Copyright 2017-2020 <NAME>. 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. T... |
use header::Header;
use types;
use error::Error;
use section::*;
use segment::*;
use symbol;
use section;
use segment;
use indexmap::{IndexMap};
use std::collections::hash_map::{HashMap};
use std::io::{Read, Seek, SeekFrom, Write};
use std;
use std::iter::FromIterator;
#[derive(Default)]
pub struct Elf {
pub hea... |
use lazy_static::lazy_static;
use std::collections::{HashMap, VecDeque};
use std::convert::TryFrom;
use super::{Lexer, Token};
use crate::data::error::CppError;
use crate::data::lex::{Keyword, Literal};
use crate::data::prelude::*;
use crate::get_str;
/// A preprocessor does textual substitution and deletion on a C ... |
mod handle_message;
mod kex;
mod metacommands;
mod restrict_message;
use self::kex::{KexData, NakedState};
use byteorder::{self, ByteOrder};
#[cfg(unix)]
use crate::pty::Pty;
#[cfg(unix)]
use crate::tuntap::TunTap;
use crate::{
arg, keys,
message::OxyMessage::{self, *},
ui::Ui,
};
#[allow(unused_imports)]
... |
use std::collections::{hash_map::Entry, BTreeSet};
use anyhow::{anyhow, bail};
use smallvec::SmallVec;
use crate::prelude::*;
/// Just a place where commented-out code goes to die
pub mod deprecated;
/// Removes `h_l` and its twin `h_r`, merging their respective faces together.
/// The face on the L side will be ke... |
#![deny(missing_docs, unused_import_braces, unused_qualifications)]
#![warn(
missing_debug_implementations,
missing_copy_implementations,
trivial_casts,
trivial_numeric_casts,
unsafe_code,
unstable_features
)]
//! A Hedwig library for Rust. Hedwig is a message bus that works with AWS SNS/SQS an... |
use super::*;
use super::util::*;
use chrono::{DateTime, Utc};
use roblox::*;
use serenity;
use std::borrow::Cow;
use std::time::SystemTime;
use util;
// TODO: Check role existence.
// TODO: Take care of massive code redundancy here.
fn get_discord_username(discord_id: UserId) -> String {
match discord_id.to_use... |
use std::{isize};
use std::cell::{Cell, RefCell};
use std::convert::{TryFrom};
use std::fmt::{self, Debug, Formatter};
use std::mem::{size_of};
use super::ast::{ParamList};
use super::engine::{glsp, Span, Sym, with_heap};
use super::error::{GError, GResult};
use super::gc::{Allocate, Gc, GcHeader, Root, Slot, V... |
use alloc::string::String;
use ckb_std::{
ckb_constants::Source,
high_level::{load_cell_capacity, load_cell_data, load_cell_lock, load_script},
};
use core::{convert::TryFrom, convert::TryInto, result::Result};
use das_core::{
assert, constants::*, data_parser, debug, error::Error, parse_witness, util, warn... |
//
// Copyright (c) 2017 10x Genomics, Inc. All rights reserved.
//
use std::alloc::System;
#[global_allocator]
static A: System = System;
//#[macro_use] extern crate log;
extern crate histogram;
extern crate csv;
extern crate rust_htslib;
extern crate itertools;
extern crate num;
extern crate rand;
extern crate bin... |
//! A module for controlling the oracle down payment model
#![cfg_attr(not(feature = "std"), no_std)]
use crate::traits::*;
use crate::types::*;
use frame_support::sp_runtime::traits::AccountIdConversion;
use frame_support::sp_std::convert::TryInto;
use frame_support::traits::{Currency, ExistenceRequirement, Get, OnU... |
mod components;
use anyhow::Error;
use log::*;
use serde_derive::{Deserialize, Serialize};
use std::collections::HashMap;
use wasm_bindgen::{closure::Closure, convert::IntoWasmAbi, prelude::wasm_bindgen, JsValue};
use yew::format::{Json, Nothing};
use yew::prelude::*;
use yew::services::fetch::{FetchService, FetchTask... |
// Copyright 2017 <NAME>. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... |
use bit_vec::BitVec;
use std::{collections::BTreeMap};
use alloc::{boxed::Box, vec::Vec, rc::{Rc, Weak}, string::String};
use core::cell::{RefCell, RefMut};
use core::mem::{uninitialized, size_of};
use core::slice;
use core::fmt::{Debug, Formatter, Error};
use core::any::Any;
use dirty::Dirty;
use structs::*;
use vfs:... |
use std::io::{self, Write, Seek, Read, SeekFrom};
use std::path::{Path, PathBuf};
use std::fs;
use byteorder::{LittleEndian as Le, ReadBytesExt, WriteBytesExt};
use crate::pos::Sp;
use crate::diagnostic::{self, Diagnostic, Emitter, RootEmitter};
use crate::error::{ErrorReported};
// Binary file IO uses anyhow instea... |
//! This module implements the global `Intl` object.
//!
//! `Intl` is a built-in object that has properties and methods for i18n. It's not a function object.
//!
//! More information:
//! - [ECMAScript reference][spec]
//!
//! [spec]: https://tc39.es/ecma402/#intl-object
use crate::{
builtins::intl::date_time_fo... |
#![deny(clippy::float_arithmetic)]
use macros::{d, dbg, fmt_debug, u, SaturatingSub};
use platform_types::{screen_positioning::*, *};
use parsers::{Parsers, ParserKind};
use std::{
path::PathBuf,
time::Instant,
};
use text_buffer::{
Editedness,
PossibleEditedTransition,
ScrollAdjustSpec,
TextB... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.