text stringlengths 7.05k 33.9k |
|---|
//! Module definining the database of known mods.
//!
//! Note that the actual data here is filled in using a build script.
use std::borrow::Cow;
use std::collections::HashMap;
use std::error::Error;
use std::fmt;
use std::str::FromStr;
use std::sync::Arc;
use regex::{self, RegexSet, RegexSetBuilder};
use super::Mod... |
use gio;
use app;
use page_store;
use window;
use recently_closed;
use stored;
const ACCEL_RELOAD: &str = "<ctrl>r";
const ACCEL_RELOAD_BP: &str = "<ctrl><shift>r";
const ACCEL_QUIT: &str = "<ctrl>q";
const ACCEL_STOP: &str = "Escape";
const ACCEL_GO_BACK: &str = "<alt>Left";
const ACCEL_GO_FORWARD: &str = "<alt>Rig... |
use std::f32;
use std::fs;
use std::fs::File;
use std::io::{Read, Write};
use std::iter;
use std::path::{Path, PathBuf};
use std::process::exit;
use clap::{crate_authors, crate_version, App, AppSettings, Arg, ArgMatches, SubCommand};
use failure::{bail, Error};
use image::io::Reader as ImageReader;
use image::{GrayIma... |
//! A Piston library for handling split state and events.
extern crate input;
extern crate vecmath;
use input::{Button, GenericEvent, MouseButton};
use self::math::{is_inside, inside_pos, Matrix2d, Rectangle};
mod math;
const LEFT: u8 = 0x1;
const RIGHT: u8 = 0x2;
const TOP: u8 = 0x4;
const BOTTOM: u8 = 0x8;
/// ... |
use std::fmt::{Display, Formatter};
use std::ops::Add;
use std::path::{Path, MAIN_SEPARATOR};
use nom::branch::alt;
use nom::bytes::complete::tag;
use nom::character::complete::{anychar, none_of};
use nom::combinator::{cond, map};
use nom::multi::{many0, separated_list};
use nom::sequence::tuple;
use nom::IResult;
use... |
use crate::{
environment::lexical_environment::{new_function_environment, LexicalEnvironment},
js::{
array, console, function,
function::{Function, RegularFunction},
json, math, object,
object::{ObjectKind, INSTANCE_PROTOTYPE, PROTOTYPE},
string,
value::{from_valu... |
use crate::compact1::StringID;
const NUMBER_OF_STANDARD_STRINGS: usize = 391;
index! {
#[doc = "A string index."]
pub Strings
}
impl Strings {
/// Return the string corresponding to a string identifier.
pub fn get(&self, sid: StringID) -> Option<String> {
match sid as usize {
i if... |
// Copyright (c) 2017-present PyO3 Project and Contributors
use crate::attributes::TextSignatureAttribute;
use crate::params::{accept_args_kwargs, impl_arg_params};
use crate::pyfunction::PyFunctionOptions;
use crate::pyfunction::{PyFunctionArgPyO3Attributes, PyFunctionSignature};
use crate::utils;
use crate::{depreca... |
//! APIs for storing (layered) container images as OSTree commits
//!
//! # Extension of encapsulation support
//!
//! This code supports ingesting arbitrary layered container images from an ostree-exported
//! base. See [`encapsulate`][`super::encapsulate()`] for more information on encaspulation of images.
use supe... |
/*
This tool is part of the WhiteboxTools geospatial analysis library.
Authors: Dr. <NAME>
Created: 16/12/2017
Last Modified: 12/10/2018
License: MIT
*/
use self::statrs::distribution::{Normal, Univariate};
use whitebox_raster::*;
use crate::tools::*;
use num_cpus;
use statrs;
use std::env;
use std::f64;
use std::fs::... |
use crate::server::Server as BobServer;
use bob_backend::pearl::{Group as PearlGroup, Holder};
use bob_common::{
data::{BobData, BobKey, BobMeta, BobOptions, VDisk as DataVDisk},
node::Disk as NodeDisk,
};
use futures::{future::BoxFuture, FutureExt};
use rocket::{
http::{ContentType, RawStr, Status},
re... |
use crate::hb;
use std::borrow::Borrow;
use std::ops::{Deref, DerefMut};
/// A type to represent 4-byte SFNT tags.
///
/// The easiest way to create a tag is by using its `From<&[u8; 4]>` impl:
///
/// ```
/// # use harfbuzz_rs::Tag;
/// let tag: Tag = b"abcd".into();
/// assert_eq!(&tag.to_bytes(), b"abcd");
/// ```
... |
// Copyright 2020 MaidSafe.net limited.
//
// This SAFE Network Software is licensed to you under the MIT license <LICENSE-MIT
// http://opensource.org/licenses/MIT> or the Modified BSD license <LICENSE-BSD
// https://opensource.org/licenses/BSD-3-Clause>, at your option. This file may not be copied,
// modified, or di... |
use std::mem;
use std::rc::Rc;
use std::ffi::OsStr;
use std::cell::RefCell;
use std::borrow::Cow;
use clientpipe_proto::ClipboardTypes;
use itertools::Itertools;
use libudev::{Result as UdevResult, Context, Enumerator};
use futures::unsync::mpsc::UnboundedSender;
use futures::unsync::oneshot::{self, Sender};
use futur... |
// Copyright (c) 2018-2020 MobileCoin Inc.
//! A demo client for interacting with the MobileCoin test network using mobilecoind.
use dialoguer::{theme::ColorfulTheme, Input, Select, Validator};
use grpcio::{ChannelBuilder, ChannelCredentialsBuilder};
use indicatif::{ProgressBar, ProgressStyle};
use mc_b58_payloads::p... |
//! Defines some basic settings surrounding a CSV file.
//!
//! This is designed to make it simple for me to create new command-line
//! interfaces for parsing CSVs. I built this specifically for the
//! command-line tool [I built](https://github.com/maxblee/clipivot) for
//! creating pivot tables. So far, I have not a... |
use itertools::Itertools;
use tracing::error;
use super::Horizon;
use crate::{
components::consensus::{
highway_core::{
state::{Observation, Panorama, State, Weight},
validators::ValidatorMap,
},
traits::Context,
},
types::Timestamp,
};
/// Returns the map o... |
/*
* Copyright 2019 <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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... |
//! Algorithm M creates an exact representation from the digits of a float.
//!
//! Note: this algorithm exists entirely for historical purposes
//! and is currently not used. It exists primarily for a simple,
//! correct, reasonably-performance implementation.
//!
//! Although this seems superficially similar to libco... |
/*
This tool is part of the WhiteboxTools geospatial analysis library.
Authors: Dr. <NAME>
Created: June 14, 2017
Last Modified: Feb. 14, 2018
License: MIT
*/
use time;
use na;
use num_cpus;
use std::env;
use std::f64;
use std::path;
use std::io::{Error, ErrorKind};
use std::sync::Arc;
use std::sync::mpsc;
use std::t... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
use std::collections::{BTreeMap, BTreeSet};
use std::fmt;
use std::path::{Path, PathBuf};
use std::time::{SystemTime, UNIX_EPOCH};
use anyhow::{format_err, Context, Result};
use log::warn;
use regex::Regex;
use xml::writer::{EmitterConfig, Xml... |
/*
* Copyright (C) 2022 <NAME> <<EMAIL>>
*
* Use of this source code is governed by the Apache 2.0 and/or the MIT
* License.
*/
//!<div align="center"><h1>Actix Authentication Middleware</h1>
//!
//](https://realaravinth.github.io/actix-auth-middlew... |
use crate::{
api::prelude::*,
proc_macros::*,
shell::prelude::{Key, KeyEvent},
theme::fonts,
};
use super::MouseBehavior;
#[derive(Clone)]
enum TextAction {
Key(KeyEvent),
Mouse(Mouse),
}
/// The `TextBehaviorState` handles the text processing of the `TextBehavior` widget.
#[derive(Default, A... |
use crate::{ctx::*, DekuError, DekuRead, DekuWrite};
use bitvec::prelude::*;
use std::collections::HashMap;
use std::hash::{BuildHasher, Hash};
/// Read `K, V`s into a hashmap until a given predicate returns true
/// * `capacity` - an optional capacity to pre-allocate the hashmap with
/// * `ctx` - The context require... |
// 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 super::{CompositionPoly, ConstraintDivisor, ProverError, StarkDomain};
use math::{batch_inversion, fft, FieldElement, StarkField};
use... |
// Copyright 2016 Dtoa Developers
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according... |
use crate::errors::{CallystoError, Result};
use crate::kafka::ctopic::CTP;
use crate::prelude::CTable;
use crate::stores::store::Store;
use crate::types::collection::Collection;
use crate::types::context::Context;
use crate::types::service::{Service, ServiceState};
use async_trait::*;
use futures::future::{BoxFuture, F... |
use itertools::iproduct;
use regex::Regex;
use std::collections::BTreeSet;
use std::collections::HashMap;
use std::collections::HashSet;
use std::fs;
use std::fs::File;
use std::io::{self, BufRead, Error};
use std::path::Path;
// The output is wrapped in a Result to allow matching on errors
// Returns an Iterator to t... |
use structopt::StructOpt;
use std::collections::BTreeMap;
use diem_client::{
AccountData,
AccountStatus,
};
use anyhow::{ensure, Result};
use reqwest::Url;
use diem_crypto::hash::CryptoHash;
use diem_types::{
account_address::{
AccountAddress, HashAccountAddress
},
chain_id::{ChainId, Name... |
use crate::api::*;
use crate::dequant_tables::*;
use crate::frame::Frame;
use crate::getbits::*;
use crate::headers::*;
use crate::internal::*;
use crate::levels::*;
use crate::plane::PlaneType;
use crate::util::*;
use std::rc::Rc;
use std::slice;
use std::vec::Vec;
use std::{cmp, io};
fn init_quant_tables(
seq_h... |
use core::result::Result;
// use cortex_m_semihosting::{heprint,heprintln};
use crate::{
drivers::{
clocks::Clocks,
},
typestates::{
init_state,
}
};
#[derive(Copy,Clone,PartialEq)]
pub enum KeyType {
Sbkek = 0x00,
User = 0x01,
Uds = 0x02,
PrinceRegion0 = 0x03,
Prin... |
// SPDX-License-Identifier: MIT OR Apache-2.0
//
// Copyright (c) 2018-2020 <NAME> <<EMAIL>>
//! PL011 UART driver.
//!
//! # FIFO fill level IRQ hack
//!
//! For learning purposes, we want the UART to raise an IRQ on _every_ received character.
//! Unfortunately, this rather common mode of operation is not supported ... |
//! A slider that integrates with NIH-plug's [`Param`] types.
use nih_plug::prelude::{Param, ParamPtr};
use vizia::*;
use super::util::{self, ModifiersExt};
use super::RawParamEvent;
/// When shift+dragging a parameter, one pixel dragged corresponds to this much change in the
/// noramlized parameter.
const GRANULAR... |
use async_trait::async_trait;
use atom_syndication::Feed as AtomFeed;
use futures::future::join_all;
use reqwest::{Client, Response};
use rss::Channel;
use scraper::{Html, Selector};
use std::str::FromStr;
use url::{ParseError, Url};
use crate::models::*;
use crate::result::{Error, Result};
use tokio::sync::mpsc;
#[... |
use std::f32;
use std::ffi::CStr;
use std::sync::Arc;
use std::time::Instant;
use ash::{extensions::khr, version::DeviceV1_0, vk};
use lahar::DedicatedImage;
use tracing::info;
use winit::{
event::{DeviceEvent, ElementState, Event, KeyboardInput, VirtualKeyCode, WindowEvent},
event_loop::{ControlFlow, EventLoo... |
pub mod protocol;
use ready_waiter::Waiter;
use serde_json;
use thiserror::Error;
use tokio::sync::{mpsc, oneshot, Mutex, RwLock};
use tokio::time::{timeout, Instant};
use tokio_tungstenite::tungstenite::Error as TungsteniteError;
use tracing;
use tracing_futures;
use tracing::{trace, debug, info, warn, error, field, ... |
use crate::tracker::inflights::Inflights;
use crate::tracker::state::StateType;
use crate::tracker::state::StateType::{Probe, Replicate, Snapshot};
use nom::lib::std::option::IterMut;
use std::collections::hash_map::{Iter, Keys};
use std::collections::HashMap;
use std::fmt::{self, Display, Error, Formatter};
// Progr... |
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT
use bitflags::_core::any::Any;
use cbmc::goto_program::symtab_transformer;
use cbmc::goto_program::{Stmt, Symbol, SymbolTable};
use cbmc::{MachineModel, RoundingMode};
use metadata::*;
use rustc_codegen_s... |
//! Provides an intermediate representation for emitter.
use derive_new::new;
use ordered_float::OrderedFloat;
use std::collections::BTreeMap;
pub use crate::ast::builtin::{CapturedUse, Sexp, Syntax, SyntaxBody, SyntaxMetadata};
#[derive(PartialEq, Eq, PartialOrd, Ord, Debug, Clone, Copy, Hash)]
pub struct CtId(u32)... |
use std::collections::{HashSet, VecDeque};
use std::error::Error;
use std::fmt::Display;
use std::io::{self, BufRead};
use std::iter::FromIterator;
type Pos = (i64, i64, i64);
fn dist(a: &Pos, b: &Pos) -> u64 {
(a.0 - b.0).pow(2) as u64 + (a.1 - b.1).pow(2) as u64 + (a.2 - b.2).pow(2) as u64
}
#[derive(Clone, De... |
use aoc_common::math::Point;
use rand::Rng;
use std::cell::RefCell;
use std::collections::{HashSet, VecDeque};
use std::convert::{TryFrom, TryInto};
use std::fmt::{Formatter, Write};
use std::io::{Error, ErrorKind};
use std::num::ParseIntError;
use std::rc::Rc;
use std::str::FromStr;
use std::time::Duration;
use std::{... |
use std::collections::BTreeMap;
use nalgebra as na;
use quicksilver::{
geom::{Circle, Rectangle, Transform, Vector},
graphics::{
//blend::{BlendEquation, BlendFunction, BlendMode, BlendOperation, BlendFactor, BlendChannel, BlendInput},
Color,
Graphics,
},
};
use comn::{
game::... |
//! Execute make of OpenBLAS, and its options
use crate::{check::*, error::*};
use std::{
fs,
os::unix::io::*,
path::*,
process::{Command, Stdio},
str::FromStr,
};
use walkdir::WalkDir;
/// Interface for 32-bit interger (LP64) and 64-bit integer (ILP64)
#[derive(Debug, Clone, Copy, PartialEq, Eq, ... |
use super::connection::Connection;
use crate::{
base64::{decode_base64, encode_base64},
player::{Announce, Command, Encryption, Setup},
rtp_info::RtpInfo,
shutdown::Shutdown,
Configuration,
};
use once_cell::sync::Lazy;
use rsa::{pkcs1::FromRsaPrivateKey, PaddingScheme, RsaPrivateKey};
use rtsp_type... |
extern crate llvm_sys as llvm;
use std::collections::hash_map::Entry;
use std::ffi::CString;
use std::ptr;
use self::llvm::prelude::*;
use node::*;
use env::Env;
#[derive(Clone)]
pub enum Value {
Int(LLVMValueRef),
Function(LLVMValueRef), // to fix
Lambda(Env<Value>, Node, Node), // env, args, body
}
imp... |
use enum_map::{enum_map, Enum, EnumMap};
use quicksilver::prelude::*;
use quicksilver::graphics::View;
use std::collections::HashMap;
use std::time::{Duration, Instant};
mod game_map;
mod color_scheme;
mod camera;
use game_map::GameMap;
use color_scheme::{ColorScheme, ColorName};
use camera::Camera;
const FONT_MONO... |
use byteorder::{ByteOrder, LittleEndian};
use leb128;
mod name_section;
#[derive(Debug, Clone)]
pub struct FuncType {
pub params: Vec<u8>,
pub results: Vec<u8>,
}
#[derive(Debug, Clone)]
pub struct FuncExport {
pub name: String,
pub func: Func,
}
#[derive(PartialEq, Clone)]
pub enum ExportType {
... |
//! This module contains a platform specific implementation of the window shell.
use std::{
cell::RefCell,
char,
collections::HashMap,
rc::Rc,
sync::mpsc::{channel, Receiver, Sender},
sync::Mutex,
time::Duration,
};
use minifb;
#[cfg(not(target_os = "redox"))]
use raw_window_handle::{HasR... |
use crate::errors::{Error, Result};
use crate::token::{Keyword, Token};
/// Lexer for reproto IDL.
use core::RpNumber;
use num_bigint::BigInt;
use num_traits::Zero;
use std::borrow::Cow;
use std::result;
use std::str::CharIndices;
pub struct Lexer<'input> {
source: CharIndices<'input>,
source_len: usize,
s... |
// Copyright 2018 The Grin Developers
// Modifications Copyright 2019 The Gotts 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... |
// Copyright 2020 The Exonum Team
//
// 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 i... |
//! Define the Nickel type system.
//!
//! # Base types
//!
//! - Num: a floating-point number
//! - Bool: a boolean
//! - Str: a string literal
//! - Sym: a symbol, used by contracts when checking polymorphic types
//! - List: an (heterogeneous) list
//!
//! # Higher-order types
//!
//! - `->`: the function type, or a... |
//! Module containing functions for interacting with gluon's primitive types.
use std::result::Result as StdResult;
use std::str::FromStr;
use std::string::String as StdString;
use api::generic::A;
use api::{
generic, primitive, Array, Getable, OpaqueRef, Pushable, Pushed, RuntimeResult, ValueRef,
WithVM,
};
u... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Start HFCLK crystal oscillator"]
pub tasks_hfclkstart: TASKS_HFCLKSTART,
#[doc = "0x04 - Stop HFCLK crystal oscillator"]
pub tasks_hfclkstop: TASKS_HFCLKSTOP,
#[doc = "0x08 - Start LFCLK source"]
pub tasks_lfclkstar... |
use super::error;
use libsodium_sys::*;
use std::fmt;
pub type Scalar = [u8; crypto_core_ristretto255_SCALARBYTES as usize];
pub type Point = [u8; crypto_core_ristretto255_BYTES as usize];
pub type Sha512Hash = [u8; crypto_hash_sha512_BYTES as usize];
pub struct KeyPair {
pub private: Scalar,
pub public: Poin... |
/*
* Copyright (c) 2016-2018 Boucher, Antoni <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, mod... |
#![allow(unused_doc_comments)]
use fnv::FnvHashMap;
use grb::callback;
use grb::prelude::*;
use std::iter::IntoIterator;
const N: usize = 29;
/// Data taken from [ZIB](http://elib.zib.de/pub/mp-testdata/tsp/tsplib/tsp/bays29.tsp)
const TRAVEL_TIMES: [usize; N * N] = [
0, 107, 241, 190, 124, 80, 316, 76, 152, 157,... |
use std::fs::OpenOptions;
use std::time::Duration;
use std::{io, u32};
use anyhow::bail;
use bellperson::Circuit;
use chrono::Utc;
use log::info;
use merkletree::store::StoreConfig;
use paired::bls12_381::Bls12;
use rand::Rng;
use serde::Serialize;
use fil_proofs_tooling::{measure, FuncMeasurement, Metadata};
use sto... |
use crate::ctapdef;
#[allow(unused_imports)]
use crate::util;
#[cfg(not(target_os = "linux"))]
use crate::fidokey::*;
// for pi
#[cfg(target_os = "linux")]
use crate::fidokey_pi::*;
use std::{thread, time};
//pub const USAGE_PAGE_FIDO: u16 = 0xf1d0;
pub const CTAP_FRAME_INIT: u8 = 0x80;
pub const PACKET_SIZE: usiz... |
// MIT License
//
// Copyright (c) 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, merg... |
// Copyright 2021 Parallel Finance Developer.
// This file is part of Parallel Finance.
// 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
// Unl... |
#![allow(clippy::wildcard_in_or_patterns)]
mod binary;
use dune::{parse_script, Diagnostic, Environment, Error, Expression, SyntaxError, TokenKind};
use rustyline::completion::{Completer, FilenameCompleter, Pair as PairComplete};
use rustyline::config::OutputStreamType;
use rustyline::highlight::Highlighter;
use rus... |
pub use ipfs_sqlite_block_store::TempPin;
use ipfs_sqlite_block_store::{
cache::SqliteCacheTracker, BlockStore, Config, SizeTargets, Synchronous,
};
use lazy_static::lazy_static;
use libipld::codec::References;
use libipld::store::StoreParams;
use libipld::{Block, Cid, Ipld, Result};
use parking_lot::{Condvar, Mute... |
use crate::bba::bbafile::*;
use crate::bba::idstring::*;
use crate::bels::*;
use std::convert::TryInto;
use std::io::Result;
pub struct BBAStructs<'a> {
pub out: &'a mut BBAWriter<'a>,
}
// *MUST* update this here and in nextpnr whenever making changes
pub const BBA_VERSION: u32 = 11;
// Wire flags
pub const WI... |
//! Solana Vault
use {
crate::{pack::*, string::ArrayString64, traits::*},
arrayref::{array_mut_ref, array_ref, array_refs, mut_array_refs},
num_enum::TryFromPrimitive,
serde::{Deserialize, Serialize},
serde_json::to_string,
solana_program::{clock::UnixTimestamp, program_error::ProgramError, pu... |
use std::ffi::{CStr, CString};
use std::os::raw::c_char;
extern "C" {
fn c_sqrtfp(n_str: *const c_char, p_str: *const c_char, out_str: *mut c_char);
fn c_points(
a_str: *const c_char,
b_str: *const c_char,
p_str: *const c_char,
out_str: *mut c_char,
);
}
pub fn sqrtfp(n: &s... |
use crate::{
ceil_log_2,
fields::{
fp::FpGadget,
nonnative::{
nonnative_field_gadget::{
bigint_to_constraint_field, limbs_to_bigint, NonNativeFieldGadget,
},
params::{get_params, get_params_for_generic_field, get_params_for_pseudomersenne},
... |
mod block_proposal_process;
mod block_transactions_process;
pub mod compact_block;
mod compact_block_process;
mod compact_block_verifier;
mod error;
mod get_block_proposal_process;
mod get_block_transactions_process;
mod get_transaction_process;
#[cfg(test)]
mod tests;
mod transaction_hash_process;
mod transaction_proc... |
use std::collections::{BTreeMap, HashMap, VecDeque};
use std::convert::TryFrom;
use std::path::PathBuf;
use std::sync::Arc;
use snafu::ResultExt;
use libeir_diagnostics::*;
use libeir_util_parse::{ErrorReceiver, ErrorReceiverTee, Source};
use crate::evaluator;
use crate::lexer::Lexer;
use crate::lexer::{symbols, Del... |
use super::{
elf::{Elf, ProgramHeader},
process_group::{PgId, ProcessGroup},
signal::{Signal, SignalDelivery, SIGKILL},
*,
};
use crate::{
arch::{self, SpinLock, SyscallFrame},
boot::INITIAL_ROOT_FS,
ctypes::*,
fs::devfs::SERIAL_TTY,
fs::{
mount::RootFs,
opened_file:... |
// 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.
#[cfg(feature = "direct")]
use std::fs::read_to_string;
use std::fs::{read, write, File, OpenOptions};
use std::os::unix::fs::FileExt;
use std::path::{... |
use std::collections::hash_map::Values;
use strum::EnumProperty;
use strum::IntoEnumIterator;
use strum::VariantNames;
use strum_macros::EnumIter;
use strum_macros::EnumProperty;
use strum_macros::EnumString;
use strum_macros::EnumVariantNames;
use crate::color::Color;
use crate::instructions::Instruction::RawString;... |
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use crate::rewrite_manager::RewriteManager;
use failure::{Error, ResultExt};
use fidl::endpoints::ServerEnd;
use fidl_fuchsia_amber::{self, ControlMarker a... |
//! Crate for loading and running Monument's input files. The CLI itself is a very thin wrapper
//! around `monument_toml`, parsing CLI args and immediately calling into this. This crate is also
//! shared between the various integration test runners, making sure that the integration tests run
//! in exactly the same... |
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or ... |
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use super::{Meani... |
// Copyright © Spelldawn 2021-present
// 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/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to i... |
mod psalm_001;
mod psalm_002;
mod psalm_003;
mod psalm_004;
mod psalm_005;
mod psalm_006;
mod psalm_007;
mod psalm_008;
mod psalm_009;
mod psalm_010;
mod psalm_011;
mod psalm_012;
mod psalm_013;
mod psalm_014;
mod psalm_015;
mod psalm_016;
mod psalm_017;
mod psalm_018;
mod psalm_019;
mod psalm_020;
mod psalm_021;
mod p... |
// This file was generated by gir (https://github.com/gtk-rs/gir @ 58cffd4)
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT
extern crate gstreamer_tag_sys;
extern crate shell_words;
extern crate tempdir;
use std::env;
use std::error::Error;
use std::path::Path;
use std::mem::{align_of, siz... |
//! Selected structures from RFC5652 to enable processing of DER-encoded certs-only SignedData messages.
use core::cmp::Ordering;
use der::asn1::{OctetStringRef, SetOf, SetOfVec, UIntRef};
use der::{AnyRef, Choice, Sequence, ValueOrd};
use spki::{AlgorithmIdentifier, ObjectIdentifier};
use x509_cert::attr::AttributeTy... |
use anyhow::{anyhow, bail};
use anyhow::{Context, Result};
use clap::{App, AppSettings, Arg, ArgMatches, SubCommand};
use control_plane::compute::ComputeControlPlane;
use control_plane::local_env::{self, LocalEnv};
use control_plane::storage::PageServerNode;
use std::collections::btree_map::Entry;
use std::collections:... |
use std::collections::BTreeMap;
use std::sync::{Arc, Mutex};
use id_arena::Arena;
use crate::common::analyze_resource::peachili_type::Type;
use crate::common::option;
use crate::common::{ast, peachili_type, three_address_code as tac};
type ValueCache = BTreeMap<ast::ExpressionNode, tac::ValueId>;
/// 4つ組生成のメインルーチン
... |
//! Simplex using the Johnson subalgorithm to compute the projection of the origin on the simplex.
use std::mem;
use std::iter;
use std::cell::RefCell;
use std::sync::Arc;
use std::collections::BTreeMap;
use std::marker::PhantomData;
use na::{Axpy, Dim, Bounded};
use na;
use geometry::algorithms::simplex::Simplex;
us... |
#![no_std]
#![feature(iterator_step_by)]
#![allow(dead_code)]
extern crate slice_cast;
use core::num::Wrapping;
use core::cmp::min;
use core::mem::size_of;
pub const NDIRECT: usize = 64;
pub const NINDIRECT: usize = 0;
// max file size, based on the number of blocks addressible (direct and indirect)
pub const MAXFILE... |
use std::io::Write;
use rust_htslib::{bam, bam::Read};
use structopt::{clap::ArgGroup, StructOpt};
// CLI tutorial book
// https://rust-cli.github.io/book/tutorial/index.html
//
// Advice for using enum + struct for building subcommands:
// https://stackoverflow.com/a/61351721
#[derive(StructOpt, Debug)]
#[structopt(s... |
use std::{
marker::PhantomData,
ops::{Bound, RangeBounds},
};
use crate::{
error::Result,
file::{BlockHeader, FixedSizeTupleFile, TupleFile, VariableSizeTupleFile},
Error,
};
use serde::{de::DeserializeOwned, Serialize};
use self::node::{NodeFile, SearchResult, StackEntry, MAX_NUMBER_KEYS};
mod n... |
use crate::common::CommonState;
use crate::edit::apply_map_edits;
use crate::game::{msg, State, Transition, WizardState};
use crate::render::{
draw_signal_phase, DrawOptions, DrawTurnGroup, TrafficSignalDiagram, BIG_ARROW_THICKNESS,
};
use crate::sandbox::spawn_agents_around;
use crate::ui::{ShowEverything, UI};
us... |
use byteorder::{
ByteOrder,
NetworkEndian,
};
use core::repr::Ipv4Repr;
use {
Error,
Result,
};
/// A TCP header.
///
/// Options are currently not supported.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct Repr {
pub src_port: u16,
pub dst_port: u16,
pub seq_num: u32,
pub ack_... |
// Copyright (c) 2017-2020, scoobybejesus
// Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt
use std::rc::{Rc};
use std::cell::{RefCell};
use std::process;
use std::fmt;
use std::collections::{HashMap};
use std::error::Error;
use decimal::d128;
use chrono::Na... |
use super::dialogs::dialog_helpers;
use super::dialogs::project_add_edit_dlg::Msg as MsgProjectAddEditDialog;
use super::dialogs::project_add_edit_dlg::ProjectAddEditDialog;
use super::dialogs::project_add_item_dlg;
use super::dialogs::project_add_item_dlg::ProjectAddItemDialog;
use super::dialogs::standard_dialogs;
us... |
// Copyright 2019-2021 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use crate::{
helpers::{
app_paths::{app_dir, tauri_dir},
command_env,
config::{get as get_config, reload as reload_config, AppUrl, ConfigHandle, WindowUrl},
man... |
use crate::proto::data::{decode_translation_data, Book, Translation, VerseKey, VerseText};
use crate::proto::engine::{
decode_index_data, IndexData as IndexDataProtoStruct,
ReverseIndexEntry as ReverseIndexEntryBytes,
};
use crate::TRANSLATION_COUNT;
use anyhow::{anyhow, Context, Result};
use fst::MapBuilder;
u... |
#![feature(proc_macro, custom_derive)]
#[macro_use] extern crate clap;
extern crate chrono;
extern crate mxfedtest;
extern crate resolv_conf;
#[macro_use] extern crate prettytable;
#[macro_use] extern crate serde_json;
extern crate itertools;
extern crate rustc_serialize;
use mxfedtest::{
resolver, resolve_matrix... |
//! [Java SE 7 § 4.4](https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.4): Parsing APIs and structures for the constants pool.
use crate::io::be::*;
use bugsalot::*;
use std::convert::*;
use std::io::{self, Read};
/// [Java SE 7 § 4.4](https://docs.oracle.com/javase/specs/jvms/se7/... |
// Copyright 2020 <NAME>
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE-2.0 or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to t... |
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MI... |
//! An interpreter for the rust-installer package format. Responsible
//! for installing from a directory or tarball to an installation
//! prefix, represented by a `Components` instance.
use std::collections::{HashMap, HashSet};
use std::fmt;
use std::io::{self, ErrorKind as IOErrorKind, Read};
use std::mem;
use std... |
//! # tracing-journald
//!
//! Support for logging [`tracing`] events natively to [journald],
//! preserving structured information.
//!
//! ## Overview
//!
//! [`tracing`] is a framework for instrumenting Rust programs to collect
//! scoped, structured, and async-aware diagnostics. `tracing-journald` provides a
//! [`... |
// Copyright 2014 The syscall.rs Project Developers. See the
// COPYRIGHT file at the top-level directory of this distribution.
//
// 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>... |
//! Implementation of the GPIO controller for the SAM4L.
use core::ops::{Index, IndexMut};
use core::sync::atomic::{AtomicUsize, Ordering};
use kernel::hil;
use kernel::hil::gpio;
use kernel::utilities::cells::OptionalCell;
use kernel::utilities::registers::interfaces::{Readable, Writeable};
use kernel::utilities::reg... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.