text
stringlengths
7.05k
33.9k
use crate::dep_graph::DepContext; use crate::query::plumbing::CycleError; use crate::query::{QueryContext, QueryStackFrame, SimpleDefKind}; use rustc_data_structures::fx::FxHashMap; use rustc_errors::{struct_span_err, Diagnostic, DiagnosticBuilder, Handler, Level}; use rustc_session::Session; use rustc_span::Span; us...
// Copyright 2020-2021 the Deno authors. All rights reserved. MIT license. use crate::swc_util::AstParser; use crate::ReexportKind; use futures::future::LocalBoxFuture; use swc_common::comments::CommentKind; use swc_common::Span; use swc_ecmascript::ast::Decl; use swc_ecmascript::ast::DefaultDecl; use swc_ecmascript::a...
// Copyright (c) 2021, <NAME>, <NAME> 10, bus 2452, B-3001 Leuven-Heverlee, Belgium. // Copyright (c) 2021, Cosmian Tech SAS, 53-55 rue La Boétie, Paris, France. use crate::asm::AugmentedBlock; use crate::asm::AugmentedStatement; use crate::asm::Block; use crate::asm::Body; use crate::asm::Instruction; use crate::asm...
// Copyright 2019 The Druid Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
//! Richer loop fusion rules. use ast::BuilderKind::*; use ast::ExprKind::*; use ast::Type::*; use ast::*; use error::*; use super::uniquify; use util::SymbolGenerator; extern crate fnv; struct MergeSingle<'a> { params: &'a Vec<TypedParameter>, value: &'a TypedExpr, } impl<'a> MergeSingle<'a> { fn ext...
use jormungandr_lib::interfaces::{ AccountState, Address, EnclaveLeaderId, FragmentOrigin, Rewards as StakePoolRewards, StakePoolStats, TaxTypeSerde, }; use jormungandr_lib::time::SystemTime; use actix_web::error::{ErrorBadRequest, ErrorInternalServerError, ErrorNotFound}; use actix_web::{Error, HttpResponse};...
//! A [`crate::sharded::Cache`] uses the same basic file-based second //! chance strategy as a [`crate::plain::Cache`]. However, while the //! simple plain cache is well suited to small caches (down to 2-3 //! files, and up maybe one hundred), this sharded version can scale //! nearly arbitrarily high: each shard shou...
// TODO - remove once schemars stops causing warning. #![allow(clippy::field_reassign_with_default)] use alloc::{format, string::String, vec::Vec}; use core::{ array::TryFromSliceError, convert::TryFrom, fmt::{self, Debug, Display, Formatter}, }; use datasize::DataSize; use rand::{ distributions::{Dis...
// Copyright 2020 ZomboDB, LLC <<EMAIL>>. All rights reserved. Use of this source code is // governed by the MIT license that can be found in the LICENSE file. //! //! Provides interfacing into Postgres' `MemoryContext` system. //! //! The `PgBox<T>` projects Postgres-allocated memory pointers as if they're first-clas...
use crate::magic_crypt::MagicCryptTrait; use log::{error, info}; extern crate num_traits; use num_traits::cast::ToPrimitive; use serde::{Deserialize, Serialize}; use serde_json::{from_value, json, Map, Value}; use std::{env, fs::create_dir, path::Path}; use tda_sdk::responses::{Candle, SecuritiesAccount}; use accounts...
// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // Analysis pass which analyzes how to injects global invariants into the bytecode. use crate::{ function_target::{FunctionData, FunctionTarget}, function_target_pipeline::{ FunctionTargetProcessor, FunctionTargetsHolde...
/* This is dvipdfmx, an eXtended version of dvipdfm by <NAME>. Copyright (C) 2002-2016 by <NAME> and <NAME>, the dvipdfmx project team. Copyright (C) 1998, 1999 by <NAME> <<EMAIL>> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Li...
use std::{ collections::HashMap, env, io::Error as IoError, net::{TcpStream, TcpListener, SocketAddr}, sync::{Arc, Mutex}, time::Duration, }; use rand::Rng; use log::{error, warn, info, debug, trace}; use env_logger::Env; use futures::{future, future::{join}}; use futures::stream::StreamExt; us...
#![feature(llvm_asm)] extern crate syscall; extern crate rand_chacha; extern crate rand_core; #[cfg(target_arch = "x86_64")] extern crate raw_cpuid; extern crate sha2; use std::fs::File; use std::io::{Read, Write}; use rand_chacha::ChaCha20Rng; use rand_core::RngCore; pub const MODE_PERM: u16 = 0x0FFF; pub const M...
//! Masks and various other constants. use super::sq::SQ; /// The total number of players on a chessboard. pub const PLAYER_CNT: usize = 2; /// The total number of types of pieces on a chessboard. pub const PIECE_TYPE_CNT: usize = 8; /// The total number of types of pieces & player combinations on a chessboard. pub c...
//! Defines `Node` for `Tree`. use hyper::{Body, StatusCode}; use log::trace; use crate::helpers::http::PercentDecoded; use crate::router::non_match::RouteNonMatch; use crate::router::route::{Delegation, Route}; use crate::router::tree::segment::{SegmentMapping, SegmentType}; use crate::state::{request_id, State}; u...
use itertools::Itertools; use sgx_rand::*; use sgx_tcrypto::*; use sgx_tse::*; use sgx_types::*; use config::ServerParam; use std::io::{BufReader, Read, Write}; use std::net::TcpStream; use std::prelude::v1::*; use std::ptr; use std::str; use std::string::String; use std::sync::Arc; use std::untrusted::fs; use std::ve...
//! Smart caching and deduplication of requests when using a forking provider use sputnik::backend::{Backend, Basic, MemoryAccount, MemoryVicinity}; use ethers::{ providers::Middleware, types::{Address, BlockId, Bytes, TxHash, H160, H256, U256}, }; use futures::{ channel::mpsc::{channel, Receiver, Sender},...
use laria_vm::{ instructions::Instruction, subroutine::Subroutine, value::{Value, ValueKind}, Script as VMScript, }; use std::{collections::HashMap, convert::TryInto, ops::Range}; use crate::{ lexer::token::LiteralKind, parser::ast::{ BinaryOperator, Block, Expression, ExpressionKind, F...
use common::Result; use native::mbuf::MBuf; use packets::ip::v6::Ipv6Packet; use packets::ip::ProtocolNumbers; use packets::{buffer, checksum, Fixed, Header, Packet, ParseError}; use std::fmt; pub use self::echo_reply::*; pub use self::echo_request::*; pub use self::ndp::neighbor_advert::*; pub use self::ndp::neighbor...
// Copyright 2020 Oxide Computer Company /*! * Generic server-wide state and facilities */ use super::api_description::ApiDescription; use super::config::ConfigDropshot; use super::error::HttpError; use super::handler::RequestContext; use super::http_util::HEADER_REQUEST_ID; use super::router::HttpRouter; use super:...
use crate::ecs; use crate::ecs::prelude::*; use std::path::{Path, PathBuf}; use trekanten::buffer::{HostIndexBuffer, HostVertexBuffer, VertexBufferType}; use trekanten::texture::{MipMaps, TextureDescriptor}; use trekanten::util; use trekanten::vertex::VertexFormat; use ramneryd_derive::Visitable; use crate::camera::...
use std::{ collections::{BTreeMap, HashMap, HashSet}, fmt::Debug, iter, }; use datasize::DataSize; use itertools::Itertools; use tracing::{debug, info}; use crate::{ components::consensus::{ consensus_protocol::{ProposedBlock, ProtocolOutcome}, highway_core::{ highway::{Dep...
use std::collections::HashMap; use std::mem::take; pub(crate) use pyo3::exceptions; pub(crate) use pyo3::prelude::*; use pyo3::PyIterProtocol; use pyo3::types::{PyDict, PyList, PyTuple, PyType}; use crate::{CircularDependencyError, construct_new_ycd, delete_remove_markers, InvalidDocumentError, InvalidHeaderError, load...
use treeflection::{NodeRunner, Node}; use bincode; use rand::Rng; use rand; use crate::files::build_version; use std::net::{TcpListener, UdpSocket, IpAddr, SocketAddr}; use std::io::Read; use std::io::Write; use std::str; use std::time::{Instant, Duration}; use crate::input::state::ControllerInput; pub struct NetCom...
pub extern crate cgmath; extern crate lodepng; extern crate rgb; extern crate hound; extern crate lewton; extern crate sample; extern crate time_calc; #[macro_use] extern crate log; extern crate fern; #[macro_use] extern crate serde_derive; extern crate bincode; extern crate ron; extern crate serde; #[macro_use] pu...
use crate::error::{ServerSendError, TcpError}; use crate::network::ConnectionInfo; use crate::notifications; use crate::state::server::Server; use crate::state::{State, StatePhase}; use futures_util::select; use futures_util::stream::{SplitSink, SplitStream, Stream}; use futures_util::{FutureExt, SinkExt, StreamExt}; ...
use metal::*; use crate::cx::*; #[derive(Default,Clone)] pub struct AssembledMtlShader{ pub instance_slots:usize, pub uniforms_dr: Vec<ShVar>, pub uniforms_dl: Vec<ShVar>, pub uniforms_cx: Vec<ShVar>, pub texture_slots:Vec<ShVar>, pub rect_instance_props: RectInstanceProps, pub named_insta...
#[allow(non_camel_case_types)] #[derive(Debug, Clone, Copy, PartialEq)] #[repr(u32)] pub enum ELFSectionType { /// Identifies the section header as inactive. This section header does not /// have an associated section. /// Other members of the section header have undefined values. SHT_NULL, /// I...
#![feature(io_read_to_string)] use std::collections::HashMap; use std::error::Error; use std::path::PathBuf; use clap::Parser; use midly::num::{u15, u24, u28, u4, u7}; use midly::{ Format, Header, MetaMessage, MidiMessage, Smf, Timing, Track, TrackEvent, TrackEventKind, }; mod utils; use crate::utils::{parse_pos...
use std::borrow::Cow; use std::path::Path; use std::str::FromStr; use lazy_static::lazy_static; use regex::{Captures, Regex}; use crate::config::Config; use crate::features::OptionValueFunction; use crate::git_config::{GitConfig, GitConfigEntry, GitRemoteRepo}; pub fn make_feature() -> Vec<(String, OptionValueFuncti...
use crate::animations_fx::Animation; use super::*; use indexmap::IndexMap; use std::{cell::RefCell, collections::HashMap, rc::Rc}; pub type ResourceName = String; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub enum AssetLoadingStage { SplashStart, SplashProgress, SplashFinish, WaitingToS...
/* * Copyright 2020 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, ...
use std::{ collections::{HashMap, hash_map::Entry}, fmt, fs::File, hash::{Hash, Hasher}, marker::PhantomData, io, path::Path, }; use byteorder::{ByteOrder, LittleEndian, ReadBytesExt}; use crate::{ prelude::*, handle::hsize, io::{ Error, parse::{self, ParseBuf, ...
// Copyright 2018-2019 <NAME> <<EMAIL>> // Licensed under the MIT License. //! The main CLI driver logic. #![deny(missing_docs)] #![allow(proc_macro_derive_resolution_fallback)] extern crate app_dirs; extern crate chrono; #[macro_use] extern crate clap; // for arg_enum! #[macro_use] extern crate diesel; #[macro_use]...
#![allow(clippy::too_many_lines)] #![allow(clippy::used_underscore_binding)] use anyhow::{format_err, Error}; use dioxus::{ core::exports::futures_channel::oneshot::{channel, Sender}, prelude::{ dioxus_elements, fc_to_builder, format_args_f, rsx, use_future, use_state, Element, LazyNodes, NodeF...
//! A single pod in a project. use compose_yml::v2 as dc; use compose_yml::v2::MergeOverride; use std::collections::btree_map; use std::collections::{BTreeMap, BTreeSet}; use std::ffi::OsString; use std::fmt; use std::path::{Path, PathBuf}; use crate::args; use crate::cmd::CommandRun; use crate::command_runner::Comma...
#![allow(unused_imports)] use crate::engine::timeout; use error_chain::bail; use std::fmt::Debug; use std::fmt::Formatter; use std::mem; use std::net::{SocketAddr, ToSocketAddrs}; use std::str; use std::time; use std::time::Duration; use tokio::io; use tokio::net; use tokio::net::UdpSocket; use tracing::{debug, error, ...
use crate::translator::state::{TranslationState, Variable}; use brucket_analyzer::type_analyzer::NodeTypes; use brucket_analyzer::variables_analyzer::Variables; use brucket_ast::ast_type::{LambdaType, Type}; use brucket_ast::constant_value::{Boolean, ConstantValue, ConstantVariant, Number}; use brucket_ast::function::{...
use arc_swap::{access::Map, ArcSwap}; use helix_core::{ config::{default_syntax_loader, user_syntax_loader}, pos_at_coords, syntax, Selection, }; use helix_lsp::{lsp, util::lsp_pos_to_pos, LspProgressMap}; use helix_view::{align_view, editor::ConfigEvent, theme, Align, Editor}; use serde_json::json; use crate:...
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 use crate::{ connection::ProcessingError, crypto::{application::limited, OneRttKey, ProtectedPayload}, packet::{ encoding::PacketEncodingError, number::PacketNumber, short::{...
use api::ApiSvr; use apis_interface::InterfaceSyncProcessor; use apis_log::LogSyncProcessor; use apis_route::RouteSyncProcessor; use counters::Counters; use crossbeam_queue::ArrayQueue; use efd::Efd; use epoll::{Epoll, EpollClient, EPOLLIN}; use graph::{GnodeCntrs, GnodeInit, Graph}; use l2_eth_encap::EncapMux; use log...
use wasm_bindgen::prelude::*; use wasm_bindgen::Clamped; use web_sys::{CanvasRenderingContext2d, ImageData}; use js_sys::Uint8ClampedArray; use js_sys::Array; use std::cell::RefCell; use std::rc::Rc; use std::cell::RefMut; use std::collections::VecDeque; use std::f64::consts::PI; extern crate console_error_panic_h...
use cpu::registers::{Flag, Reg8, Reg16}; #[derive(Copy, Clone, Debug)] pub enum Src8 { Imm(u8), Reg(Reg8), Indir(Reg16), Mem(u16), } fn src_reg8(opcode: u8) -> Src8 { Src8::Reg(byte_to_reg8(opcode & 0b111)) } fn src_mem(lower: u8, upper: u8) -> Src8 { Src8::Mem(u16_val(lower, upper)) } #[d...
mod mr_db; mod review_db; use crate::mr_db::RevInfo; use crate::review_db::*; use anyhow::anyhow; use git2::{Oid, Repository}; use gitlab::{Gitlab, MergeRequest, MergeRequestInternalId, MergeRequestState, ProjectId}; use once_cell::sync::{Lazy, OnceCell}; use std::collections::HashSet; use std::io::{stdin, stdout, Buf...
use crate::camera::{ ActiveCamera, CameraProjection, CameraResizeSystem, CameraView, DollyCamera, FocusTarget, GridCamera, OrbitalCamera, SlideCamera, }; use crate::colors; use crate::comp::{GlTexture, Mesh, MeshCommandBuffer, MeshUpkeepSystem, Tag, Transform}; use crate::draw2d::Canvas; use crate::errors::*; u...
use hashbrown::HashMap; use rand::{prelude::IteratorRandom, Rng, SeedableRng}; use serde::{Deserialize, Serialize}; use pokedex::moves::MoveId; use crate::{ actions::{WorldAction, WorldActions}, character::{ npc::{ group::{MessageColor, NpcGroup, NpcGroupId}, trainer::TrainerDi...
// suppress inscrutable useless_attribute clippy that shows up when // using derive(FromPrimitive) #![cfg_attr(feature = "cargo-clippy", allow(clippy::useless_attribute))] //! This module provides the ability to parse escape sequences and attach //! semantic meaning to them. It can also encode the semantic values as /...
extern crate comrak; extern crate regex; use std::fs::File; use std::io::prelude::*; use std::path::Path; use std::process; use super::parse::{MdFile, MdHead}; use super::util::*; use self::comrak::{ComrakOptions, markdown_to_html}; use self::regex::Regex; use super::site::Site; pub fn render(site: &Site, public: &...
// Copyright 2017 <NAME> // // 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 to those terms...
use miniquad::*; use crate::sim::*; pub type GFXPos = [f32;2]; use std::f32::consts::PI; pub fn pos_to_xy(input: &Pos) -> GFXPos{ let a = input.x as f32; let b = input.y as f32; [a*2.+b,b*f32::sqrt(3.)] } pub fn rot_to_angle(r: Rot) -> f32{ (-r as f32)*PI/3. } type Vert = [f32;2]; //Vertex format: (x,...
use crate::request::{ConnectionType, HttpVersion, Request, RequestData}; /// For build and send HTTP response. pub struct Response<'a, 'b, 'c, 'd, 'e> { /// HTTP response code. code: u16, /// Value of "Content-Type" header. content_type: &'a str, /// Data of HTTP response content. content: &'b[...
use std::cell::RefCell; use std::{io, mem}; use std::net::{SocketAddr, ToSocketAddrs}; #[cfg(all(unix, not(feature = "minimal")))] use std::path::Path; use std::rc::Rc; use std::time::Duration; use futures::future::{self, Either}; use futures::{Future, IntoFuture}; use futures::sync::mpsc; #[cfg(feature = "tls")] use ...
use std::borrow::Cow; use std::collections::VecDeque; use std::io::{self, prelude::*}; use log::warn; use crate::collapse::common::{self, CollapsePrivate, Occurrences}; /// `dtrace` folder configuration options. #[derive(Clone, Debug)] pub struct Options { /// Include function offset (except leafs). /// ...
// Copyright (c) The Libra Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ block_storage::BlockStore, counters, error::{error_kind, DbError}, liveness::{ leader_reputation::{ActiveInactiveHeuristic, LeaderReputation, LibraDBBackend}, proposal_generator::ProposalGen...
use crate::shell_history; use clap::AppSettings; use clap::{crate_authors, crate_version, value_t}; use clap::{App, Arg, SubCommand}; use directories_next::{ProjectDirs, UserDirs}; use std::env; use std::path::PathBuf; use std::str::FromStr; use std::time::SystemTime; use std::time::UNIX_EPOCH; #[derive(Debug)] pub en...
// 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. //! Ephemeral port allocation provider. //! //! Defines the [`PortAlloc`] structure and [`PortAllocImpl`] trait, used for //! ephemeral port allocations in...
use heck::*; use std::io::{Read, Write}; use std::path::Path; use std::process::{Command, Stdio}; use witx::*; pub fn generate<P: AsRef<Path>>(witx_paths: &[P]) -> String { let doc = witx::load(witx_paths).unwrap(); let mut raw = String::new(); raw.push_str( "\ // This file is automatically genera...
use anyhow::{anyhow,Result}; use async_stream::stream; use futures_core::stream::Stream; use log::{debug,error,warn}; use prost::Message; use std::collections::HashMap; use tokio::sync::mpsc::{Sender,Receiver, channel}; use tonic::Request; use tonic::transport::Channel; use uuid::Uuid; use super::{ApplicableTo, AxonCon...
// Copyright (c) 2017-2019 <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, modify, merge, publish, d...
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. use anyhow::Result; use libclusterfuzz::get_stack_filter; use regex::RegexSet; use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; mod asan; #[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] pub struct StackEntr...
// Copyright 2021 TiKV Project Authors. Licensed under Apache-2.0. use codec::byte::MemComparableByteCodec; use engine_traits::Result; use tikv_util::codec::number::{self, NumberEncoder}; use tikv_util::codec::{bytes, Error}; use super::*; pub const RAW_KEY_PREFIX: u8 = b'r'; pub const RAW_KEY_PREFIX_END: u8 = RAW_K...
// surfman/surfman/src/platform/android/surface.rs // //! Surface management for Android using the `GraphicBuffer` class and EGL. use crate::context::ContextID; use crate::egl::types::{EGLSurface, EGLint}; use crate::egl; use crate::gl::types::{GLenum, GLuint}; use crate::gl; use crate::gl_utils; use crate::platform::...
//! `store` presents a combined interface to three littlefs2 filesystems: //! internal flash, external flash, volatile/RAM. //! //! It covers two usecases: //! - cryptographic key storage (for trussed itself) //! - somewhat namespaced key-value storage for client apps //! //! The cryptographic keys are stored with a ra...
//! A wrapper around calls to xlib and X related functions. // We allow this _ because if we don't we'll receive an error that it isn't read on _task_guard. #![allow(clippy::used_underscore_binding)] // We allow this so that extern "C" functions are not flagged as confusing. The current placement // allows for easy rea...
// 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. //! Values of this type represent "execution scopes" used by the library to give fine grained //! control of the lifetimes of the tasks associated with par...
use crate::hlreg::HostLocalSystemService; use crate::messagebus::{LookupLink, MessageBus, OP_BIND_ACTOR}; use crate::{ errors::{self, ErrorKind}, messagebus::LookupAlias, }; use crate::{Result, SYSTEM_ACTOR}; use actix::dev::MessageResponse; use actix::prelude::*; use codec::capabilities::Dispatcher; use data_e...
use crate::error::CudaResult; use crate::error::ToResult; use crate::memory::array::ArrayDescriptor; use crate::memory::array::ArrayFormat; use crate::memory::array::ArrayObject; use crate::sys::cuTexObjectCreate; use crate::sys::cuTexObjectGetResourceDesc; use crate::sys::{ self as cuda, cuTexObjectDestroy, CUDA_R...
/// Spanish number interpretor use crate::digit_string::DigitString; use crate::error::Error; mod vocabulary; use super::{LangInterpretor, MorphologicalMarker}; use vocabulary::INSIGNIFICANT; fn lemmatize(word: &str) -> &str { // brute, blind removal of 's' ending is enough here if word.ends_with("os") && wo...
extern crate rand; use rand::random; /// The default CPU clock, in Hz. const CPU_CLOCK: u32 = 600; /// The timers clock, in Hz. const TIMERS_CLOCK: u32 = 60; /// The index of the register used for the 'carry flag'. /// VF is used according to the CHIP 8 specifications. const FLAG: usize = 15; /// The size of the sta...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Start resolving addresses based on IRKs specified in the IRK data structure"] pub tasks_start: TASKS_START, _reserved1: [u8; 4usize], #[doc = "0x08 - Stop resolving addresses"] pub tasks_stop: TASKS_STOP, _reserved2...
use std::collections::{BTreeMap, BTreeSet}; use serde::{Deserialize, Serialize}; use crate::{Actor, Error, Sig, SigningActor}; use core::fmt::Debug; use log::info; const SOFT_MAX_MEMBERS: usize = 7; pub type Generation = u64; #[derive(Debug)] pub struct State<A: Ord, SA, S: Ord> { pub id: SA, pub gen: Gener...
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ use crate::lsp::{ set_initializing_status, Completion, CompletionOptions, Connection, DidChangeTextDocument, DidCloseTextDo...
use std::cell::RefCell; use std::collections::{BTreeMap, BTreeSet, HashMap}; use std::ops::Deref; use std::rc::Rc; use std::sync::RwLock; use anyhow::Error; use once_cell::sync::{Lazy, OnceCell}; use serde::Deserialize; use wasm_bindgen::JsCast; use wasm_bindgen::prelude::Closure; use web_sys::{Element, HtmlElement, N...
//! Proof block datastructure use crate::{backlog, delay::*, preimage::genesis_preimage}; use anyhow::{bail, Error}; use diem_crypto::hash::HashValue; use diem_global_constants::{delay_difficulty, VDF_SECURITY_PARAM}; use glob::glob; use ol_types::block::VDFProof; use ol_types::config::AppCfg; use std::{ fs, i...
use bevy::{ asset::AssetServerSettings, input::{keyboard::KeyCode, system::exit_on_esc_system}, prelude::*, render::{ camera::PerspectiveProjection, pipeline::{FrontFace, PipelineDescriptor, RenderPipeline}, render_graph::{base, RenderGraph, RenderResourcesNode}, shader::...
use super::{base::credential::Credential, download::RangeReaderBuilder}; use log::{error, info, warn}; use notify::{watcher, DebouncedEvent, RecursiveMode, Result as NotifyResult, Watcher}; use once_cell::sync::{Lazy, OnceCell}; use reqwest::blocking::Client as HTTPClient; use serde::{Deserialize, Serialize}; use std::...
#![allow(unused_imports)] #![allow(unused_variables)] use codec::{Decode, Encode}; use rstd::{convert::TryInto, prelude::*, result}; use sr_primitives::traits::{CheckedDiv, CheckedSub, Hash}; use support::{ decl_event, decl_module, decl_storage, dispatch::Result, ensure, traits::Currency, StorageMap, StorageValue,...
use serde::{Serialize, Deserialize}; use actix_web::{HttpResponse, HttpRequest, Responder, Error}; use futures::future::{ready, Ready}; use sqlx::{FromRow}; //use sqlx::postgres::PgPool; use sqlx::PgPool; //use sqlx::postgres::PgRow; //use sqlx::postgres::PgDatabaseError; use anyhow::{Result, anyhow}; //use log::info; ...
// Adapted from imgui-rs glium example use glutin::{event::Event, window::Window}; use imgui::Context; use imgui::{im_str, FontConfig, FontSource, ImStr}; use imgui_glium_renderer::Renderer; use imgui_winit_support::{HiDpiMode, WinitPlatform}; use std::{path::PathBuf, str::FromStr, sync::Arc, time::Duration}; use stru...
//! LLVM target triple and layout information is used to describe the host that will run the code. use crate::identifier::{self, Id, Identifier}; use std::fmt::{Display, Formatter}; /// The Instruction Set Architecture being targeted in a target triple. #[derive(Copy, Clone, Debug)] #[non_exhaustive] pub enum Archite...
use std::{default::Default, fmt}; use anyhow::{anyhow, Result}; use chrono::{Duration, NaiveDateTime, NaiveTime, Utc}; use diesel::prelude::*; use serenity::{ client::Context, model::{channel::Message, id::ChannelId}, }; use crate::{ discord::{ channel_groups::{ChannelGroup, ChannelType}, ...
// 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...
// Copyright (c) SimpleStaking, Viable Systems and Tezedge Contributors // SPDX-License-Identifier: MIT use std::{ cmp::Ordering, convert::{TryFrom, TryInto}, mem::size_of, }; use modular_bitfield::prelude::*; use static_assertions::assert_eq_size; use tezos_timing::StorageMemoryUsage; use crate::kv_stor...
use std::path::Path; use std::io::{self, Read, Write, Seek, SeekFrom, Cursor}; use std::iter::{self, FromIterator}; use std::fmt::{self, Debug, Formatter}; use std::collections::{hash_map, HashMap}; use std::ops::{Deref, DerefMut}; use std::sync::{Arc, RwLock}; use std::str; use std::borrow::Cow; use std::vec; use chr...
#![no_std] //! Crate with the purporse of using more easely and powerfull the functionality of the C library //! [`dyncall`](https://www.dyncall.org). Refer to the page for platforms supported. //! //! This library needs [`mercurial`](https://www.mercurial-scm.org),either on the `PATH` //! environment variable or in t...
//! The Executor is responsible for the high-level scheduling of Actors. use crate::actors::ActorStream; use crate::executor::thread_pool::MaximThreadPool; use crate::prelude::*; use dashmap::DashMap; use futures::task::ArcWake; use futures::Stream; use log::{debug, info, trace, warn}; use std::collections::{BTreeMap,...
//! Interrupt handler for "background" (i.e. lower priority than the timing //! interrupts) rasterization. use stm32f4::stm32f407 as device; use core::ops::Range; use core::sync::atomic::Ordering; use crate::priority; use crate::rast::{RasterCtx, TargetBuffer}; use crate::timing::{Timing, MIN_CYCLES_PER_PIXEL}; use ...
use crate::emulator::instruction::exec; use crate::emulator::instruction::opcode::*; pub fn init_cmn_opcode(op: &mut super::OpcodeArr){ macro_rules! setcmnop { ($n:expr, $fnc:ident, $flg:expr) => { op[$n & 0x1ff] = OpcodeType{func:$fnc, flag:$flg} } } setcmnop!(0x00, add_rm8_r8, OpFlags::MODRM)...
// Copyright 2018-2020 Cargill Incorporated // // 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...
use super::instructions::INSTR_TABLE; use super::instructions_ddcb::INSTR_TABLE_DDCB; use super::instructions_fdcb::INSTR_TABLE_FDCB; use super::instructions_cb::INSTR_TABLE_CB; use super::instructions_ed::INSTR_TABLE_ED; use super::instructions_dd::INSTR_TABLE_DD; use super::instructions_fd::INSTR_TABLE_FD; use ::inte...
/* Copyright (c) 2018 <NAME>, <EMAIL> * * 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 t...
/* origin: FreeBSD /usr/src/lib/msun/src/s_erff.c */ /* * Conversion to float by <NAME>, Cygnus Support, <EMAIL>. */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permissi...
//! Mocking utilities for tests. // Built-in deps use crate::database::DatabaseInterface; use crate::ethereum_interface::FailureInfo; use crate::EthSenderOptions; use std::collections::{BTreeMap, HashMap, VecDeque}; use tokio::sync::RwLock; // External uses use web3::contract::{tokens::Tokenize, Options}; use zksync_b...
#![allow(dead_code)] #![allow(unreachable_patterns)] use std::io; use std::fs; use std::fmt; use std::error; use std::rc::Rc; use std::ffi::OsString; use std::path::{Path, PathBuf}; use std::result::Result; use std::collections::HashMap; use zip::read::ZipArchive; use zip::result::ZipError; use serde_json::{Value, sel...
use crate::impl_prelude::*; use cardboard_math::*; use prelude_plus::*; pub type TextureUnit = u16; gl_enum!({ pub enum BindTextureTarget { Texture2D = TEXTURE_2D, CubeMap = TEXTURE_CUBE_MAP, } }); #[derive(Debug)] pub struct Texture2D<T: TextureDataType = u8> { ctx: SharedContext, addr: u32, inpu...
/* * ARIADNE Experiment, Department of Physics, University of Liverpool * * ----------------------- * Timepix Raw Data Parser * ----------------------- * * timepix-spidr-data-parser/src/bin/raw_data_parser.rs * * Authors: <NAME> */ #[macro_use] extern crate lazy_static; use std::cmp; use std::collections::V...
use crate::config::BackupConfig; use crate::remotes::uploader; use crate::services::service::Service; use job_scheduler::{Job, JobScheduler}; use regex::Regex; use std::fmt; use std::io; use std::path::{Path, PathBuf}; use std::str::FromStr; use chrono::Weekday; use log::{error, info}; use futures::executor; #[deri...
extern crate cgmath; extern crate city2ba; extern crate itertools; extern crate nalgebra as na; extern crate ply_rs; extern crate rand; extern crate structopt; use cgmath::{Point3, Vector3}; use city2ba::generate::*; use city2ba::noise::*; use city2ba::synthetic::*; use city2ba::*; use itertools::Itertools; use ply_rs...
extern crate nalgebra; extern crate image; extern crate rand; extern crate scoped_threadpool; use std::path::Path; use std::fs::File; use std::ops::{Add, AddAssign, Div, Mul}; use std::f64; use std::sync::{Arc, Mutex}; use std::time::Instant; use scoped_threadpool::Pool; use nalgebra::Vector3; use image::{DynamicImage...