text
stringlengths
7.05k
33.9k
/* Copyright 2021 JFrog Ltd 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...
use crate::block::Block; use crate::fields::GettableFields; use crate::header::BlockHeader; use crate::network::chunkable::Chunkable; use crate::network::command_utils::Command; use crate::network::message_types::MessageType; use crate::network::node::MAX_TRANSMIT_SIZE; use crate::reward::RewardState; use crate::state:...
#![deny(missing_docs)] //! Build a Rust project in a container for deployment to either //! Amazon Linux 2 or AWS Lambda. pub use docker_command; use anyhow::{anyhow, Context, Error}; use cargo_metadata::MetadataCommand; use docker_command::command_run::{Command, LogTo}; use docker_command::{BuildOpt, Launcher, RunO...
use std::{ error::Error, fmt::{Debug, Display, Formatter, Result as FmtResult}, fs::{read, File}, io::{BufRead, BufReader, Error as IOError}, net::{AddrParseError, IpAddr, Ipv4Addr, SocketAddr}, path::Path, str::Utf8Error, time::Duration, }; use base64; use diesel::{ pg::PgConnectio...
#![cfg_attr(feature = "windows_subsystem", windows_subsystem = "windows")] #![allow(clippy::type_complexity)] // TODO mod capturer; mod fonts; mod rw_condvar; mod screen_dimension; mod stready_redraw; mod timers; use sha2::Digest; use std::{ cell::Cell, sync::{atomic::AtomicU64, Arc}, time::{Duration, Ins...
//! # The RustyScheme memory allocator and garbage collector. //! //! This module contains the `RustyScheme` allocator and garbage collector. //! The collector is a simple, two-space copying collector using Cheney's //! algorithm. //! //! ## Finalizer support //! //! Finalizers for custom objects are supported by: //! ...
//! Interfacing the LSM9DS1 3D accelerometer, gyroscope, and magnetometer //! using SPI3. //! //! Using the SparkFun LSM9DS1 breakout board, connect: //! PA_8 -> CS_AG (Chip Select for accelerometer/gyro) //! PA_9 -> CS_M (Chip Select for magnetometer) //! PB_3 -> SCL (SPI clock) //!...
mod conversion; mod error; use crate::{ ast::{Id, ParameterizedValue, Query}, connector::{metrics, queryable::*, ResultSet, Transaction}, error::Error, visitor::{self, Visitor}, }; use native_tls::{Certificate, Identity, TlsConnector}; use percent_encoding::percent_decode; use std::{borrow::Borrow, con...
// Copyright 2020-2021 <NAME> // SPDX-License-Identifier: Apache-2.0 use super::{connections::ConnectionManager, *}; use crate::behaviour::{ BehaviourError, MessageEvent, P2PEvent, P2PNetworkBehaviour, P2POutboundFailure, P2PReqResEvent, }; use core::{ops::Deref, time::Duration}; use futures::{channel::mpsc::Unbou...
// 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. //! Parsing and serialization of IPv6 packets. use std::fmt::{self, Debug, Formatter}; use std::ops::Range; use byteorder::{ByteOrder, NetworkEndian}; us...
use std::{cell::RefCell, convert::TryFrom}; use std::{rc::Rc, vec}; use js_sys::Array; use wasm_bindgen::JsCast; use wasm_bindgen::prelude::*; use web_sys::{ MessageEvent, RtcConfiguration, RtcDataChannel, RtcDataChannelInit, RtcDataChannelState, RtcIceCandidateInit, RtcIceServer, RtcPeerConnection, RtcPeerCon...
use { crate::{context::Context, locations}, anyhow::{Context as AnyhowContext, Result}, rusqlite as sql, std::path::Path, thiserror::Error, }; #[derive(Error, Debug)] pub enum Error { #[error("Cannot read database path")] DbPath, // TODO Record the query that failed? #[error("Query...
use crate::error::ContractError; use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg, SellNft}; use crate::package::{ ContractInfoResponse, OfferingsResponse, PaymentResponse, QueryOfferingsResult, }; use crate::state::{increment_offerings, Offering, CONTRACT_INFO, MAPPED_DENOM, OFFERINGS}; #[cfg(not(feature = "l...
/*! Fungible Token implementation with JSON serialization. NOTES: - The maximum balance value is limited by U128 (2**128 - 1). - JSON calls should pass U128 as a base-10 string. E.g. "100". - The contract optimizes the inner trie structure by hashing account IDs. It will prevent some abuse of deep tries. Shou...
use futures::Future; use futures::FutureExt; use crate::base::LengthPrefixedVec; use crate::client::PeerClient; use crate::generated::{CommitId, ErrorCode}; use crate::storage::local::response_helpers::into_error_code; use crate::storage::ROOT_INODE; use futures::future::{err, join_all, Either}; use log::info; use sha...
#![feature(duration_float)] use bitflags::bitflags; use std::collections::{VecDeque, BTreeMap}; use std::{io, time}; bitflags! { pub(crate) struct Available: u8 { const READ = 0b00000001; const WRITE = 0b00000010; } } pub enum State { // Listen, SynRcvd, Estab, FinWait1, FinWait2, TimeWait, } impl State...
//! Defines regex replacement rules to filter text with. //! //! This module defines the FilterRule type, which represents //! a regex replacement rule, as well as several functions //! that return lists of predefined filter rules. //! //! Creating a `FilterRule` compiles a [regular expression](https://docs.rs/regex/1/...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - DMA Interrupt Status Register"] pub intstat: INTSTAT, #[doc = "0x04 - DMA Interrupt Terminal Count Request Status Register"] pub inttcstat: INTTCSTAT, #[doc = "0x08 - DMA Interrupt Terminal Count Request Clear Register"...
use bytes; use failure::{err_msg, Error}; use slab::Slab; use std::collections::HashMap; use std::i32; use std::os::unix::fs::MetadataExt; #[derive(Debug)] pub enum Value { Array(Vec<(i64, bool)>), False, Int(i32), Memory { address: i64, len: i64, }, NaN, Null, Object { ...
use crate::{ command::{families_from_device, Family, Reset, CommandBuffer, CommandPool, Transfer, IndividualReset, PendingState, InitialState, RecordingState, OneShot, PrimaryLevel}, memory::{Block, Heaps, Write}, resource::{buffer::{self, Buffer}, image::{self, Image}, Resources}, wsi::{Surface, Targe...
//! The high level IR, used during type inference. use num::BigInt; use crate::{AtomId, LispVal, FileSpan}; use super::{Binop, Mm0Expr, Unop, VarId, ast::ProcKind, ty}; /// A "generation ID", which tracks the program points where mutation /// can occur. The actual set of logical variables is some subset of /// all `(...
// Copyright 2016 <NAME>. // Copyright 2016 <NAME>. // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // // THE SOFTWARE IS PROVIDED "AS IS" AND AND...
use std::collections::HashMap; use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::Arc; use std::sync::{mpsc::Receiver, mpsc::TryRecvError}; use std::thread; use std::thread::JoinHandle; use std::time::Duration; use std::time::SystemTime; use async_std::task; use log::{debug, error, info}; use tokio::runtime:...
#![feature(bind_by_move_pattern_guards)] mod config; mod context; mod events; mod math; mod widgets; use std::{convert::TryFrom, path::Path}; use cascade::cascade; use cfgen::prelude::CfgenDefault; use euclid::{vec2, Vector2D}; use formatter::FormatMap; use futures::future; use gdk_pixbuf::Pixbuf; use glib::prelude::...
use crate::weechat_utils::MessageManager; use indexmap::IndexMap; use lazy_static::lazy_static; use regex::Regex; use serenity::{ cache::{Cache, CacheRwLock}, model::{id::ChannelId, prelude::*}, prelude::*, }; use std::{borrow::Cow, sync::Arc}; use weechat::{Buffer, ConfigOption, Weechat}; #[derive(Debug, ...
extern crate event; extern crate netutils; extern crate rand; extern crate syscall; use rand::{Rng, OsRng}; use std::collections::{BTreeMap, VecDeque}; use std::cell::RefCell; use std::fs::File; use std::io::{self, Read, Write}; use std::{mem, process, slice, str}; use std::ops::{Deref, DerefMut}; use std::os::unix::i...
use std::sync::Arc; use bvh::aabb::{Bounded, AABB}; use bvh::bounding_hierarchy::BHShape; use nalgebra::{Point2, Point3, Vector2, Vector3}; use tobj::Mesh; use helpers::{coordinate_system, gamma, max_dimension_vec_3, permute, uniform_sample_triangle}; use lights::area::AreaLight; use lights::Light; use materials::Mat...
use std::{collections::HashMap, env, process::Command}; use anyhow::{anyhow, Result}; use terminal_size::{terminal_size, Height, Width}; use crate::config_file::get_env_var; const DEFAULT_WIDTH: i32 = 80; pub struct IoStreams { pub stdin: Box<dyn std::io::Read + Send + Sync>, pub out: Box<dyn std::io::Write...
//! The `private_identity_audit_ffi` is the Foreign Function Interface (FFI) //! for the `private_identity_audit` library. It contains APIs for generating //! unique identity membership proofs and verifying them as part of the //! PIAL project. #![feature(vec_into_raw_parts)] extern crate libc; use codec::{Decode, En...
// This file is part of Substrate. // Copyright (C) 2017-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...
/* * * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech */ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LolMatchHistoryMatchH...
use super::events::{ConfigType, Event, EventBody, EventProvider, Result, WordWrapMode}; use crate::config::Config; use crate::icons::*; use chrono::prelude::*; use core::time::Duration; use itertools::{join, Itertools}; use serde_derive::{Deserialize, Serialize}; use std::borrow::Cow; use std::collections::{HashMap, Ha...
#[cfg(feature = "use-rustls")] use std::sync::Arc; use std::{ collections::VecDeque, fmt::{self, Debug, Formatter}, time::Duration, }; mod client; mod eventloop; mod framed; mod notifier; mod outgoing_buf; #[allow(clippy::all)] mod packet; mod state; #[cfg(feature = "use-rustls")] mod tls; pub use client:...
// Copyright 2021 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. //! Implement the driver side of virtio queue handling. //! The virtqueue struct is expected to be used in userspace VFIO virtio drivers. use std::mem...
use super::utils::{copy_cstr_into_wasm, write_to_buf}; use crate::allocate_on_stack; use libc::{c_char, c_int}; // use libc::{c_char, c_int, clock_getres, clock_settime}; use std::mem; use std::time::SystemTime; #[cfg(not(target_os = "windows"))] use libc::{clockid_t, time as libc_time, timegm as libc_timegm, tm as li...
// 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::hid::command::Command; use crate::hid::packet::{Packet, CONT_HEADER_LENGTH, INIT_HEADER_LENGTH}; use crate::hid::util::pad; use anyhow::{format_...
#![cfg(feature = "test_utils")] #![cfg(todo_redo_old_tests)] #![allow(unused_imports)] #![allow(dead_code)] #![allow(deprecated)] use ::fixt::prelude::*; use fallible_iterator::FallibleIterator; use futures::future::Either; use futures::future::FutureExt; use ghost_actor::GhostControlSender; use hdk::prelude::EntryVisi...
use crate::{ dataflow::{ operators::{CollectCastable, CollectDeclarations, CountExt, FilterMap}, Program, }, repr::{function::FunctionDesc, instruction::Call, terminator::Return, InstructionExt}, }; use differential_dataflow::{ algorithms::graphs::propagate, difference::{Abelian, Mul...
/* This tool is part of the WhiteboxTools geospatial analysis library. Authors: Dr. <NAME> Created: Dec. 15, 2017 Last Modified: Dec. 15, 2017 License: MIT Notes: Compared with the original Whitebox GAT tool, this will output a table with each of the mean, min, max, range, std dev, and total. The output raster can on...
/* * Copyright 2018-2020 TON DEV SOLUTIONS LTD. * * Licensed under the SOFTWARE EVALUATION License (the "License"); you may not use * this file except in compliance with the License. * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASI...
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
/* * Copyright 2019 Comcast Cable Communications Management, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
use std::{cmp::Ordering, ops::Range}; use crate::{ texture_atlas::{TextureAtlas, TextureAtlasSprite}, Rect, Sprite, SPRITE_SHADER_HANDLE, }; use bevy_asset::{AssetEvent, Assets, Handle}; use bevy_core::FloatOrd; use bevy_core_pipeline::Transparent2d; use bevy_ecs::{ prelude::*, system::{lifetimeless::*...
use super::broadcast_utils::{self, ReceiveResults}; use super::*; use crate::broadcast_stage::broadcast_utils::UnfinishedSlotInfo; use crate::entry::Entry; use crate::shred::{Shred, Shredder, RECOMMENDED_FEC_RATE}; use solana_sdk::signature::Keypair; use solana_sdk::timing::duration_as_us; use std::time::Duration; #[d...
use crate::{ discord::beatmap_cache::BeatmapMetaCache, discord::display::ScoreListStyle, discord::oppai_cache::{BeatmapCache, BeatmapInfo}, models::{Beatmap, Mode, Mods, User}, request::UserID, Client as OsuHttpClient, }; use serenity::{ framework::standard::{ macros::{command, group...
use algebra::{ bls12_377::{Bls12_377, Fq as Bls12_377_Fq, Parameters as Bls12_377_Parameters}, bw6_761::Fr, curves::bls12::Bls12Parameters, One, PairingEngine, }; use bls_crypto::{hash_to_curve::try_and_increment_cip22::COMPOSITE_HASH_TO_G1_CIP22, SIG_DOMAIN}; use bls_gadgets::{FpUtils, HashToGroupGadge...
/* * Copyright 2018 The Starlark in Rust Authors. * Copyright (c) Facebook, Inc. and its affiliates. * * 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 * * https://www.apache.org/lic...
use super::{ DecodeState, Error, KeyCode, KeyEvent, KeyState, ScancodeSet, EXTENDED_KEY_CODE, KEY_RELEASE_CODE, }; /// Contains the implementation of Scancode Set 1. /// See the OS dev wiki: <https://wiki.osdev.org/PS/2_Keyboard#Scan_Code_Set_1> pub struct ScancodeSet1; impl ScancodeSet for ScancodeSet1 { ...
use std::hash::{Hash, Hasher}; use fnv::FnvHasher; use time; use state::State; use direction::Direction; use mv::Move; use position::Position; use transposition_table::{Table, Entry}; use lru::LRU; pub struct Bot { initialized: bool, threat_list: [u8; 4], max_history: LRU<(Position, Direction)>, min_...
// Copyright (c) 2018-2020 MobileCoin Inc. //! This module contains the wrapper type for an sgx_key_request_t use crate::{ _macros::FfiWrapper, attributes::{Attributes, ATTRIBUTES_SIZE}, cpu_svn::{CpuSecurityVersion, CPU_SECURITY_VERSION_SIZE}, impl_ffi_wrapper_base, impl_serialize_to_x64, key_id:...
use std::{collections::BTreeMap, fs::File, path::PathBuf, str::FromStr}; #[derive(Default, Debug)] struct Builtin { overloads: Vec<Overload>, } #[derive(Debug)] enum Generic { VecSize, Type, TexelFormat, } #[derive(Debug)] struct Overload { generics: BTreeMap<char, (usize, Generic)>, return_typ...
use anyhow::Context; use nalgebra::{Matrix4, Point3, UnitVector3, Vector3}; use wgpu::util::DeviceExt; /// Creates a right-handed perspective projection matrix with [0,1] depth range. fn perspective_rh(fov_y_radians: f32, aspect_ratio: f32, z_near: f32, z_far: f32) -> [[f32; 4]; 4] { assert!(z_near > 0.0 && z_far ...
//! Remote Bluetooth device. use dbus::{ arg::{RefArg, Variant}, nonblock::{Proxy, SyncConnection}, Path, }; use futures::{pin_mut, select, stream, FutureExt, Stream, StreamExt}; use std::{ collections::{HashMap, HashSet}, fmt, sync::Arc, }; use tokio::time::sleep; use uuid::Uuid; use crate::{...
// // Submissions to DD Custom Leaderboards // use crate::{models::StatsBlockWithFrames, client_https}; use anyhow::bail; use hyper::{Body, Client, Method, Request}; use futures::StreamExt; use crate::ddinfo::{time_as_int, get_os}; use super::models::OperatingSystem; pub struct DdclSecrets { pub iv: Strin...
use maat_graphics::DrawCall; use maat_graphics::imgui::*; use crate::modules::Logs; use std::io::{Write, BufWriter}; use std::fs::File; use std::fs; use std::fs::copy; use std::path::Path; use hlua; use hlua::Lua; use open; use crate::cgmath::{Vector2, Vector3}; const LOCATION: &str = "./Scenes/"; const OBJECTS: ...
use crate::Context; use crate::db::models::Role as SelfRole; use super::consts::*; use regex::Regex; use std::collections::HashMap; use std::error::Error; use std::sync::Arc; use twilight_cache_inmemory::{model::CachedMember, model::CachedGuild}; use twilight_embed_builder::{EmbedBuilder, ImageSource}; use twilight_mod...
// Copyright 2014 The Gfx-rs Developers. // // 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 ag...
//! Functions for parsing and matching versions against requirements, based off //! and compatible with the Elixir Version module, which is used by Hex //! internally as well as be the Elixir build tool Hex client. use std::{ borrow::Borrow, cell::RefCell, cmp::Ordering, collections::HashMap, convert::TryFrom, ...
use fs_err::File; use log::warn; use serde::{Deserialize, Serialize}; use std::{ collections::HashMap, hash::{Hash, Hasher}, io::{self, BufRead, BufReader}, path::Path, sync::Arc, }; use crate::{ rule::{ disambiguation::POSFilter, engine::{ composition::{GraphId, Mat...
mod cargo; mod error; mod manifest; use error::Error; use manifest::Manifest; use anyhow::{bail, Context}; use curl::easy::Easy; use std::ffi::OsString; use std::io::Read; use std::path::{Path, PathBuf}; use std::time::{Duration, Instant}; use indicatif::{ProgressBar, ProgressStyle}; fn main() { if let Err(i) ...
use std::cmp::max; use std::cmp::Ordering; use std::collections::hash_map::Entry; use std::collections::HashMap; use std::collections::HashSet; use binary_heap_plus::BinaryHeap; use anyhow::Result; use stable_bst::TreeMap; use crate::algorithms::arc_compares::ilabel_compare; use crate::algorithms::arc_mappers::Quanti...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - XT Oscillator Control"] pub calxt: CALXT, #[doc = "0x04 - RC Oscillator Control"] pub calrc: CALRC, #[doc = "0x08 - Autocalibration Counter"] pub acalctr: ACALCTR, #[doc = "0x0c - Oscillator Control"] pub oc...
//! Contains definitions of various avro types. use std::io::{Read, Write}; use std::mem; use std::str; use std::collections::HashMap; use complex::Record; use errors::AvroErr; use codec::{Encoder, Decoder}; use complex::Enum; use std::error::Error; fn zig_zag(num: i64) -> u64 { if num < 0 { !((num as u64...
use sawtooth_sdk::consensus::{engine::*, service::Service}; use crate::config::{SnowballConfig}; use crate::state::{SnowballState, SnowballPhase, SnowballDecisionState}; use crate::message::{SnowballMessage, LogMessage}; use std::collections::{HashSet, VecDeque}; use std::thread::sleep; use std::time; use rand; use ...
use crate::{util, Point}; use ncollide2d::{ bounding_volume::AABB, math::Isometry, query::{proximity, Proximity}, shape::{Polyline, Segment}, }; use std::{cmp, cmp::Ordering, fmt}; mod cell_grid; pub use cell_grid::CellGrid; /// ```ignore /// 0 1 2 3 4 B C D /// 0┌─┬─┬─┬─┐ A...
use std::collections::HashMap; use std::fmt; use ::QueryError; use engine::aggregator::Aggregator; use engine::filter::Filter; use engine::types::*; use engine::vector_op::*; use engine::vector_op::vector_operator::BufferRef; use ingest::raw_val::RawVal; use mem_store::column::Column; use mem_store::column::{ColumnDat...
// Copyright 2021 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use std::{alloc::Layout, mem::MaybeUninit, os::unix::io::AsRawFd, str}; use data_model::DataInit; use libc::EINVAL; use sys_util_core::LayoutAllocati...
// 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...
use crate::function::PyFuncArgs; use crate::obj::objiter; use crate::obj::objtraceback::PyTracebackRef; use crate::obj::objtuple::{PyTuple, PyTupleRef}; use crate::obj::objtype; use crate::obj::objtype::PyClassRef; use crate::pyobject::{ IdProtocol, PyClassImpl, PyContext, PyIterable, PyObjectRef, PyRef, PyResult, ...
//! A module defining the `cl_device_id` related types, such as the high-level `Device` type. pub mod information; use wrapper::ffi; use wrapper::information::*; use errors::*; use std::fmt; use std::iter::IntoIterator; bitfield_builder!( [Type, TypeBuilder, "Type"], "cl_device_type", [gpu, "gpu"] => ffi...
// Copyright (c) 2021 The Lutino Projects // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. use std::convert::TryFrom; use nh_common::result::AssetResult; use nh_maths::na; use crate::format::ds1_util::*; use crate...
extern crate libc; extern crate freetype; extern crate rustc_serialize; extern crate docopt; use std::f32; use std::io; use std::io::Read; use std::io::Write; use std::fs::File; use std::process; use std::ptr; use std::slice; use libc::{c_int, c_double, c_void, c_char}; use docopt::Docopt; use freetype as ft; const B...
//! Decoder that will remove NAL header bytes and _Emulation Prevention_ byte //! values from encoded NAL Units, to produce the _Raw Byte Sequence Payload_ //! (RBSP). //! //! The following byte sequences are not allowed to appear in a framed H264 bitstream, //! //! - `0x00` `0x00` `0x00` //! - `0x00` `0x00` `0x01` /...
//! Powerful for avoiding N+1 queries with async/await, based on the DataLoader pattern. //! //! data_loader batches loads which occur during a single "poll", without requiring an artificial delay. //! //! Design inspired by https://github.com/exAspArk/batch-loader and https://github.com/graphql/dataloader //! //! # Us...
mod daily; mod alert; mod hourly; use std::sync::{Arc, Mutex, Weak}; use std::path::{Path, PathBuf}; use std::env::current_dir; use core::future::Future; use gtk::prelude::*; use gtk::{ ApplicationWindow, ActionBar, CenterBox, Label, EditableLabel, Picture, Popover, Image, Entry, ...
use std::f32::consts::{FRAC_PI_2, FRAC_PI_3, FRAC_PI_4, PI}; use bevy::{ ecs::component::Component, input::{mouse::MouseButtonInput, ElementState}, utils::HashMap, }; use bitworks::*; use bevy_egui::{egui, EguiContext, EguiPlugin}; use bevy_mod_picking::*; use bevy_mod_raycast::*; use smooth_bevy_cameras:...
//! Utilities used by the tests in `tests/integration/` use std::path::{Path, PathBuf}; use std::process::Command; use std::ffi::OsStr; use truth::Game; use assert_cmd::prelude::*; pub mod formats; pub struct Format { pub cmd: &'static str, pub game: Game, pub script_head: &'static str, /// Embed a...
use crate::prototype_rust_sdk::{ CancelExternalWfResult, CancellableID, CommandCreateRequest, CommandSubscribeChildWorkflowCompletion, RustWfCmd, SignalExternalWfResult, TimerResult, UnblockEvent, Unblockable, }; use crossbeam::channel::{Receiver, Sender}; use futures::{task::Context, FutureExt, Stream}; us...
use crate::app::{ActiveView, App, DiffMode}; use crate::dialogs::FileDialog; use crate::util::syntax_highlight::as_styled; use crate::widgets::branches_view::{BranchList, BranchListItem}; use crate::widgets::commit_view::CommitView; use crate::widgets::files_view::{FileList, FileListItem}; use crate::widgets::graph_vie...
use std::ffi::{OsStr, OsString}; use std::path::PathBuf; use std::time::Duration; use std::{io, mem}; use widestring::WideCString; use winapi::shared::winerror::{ERROR_SERVICE_SPECIFIC_ERROR, NO_ERROR}; use winapi::um::{winnt, winsvc}; use sc_handle::ScHandle; use {ErrorKind, Result, ResultExt}; /// Enum describing ...
use super::{SensorCommon, SensorInterface, PACKET_HEADER_LENGTH}; use crate::Error; use embedded_hal::blocking::delay::DelayMs; #[cfg(feature = "rttdebug")] use panic_rtt_core::rprintln; /// the i2c address normally used by BNO080 pub const DEFAULT_ADDRESS: u8 = 0x4A; /// alternate i2c address for BNO080 pub const AL...
use crate::b2_collision::*; use crate::b2_math::*; use crate::b2_settings::*; use crate::shapes::b2_circle_shape::*; use crate::shapes::b2_edge_shape::*; use crate::shapes::b2_polygon_shape::*; // Compute contact points for edge versus circle. // This accounts for edge connectivity. pub fn b2_collide_edge_and_circle( ...
// MIT/Apache2 License use super::{double_to_fixed, fixed_to_double}; use crate::{ auto::render::{Fixed, Linefix, Pointfix, Trapezoid, Triangle}, log_trace, }; use alloc::{vec, vec::Vec}; use core::{ cmp::Ordering, iter::{Fuse, FusedIterator}, mem, }; /// Tesselate a shape into a set of triangles....
// Copyright (c) 2017 <NAME>, RWTH Aachen University // 2018 <NAME>, RWTH Aachen University // // 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 fi...
//! Vulkan version. use std::sync::Arc; use anyhow::{anyhow, Context}; use cgmath::{ Angle, EuclideanSpace, Matrix4, Point3, Quaternion, Rad, Rotation, Rotation3, Vector3, }; use fbx_viewer::{fbx, CliOpt}; use log::{debug, error, info, trace}; use vulkano::{ buffer::{BufferUsage, CpuBufferPool}, command_b...
#[macro_use] extern crate log; #[cfg_attr(feature = "scripting", macro_use)] #[cfg(feature = "scripting")] extern crate lua_ffi; extern crate strum; #[macro_use] extern crate strum_macros; use std::{env, mem}; use std::cell::UnsafeCell; use std::path; use std::time::Instant; use ggez::{Context, ContextBuilder, GameEr...
mod utils; use lazy_static::lazy_static; use std::cell::RefCell; use std::cmp; use std::f64; use std::rc::Rc; use std::sync::Mutex; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; #[wasm_bindgen] extern "C" { #[wasm_bindgen(js_namespace = console)] fn log(s: &str); } lazy_static! { static ref CON...
use crate::cell::Cell; use crate::error::Error; use crate::error::Error::{ InvalidBytecode, InvalidNumArgs, InvalidProcedure, InvalidSyntax, VariableNotBound, }; use crate::vm::environment::{BindingSource, EnvironmentMap, LexicalEnvironment}; use crate::vm::lambda::Lambda; use crate::vm::opcode::OpCode; use crate::...
mod config_files; mod logger; mod test_bins; #[cfg(test)] mod tests; #[cfg(feature = "plugin")] use crate::config_files::NUSHELL_FOLDER; use crate::logger::{configure, logger}; use log::info; use miette::Result; #[cfg(feature = "plugin")] use nu_cli::read_plugin_file; use nu_cli::{ evaluate_commands, evaluate_file...
//! Crate `ruma_api` contains core types used to define the requests and responses for each endpoint //! in the various [Matrix](https://matrix.org) API specifications. //! These types can be shared by client and server code for all Matrix APIs. //! //! When implementing a new Matrix API, each endpoint has a request ty...
//! The `sigverify` module provides digital signature verification functions. //! By default, signatures are verified in parallel using all available CPU //! cores. When `--features=cuda` is enabled, signature verification is //! offloaded to the GPU. //! use crate::packet::{Packet, Packets}; use crate::result::Resul...
use super::{ abi::{self, ProcInitInfo}, add_to_process_table, Pid, Process, PROCESSORS, }; use crate::arch::interrupt::consts::{ is_intr, is_page_fault, is_reserved_inst, is_syscall, is_timer_intr, }; use crate::arch::interrupt::{get_trap_num, handle_reserved_inst}; use crate::arch::{ cpu, fp::FpSta...
// Copyright (c) 2020 Huawei Technologies Co.,Ltd. All rights reserved. // // StratoVirt is licensed under Mulan PSL v2. // You can use this software according to the terms and conditions of the Mulan // PSL v2. // You may obtain a copy of Mulan PSL v2 at: // http://license.coscl.org.cn/MulanPSL2 // THIS SOFTWA...
//! # Standalone Pact Stub Server //! //! This project provides a server that can generate responses based on pact files. It is a single executable binary. It implements the [V2 Pact specification](https://github.com/pact-foundation/pact-specification/tree/version-2). //! //! [Online rust docs](https://docs.rs/pact-stu...
use crate::conn::AmConnCore; use crate::hdb_response::InternalReturnValue; use crate::protocol::parts::{ HdbValue, LobFlags, ParameterDescriptors, ParameterRows, ResultSetMetadata, TypeId, }; use crate::protocol::{ Part, PartKind, Request, RequestType, ServerUsage, HOLD_CURSORS_OVER_COMMIT, }; use crate::types_...
/* * Regular expressions. * * This module fits the python re interface onto the rust regular expression * system. */ use std::fmt; use num_traits::Signed; use regex::bytes::{Captures, Regex, RegexBuilder}; use crate::function::{Args, OptionalArg}; use crate::obj::objint::{PyInt, PyIntRef}; use crate::obj::objstr...
// Copyright © 2019-2020 VMware, Inc. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 OR MIT //! Evaluates a virtual address space implementation using node-replication. #![feature(test)] #![feature(bench_black_box)] extern crate alloc; use std::fmt; use std::mem::transmute; use std::pin::Pin; use log::...
use std::env; use std::ffi::{OsStr, OsString}; use std::fs::File; use std::io::{Read, Write}; use std::path::{Path, PathBuf}; use envoy; use serde_json; use volta_core::path::{create_file_symlink, ARCH, OS}; use test_support::{self, ok_or_panic, paths, paths::PathExt, process::ProcessBuilder}; #[derive(PartialEq, C...
mod operator; use crate::operator::{Operator, OPERATORS}; use itertools::iproduct; use num::rational::Rational64; use fxhash::{FxHashMap as HashMap, FxHashSet as HashSet}; use serde::{Serialize, Deserialize}; #[derive(Debug)] pub struct RationalSearch { denom_cut: i64, generatable_nums: Vec<Vec<Rational64>>, ...
use crate::{ error::{CollectedError, CollectedResult}, peer_connection::Message, FileStatus, }; use rand::{ prelude::{IteratorRandom, StdRng}, SeedableRng, }; use sha1::{Digest, Sha1}; use std::{ fmt, future::Future, io::SeekFrom, pin::Pin, sync::{ atomic::{AtomicUsize, O...