给定:
- 请求序列
k1, k2, ... - 容量上限
C - 当前驻留集合
S,满足|S| <= C
| let langserver: ExampleLanguageServer | null = null; | |
| export const activate = function() { | |
| langserver = new ExampleLanguageServer(); | |
| } | |
| export const deactivate = function() { | |
| if (langserver) { | |
| langserver.stop(); | |
| langserver = null; |
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE KindSignatures #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| module Main where | |
| class Monad m => Handler (g :: * -> *) (m :: * -> *) where | |
| handle :: g a -> (a -> m b) -> m b | |
| data Freer :: (* -> *) -> * -> * where |
| /// ref: [zhihu](https://zhuanlan.zhihu.com/p/378252833) | |
| use crate::foo::{IncreaseOnly, new_increase_only}; | |
| fn main() { | |
| let mut x1 = new_increase_only!(0); | |
| let mut x2 = new_increase_only!(2); | |
| let y = 1; | |
| // only can be used in `x1` | |
| let le = x1.check_less_or_equal(y).unwrap(); |
| package org.example; | |
| import com.fasterxml.jackson.annotation.JsonIgnore; | |
| import com.fasterxml.jackson.annotation.JsonSubTypes; | |
| import com.fasterxml.jackson.annotation.JsonTypeInfo; | |
| import com.fasterxml.jackson.annotation.JsonTypeName; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import lombok.Builder; | |
| import lombok.SneakyThrows; | |
| import lombok.Value; |
| // https://davidlattimore.github.io/posts/2025/09/02/rustforge-wild-performance-tricks.html | |
| // https://github.com/rust-lang/libs-team/issues/674 | |
| fn reuse_vec<T, U>(mut v: Vec<T>) -> Vec<U> { | |
| const { | |
| assert!(size_of::<T>() == size_of::<U>()); | |
| assert!(align_of::<T>() == align_of::<U>()); | |
| } | |
| v.clear(); | |
| v.into_iter().map(|_| unreachable!()).collect() | |
| } |
| name: DNS nameserver overwrites | |
| dns: | |
| nameserver: | |
| - system |
| name: Rules overwrites | |
| rules: | |
| - 'DOMAIN-SUFFIX,bsky.app,BosLife' | |
| - 'DOMAIN-SUFFIX,hanime1.me,BosLife' | |
| - 'DOMAIN-SUFFIX,mastodon.social,BosLife' | |
| - 'DOMAIN-SUFFIX,github.io,BosLife' | |
| - 'DOMAIN-SUFFIX,arxiv.org,BosLife' | |
| - 'DOMAIN-SUFFIX,docs.rs,BosLife' | |
| - 'DOMAIN-SUFFIX,zed.dev,BosLife' | |
| - 'DOMAIN-SUFFIX,hackmd.io,BosLife' |