text stringlengths 9.08k 47.9k |
|---|
use wasm_bindgen;
use wasm_bindgen::prelude::*;
use std::io::prelude::*;
use serde_derive::{Deserialize};
use zip;
use zip::write::FileOptions;
use std::io::Cursor;
use std::collections::HashMap;
type Dict = HashMap<String, String>;
pub mod xml;
use crate::xml::{Element};
pub mod style;
use crate::style::{StyleT... |
// 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 chrono::{Datelike, TimeZone, Timelike};
use fidl::endpoints::create_endpoints;
use fidl_fuchsia_cobalt::{CobaltEvent, LoggerFactoryMarker};
use fidl_fu... |
use alloc::borrow::Cow;
use core::str::FromStr;
// Based on
// https://www.w3.org/TR/uievents-code/
//
// Also somewhat based on MDN, but it turns out to be wrong in many ways:
// https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values
//
// Chromium's sources:
// https://github.com/chromium/ch... |
/*
This tool is part of the WhiteboxTools geospatial analysis library.
Authors: <NAME>
Created: 22/06/2020
Last Modified: 22/06/2020
License: MIT
*/
use whitebox_raster::*;
use nalgebra::{Matrix5, RowVector5, Vector5};
use num_cpus;
use std::env;
use std::f64;
use std::io::{Error, ErrorKind};
use std::path;
use std::s... |
use alloc::{collections::LinkedList, string::String, vec::Vec};
use coap_lite::{CoapOption, Packet};
use core::convert::TryFrom;
use hkdf::Hkdf;
use serde_bytes::Bytes;
use sha2::Sha256;
use crate::cbor;
use super::{error::Error, Result};
pub const KEY_LEN: usize = 16;
pub const NONCE_LEN: usize = 13;
/// Returns ... |
mod artifacts;
mod extract;
mod metapackages;
mod rsync;
use command::Command;
use config::{Config, DebianPath, Direct, Source, SourceLocation};
use deb_version;
use debarchive::Archive as DebArchive;
use debian;
use glob::glob;
use misc;
use self::artifacts::{link_artifact, LinkedArtifact, LinkError};
use self::rsync... |
use crate::config::BlockAssemblerConfig;
use crate::error::Error;
use ckb_core::block::Block;
use ckb_core::extras::EpochExt;
use ckb_core::header::Header;
use ckb_core::script::Script;
use ckb_core::service::{Request, DEFAULT_CHANNEL_SIZE, SIGNAL_CHANNEL_SIZE};
use ckb_core::transaction::{
Capacity, CellInput, Cel... |
use crossbeam_channel as channel;
use eframe::{self, egui};
use egui_extras::{Size, TableBuilder};
use std::{fmt, sync::Arc};
#[cfg(feature = "save")]
use std::{path::PathBuf, sync::Mutex};
use crate::{
bytes,
midi::{self, PortNb},
};
const MAX_REPETITIONS: u8 = 99;
const MAX_REPETITIONS_EXCEEDED: &str = ">9... |
use crate::construction::constraints::*;
use crate::construction::heuristics::*;
use crate::helpers::models::problem::*;
use crate::helpers::models::solution::*;
use crate::models::common::*;
use crate::models::problem::{VehicleDetail, VehiclePlace};
use std::sync::Arc;
type VehicleData = (Location, Location, Timestam... |
use std::{fmt, ops};
use std::cmp::Ordering;
use std::num::ParseIntError;
use std::str::FromStr;
use num::bigint::{BigInt, Sign};
use crate::division::{gcd};
#[derive(PartialEq, Eq, Debug, Clone)]
pub struct Int {
value: BigInt,
}
//----------------------------------------------------------
// standard traits
i... |
// Copyright 2012-2014 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... |
//! Checker: verifies that spills/reloads/moves retain equivalent dataflow to original, vreg-based
//! code.
//!
//! The basic idea is that we track symbolic values as they flow through spills and reloads.
//! The symbolic values represent particular virtual or real registers in the original
//! function body presented... |
use std::collections::HashMap;
use std::env::{self, Args};
use std::fs::File;
use std::io::{Read, Write};
use std::path::{Path, PathBuf};
use std::process::{self, Command};
macro_rules! try_finally {
({$($t: tt)*} {$($f: tt)*}) => {
let result = (|| -> Result<(), Error> {
$($t)*
Ok(... |
// Copyright 2018 Google 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... |
extern crate reqwest;
extern crate serde;
extern crate serde_json;
use std::cell::RefCell;
use std::collections::HashMap;
use std::rc::Rc;
use std::time::Duration;
use reqwest::blocking::{Client, RequestBuilder, Response};
use reqwest::header::AUTHORIZATION;
use reqwest::header::USER_AGENT;
use serde::{Deserialize, S... |
use std::alloc::Layout;
use std::convert::TryInto;
use std::intrinsics::copy_nonoverlapping;
use std::mem::{self, align_of, size_of};
use std::ops::{Deref, DerefMut};
use std::ptr::NonNull;
use std::{ptr, slice};
use crate::entry::{EntryRef, PageEntry, PAGE_ENTRY_HEADER_ALIGN, PAGE_ENTRY_HEADER_SIZE};
use crate::page:... |
// Copyright 2021 <NAME>
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless requir... |
use lazy_static;
use regex::Regex;
lazy_static! {
static ref REMOVE: Regex = Regex::new(r#"[^\w\s$*_+~.()'"!\-]"#).unwrap();
static ref SPLIT: Regex = Regex::new(r#"(?P<token>\S+)\s*"#).unwrap();
}
// Convert arbitrary human name for something into a slug for url purposes
pub fn slugify(name: &str, inc: usiz... |
//! Abstraction over AST managers
//!
//! The core AST is parametrized by *symbols*, so that users can put
//! custom information in there.
use {
std::{ hash::Hash, fmt::{self, Debug}, },
crate::{ gc, GC, },
fxhash::{FxHashMap, FxHashSet, },
batsmt_pretty as pp,
};
/// A temporary view of the definit... |
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
mod class;
mod hresult;
mod interface;
pub use self::class::*;
pub use self::hresult::*;
pub use self::interface::*;
use core::ffi::c_void;
use std::intrinsics::transmute;
use uuid::Uuid;
// numeric types
pub type c_int = i32;
pub type c_long = ... |
use super::object::{ApiObject, ApiObjectBuilder, StructField, TypeParameters};
use super::RUST_KEYWORDS;
use crate::v2::models::{CollectionFormat, ParameterIn};
use heck::{CamelCase, KebabCase, SnekCase};
use std::fmt::{self, Display, Write};
use std::iter;
use std::rc::Rc;
/// Represents the API object impl.
pub str... |
pub mod serde;
use crate::{
error::{
RetrieveError,
WriteError,
},
slab::{
EdgeLink,
EdgeSet,
EntityId,
EntityType,
Memo,
MemoBody,
MemoId,
MemoRef,
RelationSet,
SlabHandle,
SlabId,
SlabRef,
... |
#[macro_use]
extern crate bitflags;
#[macro_use]
extern crate cascade;
#[macro_use]
extern crate thiserror;
#[macro_use]
extern crate log;
#[macro_use]
extern crate shrinkwraprs;
mod common;
mod dbus_helpers;
mod device;
mod release;
mod remote;
pub use self::{device::*, release::*, remote::*};
use base64::write::En... |
///! Locally Optimal Block Preconditioned Conjugated
///!
///! This module implements the Locally Optimal Block Preconditioned Conjugated (LOBPCG) algorithm,
///which can be used as a solver for large symmetric positive definite eigenproblems.
use crate::error::{LinalgError, Result};
use crate::{cholesky::*, close_l2, ... |
// Copyright 2021 The Matrix.org Foundation C.I.C.
//
// 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... |
//! Implements the resharing scheme from [Desmedt et al.](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.55.2968&rep=rep1&type=pdf)).
//! The protoocol has the same phases as the JF-DKG module but requires additional checks
//! to verify the resharing is performed correctly. The resharing scheme runs
//! betw... |
mod legacy_resources;
pub mod v1;
pub mod v2;
pub mod v3;
pub mod v4;
use std::{
collections::HashMap,
ffi::OsStr,
fs,
path::{Path, PathBuf},
};
use chrono::Utc;
use clap::crate_version;
use rbx_api::{
models::{AssetId, CreatorType, GetExperienceResponse, SocialLinkType},
Robl... |
use crate::{HashedCommand, OpCode, Operation};
use ds::{MemGuard, RingSlice};
use sharding::hash::{Crc32, Hash, UppercaseHashKey};
// 指令参数需要配合实际请求的token数进行调整,所以外部使用都通过方法获取
#[allow(dead_code)]
#[derive(Default, Clone, Copy, Debug)]
pub(crate) struct CommandProperties {
pub(super) name: &'static str,
pub(super) ... |
use std::collections::VecDeque;
use clippy_utils::diagnostics::span_lint_and_sugg;
use clippy_utils::is_lint_allowed;
use itertools::{izip, Itertools};
use rustc_ast::{walk_list, Label, Mutability};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_errors::Applicability;
use rustc_hir::def::{DefKind, Re... |
use crate::common::crypto_for;
use ic_config::crypto::CryptoConfig;
use ic_crypto::utils::TempCryptoComponent;
use ic_crypto_internal_types::NodeIndex;
use ic_interfaces::crypto::{NiDkgAlgorithm, Signable, ThresholdSigner};
use ic_registry_client_fake::FakeRegistryClient;
use ic_registry_keys::make_crypto_node_key;
use... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - 1st-4th word of key"]
pub key: [KEY; 4],
#[doc = "0x10 - Encryption or decryption select"]
pub encrypt_sel: ENCRYPT_SEL,
#[doc = "0x14 - AES mode register"]
pub mode_ctl: MODE_CTL,
#[doc = "0x18 - Initialisation... |
use std::ffi::{c_void, CStr};
use std::os::raw::c_char;
use std::ptr::null;
use std::ptr::null_mut;
use std::time::Duration;
// use anyhow::Result;
use bindings::Windows;
use bindings::Windows::Foundation::Numerics::*;
use bindings::Windows::Win32::Foundation::*;
use bindings::Windows::Win32::Graphics::Direct2D::*;
us... |
#![doc = include_str!("../../README.md")]
#![no_std]
#![no_main]
#![feature(type_alias_impl_trait)]
#[cfg(any(
all(feature = "standalone", feature = "debug"),
all(feature = "standalone", feature = "no-cli"),
all(feature = "debug", feature = "no-cli")
))]
compile_error!(
"Only one feature of \"no-cli\",... |
//! Converts optional arguments to chaining style.
//!
//! Rust doesn't have optional or named arguments. This crate provides macros to convert optional arguments given by attributes to method chaining style instead.
//!
//! # Function with optional arguments
//!
//! Specify `optarg_fn` for a function with 2 arguments,... |
use crate::Fallible;
use comrak::nodes::Ast;
use comrak::nodes::{AstNode, NodeValue};
use comrak::{format_commonmark, parse_document, Arena, ComrakOptions};
use log::trace;
use once_cell::unsync::OnceCell;
use semver::Version;
use serde::Deserialize;
use std::cell::RefCell;
use std::path::PathBuf;
use std::time::System... |
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Parity 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 yo... |
/*!
Authentication/authorization support messages.
*/
// SPDX-License-Identifier: MIT AND WTFPL
use std::collections::HashMap;
use pandora_api_derive::PandoraRequest;
use serde::{Deserialize, Serialize};
use crate::errors::Error;
use crate::json::{PandoraApiRequest, PandoraSession, ToPartnerTokens, ToUserTokens};
/... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
_reserved0: [u8; 128usize],
#[doc = "0x80 - Source address matching result This register is stored in RAM; the reset value is undefined."]
pub srcresmask0: SRCRESMASK0,
#[doc = "0x84 - Source address matching result This register is stored... |
use std::collections::{HashMap, HashSet};
use std::error::Error;
use std::time::Instant;
use kdtree::{distance::squared_euclidean, KdTree};
use rayon::prelude::*;
use serde::{Deserialize, Serialize};
use strsim::jaro_winkler;
#[cfg(feature = "geoip2_support")]
use std::net::IpAddr;
#[cfg(feature = "geoip2_support")]... |
// Copyright (c) Facebook, Inc. and its affiliates.
use super::super::*;
use rd_agent_intf::{bandit_report::BanditMemHogReport, Report, Slice};
use std::cell::RefCell;
use std::collections::{BTreeMap, VecDeque};
#[derive(Clone, Copy, Debug)]
pub enum MemHogSpeed {
Hog10Pct,
Hog25Pct,
Hog50Pct,
Hog1x,
... |
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.
// Polkadot 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) any... |
use serde::{Serialize, Deserialize};
use super::genes::{Genome, Innovation, LinkGene, NeuronGene};
use super::params;
use super::phenotype::NeuralNet;
use super::species::Species;
use super::utils::{rand_int, rand_usize, random};
use std::fs::File;
use std::io::prelude::*;
use std::io::{Result, Error, ErrorKind};
use s... |
use crate::{timer::Timer, VERSION};
use rand::prelude::Rng;
use serde::{Deserialize, Serialize};
use std::cmp::Ordering;
use std::collections::{hash_map::DefaultHasher, HashMap};
use std::fmt;
use std::hash::{Hash, Hasher};
use std::ops::{Add, Mul};
use std::time::Duration;
/// 2D Vector (x, y) that can represent coo... |
/*
- [ ] pub display: Display,
- [x] pub position_type: PositionType, --> kinda, stretch doesnt support everything
- [ ] pub direction: Direction,
- [x] pub flex_direction: FlexDirection,
- [x] pub flex_wrap: FlexWrap,
- [x] pub flex_grow: f32,
- [x] pub flex_shrink: f32,
- [x] pub flex_basis: Dimension,
- [x] pub o... |
use fenris::{CooMatrix, CsrMatrix};
use std::ops::Add;
use nalgebra::{DMatrix, DVector, Vector3};
use crate::assert_approx_matrix_eq;
use crate::assert_panics;
use fenris::sparse::{proptest_strategies, spmm_csr, spmm_csr_pattern, spmv_csr, CscMatrix};
use fenris::util::flatten_vertically;
use fenris::util::proptest:... |
pub mod data;
use crate::data::{
PixAudioChannel, ADCPM_INDEX_TABLE, ADCPM_STEP_TABLE, ASCII_HEX_DECODER, FONT8X8, PALETTE,
PIX_NUMBER_OF_AUDIO_CHANNELS,
};
use rmp_serde::{Deserializer, Serializer};
use sdl2::audio::{AudioCallback, AudioDevice, AudioSpecDesired};
use sdl2::clipboard::ClipboardUtil;
use sdl2::even... |
#[cfg(feature = "opencl")]
use ocl::{
builders::DeviceSpecifier::TypeFlags,
flags::{DeviceType, MemFlags},
prm::Uint16,
Buffer, Context, Kernel, Platform, Program, Queue,
};
use sha1::{
compress,
digest::{
generic_array::{ArrayLength, GenericArray},
BlockInput, Digest,
},
... |
// Copyright (c) 2017 <NAME>, RWTH Aachen University
//
// MIT License
//
// 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... |
//! X-MAC protocol layer for low power 802.15.4 reception, intended primarily
//! to manage an Atmel RF233 radio.
//!
//! Original X-MAC paper, on which this implementation is heavily based:
//! <http://www.cs.cmu.edu/~andersoe/papers/xmac-sensys.pdf>
//!
//! Nodes using this layer place their radios to sleep for t... |
//! Implementation of multilayer perceptron,backpropagation algorithm and some kind of genetic algorithm.
//! Using genetic algorithm:
//! ```rust
//! extern crate maver;
//! use maver::*;
//!
//!struct XOR;
//!
//!impl Environment for XOR {
//! fn test(&self, org: &mut Organism) {
//! let mut distance: f64;
... |
use crate::playlist::PlaylistRenderState;
use gio::prelude::*;
use glib::subclass::prelude::*;
use gst::prelude::*;
use gst::subclass::prelude::*;
use gst::{gst_debug, gst_error, gst_info, gst_trace, gst_warning};
use m3u8_rs::playlist::{MediaPlaylist, MediaSegment};
use once_cell::sync::Lazy;
use std::fs;
use std::io:... |
use std::collections::HashMap;
use datasize::DataSize;
use itertools::Itertools;
use tracing::{debug, warn};
use casper_hashing::Digest;
use casper_types::{ExecutionResult, ProtocolVersion};
use super::{
pending_signatures::PendingSignatures, signature::Signature, signature_cache::SignatureCache,
};
use crate::t... |
// Copyright 2018 Parity Technologies (UK) Ltd.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, mer... |
use automata::lexer::*;
use automata::parser::*;
use automata::line_counter::*;
use automata::read_error::*;
use parsergen::{lex, parse};
use super::ast::*;
#[derive(Debug)]
enum Keyword {
Else,
Elseif,
End,
False,
For,
Function,
If,
Mutable,
Return,
Struct,
True,
Whi... |
use std::collections::HashMap;
use std::convert::TryInto;
use std::sync::Arc;
use futures::FutureExt;
use futures::SinkExt;
use futures::StreamExt;
use holochain_serialized_bytes::prelude::*;
use stream_cancel::Trigger;
use stream_cancel::Valve;
use stream_cancel::Valved;
use tracing::instrument;
use tracing::Instrume... |
use gtk::prelude::*;
use gtk::*;
use sourceview::*;
use std::fs::File;
use std::io::Read;
use std::path::{Path, PathBuf};
use std::process;
use std::rc::Rc;
use std::sync::{Arc, RwLock, Mutex};
// use std::sync::atomic::{AtomicBool, Ordering};
use std::fs::{self, DirEntry};
use std::env;
use gettextrs::gettext;
use g... |
// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Portions 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-BSD-3-Clause file.
//
// Copyright © 2019 Intel Corporation
//
// SPDX-... |
use std::iter;
use ark_bls12_377::G1Projective;
use ark_bw6_761::{Fr, G1Affine};
use ark_ec::{AffineCurve, ProjectiveCurve};
use ark_ff::{Field, One, Zero};
use ark_poly::{EvaluationDomain, Evaluations, Polynomial, Radix2EvaluationDomain, UVPolynomial};
use ark_poly::univariate::DensePolynomial;
use ark_serialize::{Ca... |
// This file is part of the SORA network and Polkaswap app.
// Copyright (c) 2020, 2021, Polka Biome Ltd. All rights reserved.
// SPDX-License-Identifier: BSD-4-Clause
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
... |
use crate::{
ast::{ConditionalPiece, Expr, Identifier, RangedVar, Stmt},
inverter,
lexer::TokenKind,
parser::{self, CalcError},
prelude,
symbol_table::SymbolTable,
};
pub(crate) struct Context<'a> {
pub(crate) symbol_table: &'a mut SymbolTable,
current_function_name: Option<String>,
... |
use ggez::conf::{FullscreenType, WindowMode};
use ggez::event::{EventHandler, KeyCode, KeyMods, MouseButton};
use ggez::graphics::{self, Rect};
use ggez::nalgebra as na;
use ggez::{Context, GameResult};
mod agent;
mod astar;
mod field;
mod flowfield;
mod imgui_wrapper;
mod map;
mod misc;
mod pathfinding;
mod sprite;
mo... |
pub const SQLITE_OK: i32 = 0;
pub const SQLITE_ERROR: i32 = 1;
pub const SQLITE_INTERNAL: i32 = 2;
pub const SQLITE_PERM: i32 = 3;
pub const SQLITE_ABORT: i32 = 4;
pub const SQLITE_BUSY: i32 = 5;
pub const SQLITE_LOCKED: i32 = 6;
pub const SQLITE_NOMEM: i32 = 7;
pub const SQLITE_READONLY: i32 = 8;
pub const SQLITE_INTE... |
use std::{
collections::HashMap,
env,
error::Error,
ffi::{c_void, CStr},
fs,
io::prelude::*,
mem,
os::raw::{c_int, c_uint, c_ulong, c_ushort},
path::PathBuf,
rc::Rc,
slice,
};
use std::{fs::File, ptr};
use cuda::{CUdeviceptr, CUfunction, CUjit_option, CUmodule, CUresult, CUs... |
//! Keychain item attributes (i.e. `SecAttr*`)
use crate::ffi::*;
use core_foundation::{
base::{CFType, TCFType, ToVoid},
data::CFData,
string::{CFString, CFStringRef},
};
use std::{
ffi::c_void,
fmt::{self, Debug, Display},
str::{self, Utf8Error},
};
/// Trait implemented by all `Attr*` types... |
//! Implementation of a renderer for Dioxus on the web.
//!
//! Oustanding todos:
//! - Removing event listeners (delegation)
//! - Passive event listeners
//! - no-op event listener patch for safari
//! - tests to ensure dyn_into works for various event types.
//! - Partial delegation?>
use dioxus_core::{DomEdit, Ele... |
use crate::infer::opaque_types::required_region_bounds;
use crate::infer::InferCtxt;
use crate::middle::lang_items;
use crate::traits::{self, AssocTypeBoundData};
use crate::ty::subst::SubstsRef;
use crate::ty::{self, ToPredicate, Ty, TyCtxt, TypeFoldable};
use rustc_hir as hir;
use rustc_hir::def_id::DefId;
use rustc_... |
macro_rules! elf_section_header {
($size:ident) => {
// XXX: Do not import scroll traits here.
// See: https://github.com/rust-lang/rust/issues/65090#issuecomment-538668155
#[repr(C)]
#[derive(Copy, Clone, Eq, PartialEq, Default)]
#[cfg_attr(
feature = "alloc",
... |
/*
* Copyright © 2020-today <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 required by applicable law or agr... |
//! This module implements Plonk circuit constraint primitive.
use crate::circuits::{
domains::EvaluationDomains,
gate::{CircuitGate, GateType, LookupInfo, LookupsUsed},
polynomial::{WitnessEvals, WitnessOverDomains, WitnessShifts},
wires::*,
};
use ark_ff::{FftField, SquareRootField, Zero};
use ark_po... |
//! Reset and Clock Control
use crate::pac::{
rcc::{self, cfgr, cfgr2},
RCC,
};
use crate::flash::ACR;
use crate::time::Hertz;
/// Extension trait that constrains the `RCC` peripheral
pub trait RccExt {
/// Constrains the `RCC` peripheral so it plays nicely with the other abstractions
fn constrain(se... |
pub mod typ;
pub mod variable;
pub use typ::*;
pub use variable::*;
use std::borrow;
use std::path::PathBuf;
use std::rc::Rc;
use crate::coresight::memory::MI;
use object::read::Object;
use crate::session::Session;
#[derive(Debug, Copy, Clone)]
pub enum ColumnType {
LeftEdge,
Column(u64),
}
impl From<giml... |
use std::collections::{BTreeMap, HashMap};
use std::ffi::{OsStr, OsString};
use std::fs;
use std::mem;
use std::path::{Path, PathBuf};
use std::rc::Rc;
use std::sync::atomic::Ordering;
use std::time::SystemTime;
use gelatin::glium;
use glium::texture::SrgbTexture2d;
mod image_loader;
use self::image_loader::*;
pub ... |
//! Module containing the system managing glyphbrush state for visible UI Text components.
use std::{collections::HashMap, marker::PhantomData, ops::Deref};
use amethyst_assets::{
AssetHandle, AssetStorage, DefaultLoader, Handle, LoadHandle, Loader, ProcessingQueue,
ProcessingState,
};
use amethyst_core::{
... |
//! VIR-AST -> VIR-AST transformation to simplify away some complicated features
use crate::ast::{
BinaryOp, Binder, CallTarget, Constant, Datatype, DatatypeTransparency, DatatypeX, Expr, ExprX,
Field, Function, GenericBound, GenericBoundX, Ident, Krate, KrateX, Mode, Path, Pattern,
PatternX, SpannedTyped,... |
use libc::{c_char, c_int, c_long, c_uchar, c_uint, c_ulong, c_void, size_t};
use std::mem;
use std::ptr;
use std::sync::{Mutex, MutexGuard};
use std::sync::{Once, ONCE_INIT};
#[cfg(not(libressl251))]
pub use libressl::v250::*;
#[cfg(libressl251)]
pub use libressl::v251::*;
#[cfg(libressl273)]
pub use libressl::v273::*... |
pub mod rest_client;
use composer::{Builder, ComposeTest};
use deployer_lib::{
default_agents,
infra::{Components, Error, IoEngine},
StartOptions,
};
use opentelemetry::{global, sdk::propagation::TraceContextPropagator};
use common_lib::{mbus_api, mbus_api::TimeoutOptions, types::v0::message_bus};
use ope... |
//! Direct Memory Access (DMA) channels and multiplexer
//!
//! ## DMAMUX Channel Configuration Options
//!
//! | ENBL | TRIG | A_ON | Function | Mode |
//! |------|------|------|---------------------------------------------------------|------------------... |
use super::Float;
use super::value_range::ValueRange;
use super::synth::*;
use super::voice::*;
use std::fmt::{self, Debug};
use serde::{Serialize, Deserialize};
#[allow(non_camel_case_types)]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
pub enum Parameter {
None,
// Function
... |
use super::{Register, RuntimeValue, Vm};
pub mod functions;
/// A type alias for results that could be a [`RuntimeError`]
pub type Result<T> = std::result::Result<T, RuntimeError>;
/// A Crunch Runtime Error
// TODO: Make this more detailed
#[repr(C)]
#[derive(Debug, Clone, Eq)]
pub struct RuntimeError {
/// The... |
// Stick
// Copyright <NAME> 2021.
// Copyright <NAME> 2021.
//
// Licensed under any of:
// - Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
// - MIT License (https://mit-license.org/)
// - Boost Software License, Version 1.0 (https://www.boost.org/LICENSE_1_0.txt)
// At your option (See acc... |
use std::{convert::TryInto, error::Error, fmt};
use byteorder::{ByteOrder, LittleEndian, NetworkEndian};
use crc::{Crc, CRC_32_ISCSI};
pub const SCTP_FLAG_END_FRAGMENT: u8 = 0x01;
pub const SCTP_FLAG_BEGIN_FRAGMENT: u8 = 0x02;
pub const SCTP_FLAG_UNRELIABLE: u8 = 0x04;
pub const SCTP_FLAG_COMPLETE_UNRELIABLE: u8 =
... |
//! Overdraw analysis and optimization
use crate::quantize::quantize_unorm;
use crate::util::{fill_slice, zero_inverse};
use crate::Vector3;
use crate::vertex::{calc_pos_extents, Position};
const VIEWPORT: usize = 256;
#[derive(Default)]
pub struct OverdrawStatistics {
pub pixels_covered: u32,
pub pixels_shaded... |
use std::{cmp, future::ready, panic, sync::Arc};
use aws_sdk_s3::error::GetObjectError;
use aws_sdk_s3::Client as S3Client;
use aws_sdk_sqs::error::{DeleteMessageBatchError, ReceiveMessageError};
use aws_sdk_sqs::model::{DeleteMessageBatchRequestEntry, Message};
use aws_sdk_sqs::output::DeleteMessageBatchOutput;
use a... |
use types::*;
//STRUCT
#[derive(Clone, Debug, PartialEq)]
pub struct ProgramBinary{
pub length: GLsizei,
pub binary_format: GLenum,
pub binary: Vec<u8>
}
//// -------------------------------------------------------------------------------------------------
//// CONSTANTS
//// ----------------------------... |
use std::marker::PhantomData;
use blake2s_simd::Params as Blake2s;
use byteorder::{LittleEndian, WriteBytesExt};
use serde::de::Deserialize;
use serde::ser::Serialize;
use crate::drgraph::Graph;
use crate::error::Result;
use crate::fr32::bytes_into_fr_repr_safe;
use crate::hasher::{Domain, Hasher};
use crate::merkle:... |
//! Interpolation of shell-style variables into strings.
use lazy_static::lazy_static;
use log::trace;
use regex::{Captures, Regex};
use serde::de::{self, Deserialize, Deserializer};
use serde::ser::{Serialize, Serializer};
use std::collections::BTreeMap;
use std::env;
use std::error;
use std::fmt::{self, Display};
us... |
use crate::arithmetic::{Engine, MillerLoopResult, MultiMillerLoop, PairingCurveAffine};
use crate::bn256::fq::*;
use crate::bn256::fq12::*;
use crate::bn256::fq2::*;
use crate::bn256::fq6::FROBENIUS_COEFF_FQ6_C1;
use crate::bn256::fr::*;
use crate::bn256::g::*;
use core::borrow::Borrow;
use core::iter::Sum;
use core::o... |
use std::cmp;
use std::fmt::Write as fmtwrite;
use std::fs;
use std::io;
use std::io::{Seek, Write};
use std::mem;
use structopt::StructOpt;
use util::{align_to, amount_alignment_needed};
mod cmdline;
mod header;
mod util;
fn main() {
let opt = cmdline::Opt::from_args();
let package_name = opt
.packa... |
use crate::durability::Durability;
use crate::plumbing::CycleDetected;
use crate::revision::{AtomicRevision, Revision};
use crate::{CycleError, Database, DatabaseKeyIndex, Event, EventKind};
use log::debug;
use parking_lot::lock_api::{RawRwLock, RawRwLockRecursive};
use parking_lot::{Mutex, RwLock};
use rustc_hash::{Fx... |
use std::borrow::Cow;
use std::cmp::max;
use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::collections::HashMap;
use std::fs::File;
use std::num::Wrapping;
use std::path::Path;
use crate::chunk::{BiomeId, BlockState, Chunk};
use crate::cube;
use crate::minecraft::biome::Biomes;
use crate::minecraft::... |
// The MIT License (MIT)
//
// Copyright (c) 2018 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, mo... |
use std::{
cmp::Reverse,
collections::{BTreeMap, BTreeSet, BinaryHeap},
time::SystemTime,
};
use maplit::btreeset;
use ruma::{
events::EventType,
identifiers::{EventId, RoomId, RoomVersionId},
};
mod error;
pub mod event_auth;
pub mod room_version;
mod state_event;
mod state_store;
pub use error:... |
//! Course refresher.
use crate::{error::LangsError, progress_reporter};
use md5::Context;
use serde::{Deserialize, Serialize};
use serde_yaml::Mapping;
use std::io::Write;
use std::path::{Path, PathBuf};
use std::time::Duration;
use tmc_langs_framework::{TmcCommand, TmcProjectYml};
use tmc_langs_util::file_util;
use ... |
/*
Copyright (C) 2018-2019 <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, modify, merge, publish,
distribute, su... |
use std::fs;
use std::io;
use std::io::Read;
static FONT_SET: [u8; 80] = [
0xF0, 0x90, 0x90, 0x90, 0xF0, 0x20, 0x60, 0x20, 0x20, 0x70, 0xF0, 0x10, 0xF0, 0x80, 0xF0, 0xF0,
0x10, 0xF0, 0x10, 0xF0, 0x90, 0x90, 0xF0, 0x10, 0x10, 0xF0, 0x80, 0xF0, 0x10, 0xF0, 0xF0, 0x80,
0xF0, 0x90, 0xF0, 0xF0, 0x10, 0x20, 0x40... |
use hex;
use libp2p::gossipsub::IdentTopic as Topic;
use libp2p::multiaddr::multiaddr;
use libp2p::Multiaddr;
use log::info;
use rand::Rng;
use ritelinked::LinkedHashMap;
use simplelog::{Config, LevelFilter, WriteLogger};
use std::fs::File;
use std::thread;
use tokio::io::AsyncBufReadExt;
use tokio::sync::mpsc;
use vrr... |
pub mod live;
pub mod mode;
pub mod receiver;
use crate::{automata::*, constants::*, guild::*, user::*, Resources, RxMap};
use dashmap::{mapref::entry::Entry as DashEntry, DashMap};
use flume::{self, Receiver, Sender, TryRecvError};
use rand::{distributions::*, thread_rng};
use receiver::{listen_in, ReceiverSignal};
u... |
use crate::conversion::coords::{CoordSeq, CoordType, ToSFCGALGeom};
use crate::{
utils::check_null_geom, GeomType, Point2d, Result, SFCGeometry, ToCoordinates, ToSFCGAL,
};
use failure::Error;
use sfcgal_sys::{
sfcgal_geometry_collection_add_geometry, sfcgal_geometry_collection_create,
sfcgal_geometry_colle... |
/* Copyright (c) 2019-2021 <NAME> <<EMAIL>>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This pro... |
//! Module
//!
//! A stand-alone flat representation of the various items which compose a
//! module: functions, types, ... all items within a given module, no matter
//! their nesting, are stored in a single Module object.
//!
//! A stand-alone representation has the benefit that the Module may be
//! understood in is... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.