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::time::Duration; | |
use tokio::task::LocalSet; | |
fn main() { | |
let mut builder = tokio::runtime::Builder::new_current_thread(); | |
let tokio = builder.enable_time().start_paused(true).build().unwrap(); | |
let local = LocalSet::new(); | |
let fut = async move { | |
tokio::task::spawn_blocking(move || { |
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::borrow::Cow; | |
use std::ops::Deref; | |
use std::collections::HashSet; | |
use std::fs::File; | |
use std::mem::{size_of, transmute}; | |
use std::os::unix::prelude::FileExt; | |
use bytemuck::{Zeroable, Pod, pod_read_unaligned, bytes_of, try_from_bytes}; | |
use bytes::{BytesMut, Bytes}; |
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
abstract class ChiselEntity { | |
__data: any; | |
__ctx_id: number; | |
public Ready: Promise.IThenable<any>; | |
public isReady = false; | |
} | |
class Person extends ChiselEntity { | |
// these just end up as dummies | |
name: string; |
This file has been truncated, but you can view the full file.
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
[START][2021-11-01 14:12:20] LSP logging initiated | |
[START][2021-11-01 14:12:30] LSP logging initiated | |
[START][2021-11-01 14:13:10] LSP logging initiated | |
[START][2021-11-01 14:15:34] LSP logging initiated | |
[START][2021-11-01 14:16:09] LSP logging initiated | |
[START][2021-11-01 14:16:22] LSP logging initiated | |
[START][2021-11-01 14:16:46] LSP logging initiated | |
[START][2021-11-01 14:17:05] LSP logging initiated | |
[START][2021-11-01 14:17:59] LSP logging initiated | |
[START][2021-11-01 14:18:13] LSP logging initiated |
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 nom::{IResult, branch::alt, bytes::complete::{take_while1, tag}, character::complete::{char, multispace0}, combinator::map, error::ParseError, multi::many0, sequence::{delimited, tuple, preceded}}; | |
fn is_key_component(c: char) -> bool { | |
c.is_alphanumeric() || ['_', '-', '.'].contains(&c) | |
} | |
fn parse_key(input: &str) -> IResult<&str, &str> { | |
let key = |input| take_while1(is_key_component)(input); | |
alt((key, delimited(char('"'), key, char('"'))))(input) | |
} |
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 nom::{ | |
IResult, | |
character::complete::{char, multispace0}, | |
combinator::map, | |
branch::alt, | |
sequence::{delimited, tuple, preceded}, | |
multi::many0, | |
bytes::complete::{take_while1, tag}, | |
}; |
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::collections::VecDeque; | |
use std::time::Instant; | |
use std::time::{SystemTime, UNIX_EPOCH}; | |
use tokio::select; | |
use tokio::stream::StreamExt; | |
use tokio::time::{self, Duration}; | |
#[derive(Debug)] | |
struct Website { | |
pub url: String, |
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
import javax.swing.*; | |
import java.awt.*; | |
import java.awt.event.MouseAdapter; | |
import java.awt.event.MouseEvent; | |
import java.awt.geom.Line2D; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class test { | |
public static void main(String args[]) { |