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
STYLE: https://github.com/Jihadist/qt-stylesheets | |
pprof-rs: https://rustcc.cn/article?id=f5d9a1ad-e463-4ae4-91bf-ed11b8c0cbf0 | |
MACRO: https://github.com/tfpk/macrokata | |
EMBEDDED: https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials | |
INTERPRET: https://rust-hosted-langs.github.io/book/introduction.html | |
STUDY: https://github.com/rust-lang-cn/rustlings-cn | |
PAPER: https://arxiv.org/pdf/2301.02308.pdf | |
DB: https://github.com/pjtatlow/jammdb | |
Lifetime: https://tfpk.github.io/lifetimekata/chapter_4.html !OVER! | |
ARGPARSER: https://github.com/rosetta-rs/argparse-rosetta-rs |
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
pub trait Inner<'a, T> { | |
fn inner(&self) -> &'a T; | |
} | |
/// Implement the trait if your want use your type in the | |
/// [`Callback`](super::Callback) of [`InvokeService`](crate::ser::InvokeService). | |
pub trait ExtractCtx<'a, V, S> | |
where | |
S: Inner<'a, V>, | |
Self: Sized, |
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::future::Future; | |
use std::sync::Arc; | |
use bytes::Bytes; | |
use color_eyre::Result; | |
use fastwebsockets::FragmentCollector; | |
use fastwebsockets::Frame; | |
use fastwebsockets::OpCode; | |
use http_body_util::Empty; | |
use hyper::header::CONNECTION; |
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 neure::{ctx::re_policy, prelude::*}; | |
const DATA: &str = include_str!("../input.txt"); | |
fn main() -> Result<(), Box<dyn std::error::Error>> { | |
let key = re::array(['&', '=']).not().repeat_one_more(); | |
let val = re::array(['\'', '&', '=']).not().repeat_one_more(); | |
let query = key.sep_once("=", val).sep("&"); | |
let url = '?'.not().repeat_one_more().sep_once("?", query); | |
let key = re::array(['\'', ':']).not().repeat_one_more(); |
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::iter::once; | |
use neure::{neu::digit, prelude::*, re::rec_parser}; | |
#[derive(Debug)] | |
pub enum Expr<'a> { | |
Int(i64), | |
Op(&'a str), |
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
pub trait TakeOut<T, R> { | |
type Rem; | |
fn take_out(self) -> (T, Self::Rem); | |
} | |
pub struct __First; | |
impl<Head, Tail> TakeOut<Head, __First> for (Head, Tail) { | |
type Rem = Tail; |
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 sys | |
from pathlib import Path | |
from PySide6.QtGui import QGuiApplication | |
from PySide6.QtCore import QUrl, QObject, Slot | |
from PySide6.QtQml import QQmlApplicationEngine, QmlElement | |
QML_IMPORT_NAME = "com.bridge.py" | |
QML_IMPORT_MAJOR_VERSION = 1 |
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::{ | |
io::stdout, | |
time::{Duration, Instant}, | |
}; | |
use crossterm::{ | |
cursor::MoveToNextLine, | |
event::{poll, read, KeyCode, KeyEvent, KeyEventKind, KeyModifiers}, | |
style, | |
terminal::{disable_raw_mode, enable_raw_mode}, |
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
#![crate_type = "proc-macro"] | |
use proc_macro2::Ident; | |
use proc_macro2::Literal; | |
use quote::quote; | |
use syn::{parse_macro_input, spanned::Spanned, ItemFn}; | |
/// | |
///``` | |
/// use playground::named; |
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 neure::{ | |
err::Error, | |
prelude::*, | |
re::{rec_parser, RecursiveCtor}, | |
}; | |
fn main() -> color_eyre::Result<()> { | |
color_eyre::install()?; | |
#[derive(Debug, PartialEq, Eq)] |
NewerOlder