This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{fs, io}; | |
use std::io::Write; | |
use std::path::Path; | |
use std::sync::{Arc, Barrier}; | |
use std::time::Duration; | |
const PATH: &str = "test-concurrent-deletion.txt"; | |
fn main() { | |
// Generate a Cartesian product of `[0, 1, 2, 3]` with itself. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stack backtrace: | |
0: sqlx_macros::parse_as_ident::{{closure}} | |
at sqlx-macros/src/lib.rs:144 | |
1: std::panicking::rust_panic_with_hook | |
at src/libstd/panicking.rs:467 | |
2: rust_begin_unwind | |
at src/libstd/panicking.rs:371 | |
3: std::panicking::begin_panic_fmt | |
at src/libstd/panicking.rs:325 | |
4: rustc_expand::proc_macro_server::Ident::new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(const_generics, raw, unsize)] | |
use std::marker::{PhantomData, Unsize}; | |
use std::mem; | |
use std::ops::Deref; | |
use std::ptr; | |
use std::raw::TraitObject; | |
#[repr(align(64))] // ensures minimum alignment for all native types | |
pub struct StackTraitObj<T: ?Sized, const SIZE: usize> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="generator" content="rustdoc"> | |
<meta name="description" content="API documentation for the Rust `SourceFile` struct in crate `proc_macro`."> | |
<meta name="keywords" content="rust, rustlang, rust-lang, SourceFile"> | |
<title>proc_macro::SourceFile - Rust</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static MIME_TYPES: phf::Map<UniCase<&'static str>, &'static str> = ::phf::Map { | |
key: 1897749892740154578, | |
disps: ::phf::Slice::Static(&[ | |
(0, 497), | |
(0, 4), | |
(0, 102), | |
(0, 0), | |
(0, 580), | |
(0, 4), | |
(1, 222), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//calculator by jake molina | |
//includes iostream | |
#include <iostream> | |
//Standard namespace | |
using namespace std; | |
void main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//calculator by jake molina | |
//includes iostream | |
#include <iostream> | |
//Standard namespace | |
using namespace std; | |
void main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
End Sub | |
Sub FnRev() | |
System.Console.WriteLine("Type in text and press ENTER to reverse it.") | |
Dim input1 As String = System.Console.ReadLine() | |
Dim revstring As String = StrReverse(input1) | |
System.Console.WriteLine(revstring) | |
End Sub | |
Sub FnCharCnt() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ # Generate 8 MB of random data | |
$ head -c 8M < /dev/urandom > data.txt | |
$ # Flush and clear the cache so we get the data from disk | |
$ sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && cargo script posix_fadvise_test.rs | |
3 | |
Compiling posix_fadvise_test v0.1.0 (file:///home/austin/.cargo/script-cache/file-posix_fadvise_test-8d6a7e80a3131286) | |
Advised result: HashResult { hash: [173, 168, 157, 204, 185, 126, 165, 177, 195, 111, 94, 179, 252, 59, 25, 169], time: Duration { secs: 0, nanos: 10050785 } } | |
$ # Comment out the call to advise_willneed, save, flush again and re-run | |
$ sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && cargo script posix_fadvise_test.rs | |
3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![cfg_attr(test, feature(test))] | |
#[cfg(test)] | |
#[macro_use] | |
extern crate lazy_static; | |
use std::mem; | |
use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering}; | |
pub const INIT: AtomicBitSet = AtomicBitSet { |
NewerOlder