text stringlengths 7.05k 33.9k |
|---|
//! Functions to generate camera and point locations on a 3D model.
//!
//! Example usage:
//! ```
//! extern crate tobj;
//! use city2ba::*;
//! use city2ba::generate::*;
//! use std::path::Path;
//!
//! // load the model from disk
//! let (models, _) = tobj::load_obj(Path::new("tests/box.obj")).expect("Could not load... |
use std::collections::HashMap;
use std::fmt::Display;
use std::cmp::max;
use std::fmt::{Debug, Formatter};
use crate::lib::utils::bytes2i64;
use crate::object::{Encoding, Object};
use crate::replica::{forget_command, meet_command, replicas_command, sync_command};
use crate::resp::get_int_bytes;
use crate::resp::{new_... |
use crate::error::DhlError;
use convert_case::{Case, Casing};
use serde::{Deserialize, Serialize};
use serde_json::Value;
pub mod location_finder;
pub mod shipment_tracking;
/// Serializes a struct's fields into a string of url parameters.
fn serializable_to_url_params<T: Serialize>(serializable: &T) -> Result<String... |
// 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... |
use std::rc::Rc;
use std::sync::Arc;
use std::time::Duration;
use log::{debug, error, info, warn};
use wasm_bindgen_futures::spawn_local;
use yew::services::interval::IntervalTask;
use yew::services::IntervalService;
use yew::{html, Component, ComponentLink, Html, ShouldRender};
use libchordr::models::user::MainData;... |
// This file is part of Substrate.
// Copyright (C) 2020-2021 Parity Technologies (UK) Ltd.
// 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
//
// h... |
use std::collections::{BTreeMap, HashMap};
use std::path::PathBuf;
use std::str::FromStr;
use minidom::{Error, Element};
use serde::{Serialize, Deserialize};
use crate::utils::prelude::*;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum Core {
CortexM0,
CortexM0Plus,
CortexM1,
CortexM3,
C... |
use super::Scene;
use crate::canvas::*;
use crate::pgns::*;
use libremarkable::input::{multitouch::MultitouchEvent, InputEvent};
use anyhow::Error;
use chess_pgn_parser::{Game, read_games};
use std::fs::File;
use std::io::Read;
use regex::Regex;
use crate::REPLAYS_PER_PAGE;
const BOX_HEIGHT: i32 = 180;
const FIRST_BOX... |
use super::fill_convex::*;
use super::fill_settings::*;
use crate::geo::*;
use crate::line::*;
use crate::bezier::*;
use crate::bezier::path::*;
use std::f64;
///
/// Item returned from a ray cast intersection by the concave raycasting function (where we can hit an existing edge)
///
#[derive(Clone, Debug)]
enum Con... |
use super::ChainInvalidReason;
use crate::chain_sequence::ChainSequenceBuf;
use crate::element_buf::ElementBuf;
use crate::element_buf::HeaderCas;
use crate::source_chain::SourceChainError;
use crate::source_chain::SourceChainResult;
use fallible_iterator::FallibleIterator;
use holochain_lmdb::buffer::BufferedStore;
us... |
use libc::size_t;
use std::cell::RefCell;
use std::net::{IpAddr,SocketAddr};
use std::os::raw::c_void;
use std::panic;
use std::rc::Rc;
use std::slice;
use std::str::FromStr;
use time::precise_time_ns;
use mio::PollOpt;
use pnet::packet::Packet;
use pnet::packet::ethernet::{EthernetPacket, EtherTypes};
use pnet::packe... |
//! Data plane - Transport data path
//!
//! The data plane performs read/write QoS scheduling decisions across peer
//! connections, and performs socket IO. Once the control plane establishes a
//! peer connection, the socket is handed over to the data plane for IOs. As the
//! data plane performs the socket reads/wri... |
use std::env;
#[cfg(target_family = "unix")]
use std::fs::OpenOptions;
use std::io::Write;
#[cfg(target_family = "unix")]
use std::os::unix::fs::OpenOptionsExt;
use std::path::{Path, PathBuf};
use std::process::{self, Command};
use std::str;
use anyhow::{bail, Context, Result};
use fs_err as fs;
use path_slash::PathBu... |
pub const RESTART_SYSCALL : usize = 0;
pub const EXIT : usize = 1;
pub const FORK : usize = 2;
pub const READ : usize = 3;
pub const WRITE : usize = 4;
pub const OPEN : usize = 5;
pub const CLOSE ... |
//! Data structures for representing decoded wasm modules.
use crate::tunables::Tunables;
use crate::WASM_MAX_PAGES;
use cranelift_entity::{EntityRef, PrimaryMap};
use cranelift_wasm::*;
use indexmap::IndexMap;
use serde::{Deserialize, Serialize};
use std::collections::{HashMap, HashSet};
use std::convert::TryFrom;
us... |
use crate::bitvec::BitVec;
use crate::engine::*;
use crate::ingest::raw_val::RawVal;
use std::cmp;
use std::collections::{HashMap, HashSet};
use std::fmt;
use std::marker::PhantomData;
pub struct QueryExecutor<'a> {
ops: Vec<Box<dyn VecOperator<'a> + 'a>>,
stages: Vec<ExecutorStage>,
count: usize,
last... |
/*
* Copyright (C) 2015 <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 a... |
use super::gen_armor::*;
use super::gen_item::*;
use super::gen_monster::*;
use super::gen_quest::*;
use super::gen_skill::*;
use super::gen_weapon::*;
use super::pedia::*;
use crate::msg::*;
use crate::part_color::*;
use crate::rsz::*;
use anyhow::*;
use chrono::prelude::*;
use std::convert::TryInto;
use std::fs::{cre... |
// LNP/BP Rust Library
// Written in 2020 by
// Dr. <NAME> <<EMAIL>>
//
// To the extent possible under law, the author(s) have dedicated all
// copyright and related and neighboring rights to this software to
// the public domain worldwide. This software is distributed without
// any warranty.
//
// You should hav... |
/*
This tool is part of the WhiteboxTools geospatial analysis library.
Authors: Dr. <NAME>
Created: 25/10/2019
Last Modified: 25/10/2019
License: MIT
*/
use self::statrs::distribution::{Normal, Univariate};
use whitebox_raster::*;
use whitebox_common::rendering::html::*;
use whitebox_common::rendering::LineGraph;
use ... |
use bytemuck::{Contiguous, Pod, Zeroable};
use nom::{bytes::complete::*, IResult};
#[cfg(feature = "serde1")]
use serde::{Deserialize, Serialize};
#[repr(u8)]
#[derive(
Contiguous, Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
pub enu... |
#[global_allocator]
static ALLOCATOR: jemallocator::Jemalloc = jemallocator::Jemalloc;
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate log;
use std::collections::{HashSet, VecDeque};
use std::fs::File;
use std::io::{BufRead, BufReader, Read};
use std::time::{Duration, Instant};
use timely::dataflow... |
#[cfg(not(any(windows, target_os = "macos", target_os = "linux")))]
compile_error!("unsupported platform");
use anyhow::{anyhow, Context as _};
use clap::Parser as _;
use clap::{AppSettings, Arg};
use geodate::sun_transit;
use once_cell::sync::Lazy;
use rand::seq::SliceRandom as _;
use regex::Regex;
use serde::Deseria... |
extern crate campross;
extern crate getopts;
extern crate ring;
extern crate mktemp;
use std::time::Instant;
use std::fs::File;
use std::io::{Write, Read};
use std::io::{BufReader, BufWriter};
use std::env;
use ring::digest;
use getopts::Options;
use mktemp::Temp;
use campross::arith;
use campross::witten_arith;
use... |
use crate::redis_type::ffi as rffi;
use crate::redis_type::{CallReply, Context};
use crate::sqlite::ffi;
use crate::sqlite::{
SQLite3Error, SQLiteConnection, SQLITE_TRANSIENT,
};
use std::cell::RefCell;
use std::collections::VecDeque;
use std::ffi::{CStr, CString};
use std::os::raw;
use std::ptr;
use std::sync::{A... |
// Copyright 2019 <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 agreed t... |
// Copyright 2022 Alibaba Cloud. All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//
use std::fs::File;
use std::os::unix::fs::MetadataExt;
use std::os::unix::io::{AsRawFd, IntoRawFd};
use std::path::{Path, PathBuf};
use std::thread::{self, JoinHandle};
use nix::mount::{mount, umount2, MntFlags, MsFlags... |
use heck::CamelCase;
use schema_bundle::*;
use std::cell::RefCell;
use std::collections::{BTreeMap, BTreeSet};
use std::rc::Rc;
fn get_rust_primitive_type_tag(primitive_type: &PrimitiveType) -> &str {
match primitive_type {
PrimitiveType::Invalid => panic!("Encountered invalid primitive."),
Primiti... |
#[macro_use]
extern crate glium;
extern crate unicode_normalization;
extern crate rusttype;
use std::borrow::Cow;
use std::ops::Range;
use glium::texture::Texture2d;
use glium::backend::Facade;
use glium::backend::glutin::Display;
pub use rusttype::{Scale, point, Point, vector, Vector, Rect, SharedBytes};
use rustty... |
use std::collections::{HashMap, HashSet};
use std::io::{BufReader, Error, ErrorKind, Read};
use std::process::{Command, Stdio};
use crate::connector::Connector;
use crate::source::Source;
use crate::transformer::Transformer;
use crate::types::{Column, OriginalQuery, Query};
use crate::utils::{binary_exists, wait_for_c... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Control Register"]
pub hsmci_cr: HSMCI_CR,
#[doc = "0x04 - Mode Register"]
pub hsmci_mr: HSMCI_MR,
#[doc = "0x08 - Data Timeout Register"]
pub hsmci_dtor: HSMCI_DTOR,
#[doc = "0x0c - SD/SDIO Card Register"]
... |
use crate::horust::formats::{
FailureStrategy, HealthinessStatus, RestartStrategy, Service, ServiceName, ServiceStatus,
};
use crate::horust::supervisor::repo::Repo;
use crate::horust::Event;
use nix::unistd::Pid;
use std::time::Instant;
use super::{LifecycleStatus, ShuttingDown};
#[derive(Clone, Debug, Eq, Parti... |
// Cala
// Copyright © 2017-2021 <NAME>.
//
// 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 choosing (See accompanying files LI... |
use crate::blob::Blob;
use crate::codes::*;
use crate::tables::*;
use crate::types::*;
use crate::*;
use proc_macro2::TokenStream;
use quote::{format_ident, quote};
use std::iter::FromIterator;
/// A type's name including module namespace and generics
#[derive(Debug, Clone)]
pub struct TypeName {
/// The type's ... |
// 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 agreed to in writ... |
//!
//! # Arena-Based Graphs
//!
//! For the hearty of heart
//!
// Std-Lib Imports
use std::{
cell::RefCell,
cmp::Ordering,
collections::{BinaryHeap, HashMap, HashSet},
hash::{Hash, Hasher},
ops::Deref,
};
// Crates.io Imports
use typed_arena::Arena;
pub struct Error;
pub type Result<T> = std::r... |
// Copyright Materialize, Inc. and contributors. All rights reserved.
//
// Use of this software is governed by the Business Source License
// included in the LICENSE file.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by ... |
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
// Load the allocator
cfg_if::cfg_if! {
// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global
// allocator.
if #[cfg(feature = "wee_alloc")] {
use wee_alloc;
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc<'_> = wee_alloc::WeeAlloc::INIT;
}
}
// use fut... |
/*
This file contains code from Programming Rust by <NAME> and <NAME>
(O'Reilly), copyright 2018 <NAME> and <NAME>, 978-1-491-92728-1.
*/
use std::io::Write;
use std::sync::{Arc, Mutex};
use std::collections::HashMap;
use num_complex::Complex;
use image::{Rgb, RgbImage};
mod threadpool;
mod mandelbrot;
pub mod color... |
use prelude::*;
use ast::*;
use parser::api::IsParser;
// ===============
// === Helpers ===
// ===============
/// Takes Ast being a module with a single line and returns that line's AST.
fn expect_single_line(ast:&Ast) -> &Ast {
let module:&Module<Ast> = expect_shape(ast);
let (line,) = (&modu... |
pub const MIN_SERVER_VER_FRACTIONAL_POSITIONS: i32 = 101;
pub const MIN_SERVER_VER_PEGGED_TO_BENCHMARK: i32 = 102;
pub const MIN_SERVER_VER_MODELS_SUPPORT: i32 = 103;
pub const MIN_SERVER_VER_SEC_DEF_OPT_PARAMS_REQ: i32 = 104;
pub const MIN_SERVER_VER_EXT_OPERATOR: i32 = 105;
pub const MIN_SERVER_VER_SOFT_DOLLAR_TIER: ... |
use {ast, typeinf, util};
use core::{Src, CompletionType, Point, SourceByteRange};
#[cfg(test)]
use core::{self, Coordinate};
use std::iter::Iterator;
use std::path::{Path, PathBuf};
use std::str::from_utf8;
use util::{closure_valid_arg_scope, char_at};
use codecleaner::comment_skip_iter_rev;
fn find_close<'a, A>(ite... |
#![allow(unused_variables)]
#![allow(unused_mut)]
#![allow(dead_code)]
#![allow(unused_imports)]
use std::rc::Rc;
use std::cell::RefCell;
use std::fs;
use std::path::Path;
use std::collections::HashMap;
use neon::prelude::*;
use neon::result::Throw;
use neon::object::This;
use skia_safe::{FontMgr, FontMetrics, FontArg... |
use core_foundation as cf;
use core_foundation::array as cf_array;
use core_foundation::array::{CFArray, CFArrayRef};
use core_foundation::base::{CFGetTypeID, CFRetain, TCFType};
use core_foundation::dictionary::CFDictionary;
use core_foundation::number::{kCFNumberSInt32Type, CFNumber, CFNumberGetValue};
use core_foun... |
//! Serial bus UART and USART
use crate::ckcu::Clocks;
use crate::gpio::{
gpioa::{PA10, PA14, PA15, PA2, PA3, PA4, PA5, PA8},
gpiob::{PB0, PB1, PB15, PB2, PB3, PB4, PB5, PB6, PB8},
gpioc::{PC0, PC1, PC12, PC13, PC3, PC4, PC5, PC6, PC7},
Floating, Input, Output, PushPull, AF6,
};
use crate::hal::blocking... |
/*
* __ __ _ _ _
* | \/ | ___ ___ __ _| | (_)_ __ | | __
* | |\/| |/ _ \/ __|/ _` | | | | '_ \| |/ /
* | | | | __/\__ \ (_| | |___| | | | | <
* |_| |_|\___||___/\__,_|_____|_|_| |_|_|\_\
*
* Copyright (c) 2017-2018, The MesaLink Authors.
* All rights reserved.
*
*... |
/*!
Create a rich document for the provided scheme.
*/
use crate::model::collection::Member;
use crate::model::concept::ConceptRelation;
use crate::model::properties::LabelKind;
use crate::model::{
standard_mappings, to_rdf_graph_with_mappings, Collection, Concept, Label, Labeled,
LiteralProperty, Resource, Sc... |
use std::hash::Hash;
use id_arena::Arena;
use super::{spill, types::*};
use crate::common::{self, Color, REGS};
use crate::mir::mir::*;
use crate::regalloc::liveness;
use util::Id as Var;
use util::{Map, Set};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
enum NodeState {
PreColored,
SimplifyWorkset,
... |
use bevy::prelude::*;
use rand::seq::SliceRandom;
use rand::Rng;
use tracing::info;
use bevy_easings::Ease;
const CURRENT_SCREEN: crate::Screen = crate::Screen::Menu;
struct ScreenTag;
struct Screen {
loaded: bool,
first_load: bool,
menu_selected: Option<i32>,
}
impl Default for Screen {
fn default... |
// Copyright (c) 2017-2021, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707.
// All Rights reserved. See files LICENSE and NOTICE for details.
//
// This file is part of CEED, a collection of benchmarks, miniapps, software
// libraries and APIs for ... |
// Copyright 2016 TiKV Project Authors. Licensed under Apache-2.0.
use codec::prelude::NumberDecoder;
use std::mem::size_of;
use tikv_util::codec::number::{self, NumberEncoder, MAX_VAR_U64_LEN};
use crate::lock::LockType;
use crate::timestamp::TimeStamp;
use crate::types::{Value, SHORT_VALUE_PREFIX};
use crate::{Erro... |
// Copyright 2018 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 std::convert::Into;
use actix::prelude::*;
use failure::{err_msg, Error, Fail};
use futures::*;
use futures::future::{Either, ok};
use serde_json;
use crate::actors::{AddA2ARoute, AdminRegisterForwardAgent, Endpoint, ForwardA2AMsg, GetEndpoint, HandleA2AMsg, HandleAdminMessage, RouteA2AMsg};
use crate::actors::ad... |
use crate::common::format::pack_sequence_and_type;
use crate::common::ValueType;
use crate::memtable::concurrent_arena::Arena;
use crate::memtable::MemTableContext;
use crate::util::{encode_var_uint32, get_var_uint32, varint_length};
use rand::{thread_rng, RngCore};
use std::ptr::null_mut;
use std::sync::atomic::{Atomi... |
// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::{
attributes, events::EventSignature, evm_transformation::EvmTransformationProcessor,
native_functions::NativeFunctions, yul_functions, yul_functions::YulFunction, Options,
};
use codespan::FileId;
use itertools::Iter... |
use std::{
convert::TryFrom,
io,
path::{Path, PathBuf},
};
use anyhow::Result;
use serde::{Deserialize, Serialize};
use thiserror::Error;
use crate::util::{write_proto_to_file_raw, write_registry_entry};
use ic_crypto::utils::get_node_keys_or_generate_if_missing;
use ic_protobuf::{
crypto::v1::NodePub... |
use io_device::IODevice;
/// Width of screen in pixels.
const SCREEN_W: u8 = 160;
/// Height of screen in pixels.
const SCREEN_H: u8 = 144;
#[derive(Copy, Clone, PartialEq)]
enum BGPriority {
Color0,
Color123,
}
/// Pixel Processing Unit.
pub struct PPU {
/// VRAM
vram: [u8; 0x2000],
/// OAM
... |
//! Intermediate representation for C/C++ functions and methods.
use super::comp::MethodKind;
use super::context::{BindgenContext, TypeId};
use super::dot::DotAttributes;
use super::item::Item;
use super::traversal::{EdgeKind, Trace, Tracer};
use super::ty::TypeKind;
use crate::clang;
use crate::parse::{
ClangItem... |
use super::match_::Match;
use crate::{iface, Inspect, Registry};
use futures::ready;
use hyper::body::{Buf, HttpBody};
use linkerd2_conditional::Conditional;
use linkerd2_proxy_api::{http_types, pb_duration, tap as api};
use linkerd2_proxy_http::HasH2Reason;
use pin_project::pin_project;
use std::convert::TryFrom;
use ... |
// 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::{
builtin_environment::BuiltinEnvironment,
klog,
model::{
hooks::HooksRegistration,
model:... |
use crate::java::constants::{ArrayType, Type};
use crate::java::constructs::{Attribute, Method, Signature};
use crate::java::dictionary::{Dictionary, DictionaryIter};
use std::cmp::Eq;
pub type PoolIdx = u16;
#[derive(Debug, PartialEq, Hash)]
pub enum PoolElement {
Utf8Value(String),
ClassInfo(PoolIdx),
/... |
//! Utilities for dealing with operators and Ast nodes related to them, like `Infix`, `Section*`.
use crate::prelude::*;
use crate::Id;
use crate::Infix;
use crate::SectionLeft;
use crate::SectionRight;
use crate::SectionSides;
use crate::Ast;
use crate::Opr;
use crate::Shape;
use crate::assoc::Assoc;
use crate::crum... |
// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//
// 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 THIRD-PARTY file.
use std::fmt;
use std... |
// 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::model::{
model::Model,
realm::BindReason,
resolver::{Resolver, ResolverError, ResolverFut},
routing,
}... |
/// Tokio-level (not Tower-level) proxy-specific networking.
use bytes::{Buf, BytesMut};
use futures::{Async, Future, IntoFuture, Poll, Stream, future::{self, Either}, stream};
use std;
use std::cmp;
use std::io;
use std::net::SocketAddr;
use tokio::{
io::{AsyncRead, AsyncWrite},
net::{TcpListener, TcpStream, ... |
//! Reactive primitives for Sycamore.
#![warn(missing_docs)]
mod arena;
mod context;
mod effect;
mod iter;
mod memo;
mod signal;
pub use effect::*;
pub use signal::*;
use std::any::{Any, TypeId};
use std::cell::RefCell;
use std::collections::HashMap;
use std::marker::PhantomData;
use std::mem;
use std::ops::Deref;
... |
#[macro_use]
extern crate beserial_derive;
#[macro_use]
extern crate log;
extern crate nimiq_bls as bls;
extern crate nimiq_hash as hash;
extern crate nimiq_keys as keys;
extern crate nimiq_macros as macros;
extern crate nimiq_primitives as primitives;
extern crate nimiq_utils as utils;
extern crate strum_macros;
use ... |
//! Importer for MMB files into the [`Environment`].
use std::convert::{TryFrom, TryInto};
use std::rc::Rc;
use crate::{Environment, Modifiers, AtomId, TermId,
Type, Term, Thm, TermKind, ThmKind, ExprNode, Expr, Proof};
use crate::elab::proof::{IDedup, ProofKind, ProofHash, build};
use crate::{FileRef, FileSpan, S... |
use anyhow::anyhow;
use naga::{
ImageClass, ImageDimension, ScalarKind, StorageAccess, StorageClass, StorageFormat, TypeInner,
};
use notify::{self, DebouncedEvent, RecommendedWatcher, RecursiveMode, Watcher};
use std::cell::RefCell;
use std::collections::HashMap;
use std::collections::{btree_map::Entry, BTreeMap};... |
use c2rust_bitfields::BitfieldStruct;
use libc::{c_char, c_int, c_short, c_uchar, c_uint, off_t, size_t, ssize_t};
use std::ffi::{c_void};
use std::io;
use std::marker::PhantomData;
use std::ptr::{NonNull};
use crate::{
HtsThreadPool,
get_cstr, from_cstr, hts_err, kstring_t, sam_hdr_t,
};
pub type HtsPos = i64... |
use super::config::*;
use std::sync::Arc;
use tokio::time::sleep;
use futures::Stream;
use futures::StreamExt;
use http::StatusCode;
use http::{Request, Response};
use hyper::{Body, Request as HyperRequest, Response as HyperResponse};
use opentelemetry::global;
use opentelemetry::metrics::{Descriptor, InstrumentKind};... |
use crate::internals::*;
use proc_macro2::Span;
use proc_macro2::TokenStream;
use quote::quote_spanned;
use quote::{quote, ToTokens};
use syn::spanned::Spanned as _;
use syn::Lit;
use syn::Meta::*;
use syn::MetaNameValue;
use syn::NestedMeta::*;
/// Parsed `#[rune(..)]` field attributes.
#[derive(Default)]
pub(crate) ... |
#![warn(missing_docs)]
//! This crate provides the [`Fortify`] wrapper type. When used with a borrowing type (i.e. a type
//! with a lifetime parameter) it allows values of that type to reference arbitrary data owned by
//! the `Fortify` itself.
//!
//! # Example
//! ```
//! use fortify::*;
//!
//! // Define a borrowin... |
///!
///! Vec<Atoms>
///! ^
///! | has multiple
///! Vec<Molecules>
///! ^
///! | has multiple
///! Vec<Structure>
use bytemuck::cast_slice;
use nalgebra_glm::*;
use wgpu::util::*;
use wgpu::*;
use std::cell::RefCell;
use std::convert::TryInto;
use std::mem::size_of;
use std::rc::Rc;
use crate::ca... |
use std::env;
use std::error::Error;
use std::fmt::{self, Debug, Display};
use std::fs;
use std::os::raw::{c_int, c_uint};
use std::path::{Path, PathBuf};
use std::process::Command;
use std::str;
use regex::Regex;
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Default)]
pub struct Version {
pub major: u8,
... |
use futures::stream::{self, TryStreamExt};
use futures::Stream;
use std::convert::TryFrom;
use std::{
pin::Pin,
task::{Context, Poll},
time::Duration,
};
use structopt::StructOpt;
use tokio::io::{AsyncRead, AsyncWrite};
use tokio::sync::mpsc;
use tonic::transport::server::Connected;
use tonic::transport::{E... |
// Copyright 2016 - 2018 <NAME> "bluss"
//
// 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 acc... |
use std::cmp::{max, Ordering};
use std::collections::VecDeque;
use std::fmt::Debug;
use std::ptr::NonNull;
#[derive(Copy, Clone, PartialEq, Debug)]
pub enum Color {
Red,
Black,
}
pub struct Node<K, V> {
pub key: K,
pub value: V,
pub left: Option<NonNull<Node<K, V>>>,
pub right: Option<NonNull<... |
// Copyright 2018-2020 argmin developers
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according... |
use super::{
mercator_x_from_lng, mercator_y_from_lat, mercator_z_from_altitude, LngLat, LngLatBounds,
MercatorCoordinate,
};
use crate::geo::edge_insets::{EdgeInsets, PaddingOptions};
use crate::source::OverscaledTileId;
use crate::util::{wrap, Aabb, Frustum, IntersectionType};
use nalgebra::{clamp, Matrix, Ma... |
use crate::messages::block_header::BlockHeader;
use crate::messages::message::Payload;
use crate::util::{sha256d, var_int, Error, Hash256, Result, Serializable};
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use hex;
use std::fmt;
use std::io;
use std::io::{Read, Write};
/// A block header and partial me... |
use rand::{Rng, thread_rng};
use std::io::Write;
#[derive(Debug)]
enum Error {
Exit,
Io(std::io::Error),
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
&Error::Exit => write!(f, "User requested exit"),
&Err... |
// © Copyright 2021 Sudoku Rustic’s Authors
// Subject to the MIT License. See file LICENSE for details.
type ElementType = u8; // Capable of containg all elements plus empty, normally 0..=9.
type SizeType = usize; // Capable of indexing all cells in a grid plus one, normally 82.
/// A sudoku grid.
#[derive(Clone)]
p... |
use crate::{
class::Class,
context::Context,
convert::IntoQj,
error::{Error, ErrorKind},
result::Result,
util::Opaque,
value::Value,
};
pub use quijine_core::ValueTag as Tag;
use std::{
any::type_name,
convert::TryFrom,
fmt::{self, Formatter},
marker::PhantomData,
ops::{D... |
use std::{error, fmt};
/// Trie: A simple trie data structure, supporting generic value types and byte-slice keys.
pub struct Trie<Value> {
root: HeapNode<Value>,
}
impl<Value> Trie<Value> {
/// Returns a new empty trie.
pub fn new() -> Self {
Self { root: new_node() }
}
/// Inserts `valu... |
#![feature(proc_macro_hygiene, decl_macro)]
#![feature(custom_inner_attributes)]
#[macro_use]
extern crate log;
pub mod net;
mod runtime;
mod cache;
mod perms;
use cache::PathManager;
use perms::*;
pub mod protos {
tonic::include_proto!("request");
}
use protos::karl_host_server::KarlHostServer;
use protos::*;
use... |
use crate::b2_body::*;
use crate::b2_fixture::*;
use crate::b2_math::*;
use std::cell::RefCell;
use std::rc::{Rc, Weak};
use crate::b2_collision::*;
use crate::b2_settings::*;
use crate::b2_world_callbacks::*;
use crate::b2_contact_manager::*;
use crate::linked_list::LinkedListNode;
use crate::double_linked_list::D... |
//! Once a Map exists, the player can edit it in the UI (producing `MapEdits` in-memory), then save
//! the changes to a file (as `PermanentMapEdits`). See
//! <https://dabreegster.github.io/abstreet/map/edits.html>.
use std::collections::{BTreeMap, BTreeSet};
use anyhow::Result;
use serde::{Deserialize, Serialize};
... |
use super::{
catalog::chunk::ChunkMetadata, pred::to_read_buffer_predicate, streams::ReadFilterResultsStream,
};
use data_types::chunk_metadata::ChunkAddr;
use data_types::{
chunk_metadata::{ChunkId, ChunkOrder},
delete_predicate::DeletePredicate,
partition_metadata,
};
use datafusion::physical_plan::Se... |
#[warn(unused_imports)]
extern crate rust_htslib;
extern crate bio_types;
extern crate libc;
// extern crate hdf5;
use rust_htslib::bam;
use rust_htslib::bam::Format;
use rust_htslib::bam::Header;
use rust_htslib::bam::Writer;
use rust_htslib::bam::Read;
use rust_htslib::bam::Record;
use rust_htslib::bam::record::Ciga... |
/// 力扣(4. 寻找两个正序数组的中位数)https://leetcode-cn.com/problems/median-of-two-sorted-arrays/
/// 归并算法
pub fn find_median_sorted_arrays(nums1: Vec<i32>, nums2: Vec<i32>) -> f64 {
let len1 = nums1.len();
let len2 = nums2.len();
// let mut merge_vec = Vec::<i32>::with_capacity(len1 + len2);
let mut merge_vec = v... |
use crate::core::dialog::{ChoiceData, Dialog, DialogBody, DialogKind, Scene};
use crate::core::kukuri_data::KukuriData;
use serde::{Deserialize, Serialize};
pub struct KukuriScript;
impl KukuriScript {
pub fn parse(content: &str) -> KukuriData {
let mut sp_data = SceneProcessData::new();
let mut s... |
use crate::*;
use futures::future::FutureExt;
use futures::sink::SinkExt;
use futures::stream::StreamExt;
use ghost_actor::dependencies::tracing;
use kitsune_p2p_types::dependencies::ghost_actor;
use kitsune_p2p_types::dependencies::ghost_actor::GhostControlSender;
use kitsune_p2p_types::dependencies::serde_json;
use k... |
use crate::WitIdsToIndices;
use crate::{ImportId, TypeId, ValType, WasmInterfaceTypes, WitIndicesToIds};
use anyhow::Result;
use id_arena::{Arena, Id};
use walrus::IndicesToIds;
#[derive(Debug, Default)]
pub struct Funcs {
arena: Arena<Func>,
}
#[derive(Debug)]
pub struct Func {
id: FuncId,
pub ty: TypeId... |
// 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... |
// PASS | select_instructions
// ---------------------------------------------------------------------------
// USAGE | select_instructions : alloc_lang::Program ->
// | alloc_lang::Program
// ---------------------------------------------------------------------------
// RETURNS | Th... |
//
// Copyright 2021 <NAME>. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
use std::collections::HashMap;
use super::hash::H256;
use chain;
use super::transaction::RawTransaction;
use miner;
/// Block template as described in:
/// https://github.com/bitcoin/bips/blob/master/bip-0022.mediawiki
/// https://github.com/bitcoin/bips/blob/master/bip-0023.mediawiki
/// https://github.com/bitcoin/bi... |
use std::{cmp::Ordering, collections::HashMap, time::Duration};
use cosmicverge_shared::{
euclid::Point2D,
protocol::Response,
solar_systems::{universe, Pixels, SolarSystemId},
};
use crossbeam::channel::Sender;
use web_sys::{HtmlCanvasElement, MouseEvent, WheelEvent};
use yew::{
prelude::*,
servic... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.