text stringlengths 9.08k 47.9k |
|---|
use crate::resolver::Resolver;
use regex::Regex;
use sha1::{Digest, Sha1};
use std::{cell::RefCell, path::Path, rc::Rc};
use swc_common::{SourceMap, Span, DUMMY_SP};
use swc_ecma_ast::*;
use swc_ecma_utils::quote_ident;
use swc_ecma_visit::{noop_fold_type, Fold, FoldWith};
lazy_static! {
pub static ref RE_CSS_MODULE... |
use std::f32;
use std::mem;
use std::os::raw::c_void;
use std::path::Path;
use std::ptr;
use cgmath::{self, Array, InnerSpace, Matrix4, SquareMatrix, Vector4, Zero};
use gl;
use gl::types::*;
use hyperplane::Hyperplane;
use math;
use polychora::{Definition, Polychoron};
use program::Program;
use tetrahedron::Tetrahed... |
use crate::Context;
use crate::rbsp::BitRead;
use crate::rbsp::BitReaderError;
use crate::nal::pps::{ParamSetId, PicParameterSet};
use crate::nal::pps;
use crate::nal::sps;
use crate::nal::sps::SeqParameterSet;
use crate::nal::NalHeader;
#[derive(Debug,PartialEq)]
enum SliceFamily {
P,
B,
I,
SP,
S... |
use crate::common::BitArray;
use crate::qrcode::decoder::{ErrorCorrectionLevel, Version};
use crate::qrcode::encoder::{ByteMatrix, MaskUtil, QRCode};
pub struct MatrixUtil;
impl MatrixUtil {
const POSITION_DETECTION_PATTERN: [[i32; 7]; 7] = [
[1, 1, 1, 1, 1, 1, 1],
[1, 0, 0, 0, 0, 0, 1],
[... |
use crate::mechanics::car::Car;
use crate::mechanics::Queue;
use crate::{AgentID, AlertLocation, CarID, Command, Event, Scheduler, Speed};
use abstutil::{deserialize_btreemap, retain_btreeset, serialize_btreemap};
use geom::{Duration, Time};
use map_model::{
ControlStopSign, ControlTrafficSignal, IntersectionID, La... |
// Copyright 2018 <NAME>
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those... |
//! # twilight-cache-inmemory
//!
//! [![discord badge][]][discord link] [![github badge][]][github link] [![license badge][]][license link] ![rust badge]
//!
//! `twilight-cache-inmemory` is an in-process-memory cache for the
//! [`twilight-rs`] ecosystem. It's responsible for processing events and
//! caching things ... |
//! A near-direct port of the original C implementation, available in the [insecure implementation](https://github.com/mitre-cyber-academy/2021-ectf-insecure-example/blob/master/controller/controller.c).
//!
//! As described in the [crate documentation](..), this implementation is modularised to support
//! changes nec... |
// Copyright 2021. The Tari Project
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
// following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
// disclai... |
// Copyright 2016 <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 writi... |
macro_rules! lazy_url {
($url:literal $(,)?) => {
::once_cell::sync::Lazy::new(|| $url.parse().unwrap());
};
}
macro_rules! static_url {
($url:literal $(,)?) => {{
static URL: ::once_cell::sync::Lazy<::url::Url> = lazy_url!($url);
&*URL
}};
}
macro_rules! lazy_selector {
($... |
use super::syntax_definition::*;
use super::scope::*;
use onig::{self, Region};
use std::usize;
use std::collections::{HashMap, HashSet};
use std::i32;
use std::hash::BuildHasherDefault;
use std::ptr;
use fnv::FnvHasher;
/// Keeps the current parser state (the internal syntax interpreter stack) between lines of parsin... |
use super::{Include, Relationship, Subquery};
use crate::entity::alias::Alias;
use crate::entity::genre::Genre;
use crate::entity::rating::Rating;
use crate::entity::relations::Relation;
use crate::entity::tag::Tag;
use crate::entity::BrowseBy;
use lucene_query_builder::QueryBuilder;
/// The "type" of a MusicBrainz w... |
#![recursion_limit = "1024"]
#[macro_use]
extern crate bitflags;
extern crate byteorder;
#[macro_use]
extern crate error_chain;
#[macro_use]
extern crate log;
mod errors;
#[allow(non_snake_case, non_camel_case_types, dead_code)]
#[allow(non_upper_case_globals)]
mod sys {
include!("bindings.rs");
// from tro... |
use super::{
cgroups,
config::{Config, RepositoryType},
console::Request,
error::Error,
mount::{MountControl, MountInfo},
process::Launcher,
repository::{DirRepository, MemRepository},
stats::ContainerStats,
Container, ContainerEvent, Event, EventTx, ExitStatus, NotificationTx, Pid, ... |
//! Contains m68k-specific types
use core::convert::From;
use core::{cmp, fmt, slice};
use capstone_sys::{
cs_m68k, cs_m68k_op, cs_m68k_op__bindgen_ty_1, m68k_address_mode, m68k_cpu_size, m68k_fpu_size,
m68k_op_br_disp, m68k_op_mem, m68k_op_size, m68k_op_type, m68k_reg, m68k_size_type,
};
// XXX todo(tmfink)... |
mod addressing;
mod instructions;
mod status;
use crate::bus::{Bus, Device};
use crate::cpu::status::Status;
const STACK_BASE: u16 = 0x0100;
#[derive(Default)]
pub struct Cpu {
/// CPU registers
a: u8,
x: u8,
y: u8,
pc: u16,
sp: u8,
status: Status,
/// Implementation specific
cyc... |
// Copyright 2021 <NAME> <<EMAIL>>
// SPDX-License-Identifier: MIT OR Apache-2.0
use crate::attribute_value::{
NtfsAttributeListNonResidentAttributeValue, NtfsAttributeValue, NtfsNonResidentAttributeValue,
NtfsResidentAttributeValue,
};
use crate::error::{NtfsError, Result};
use crate::file::NtfsFile;
use crat... |
// Copyright 2017-2019 Parity Technologies (UK) Ltd.
// This file is part of Substrate.
// Substrate 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 option) a... |
#[cfg(test)]
mod test_context;
#[cfg(test)]
mod test_steps;
#[cfg(test)]
mod tests;
use crate::workflows::definitions::{WorkflowDefinition, WorkflowStepDefinition};
use crate::workflows::steps::factory::WorkflowStepFactory;
use crate::workflows::steps::{
StepFutureResult, StepInputs, StepOutputs, StepStatus, Workf... |
use ic_canister_sandbox_common::protocol;
use ic_canister_sandbox_common::protocol::id::{MemoryId, WasmId};
use ic_canister_sandbox_common::protocol::sbxsvc::MemorySerialization;
use ic_canister_sandbox_common::protocol::structs::SandboxExecInput;
use ic_canister_sandbox_common::sandbox_service::SandboxService;
use ic_... |
use std::mem;
//use cocoa::base::{id};
use cocoa::appkit::{NSView};
use cocoa::foundation::{NSAutoreleasePool, NSUInteger, NSRange};
use core_graphics::geometry::CGSize;
use objc::{msg_send, sel, sel_impl};
use objc::runtime::YES;
use metal::*;
use crate::cx_cocoa::*;
use crate::cx::*;
impl Cx {
pub fn rende... |
//! Types related to a time zone.
mod rule;
pub use rule::*;
use crate::datetime::{days_since_unix_epoch, is_leap_year};
use crate::error::*;
use crate::parse::*;
use crate::utils::*;
use crate::UtcDateTime;
use std::cmp::Ordering;
use std::convert::TryInto;
use std::fmt;
use std::fs::{self, File};
use std::io::{se... |
// Copyright 2015-2016 Mozilla Foundation. See the COPYRIGHT
// file at the top-level directory of this distribution.
//
// 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 you... |
// Copyright 2018-2019 Parity Technologies (UK) Ltd.
// This file is part of Substrate.
// Substrate 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 option) a... |
use std::{
sync::mpsc::{channel, Receiver, Sender},
time::Duration,
};
use heck::TitleCase;
use log::{info, trace};
use mq::{color::Color, math::Vec2};
use ui::{self, Gui, Widget};
use zscene::{action, Action, Boxed};
use crate::{
assets,
core::{
battle::{
self,
abilit... |
use std::fmt::{self, Debug};
use indexmap::{IndexMap, IndexSet};
use log::*;
use crate::{unionfind::UnionFind, Dot, EClass, ENode, Id, Language, Metadata, RecExpr};
/** A data structure to keep track of equalities between expressions.
# What's an egraph?
An egraph ([/'igraf/][sound]) is a data structure to maintai... |
use rayon::prelude::*;
use std::collections::{HashMap, HashSet};
//Imports Arc:
use std::sync::{Arc, Mutex};
#[derive(Debug, PartialEq, Clone)]
pub struct Sentence {
pub index: usize,
pub length: usize,
pub outgoing_connections: Option<HashMap<usize, usize>>, //first represents sentence index, second repre... |
#[cfg(not(feature = "library"))]
use cosmwasm_std::entry_point;
use cosmwasm_std::{
attr, to_binary, Addr, Attribute, Binary, CanonicalAddr, CosmosMsg, Decimal, Deps, DepsMut,
Env, MessageInfo, Reply, ReplyOn, Response, StdError, StdResult, SubMsg, Uint128, WasmMsg,
};
use crate::querier::{load_mint_asset_con... |
// Code by <NAME> (<EMAIL>)
// https://gitlab.com/ideasman42/rust-simple-examples/blob/master/polyfill_2d
// Which in turn came from LibGDX
/**
* A simple implementation of the ear cutting algorithm
* to triangulate simple polygons without holes.
*
* \note
*
* Changes made for Blender.
*
* - loop the array to... |
// Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of Substrate.
// Substrate 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 option) a... |
#![allow(dead_code)]
use std::rc::Rc;
use std::collections::HashMap;
use std::mem::replace;
use parser::{AST, Symbol, Info};
use typing::{symbol_table::SymbolTable, VariableKind, Type};
// byte code size
// byte code + argument size
// byte code + argument + argument size
pub const BCSIZE: usize = 1;
pub const BCASI... |
#![cfg(feature = "googlevr")]
use {VRDisplay, VRDisplayData, VRDisplayCapabilities, VRFramebuffer, VRFramebufferAttributes,
VREvent, VRDisplayEvent, VREyeParameters, VRFrameData, VRLayer, VRViewport};
use super::service::GoogleVRService;
use rust_webvr_api::utils;
#[cfg(target_os="android")]
use rust_webvr_api::jni... |
//!
//! Macros for generating wrappers for rust functions.
//
// We can invoke the #[extendr] macro on functions or struct impls.
//
// eg.
//
// ```ignore
// #[extendr]
// fn hello() -> &'static str {
// "hello"
// }
// ```
//
// These macros add additional functions which you can see using the
// `cargo expand` ... |
//! A slideshow of ten graphs examples from the `plotters` crate.
//!
//! sources: <https://github.com/38/plotters/tree/master/examples>
//!
//! Run with:
//! ```sh
//! cargo re plotters-examples --features="plotters"
//! ```
use notcurses::*;
fn main() -> NResult<()> {
let mut nc = Notcurses::new()?;
let geo... |
/*
* Copyright 2019 OysterPack 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 applicabl... |
// Copyright 2017 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 ... |
#![allow(unused_imports)]
use std::fmt;
use std::collections::{HashMap, BTreeSet};
use super::locations2::*;
use super::zones::*;
use super::dungeons::*;
use super::logic::*;
use super::items::*;
type CanPassClosure = Fn(&Vec<Item>) -> bool + Sync;
pub struct ItemDoor {
pub zone1: Zone,
pub zone2: Zone,
pub r... |
//! The `fullnode` module hosts all the fullnode microservices.
use crate::bank::Bank;
use crate::cluster_info::{ClusterInfo, Node, NodeInfo};
use crate::counter::Counter;
use crate::db_ledger::DbLedger;
use crate::genesis_block::GenesisBlock;
use crate::gossip_service::GossipService;
use crate::leader_scheduler::Lead... |
use crate::b2_body::*;
use crate::b2_fixture::*;
use crate::b2_math::*;
use crate::b2_settings::*;
use crate::b2_shape::*;
use crate::b2_world::*;
use crate::double_linked_list::*;
use crate::linked_list::*;
use std::cell::RefCell;
use std::ptr;
use std::rc::Rc;
pub fn b2_body<D: UserDataType>(bd: &B2bodyDef<D>, worl... |
//! An in-memory network for sharded kitsune tests.
use crate::event::{QueryOpHashesEvt, TimeWindow};
use crate::gossip::sharded_gossip::{BandwidthThrottle, GossipType, ShardedGossip};
use crate::test_util::spawn_handler;
use crate::types::gossip::*;
use crate::types::wire;
use futures::stream::StreamExt;
use ghost_ac... |
//! Txs App submit_tx module
#![forbid(unsafe_code)]
use crate::{
entrypoint::{self, EntryPointTxsCmd},
prelude::app_config,
save_tx::save_tx,
sign_tx::sign_tx, tx_params::TxParams,
};
use anyhow::{Error, anyhow};
use cli::{diem_client::DiemClient, AccountData, AccountStatus};
use diem_json_rpc_types:... |
// Copyright 2021 TiKV Project Authors. Licensed under Apache-2.0.
use std::{
collections::{BTreeMap, HashMap},
path::{Path, PathBuf},
sync::{
atomic::{AtomicBool, AtomicUsize, Ordering},
Arc, RwLock as SyncRwLock,
},
time::Duration,
};
use crate::{endpoint::Task, errors::Error, met... |
use std::any::Any;
use std::fmt::Debug;
use std::sync::Arc;
use std::time::{Duration, Instant};
use rand::{Rng, SeedableRng};
use crate::congestion::bbr::bw_estimation::BandwidthEstimation;
use crate::congestion::bbr::min_max::MinMax;
use crate::connection::RttEstimator;
use super::{Controller, ControllerFactory};
... |
// Copyright 2021 COMIT Network.
//
// 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, di... |
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//! `StreamContainer` is a container for all Streams. It manages the permanent
//! map of all active Streams, as well as a variety of dynamic Stream lists.
// hide warnings from the intrusive_collections crate... |
// 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 anyhow::{Context as _, Error};
use fidl::endpoints::ClientEnd;
use fidl_fuchsia_logger::{
LogFilterOptions, LogListenerSafeMarker, LogRequest, LogR... |
/* Copyright (C) 2017 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
* Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARR... |
use super::Csr;
/// Ordering semantics for atomics.
#[derive(Clone, Copy, PartialEq)]
pub enum Ordering {
Relaxed = 0,
Release = 1,
Acquire = 2,
SeqCst = 3,
}
use core::sync::atomic::Ordering as MemOrder;
impl From<Ordering> for MemOrder {
fn from(ord: Ordering) -> Self {
match ord {
... |
//! 2D shadow mapping for multiple light sources.
//!
//! The implementation follows https://www.gamasutra.com/blogs/RobWare/20180226/313491/Fast_2D_shadows_in_Unity_using_1D_shadow_mapping.php
//! with some modifications.
use golem::{
blend::{BlendEquation, BlendFactor, BlendFunction, BlendMode, BlendOperation},
... |
//
// Copyright (c) Dell Inc., or its subsidiaries. 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
//
use crate::cl... |
// Copyright 2020 Two Sigma Investments, LP.
//
// 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... |
use std::borrow::Cow;
use std::cmp;
use std::fs;
use std::fs::OpenOptions;
use std::io::prelude::*;
use std::io::{self, Error, ErrorKind, SeekFrom};
use std::marker;
use std::path::{Component, Path, PathBuf};
use filetime::{self, FileTime};
use crate::archive::ArchiveInner;
use crate::error::TarError;
use crate::head... |
//! A module dedicated to parsing the names of polytopes into different
//! languages.
//!
//! A great part of the terms we use to describe polytopes are recently coined
//! neologisms and words that haven't entered the wider mathematical sphere.
//! Furthermore, there are some rather large families of words (like thos... |
use crate::high_level_ir::declaration_id::DeclarationId;
use crate::high_level_ir::node_id::TypedModuleId;
use crate::utils::path_string_to_page_name;
use crate::ResolverArena;
use std::collections::HashMap;
use wiz_hir::typed_annotation::TypedAnnotations;
use wiz_hir::typed_decl::{
TypedArgDef, TypedComputedProper... |
// 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... |
//! Frame repeat/muting, spectral amplitude enhancement, and adaptive smoothing.
use std;
use std::f32::consts::PI;
use arrayvec::ArrayVec;
use slice_mip::MapInPlace;
use consts::MAX_HARMONICS;
use frame::Errors;
use descramble::VoiceDecisions;
use params::BaseParams;
use spectral::Spectrals;
/// Values derived fro... |
use crate::frontend::*;
use cranelift::codegen::ir::immediates::Offset32;
use cranelift::prelude::*;
use cranelift_jit::{JITBuilder, JITModule};
use cranelift_module::{DataContext, Linkage, Module};
use std::collections::HashMap;
use std::slice;
/// The basic JIT class.
pub struct JIT {
/// The function builder co... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Flash Memory Address"]
pub fma: FMA,
#[doc = "0x04 - Flash Memory Data"]
pub fmd: FMD,
#[doc = "0x08 - Flash Memory Control"]
pub fmc: FMC,
#[doc = "0x0c - Flash Controller Raw Interrupt Status"]
pub fcris: ... |
// Copyright 2018 Osspial
//
// 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... |
//! A time-space balanced (de)serialization of the filetree.
//!
//! It's optimized for three things:
//!
//! * fast load with little RAM usage and without reallocations;
//!
//! * effective multithreaded yet unique reads of the files in the tree
//! along with automatic workload rebalancing (both on per-folder basis... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
//! Timers monitor a specified thread using the PMU and deliver a signal
//! after a specified num... |
use crate::address::AddressValue;
use crate::disassembly::Error;
use crate::disassembly::IRBuilderArena;
use crate::disassembly::context::ContextDatabase;
use crate::disassembly::pattern::PatternExpression;
use crate::disassembly::symbol::{Constructor, FixedHandle, Symbol, SymbolTable};
use crate::space_manager::SpaceM... |
#![allow(non_snake_case, non_upper_case_globals)]
#![allow(non_camel_case_types)]
//! RCC
//!
//! Used by: stm32mp153, stm32mp157
#[cfg(not(feature = "nosync"))]
pub use crate::stm32mp::peripherals::rcc::Instance;
pub use crate::stm32mp::peripherals::rcc::{RegisterBlock, ResetValues};
pub use crate::stm32mp::periphera... |
#![allow(non_snake_case, non_upper_case_globals)]
#![allow(non_camel_case_types)]
//! OTG
//!
//! Used by: stm32mp153, stm32mp157
#[cfg(not(feature = "nosync"))]
pub use crate::stm32mp::peripherals::otg::Instance;
pub use crate::stm32mp::peripherals::otg::{RegisterBlock, ResetValues};
pub use crate::stm32mp::periphera... |
use crate::mnemonic::Mnemonic;
use crate::msg::Msg;
use crate::public_key::PublicKey;
use crate::utils::bytes_to_hex_str;
use crate::utils::encode_any;
use crate::utils::hex_str_to_bytes;
use crate::{coin::Fee, Address};
use crate::{error::*, utils::contains_non_hex_chars};
use cosmos_sdk_proto::cosmos::crypto::secp256... |
#[macro_use]
extern crate ash;
extern crate cgmath;
extern crate winapi;
extern crate winit;
use std::default::Default;
use std::ffi::{CStr, CString};
use std::ptr;
use ash::{Entry, Instance, Device, vk};
use ash::version::{DeviceV1_0, EntryV1_0, InstanceV1_0, V1_0};
use ash::extensions::{DebugReport, Surface, Swapch... |
//#![forbid(unsafe_code)]
#![cfg_attr(not(debug_assertions), deny(warnings))] // Forbid warnings in release builds
#![warn(clippy::all, rust_2018_idioms)]
mod app;
mod fanatics;
use opencv::core::{bitwise_not, BORDER_CONSTANT, Size_, NORM_L1};
use opencv::photo::{fast_nl_means_denoising_vec};
use platform_dirs::AppDir... |
#![allow(non_snake_case)]
use super::clap;
use super::util;
use super::rand::prelude::*;
use super::serde_json;
use super::serde_json::{Value, Map};
use super::types::*;
use super::qec;
use super::pyo3::prelude::*;
use super::pyo3::types::{IntoPyDict};
use super::blossom_v;
use super::ftqec;
pub fn run_matched_test(m... |
#![allow(dead_code)]
use crate::eval;
use crate::types;
use crate::types::{Direction, KnightHop, Color, GamePhase};
// types, enums, structs
pub type Bitboard = u64;
pub type Bitrank = u8;
#[derive(Debug, PartialEq, Copy, Clone)]
pub struct Pieces {
pub all : Bitboard,
pub king: Bitboard,
pub queens: Bi... |
extern crate khronos_registry_parse;
#[cfg(feature = "opengl")]
use khronos_registry_parse::gl;
#[cfg(feature = "vulkan")]
use khronos_registry_parse::vk;
use std::fs::File;
use std::io::BufReader;
use std::path::{Path, PathBuf};
const URL_REPO: &str = "https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs";
con... |
#![allow(bad_style)]
#![allow(unused)]
#![allow(
clippy::shadow_reuse,
clippy::cast_lossless,
clippy::match_same_arms,
clippy::nonminimal_bool,
clippy::print_stdout,
clippy::use_debug,
clippy::eq_op,
clippy::useless_format
)]
use std::collections::{BTreeMap, HashMap};
use serde::Deseri... |
/// The top-level message sent by the client. Clients must send at least two, and
/// typically numerous `AssistRequest` messages. The first message must
/// contain a `config` message and must not contain `audio_in` data. All
/// subsequent messages must contain `audio_in` data and must not contain a
/// `config` mess... |
//! # Decoding BER
mod config;
mod error;
pub(super) mod parser;
use alloc::{borrow::ToOwned, vec::Vec};
use snafu::*;
use super::identifier::Identifier;
use crate::{
de::Error as _,
types::{
self,
oid::{MAX_OID_FIRST_OCTET, MAX_OID_SECOND_OCTET},
Tag,
},
Decode,
};
pub use ... |
use std::convert::{TryFrom, TryInto};
use std::sync::atomic::{AtomicBool, AtomicU32, Ordering};
use std::sync::Arc;
use std::time::Duration;
use anyhow::Result;
use crossbeam_queue::SegQueue;
use sha2::Digest;
use tokio::sync::mpsc;
use ton_api::{ton, IntoBoxed};
use super::{broadcast_receiver::*, MAX_OVERLAY_PEERS};... |
use serde::{Deserialize, Serialize};
use strum_macros::{EnumCount, EnumIter};
use crate::room::Room;
#[derive(EnumIter, EnumCount, Hash, Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq)]
pub enum Spatula {
// Bikini Bottom
OnTopOfThePineapple,
OnTopOfShadyShoals,
OnTopOfTheChumBucket,
Sp... |
#![warn(
trivial_casts,
trivial_numeric_casts,
unused_extern_crates,
unused_import_braces,
unused_qualifications
)]
#![deny(
broken_intra_doc_links,
missing_debug_implementations,
missing_docs,
unused
)]
//! Low-level graphics abstraction for Rust. Mostly operates on data, not types... |
//! Low level API for transcoding.
use encoding_rs as enc;
use chardetng as cd;
use std::str;
use crate::constants;
/// Low level API for transcoding.
pub struct Transcoder {
src_encoding: Option<&'static enc::Encoding>,
dst_encoding: &'static enc::Encoding,
decoder: Option<enc::Decoder>,
encoder: Op... |
// Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
// Licensed under the Apache License, Version 2.0 (see LICENSE).
use crate::{snapshot::osstring_as_utf8, Snapshot};
use async_trait::async_trait;
use bazel_protos::remote_execution as remexec;
use bytes::Bytes;
use fs::{
ExpandablePathGlobs, Gitign... |
use std::cell::RefCell;
use std::collections::hash_map::RandomState;
use std::collections::HashSet;
use std::path::PathBuf;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, Mutex};
use crate::common::format::ValueType;
use crate::common::{
make_current_file, make_log_file, parse_file_name, DBFil... |
//! Bindings to libsixel
//!
//! libsixel is an encoder/decoder implementation for DEC SIXEL graphics
//!
//! > SIXEL is one of image formats for printer and terminal imaging introduced by Digital Equipment Corp. (DEC).
//! > Its data scheme is represented as a terminal-friendly escape sequence.
//! > So if you want to... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Module Clock Enable Clock enable for each module in the AUX domain For use by the system CPU The settings in this register are OR'ed with the corresponding settings in MODCLKEN1. This allows the system CPU and AUX_SCE to request clocks... |
/**
* @File : matrix3.rs
* @Author : dtysky (<EMAIL>)
* @Link : http://dtysky.moe
* @Date : 2019/2/7 下午9:53:03
*/
use wasm_bindgen::prelude::*;
use super::common::*;
use super::matrix2d::*;
use super::matrix4::*;
use super::quaternion::*;
use super::vector2::*;
#[wasm_bindgen]
pub struct Matrix3(
pub f... |
use std::{collections::HashSet, fmt};
use gimli::{Encoding, RunTimeEndian, UnitHeader, UnitIndex, UnitSectionOffset, UnitType};
use object::{
write::{Object as WritableObject, SectionId},
BinaryFormat, Object, ObjectSection, SectionKind,
};
use tracing::debug;
use crate::{
error::{Error, Result},
ext:... |
//! The bidirectional scattering surface reflectance distribution
//! function (BSSRDF) gives exitant radiance at a point on a surface
//! given incident differential irradiance at another point.
//std
use serde::{Deserialize, Serialize};
use std::borrow::Borrow;
use std::cell::Cell;
use std::f32::consts::PI;
use std:... |
use libc::{c_char, c_float, c_int, c_uchar, c_uint, c_void};
#[allow(unused_imports)]
use std::{ffi::CString, mem::transmute, ptr};
/*
WGL FUNCTION POINTERS
*/
#[link(name = "Opengl32")]
extern "C" {
pub fn wglGetProcAddress(unnamedParam1: *const c_char) -> *const ();
pub fn wglGetCurrentContext() -> *cons... |
extern crate futures;
#[macro_use]
extern crate log;
extern crate irc;
extern crate hyper;
extern crate slack;
#[macro_use]
extern crate lazy_static;
extern crate regex;
extern crate toml;
extern crate rustc_serialize;
extern crate multimap;
extern crate time;
use std::env;
use std::fmt::Debug;
use std::collections::H... |
//! The Raft actor's module and its associated logic.
mod admin;
mod append_entries;
mod apply_logs;
mod client;
mod install_snapshot;
mod replication;
mod state;
mod vote;
use std::{
collections::BTreeMap,
sync::Arc,
time::{Duration, SystemTime},
};
use actix::prelude::*;
use futures::sync::{mpsc};
use ... |
use std::any::Any;
use std::f32::consts::PI;
use std::rc::{Rc, Weak};
use std::cell::{RefCell};
use std::time::{Duration};
use display::{Image, Button, Stage, Display, FillMode};
use model::Gallery;
use sdl2::video::{Window, WindowContext};
use sdl2::render::{Canvas, TextureCreator};
use sdl2::rect::{Rect, Point};
use ... |
use crate::b2_draw::*;
use crate::b2_math::*;
use crate::b2_settings::*;
use crate::b2_time_step::*;
use crate::joints::b2_wheel_joint::*;
// Linear constraint (point-to-line)
// d = p_b - p_a = x_b + r_b - xA - r_a
// c = dot(ay, d)
// cdot = dot(d, cross(w_a, ay)) + dot(ay, v_b + cross(w_b, r_b) - v_a - cross(w_a, r... |
//! A mixer processing node.
//!
//! A mixer can have multiple consumer slots, which will be routed
//! through `compositor` and `audiomixer` elements.
use actix::prelude::*;
use anyhow::{anyhow, Error};
use gst::prelude::*;
use gst_base::prelude::*;
use std::collections::HashMap;
use std::sync::{Arc, Mutex};
use trac... |
// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//! Exposes simple TCP over IPv4 listener functionality via the [`TcpIPv4Handler`] structure.
//!
//! [`TcpIPv4Handler`]: struct.TcpIPv4Handler.html
use std::collections::{HashMap, HashSet};
use std::net:... |
use std::cmp::{max, min};
use std::marker::PhantomData;
use std::sync::mpsc::channel;
use crossbeam_utils::thread;
use memmap::MmapMut;
use memmap::MmapOptions;
use rayon::prelude::*;
use serde::de::Deserialize;
use serde::ser::Serialize;
use slog::*;
use crate::challenge_derivation::derive_challenges;
use crate::drg... |
use errors::DiagnosticBuilder;
use smallvec::SmallVec;
use syntax_pos::Span;
use crate::hir;
use crate::hir::def_id::DefId;
use crate::traits::specialize::specialization_graph::NodeItem;
use crate::ty::{self, Ty, TyCtxt, ToPredicate, ToPolyTraitRef};
use crate::ty::outlives::Component;
use crate::ty::subst::{Kind, Sub... |
//! Structs used in the API.
use alloc::vec::Vec;
use core::result::Result;
use x25519_dalek_ng::{PublicKey, SharedSecret, StaticSecret};
use super::{
cose,
error::{EarlyError, Error, OwnError, OwnOrPeerError},
util::{self, Message1, Message2, Message3,Message4},
};
// Party U constructs ----------------... |
// Copyright 2018 <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 writi... |
// 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.
use {
anyhow::{anyhow, bail, Context, Error},
async_trait::async_trait,
epoch::EpochFile,
fidl_fuchsia_io::DirectoryProxy,
fidl_fuchsia... |
// This file is part of Substrate.
// Copyright (C) 2018-2020 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the F... |
//! sys/socket implementation, following http://pubs.opengroup.org/onlinepubs/009696699/basedefs/sys/socket.h.html
use core::result::Result as CoreResult;
use core::{mem, ptr, slice};
use syscall::data::Map;
use syscall::data::Stat as redox_stat;
use syscall::data::StatVfs as redox_statvfs;
use syscall::data::TimeSpec... |
/*
* Copyright (c) 2017-2020 Boucher, Antoni <<EMAIL>>
*
* 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, mod... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.