Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
3.09k
13.9k
use super::*; use bytes::{Buf, BufMut, Bytes, BytesMut}; //// Return code in connack #[derive(Debug, Clone, Copy, PartialEq)] #[repr(u8)] pub enum UnsubAckReason { Success = 0x00, NoSubscriptionExisted = 0x11, UnspecifiedError = 0x80, ImplementationSpecificError = 0x83, NotAuthorized = 0x87, To...
// Copyright 2020, The Tari Project // // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the // following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following // di...
// Copyright (c) The Libra Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] use anyhow::Result; use bytecode_verifier::VerifiedModule; use libra_state_view::StateView; use libra_types::{ access_path::AccessPath, account_address::AccountAddress, account_config, contract_...
use druid::kurbo::{Point, Rect, Size}; use druid::piet::{ CairoTextLayout, Color, FontBuilder, InterpolationMode, PietText, RenderContext, Text, TextLayout, TextLayoutBuilder, UnitPoint, }; use druid::{ BoxConstraints, Env, Event, EventCtx, LayoutCtx, LifeCycle, LifeCycleCtx, PaintCtx, UpdateCtx, Widget...
use adventofcode2021::{default_sub_command, CommandResult, Problem}; use clap::{value_t_or_exit, App, Arg, ArgMatches}; use nom::{ branch::alt, bytes::complete::tag, character::complete::newline, combinator::{map, value}, multi::{many1, separated_list0}, sequence::separated_pair, IResult, };...
use std::sync::{Arc, Mutex}; use super::Canvas; use super::glwrap::{GlTexture, TexFilters}; ///////////////////////////////////////////////////////////////////////////////////////////////////// Texture #[derive(Clone, Debug)] pub enum Texture { None, Static (StaticTexture), Dynamic (DynTexture), Sub (SubTextu...
//! The REPL (Read-Eval-Print-Loop) use codespan::{CodeMap, FileMap, FileName}; use codespan_reporting; use codespan_reporting::termcolor::{ColorChoice, StandardStream}; use failure::Error; use rustyline::error::ReadlineError; use rustyline::Editor; use std::path::PathBuf; use term_size; use semantics; use syntax::co...
use crate::app::App; use crate::colors::ColorScheme; use crate::helpers::ID; use crate::render::{DrawOptions, Renderable, OUTLINE_THICKNESS}; use ezgui::{Color, Drawable, GeomBatch, GfxCtx, Line, Prerender, Text}; use geom::{Angle, ArrowCap, Distance, PolyLine, Polygon, Pt2D}; use map_model::{Map, TurnType}; use sim::{...
use clap::{App, Arg}; use lazy_static::lazy_static; use regex::Regex; use std::{ cmp::Reverse, collections::{BinaryHeap, HashMap}, convert::TryFrom, io::{self, Write}, path::PathBuf, }; use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor}; use hyperpolyglot::{get_language_brea...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Version ID Register"] pub ver: VER, #[doc = "0x04 - Parameter Register"] pub par: PAR, _reserved2: [u8; 24usize], #[doc = "0x20 - Transmit Register"] pub tr: [TR; 4], _reserved3: [u8; 16usize], #[doc = "0x40 - Receive Reg...
use std::rc::Rc; use std::cell::RefCell; use std::collections::{HashSet, HashMap}; use std::ops; use std::iter::Iterator; use byteorder::{BigEndian, WriteBytesExt}; use super::mast::{State, Mast, StateId}; #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Op(pub u8); const OPCODE_MASK: ...
#![cfg_attr(feature = "sgx", no_std)] #![feature(const_fn)] #![feature(thread_local)] #![feature(const_fn_fn_ptr_basics)] #![feature(duration_zero)] #![feature(duration_constants)] #![feature(duration_saturating_ops)] #[cfg(feature = "sgx")] #[macro_use] extern crate sgx_tstd as std; extern crate alloc; pub mod confi...
use std::sync::{ atomic::{AtomicBool, Ordering::Relaxed}, mpsc::{sync_channel, Receiver, SyncSender}, }; use crate::*; static ID_GEN: AtomicUsize = AtomicUsize::new(0); /// An event that happened to a key that a subscriber is interested in. #[derive(Debug, PartialEq, Eq, PartialOrd, Ord)] pub enum Event { ...
//! Real-Time Interrupt-driven Concurrency (RTIC) framework for ARM Cortex-M microcontrollers //! //! **HEADS UP** This is an **beta** pre-release; there may be breaking changes in the API and //! semantics before a proper release is made. //! //! **IMPORTANT**: This crate is published as [`cortex-m-rtic`] on crates.io...
use lang_data::data::*; use lang_data::rule::*; use lang_data::typed_part::*; use lang_data::annotations::*; use descr_lang::gen::ast::*; use descr_lang::gen::visitor::Visitor; use std::collections::HashMap; pub struct BuildParsers<'a, 'd: 'a> { data: &'a mut LangData<'d>, } impl<'a, 'd: 'a> BuildParsers<'a, 'd> {...
extern crate nom; extern crate classfile_parser; use classfile_parser::class_parser; use classfile_parser::constant_info::ConstantInfo; #[test] fn test_valid_class() { let valid_class = include_bytes!("../java-assets/compiled-classes/BasicClass.class"); let res = class_parser(valid_class); match res { ...
// Copyright 2020 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. //! Service-wide definitions. //! //! # Summary //! //! The base mod houses the core definitions for communicating information //! across the service. Note...
use std::{ time::Duration, sync::atomic::{AtomicU64, Ordering}, }; struct Query { total_queries: AtomicU64, total_fail: AtomicU64, total_time: AtomicU64, fail_time: AtomicU64, min_sucess_time: AtomicU64, max_sucess_time: AtomicU64, min_fail_time: AtomicU64, max_fail_time: Atomic...
mod receiver; mod sender; use crate::metainfo::Metainfo; use crate::storage::PieceStore; use bitvec::{bitvec, BitVec}; use receiver::Receiver; use sender::Sender; use std::collections::HashSet; use std::collections::{HashMap, VecDeque}; use std::fmt; use std::io::{self, BufReader, BufWriter}; use std::net::{TcpStream,...
use std::vec::Vec; use chunk::{Chunk, Param, TupleMode}; use codegen::translate_from_glib::TranslateFromGlib; use codegen::translate_to_glib::TranslateToGlib; use env::Env; use super::primitives::*; pub trait ToCode { fn to_code(&self, env: &Env) -> Vec<String>; } impl ToCode for Chunk { fn to_code(&self, en...
use crate::partition::PartitionID; use std::{ ffi::OsString, fmt::{self, Display, Formatter}, fs::File, io::{self, BufRead, BufReader, Error, ErrorKind}, os::unix::prelude::OsStringExt, path::{Path, PathBuf}, str::FromStr, }; #[derive(Debug, Default, Clone, Hash, Eq, PartialEq)] pub struct M...
use crate::cartridge::Cartridge; use crate::joypad::Joypad; use crate::joypad::JOYPAD_REGISTER; use crate::lcd::Lcd; use crate::lcd::CONTROL_REGISTER; use crate::lcd::WINDOW_X_REGISTER; use crate::lcd::OAM_START; use crate::lcd::OAM_END; use crate::lcd::VRAM_START; use crate::lcd::VRAM_END; use crate::timer::Timer; use...
// Copyright 2019 EinsteinDB a Project Housed by WHTCORPS INC ALL RIGHTS RESERVED. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use // this file except in compliance with the License. You may obtain a copy of the // License at http://www.apache.org/licenses/LICENSE-2.0 // Unless req...
//! Provides fetcher for Node distributions use std::fs::{read_to_string, write, File}; use std::path::{Path, PathBuf}; use super::NodeVersion; use crate::error::{Context, ErrorKind, Fallible}; use crate::fs::{create_staging_dir, create_staging_file, rename}; use crate::hook::ToolHooks; use crate::layout::volta_home;...
use super::{Client, ClientBuilder, InboundSubscriptions}; use crate::blockcfg::HeaderHash; use crate::network::{ grpc, p2p::{comm::PeerComms, Address}, security_params::NONCE_LEN, Channels, ConnectionState, }; use chain_core::mempack::{self, ReadBuf, Readable}; use chain_network::data::{AuthenticatedNod...
// Chunk's read_completely_times updated on Iter::Drop // // Chunk's iteration synchronization occurs around [ChunkStorage::storage_len] acquire/release access // use crate::sync::Ordering; use std::ptr::{NonNull}; use crate::event_queue::{CleanupMode, EventQueue, foreach_chunk, Settings}; use std::ops::ControlFlow::{...
use core::{ alloc::Layout, cell::UnsafeCell, ptr::{self, NonNull}, sync::atomic::{AtomicUsize, Ordering}, }; use alloc::vec::Vec; #[derive(PartialEq, Eq)] pub(crate) struct DropQueue { inner: NonNull<DropQueueInner<[UnsafeCell<u32>]>>, } /// # Safety /// /// This is basically `Arc<DropQueueInner>...
use super::{Number, Position, Size}; #[derive(Debug, Copy, Clone, PartialEq)] pub struct Region<N: Number = f32> { pub x: N, pub y: N, pub width: N, pub height: N, } pub type Viewport<N = f32> = Region<N>; impl<N: Number> Region<N> { pub fn new(x: N, y: N, width: N, height: N) -> Self { S...
#![feature(step_by, inclusive_range_syntax, heap_api, alloc)] extern crate libc; extern crate byteorder; extern crate cpuprofiler; extern crate alloc; use std::fs::File; mod instr; mod disasm; mod thumb_disasm; mod mem; mod emu; mod binutil; mod pp; mod gui; // mod analysis; // mod cell; // mod store; use mem::Store...
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
-