text
stringlengths
7.05k
33.9k
//! Basic SPIR-V reflection library to extract binding information //! //! ```rustc //! let info = Reflection::new_from_spirv(&spirv_blob)?; //! dbg!(info.get_descriptor_sets()?); //! ``` use rspirv::binary::Parser; use rspirv::dr::{Instruction, Loader, Module, Operand}; use std::collections::BTreeMap; use std::convert...
use rand::{prelude::{thread_rng, SliceRandom}}; use std::{io, io::{stdout, Write}}; /** * todo list: * * allow splitting */ //DATA //enums enum PlayerType { Player, Dealer, } impl ToString for PlayerType { fn to_string(&self) -> String { match self { &PlayerType::Dealer => return ...
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. use deno_core::serde::Serialize; use deno_core::serde_json; use deno_core::serde_json::Map; use deno_core::serde_json::Value; use deno_core::url::Url; use indexmap::IndexMap; use std::cmp::Ordering; use std::collections::HashSet; use std::error...
//! Memory management for linear memories. //! //! `RuntimeLinearMemory` is to WebAssembly linear memories what `Table` is to WebAssembly tables. use crate::mmap::Mmap; use crate::vmcontext::VMMemoryDefinition; use crate::MemoryImage; use crate::MemoryImageSlot; use crate::Store; use anyhow::Error; use anyhow::{bail, ...
mod ipc; mod cli; use colored::Colorize; use std::convert::TryFrom; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { env_logger::init(); let cli = cli::client() .version(env!("CARGO_PKG_VERSION")) .author(format!("{} <<EMAIL>>", env!("CARGO_PKG_AUTHORS")).as_str()) ...
//! Safe bindings to FreeBSD's libgeom //! //! The primary purpose of this crate is to support the //! [`gstat`](https://crates.io/crates/gstat) crate, so some bindings may be //! missing. Open a Github issue if you have a good use for them. //! <https://www.freebsd.org/cgi/man.cgi?query=libgeom> use freebsd_libgeom_...
// Copyright © 2021 VMware, Inc. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 OR MIT //! API to construct a virtual address space for the loaded kernel image. use core::fmt; use core::mem::transmute; use uefi::table::boot::AllocateType; use uefi::ResultExt; use uefi_services::system_table; use x86::b...
//! Types for defining and monitoring event types use std::time::Duration; use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use crate::misc::{AuthorizationAttribute, AuthorizationAttributes, OwningApplication}; mod event_type_input; pub use event_type_input::*; new_type! { #[doc=r#"Name of an E...
// Copyright (c) 2017 <NAME> //! The simulation state. #![allow(unused_imports)] use crate::value::{TimeValue, Value}; use llhd::ir::Unit; use num::zero; use std::{ cmp::Ordering, collections::{BTreeMap, BinaryHeap, HashMap, HashSet}, fmt, ops::{Index, IndexMut}, sync::Mutex, }; /// A simulation...
//! Represents a structure containing all fields and records, read from an external XML file. //! This definition file, called **layout** file, defines all field and record features. //! //! # Examples //! ```rust //! use rbf::record::AsciiMode; //! use rbf::layout::Layout; //! //! // load my layout //! let layout ...
mod command_buffer; mod context; mod swapchain; mod window_surface; use command_buffer::*; use context::*; use imgui::Key; use imgui_winit_support::{HiDpiMode, WinitPlatform}; use spark::{vk, Builder}; use std::collections::HashMap; use std::env; use std::f32::consts::PI; use std::ffi::CStr; use std::mem; use std::sli...
#![cfg_attr(not(feature = "std"), no_std)] use frame_support::{Parameter, decl_module, decl_event, decl_storage, decl_error, ensure, dispatch, debug}; use frame_support::{ weights::{Weight, GetDispatchInfo, Pays}, traits::{UnfilteredDispatchable, Currency, ReservableCurrency}, dispatch::DispatchResultWithPostInf...
//! This module provides block-aligned buffers. //! //! There are three public buffer types, [Buf], [MutBuf], and [BufWrite]. They can be converted into //! each other without reallocation of the backing buffer. //! //! [Buf] and [MutBuf] are shared (Arc) and splittable, for immutable and mutable access, respectively. ...
//! Decoding and Encoding of JPEG Images //! //! JPEG (Joint Photographic Experts Group) is an image format that supports lossy compression. //! This module implements the Baseline JPEG standard. //! //! # Related Links //! * <http://www.w3.org/Graphics/JPEG/itu-t81.pdf> - The JPEG specification //! extern crate byteor...
use std::collections::HashMap; use std::fmt::Debug; use std::fs::File; use std::io::BufWriter; use std::path::{Path, PathBuf}; use std::sync::{mpsc, Arc}; use std::time::Duration; use std::{fs, thread}; use aho_corasick::AhoCorasick; use anyhow::{anyhow, bail, Context, Result}; use atom_syndication::{ContentBuilder, E...
// Rust warnings #![forbid(unsafe_code)] #![deny(future_incompatible)] #![deny(nonstandard_style)] #![deny(rust_2018_idioms)] // Rustdoc Warnings #![deny(broken_intra_doc_links)] //! Buffer belt abstraction for wgpu supporting UMA optimization, automatic resizing, and a bind group cache. //! //! ## Example //! //! ```...
// Copyright 2020 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This library must remain platform-agnostic because it used by a host tool and within Fuchsia. use { anyhow::{anyhow, Context, Result}, fidl_fuc...
use std::num::NonZeroUsize; use clap::ArgEnum; use serde::Deserialize; use serde::Serialize; use strum::Display; use strum::EnumString; use crate::custom_layout::Column; use crate::custom_layout::ColumnSplit; use crate::custom_layout::ColumnSplitWithCapacity; use crate::CustomLayout; use crate::DefaultLayout; use cra...
use super::*; use super::config; use super::process::elf_file::{ElfFile, ProgramHeaderExt}; use super::user_space_vm::{UserSpaceVMManager, UserSpaceVMRange, USER_SPACE_VM_MANAGER}; use super::vm_manager::{ VMInitializer, VMManager, VMMapAddr, VMMapOptions, VMMapOptionsBuilder, VMRemapOptions, }; use super::vm_perm...
//! Generates API documentation for a humble specification file // Reading this file, you should be aware that we use `format!(include_str!(...), ...)` // as a simple HTML template engine. Since `format!` does not support loops, // listings are generated using `...map(|thing| format!(include_str!(...), ...)).join("")`...
use std::collections::BTreeMap; use std::fmt::{self, Display}; use std::path::{Path, PathBuf}; use std::str::FromStr; pub mod deserialization; pub mod serialization; pub use deserialization::ImportError; const DEFAULT_CONFIG_CONTENT: &str = include_str!("../default_config.toml"); /// Produce a unique instance of th...
use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; use std::cmp; use std::io::{self, Error, ErrorKind, Read, Write}; use super::icontype::{Encoding, IconType, OSType}; use super::image::{Image, PixelFormat}; /// The length of an icon element header, in bytes: const ICON_ELEMENT_HEADER_LENGTH: u32 = 8; /// The ...
//- // Copyright (c) 2017 <NAME> // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHO...
extern crate regex; use scheme::LispResult; use scheme::error::LispError; use scheme::value::Sexp; use std::error::Error; use std::io::{self, Stdin, BufRead, Write}; use std::cell::RefCell; use std::rc::Rc; use std::str; use self::regex::Regex; #[derive(Debug, PartialEq, Clone)] enum Token { EndOfFile, Quot...
use anyhow::{anyhow, bail, Result}; use fgoxide::io::Io; use itertools::Itertools; use log::*; use regex::RegexBuilder; use std::collections::HashSet; use std::fmt::{Display, Formatter}; use std::path::Path; /// Guides can either target essential genes, non-essential genes, control sequences /// or other genes. #[deri...
use crate::constants::*; use std::ops::Deref; use std::sync::{Arc, RwLock}; use std::task::Poll; /// A type to encode 64 Curl states in a compressed way that is optimal for parallel processing. /// It uses only 2 bits intead of 8 to represent a trit as with `i8`, and therefore can store 8 /// trits per 2 bytes (4 tri...
//! Parsers for character-separated formats like csv. mod error_buffer; mod w3c_extended_log; use self::error_buffer::ParseErrorBuffer; use crate::config::{ csv::{CharacterSeparatedConfig, LineEnding}, ParseConfig, }; use crate::format::projection::{build_projections, Projection, Projections}; use crate::form...
/// Audio for GBA mod fifo; mod gb; mod resampler; use bitflags::bitflags; use crossbeam_channel::Sender; use dasp::frame::Stereo; use crate::common::{ meminterface::MemInterface8, bits::u8, bytes::u16 }; use gb::*; pub use resampler::Resampler; bitflags! { #[derive(Default)] struct ChannelEnabl...
//! Logic for dealing with chunks of entities. use std::alloc::Layout; use std::cmp::{Ord, Ordering}; use std::convert::TryFrom; use std::fmt::Debug; use std::ops::{Bound, RangeBounds}; use std::ptr::{self, NonNull}; use std::sync::{Arc, atomic}; use bit_vec::BitVec; use crate::{Archetype, EntityID, GenerationID}; u...
//! Types and utilities for the intermediate representation between the rust code //! and the target language code. use common; use std::collections::BTreeMap; use syntax::ast; use syntax::print::pprust; use syntax::ptr; // TODO: replace whit macro with the ? operator one we upgrade to rust 1.22 macro_rules! try_opt ...
use crate::bets::{BetError, Bets, AccountUpdate}; use crate::front::{bet_stub, options_display, update_options, Front, FrontError}; use crate::{CURRENCY, INCOME, INTERVAL, STARTING_COINS, handler_utils::*}; use std::sync::{atomic::AtomicBool, Arc}; use itertools::Itertools; use serenity::http::CacheHttp; use serenity::...
#![allow(dead_code)] use { super::*, crate::ipc::*, crate::object::*, alloc::sync::Arc, alloc::vec, alloc::vec::Vec, core::mem::size_of, core::time::Duration, futures::channel::oneshot, futures::pin_mut, kernel_hal::UserContext, spin::Mutex, }; /// Kernel-owned exception channel endpoint. pub struct Excep...
use crate::{ Result, model::Content, }; use byteordered::Endian; use failure::ResultExt; use msbt::Header; use serde_derive::{Deserialize, Serialize}; use std::{ boxed::Box, io::{Cursor, Write}, }; pub mod zero; pub mod one; pub mod two; pub mod three; pub mod four; pub mod five; pub mod two_hundred_one; pub ...
//! Assertion-related things //! //! Assertions *Require* the following (from <http://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf> 2.3.3 Element Assertion): //! * Version - The version of this assertion. The identifier for the version of SAML defined in this specification is "2.0". SAML versioning is d...
use anyhow::{anyhow, bail}; use futures::{ channel::{mpsc, oneshot}, pin_mut, select_biased, FutureExt, SinkExt, StreamExt, }; use shadow_clone::shadow_clone; use std::{io, mem, path::PathBuf, time::Duration}; use tokio::{fs::File, io::AsyncReadExt, sync::watch}; use tracing::{debug, error, info, warn}; use tru...
use crate::protobuf::EvaluationData; use crate::Result; use byteorder::{BigEndian, ByteOrder, ReadBytesExt, WriteBytesExt}; use md5; use std::collections::BTreeMap; use std::fmt; use std::hash::{Hash, Hasher}; use std::io::{Read, Write}; use std::str::FromStr; use trackable::error::{Failed, Failure}; /// Model specifi...
//! Helpers to log traces for PAG construction from timely & differential. //! //! To log a computation, see `Adapter`'s docstring. If `SNAILTRAIL_ADDR=<IP>:<Port>` //! is set as env variable, the computation will be logged online via TCP. //! //! Replay a log trace with `replay_into` or `replay_throttled`. use std::{...
// Copyright (c) 2018 King's College London // created by the Software Development Team <http://soft-dev.org/> // // The Universal Permissive License (UPL), Version 1.0 // // Subject to the condition set forth below, permission is hereby granted to any // person obtaining a copy of this software, associated documentati...
//! Single client connection use std::fmt; use std::future::Future; use std::pin::Pin; use std::sync::Arc; use crate::solicit::end_stream::EndStream; use crate::solicit::header::*; use crate::AnySocketAddr; use crate::HttpScheme; use tls_api::AsyncSocket; use tls_api::TlsConnectorBox; use tls_api; use crate::solic...
// Copyright © 2016, <NAME> // Licensed under the MIT License <LICENSE.md> use super::*; ENUM!{enum D3D11_SHADER_VERSION_TYPE { D3D11_SHVER_PIXEL_SHADER = 0, D3D11_SHVER_VERTEX_SHADER = 1, D3D11_SHVER_GEOMETRY_SHADER = 2, D3D11_SHVER_HULL_SHADER = 3, D3D11_SHVER_DOMAIN_SHADER = 4, D3D11_SHVER_CO...
/* Copyright 2021 BlazifyOrg 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...
//! Intrinsics and other functions that the miri engine executes without //! looking at their MIR. Intrinsics/functions supported here are shared by CTFE //! and miri. use rustc::mir::{ self, interpret::{ConstValue, GlobalId, InterpResult, Scalar}, BinOp, }; use rustc::ty; use rustc::ty::layout::{LayoutOf,...
//! An example showing runtime dispatch to an architecture-optimized //! implementation. //! //! This program implements hex encoding a slice into a predetermined //! destination using various different instruction sets. This selects at //! runtime the most optimized implementation and uses that rather than being //! r...
#![crate_name = "uu_cut"] /* * This file is part of the uutils coreutils package. * * (c) <NAME> <<EMAIL>> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ #[macro_use] extern crate uucore; use std::fs::File; use std::io::{stdin,...
// Copyright 2012-2016 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-MI...
#![allow(trivial_numeric_casts)] //! Embedding fonts in 2D for Pdf use lopdf; use lopdf::{Stream as LoStream, Dictionary as LoDictionary}; use lopdf::StringFormat; use owned_ttf_parser::{AsFaceRef as _, Face, OwnedFace}; use std::collections::BTreeMap; use std::iter::FromIterator; use {Error, PdfError}; /// The font ...
// 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 crate::backend::render::{RenderBackend, ShapeHandle}; use crate::display_object::{DisplayObject, DisplayObjectBase}; use crate::player::{RenderContext, UpdateContext}; use crate::prelude::*; use swf::Twips; #[derive(Clone, Debug)] pub struct MorphShape<'gc> { base: DisplayObjectBase<'gc>, static_data: gc_a...
use byteorder::{LittleEndian, ReadBytesExt}; use std::convert::TryFrom; use std::io; use std::io::{Read, Seek}; use crate::color::{ColorType, ExtendedColorType}; use crate::error::{ImageError, ImageResult, UnsupportedError, UnsupportedErrorKind}; use crate::image::{ImageDecoder, ImageFormat, ImageReadBuffer}; enum Im...
use std::cmp::Reverse; use big_s::S; use heed::EnvOpenOptions; use itertools::Itertools; use maplit::hashset; use milli::update::{Settings, UpdateBuilder, UpdateFormat}; use milli::{AscDesc, Criterion, Index, Search, SearchResult}; use rand::Rng; use Criterion::*; use crate::search::{self, EXTERNAL_DOCUMENTS_IDS}; c...
/*! # Serial Peripheral Interface ## Alternate function remapping ### SPI1 | Function | Spi1NoRemap | Spi1Remap | |:----:|:-----------:|:---------:| | SCK | PA5 | PB3 | | MISO | PA6 | PB4 | | MOSI | PA7 | PB5 | ### SPI2 | Function | Spi2NoRemap | |:----...
/* ************************************************************************ ** ** This file is part of rsp2, and is licensed under EITHER the MIT license ** ** or the Apache 2.0 license, at your option. ** ** ** ** ...
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 /*! Download Amazon EBS snapshots. */ use async_trait::async_trait; use futures::stream::{self, StreamExt}; use indicatif::ProgressBar; use rusoto_ebs::{Ebs, EbsClient}; use rusoto_ebs::{GetSnapshotBlockReques...
// Copyright 2020 Contributors to the Parsec project. // SPDX-License-Identifier: Apache-2.0 use std::{ convert::{TryFrom, TryInto}, env, str::FromStr, sync::Once, }; use tss_esapi::{ abstraction::{cipher::Cipher, pcr::PcrData}, attributes::{ObjectAttributesBuilder, SessionAttributesBuilder}, ...
// Copyright (c) The Starcoin Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{ensure, format_err, Result}; use once_cell::sync::Lazy; use serde::{Deserialize, Serialize}; use starcoin_accumulator::node::AccumulatorStoreType; use starcoin_accumulator::{Accumulator, MerkleAccumulator}; use starcoin...
// Copyright 2020-2021 <NAME> // SPDX-License-Identifier: Apache-2.0 use core::convert::TryInto as _; use core::fmt::Display; use core::fmt::Error as FmtError; use core::fmt::Formatter; use core::fmt::Result as FmtResult; use identity_core::common::Object; use identity_core::common::Url; use identity_core::convert::To...
use crate::config::dfinity::CONFIG_FILE_NAME; use crate::lib::environment::Environment; use crate::lib::error::{DfxError, DfxResult}; use crate::lib::manifest::{get_latest_version, is_upgrade_necessary}; use crate::util::assets; use crate::util::clap::validators::project_name_validator; use anyhow::{anyhow, bail, Cont...
// 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. use { crate::common_operations::allowed_ops, crate::target::{AvailableTargets, TargetOps}, clap::{App, Arg}, log::error, std::{env, ffi...
//! The catalog.rs provides the functionality to parse a CATALOG.031 file. It tries to use the //! nomenclature from the S-57 data specification found in the Annex A section of //! [`S-57 Specification`](http://iho.int/iho_pubs/standard/S-57Ed3.1/31Main.pdf). When reading it, remember to also keep //! the maintenance d...
//! Field arithmetic modulo p = 2^256 - 2^32 - 2^9 - 2^8 - 2^7 - 2^6 - 2^4 - 1 use crate::{ arithmetic::util::{adc64, mac64, mac64_typemax, sbb64}, FieldBytes, }; use elliptic_curve::subtle::{Choice, ConditionallySelectable, ConstantTimeEq, CtOption}; #[cfg(feature = "zeroize")] use elliptic_curve::zeroize::Z...
use std::fmt; /// Represents an Array Interface type-string. /// /// This is more or less the `DType` of a scalar type. /// Exposes a `FromStr` impl for construction, and a `Display` impl for writing. /// /// ``` /// # fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> { /// use npyz::TypeStr; /// /// l...
// This file is part of the uutils coreutils package. // // (c) <NAME> <<EMAIL>> // (c) <NAME> <<EMAIL> AT <EMAIL>> // // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. // spell-checker:ignore (ToDO) filetime strptime utcoff strs datetime MMD...
// 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 ...
// //! Copyright 2022 Alibaba Group Holding 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 appl...
// Copyright 2021 Google LLC // // 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 ...
use crate::{ bindings::{kernel::user_regs_struct, thread_db}, kernel_abi::SupportedArch, log::LogDebug, remote_ptr::{RemotePtr, Void}, session::task::TaskSharedPtr, thread_group::ThreadGroup, }; use libc::pid_t; use std::{ collections::{BTreeMap, BTreeSet}, ffi::{c_void, CStr, OsStr, OsS...
//! Helper module to submit transactions into the zkSync Network. // Built-in uses use std::fmt::Display; // External uses use bigdecimal::BigDecimal; use chrono::Utc; use futures::{ channel::{mpsc, oneshot}, prelude::*, }; use num::{bigint::ToBigInt, BigUint}; use thiserror::Error; // Workspace uses use zks...
use crate::entities_query_executor::EntitiesQueryExecutor; use crate::entity::Entity; use crate::entity_relationship::EntityRelationship; use crate::entity_relationship_kind::EntityRelationshipKind; use crate::semantic_change::{RelationshipChange, SemanticChange}; use crate::{entities_query::EntitiesQuery, entity_relat...
//! A disassembler for RISC-V binaries. //! NOTE: For research purposes, we have defered the engineering of //! the disassembler. We are currently relying on the objdump to //! disassemble the binary for us and parsing a very specific //! format of the objdump output. use pest::Parser; use std::collections::HashSet; u...
use futures::future; use hyper::rt::Future; use hyper::{Body, Method, Request, Response, StatusCode}; use crate::path::clean_path; use std::collections::BTreeMap; use std::ops::Index; use std::path::Path; use tokio_fs; use tokio_io; use crate::tree::Node; use std::error::Error as StdError; // TODO: think more about wh...
use core::math; use core::quat; use core::vector; use std; use std::fmt; use std::fmt::Display; use std::ops::{Mul, Index, IndexMut}; /** A 4x4 matrix in row-major order. */ #[derive(Clone)] pub struct Mat { pub storage: [[f32; 4]; 4], } impl Mat { pub fn new(data: [[f32; 4]; 4]) -> Mat { Self {stora...
use std::borrow::Cow; use std::collections::BTreeMap; use async_std::fs; use async_std::io::prelude::WriteExt; use async_std::io; use async_std::path::{Path, PathBuf}; use async_std::stream::StreamExt; use colorful::Colorful; use edgedb_client::client::Connection; use edgedb_client::errors::{Error, QueryError}; use ed...
//! 渲染目标分配器 use std::{hash::{Hash, Hasher}, collections::hash_map::Entry, intrinsics::transmute, num::NonZeroU32, ops::Deref}; use guillotiere::{Size, Allocation, Rectangle}; use pi_assets::{asset::{Handle, Droper}, mgr::AssetMgr}; use pi_share::{Share, ShareWeak, ShareRwLock}; use pi_slotmap::{DefaultKey, Slo...
use crate::{ data::{Boss, Food, FoodProc, Utility}, reminder::Reminder, tracking::{entry::BuffState, Encounter, Tracker}, win, }; use arc_util::{ api::{BuffRemove, StateChange}, exports, game::Player, settings::{HasSettings, Settings}, ui::{align::LeftAlign, Component, Hideable, Wind...
// Copyright 2017 <NAME> <<EMAIL>> <<EMAIL>> use std::cell::{Cell, RefCell}; use std::collections::HashMap; use std::marker::PhantomData; use std::rc::Rc; use num::Integer; use gdk; use gtk; use gtk::prelude::*; use pw_gix::gtkx::list_store::*; use pw_gix::gtkx::menu::*; use pw_gix::gtkx::tree_view_column::*; use p...
// 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-BSD-3-Clause file. // // Copyright © 2019 Intel Corporation // // SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause extern crate devices; extern crate pci...
/* * Copyright 2018-2020 TON DEV SOLUTIONS LTD. * * Licensed under the SOFTWARE EVALUATION License (the "License"); you may not use * this file except in compliance with the License. * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASI...
use std::fmt; use clap::{clap_app, Arg}; use math::stats::{mean, n_choose_2, standard_deviation, sum_of_squares_f32}; use ndarray::{s, Array, Axis, Ix2}; use ndarray_rand::RandomExt; use num_traits::Float; //use saber::trace_estimator::{estimate_gxg_dot_y_norm_sq, // estimate_gxg_gram_trace, estimate_gxg_kk_trace}; us...
use crate::{ ds::{InvalidFieldName, InvalidId}, Kserd, Value, }; use std::{error, fmt}; /// _Convert_ something into a `Kserd`. /// /// This differs to [_encoding_](crate::encode::Encoder) in that the object is _consumed_. This trait /// allows for less copying as data can be _moved_, in the case of strings or...
use chrono::{NaiveDate, NaiveDateTime, NaiveTime, TimeZone, UTC}; use chrono::prelude::*; use errors::*; use futures::{Poll, Stream}; use serde::de::{Deserialize, Deserializer, Error as DeserializeError, SeqVisitor, Visitor}; use std::iter::Cloned; use std::ops::Range; use std::slice; use std::sync::Arc; use std::sync:...
//! Blockchain protocol implementation. //! This is an implementation of a p2p protocol to synchronize //! mempool transactions and blocks. use core::convert::AsRef; use core::hash::Hash; use std::collections::hash_map::RandomState; use std::collections::{HashMap, HashSet}; use std::fmt::Debug; use std::time::Instant;...
use super::db; use super::schema::pauth::pw_reset; use super::schema::pauth::user_login_tokens; use super::schema::pauth::users; use crate::pauth_error::ApplicationError; use chrono::{NaiveDateTime, Utc}; use diesel::expression::exists::exists; use diesel::sql_types::Text; use diesel::{prelude::*, select, RunQueryDsl};...
//! Data structures used by the JSON-RPC API methods. use crate::core::{StarknetBlockHash, StarknetBlockNumber}; use serde::{Deserialize, Serialize}; /// Special tag used when specifying the `latest` or `pending` block. #[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq)] #[serde(deny_unknown_fields)] pub ...
//! # Replace Pallet //! Based on the [specification](https://interlay.gitlab.io/polkabtc-spec/spec/replace.html). #![deny(warnings)] #![cfg_attr(test, feature(proc_macro_hygiene))] #![cfg_attr(not(feature = "std"), no_std)] #[cfg(any(feature = "runtime-benchmarks", test))] mod benchmarking; mod default_weights; pub...
// Licensed to Elasticsearch B.V under // one or more agreements. // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information use crate::{ffi::E_FAIL, profiler::types::Integration}; use com::sys::HRESULT; use log::LevelFilter; use log4rs...
use num_derive::FromPrimitive; use crate::attribute::Attribute; use crate::character::character_common_data::CharacterCommonData; use crate::character::character_sub_stat::CharacterSubStatFamily; use crate::character::{CharacterConfig, CharacterName, CharacterStaticData}; use crate::character::skill_config::CharacterSk...
//! [STL] parser. //! //! [STL]: https://en.wikipedia.org/wiki/STL_(file_format) use std::{fmt, io, mem, str}; use rustc_hash::FxHashMap; use crate::{error::invalid_data, Mesh, Vec3}; /// Parses a mesh from bytes of binary or ascii STL. #[inline] pub fn from_slice(bytes: &[u8]) -> io::Result<Mesh> { from_slice_...
use std::io::BufReader; use std::io::BufRead; use std::fs::File; use std::fmt::Write; use std::cell::RefCell; use std::cell::RefMut; //use std::any::Any; use std::rc::Rc; //use std::ops::Deref; use crate::asset::{AssetHandle, asset_hndl_new_load, asset_hndl_ptr}; use crate::engine::{Vec2, Vec3, Vec4, gl_check_error};...
use std::path::PathBuf; use anyhow::{anyhow, Context, Result}; use clap::value_t; use dialoguer::{Confirm, Input, Editor, MultiSelect}; use git2::{Branch, Repository}; use graphql_client::GraphQLQuery; use serde::Deserialize; use slugify::slugify; use crate::cmds::issue::generate_basic_issue_builder; use crate::conf...
use dashmap::mapref::entry::Entry; use eyre::Report; use image::{png::PngEncoder, ColorType, GenericImageView, ImageBuffer}; use rand::Rng; use rosu_v2::prelude::{CountryCode, GameMode, GameMods, Grade, Username}; use std::{fmt::Write, time::Duration}; use tokio::time::sleep; use twilight_model::{ application::{ ...
use std::collections::HashMap; use std::path::Path; use syntect::highlighting::ThemeSet; use syntect::parsing::syntax_definition::{ ContextReference, MatchOperation, MatchPattern, Pattern, SyntaxDefinition, }; use syntect::parsing::{Scope, SyntaxSet, SyntaxSetBuilder}; use crate::assets::*; mod graphviz_utils; t...
use crate::layout::classdef::ClassDef; use crate::layout::coverage::Coverage; use crate::layout::valuerecord::{ValueRecord, ValueRecordFlags}; use crate::tables::GPOS::GPOSSubtable; use crate::types::*; use crate::Deserializer; use otspec_macros::Serialize; #[derive(Debug, PartialEq, Clone, Serialize)] #[allow(missing...
//! # css-inline //! //! A crate for inlining CSS into HTML documents. When you send HTML emails, you need to use "style" //! attributes instead of "style" tags. //! //! For example, this HTML: //! //! ```html //! <html> //! <head> //! <title>Test</title> //! <style>h1 { color:blue; }</style> //! ...
// EndBASIC // Copyright 2021 <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 agre...
use terminus_macros::*; use terminus_global::*; use num_enum::{IntoPrimitive, TryFromPrimitive}; use std::rc::Rc; use std::cell::RefCell; use std::fmt::{Display, Formatter}; use std::io::Write; use terminus_spaceport::irq::IrqVec; use crate::devices::bus::Bus; use std::mem::MaybeUninit; pub mod decode; pub mod insn; ...
// Characters and their corresponding confusables were collected from // http://www.unicode.org/Public/security/10.0.0/confusables.txt use syntax_pos::{Span, NO_EXPANSION}; use errors::{Applicability, DiagnosticBuilder}; use super::StringReader; const UNICODE_ARRAY: &[(char, &str, char)] = &[ ('
', "Line Separato...
// Copyright 2020-2021 The Datafuse Authors. // // SPDX-License-Identifier: Apache-2.0. // Borrow from apache/arrow/rust/datafusion/src/functions.rs // See notice.md use std::convert::TryFrom; use std::fmt; use std::iter::repeat; use std::ops::Deref; use std::sync::Arc; use common_arrow::arrow::array::*; use common_...
// 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. //! Test utilities for starting a pkgfs server. use { anyhow::{Context as _, Error}, fdio::{SpawnAction, SpawnOptions}, fidl::endpoints::Clien...
/* This file is part of TON OS. TON OS is free software: you can redistribute it and/or modify it under the terms of the Apache License 2.0 (http://www.apache.org/licenses/) Copyright 2019-2021 (c) TON LABS */ use std::sync::Arc; use serde_json::Value as JsonValue; use serde::{ Serialize, Serial...
// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Analysis which computes information needed in backends for monomorphization. This //! computes the distinct type instantiations in the model for structs and inlined functions. //! It also eliminates type quantification (`forall coin...