AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / coding / 问题

问题[generics](coding)

Martin Hope
MaPo
Asked: 2025-04-06 16:50:11 +0800 CST

Rust 中宏内的枚举

  • 5

我有以下锈蚀代码

use std::any::Any;
use std::rc::Rc;

fn main() {
    let mut variables = Vec::<Rc<dyn Any>>::new();
    variables.push(Rc::new(1_i32));
    variables.push(Rc::new(false));
    variables.push(Rc::new(4.53_f64));

    let integer: i32 = *variables[0].clone().downcast::<i32>().unwrap();
    let boolean: bool = *variables[1].clone().downcast::<bool>().unwrap();
    let floating: f64 = *variables[2].clone().downcast::<f64>().unwrap();

    let my_goal: (i32, bool, f64) = (integer, boolean, floating)

    println!("{:?}", my_goal);

我想使用宏来实现自动化。(我知道这不是最理想的,但这只是一个 MWE 来询问有关宏的问题)

特别是我想创建一个向下转换Any为给定类型的元组

我的第一次尝试是:

macro_rules! my_macro {
    ($vector:ident; $($type:ty),*) => {
        // ($($type),*)
        //println!("{:?}", $vector);
        //$(println!("{:?}", stringify!($type));)*
        let idx = 0;
        ($(
                *$vector[0].clone().downcast::<$type>().unwrap()
        ),*)
    };
}

这是错误的,因为0硬编码。我尝试了几种方法来声明一个变量并沿着宏增加它,但都失败了。我该怎么办?

generics
  • 1 个回答
  • 38 Views
Martin Hope
Kaven
Asked: 2025-04-04 14:29:17 +0800 CST

SwiftUI 自定义容器 init()

  • 5

我正在制作一个基于 Section() 的自定义 SwiftUI 视图。我的基本代码如下所示,其工作原理如下:

struct SettingsSection<Header: View, Content: View>: View {
    var header: () -> Header
    var content: () -> Content
    
    init(@ViewBuilder header: @escaping () -> Header, @ViewBuilder content: @escaping () -> Content)
    {
        self.header = header
        self.content = content
    }

    var body: some View {
        Section(content: {
            content()
        }, header: {
            header()
        })
    }
}

但是我想添加一个更简单的 init,它只接受字符串作为标头。我尝试执行以下操作:

    init(_ headerStr: String, @ViewBuilder content: @escaping () -> Content) {
        self.init(header: {
            Text(headerStr)
        }, content: content )
    }

但是如果像这样使用 SettingsSection,我会收到错误“无法推断通用参数‘Header’”,这正是我想要的:

SettingsSection("Actions") {
   // ... content of the section
}

我可以理解使用这个新的 init() 没有指定 Header 类型,但肯定有一种方法可以创建这种简化的构造函数......我是对的吗?

generics
  • 1 个回答
  • 35 Views
Martin Hope
McBain
Asked: 2025-02-05 11:10:38 +0800 CST

如何制作一个使用长度随每个实现者而变化的数组的特征?[重复]

  • 5
此问题这里已有答案:
特征内的 Const 表达式? (2 个答案)
6 小时前关闭。

我有一个特征,它为其实现者指定了一个反序列化函数。此特征应采用固定大小的数组,u8该数组的长度取决于实现者(例如,类型A可能从 10 个字节开始反序列化,类型B可能从 50 个字节开始反序列化)。不幸的是,当我希望它支持实现我的特征的类型的数组的反序列化时,我无法让此特征工作,我总是遇到与泛型在 const 表达式中不可用相关的错误。需要注意的一件重要事情是,我的代码在一个非常特殊的环境中运行,我需要在编译时知道我的 calldata 的大小,所以Vec很遗憾,我无法将其切换出来并完成它。这是我到目前为止尝试过的方法:

尝试 1:

trait MyTrait {
    const ARR_LEN: usize;

    fn deserialize<const N: usize>(array: [u8; N]) -> Self;
}

impl<const M: usize, T> MyTrait for [T; M]
where
    T: MyTrait,
{
    const ARR_LEN: usize = M * T::ARR_LEN;

    fn deserialize<const N: usize>(array: [u8; N]) -> Self {
        array
            .chunks_exact(T::ARR_LEN)
            .map(|chunk| T::deserialize::<{T::ARR_LEN}>(chunk.try_into().unwrap()))
            .collect::<Vec<_>>()
            .try_into()
            .unwrap()
    }

}

这会导致反序列化函数部分出现错误T::deserialize::<{T::ARR_LEN}>,即我们不能在 const 表达式中使用泛型类型。

尝试2:

trait MyTrait {
    const ARR_LEN: usize;

    fn deserialize(array: [u8; Self::ARR_LEN]) -> Self;
}

impl<const M: usize, T> MyTrait for [T; M]
where
    T: MyTrait,
{
    const ARR_LEN: usize = M * T::ARR_LEN;

    fn deserialize(array: [u8; ARR_LEN]) -> Self {
        array
            .chunks_exact(T::ARR_LEN)
            .map(|chunk| T::deserialize(chunk.try_into().unwrap()))
            .collect::<Vec<_>>()
            .try_into()
            .unwrap()
    }

}

这会导致部分错误fn deserialize(array: [u8; ARR_LEN]) -> Self {,另外,我不能在 const 表达式中使用泛型(因为ARR_LEN是使用构造的T::ARR_LEN)。

尝试3:

trait MyTrait {
    const ARR_LEN: usize;
    type ArrayType: Sized;

    fn deserialize(array: Self::ArrayType) -> Self;
}

impl<const M: usize, T> MyTrait for [T; M]
where
    T: MyTrait,
{
    const ARR_LEN: usize = M * T::ARR_LEN;
    type ArrayType = [u8; Self::ARR_LEN];

    fn deserialize(array: Self::ArrayType) -> Self {
        array
            .chunks_exact(T::ARR_LEN)
            .map(|chunk| T::deserialize(chunk.try_into().unwrap()))
            .collect::<Vec<_>>()
            .try_into()
            .unwrap()
    }

}

这会导致部分错误type ArrayType = [u8; Self::ARR_LEN],如上所述,我不能在 const 表达式中使用泛型(因为这里也是ARR_LEN使用构造的T::ARR_LEN)。

有谁对我如何才能让它工作有想法或不同的方法(而不必诉诸使用夜间版#![feature(generic_const_exprs)])?

generics
  • 1 个回答
  • 34 Views
Martin Hope
Daniel Hornik
Asked: 2025-01-12 22:01:07 +0800 CST

Rust 中结构的可选通用回调/函数参数

  • 6

您好,我正在使用 Leptos 实现一个 Rust 应用程序。我做了很多实验,同时也在学习,所以我做的事情可能不是最好的,但我想解决我看到的问题。这个问题是纯理论性的。我没有在我的生产中使用下面的客户端。对我来说,这只是一个有趣的案例。

我有以下实现

use serde::{Deserialize, de::DeserializeOwned, Serialize};

pub trait ApiResourceQuery {
    fn path(&self) -> &str;
}

pub struct ApiRequestBuilder<'a, Q, H, H2> {
    query: Q,
    client: Option<&'a reqwest::Client>, // client is marked as optional only for this example
    token: Option<&'a str>,
    on_begin_func: Option<H>,
    on_finish_func: Option<H2>,
}

impl<'a, Q, H, H2> ApiRequestBuilder<'a, Q, H, H2>
where
    Q: ApiResourceQuery + Serialize,
    H: FnOnce(),
    H2: FnOnce(),
{
    pub fn new(query: Q) -> Self {
        ApiRequestBuilder {
            query,
            client: None,
            token: None,
            on_begin_func: None,
            on_finish_func: None,
        }
    }

    pub fn with_token(mut self, token: &'a str) -> Self {
        self.token = Some(token);

        self
    }

    pub fn with_client(mut self, client: &'a reqwest::Client) -> Self {
        self.client = Some(client);

        self
    }

    pub fn on_begin(mut self, func: H) -> Self {
        self.on_begin_func = Some(func);

        self
    }

    pub fn on_finish(mut self, func: H2) -> Self {
        self.on_finish_func = Some(func);

        self
    }
    pub /* async */ fn execute<R>(self, on_successful: impl FnOnce(R))
    where
        R: DeserializeOwned + Default, // default is temporary only for this example
    {
        if let Some(handler) = self.on_begin_func {
            handler();
        }

        let res: Result<R, ()> = Ok(R::default());
        on_successful(res.unwrap()); // unwrap only for the example purposes


        if let Some(handler) = self.on_finish_func {
            handler();
        }
    }
}

#[derive(Serialize, Deserialize)]
struct GetUserQuery {}

impl ApiResourceQuery for GetUserQuery {
    fn path(&self) -> &str {
        "/api/resource"
    }
}

#[derive(Serialize, Deserialize, Debug)]
struct GetUserResponse {
    pub username: String
}

impl Default for GetUserResponse {
    fn default() -> Self {
        Self {
            username: "default username".into(),
        }
    }
}

我可以按以下方式使用它:


fn main() {
    // Usecase 1
    ApiRequestBuilder::new(GetUserQuery{})
      .on_begin(||println!("On begin handler1"))
      .on_finish(||println!("On finish handler1"))
      .execute(|user: GetUserResponse| println!("On successful1: {:?}", user));
      
      
    // Usecase 2
    // <'a, Q, H, H2>
    ApiRequestBuilder::<'_, _, _, fn()>::new(GetUserQuery{})
      .on_begin(||println!("On begin handler2"))
      .execute(|user: GetUserResponse| println!("On successful2: {:?}", user));
      
      
    // Usecase 3 - won't compile
    // <'a, Q, H, H2>
    ApiRequestBuilder::new(GetUserQuery{})
      .on_begin(||println!("On begin handler3"))
      .execute(|user: GetUserResponse| println!("On successful3: {:?}", user));
}

问题出在用例 3 中,由于以下错误,它无法编译:


error[E0284]: type annotations needed
   --> src/main.rs:111:5
    |
111 |     ApiRequestBuilder::new(GetUserQuery{})
    |     ^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `H2` declared on the struct `ApiRequestBuilder`
    |
    = note: cannot satisfy `<_ as FnOnce<()>>::Output == ()`
note: required by a bound in `ApiRequestBuilder::<'a, Q, H, H2>::new`
   --> src/main.rs:19:9
    |
19  |     H2: FnOnce(),
    |         ^^^^^^^^ required by this bound in `ApiRequestBuilder::<'a, Q, H, H2>::new`
20  | {
21  |     pub fn new(query: Q) -> Self {
    |            --- required by a bound in this associated function
help: consider specifying the generic arguments
    |
111 |     ApiRequestBuilder::<GetUserQuery, _, H2>(GetUserQuery{})
    |                      ~~~~~~~~~~~~~~~~~~~~~~~

当我想跳过一个回调时,有没有一种简单的方法可以提供默认值?它们可以在结构定义期间定义吗?这里的例子很简单,但如果我有另外 2 个回调怎么办,比如说:

  • on_expected_error
  • on_unexpected_error

当我要调用的时候用5种类型注释,不是很直观。

generics
  • 1 个回答
  • 48 Views
Martin Hope
Josh Burkart
Asked: 2024-12-04 04:46:18 +0800 CST

定义并全面实现一个共同的特征以避免 Rust 中的依赖关系

  • 5

高级问题陈述

我使用一个通用的声明性宏在许多不同的 crate 中定义了各种通用容器。每个容器看起来都像这样:

struct Container1<T> {
    a: T,
    b: T,
}

另一方面,我有一个单独的板条箱model,它具有一个特征ModelTree,当它们的类型参数实现其他特征时,我想在所有通用容器上实现该特征Model:

trait ModelTree {
    fn integrate_model_tree(self, context: Context);
}

理想情况下应该是

impl<T: Model> ModelTree for Container1<T> {
    ...
}

[...and similarly for other containers...]

但是,该model包不能直接依赖于定义容器的所有包(有很多),并且定义容器的包也不能依赖于该model包。

为了解决这个问题,我考虑从高层次上定义一个通用的 crate common,它定义了一个“类似于”的特性ModelTree,让所有容器(例如Container1)实现这个通用特性,然后ModelTree对实现这个通用特性的任何东西进行通用实现。然而,unconstrained type parameter每当我尝试这样做时,我都会不断得到错误。

具体尝试

以下是我在 中尝试的具体操作common。此游乐场链接包含完整的 MRE。定义一个常见的访客特征:

trait Visitor {
    type ItemType;

    fn visit(&mut self, item: Self::ItemType);
}

定义“可访问”的特征AcceptVisitor:

trait AcceptVisitor<V: Visitor<ItemType = Self::ItemType>> {
    type ItemType;

    fn accept_visitor(self, visitor: V);
}

AcceptVisitor为所有通用容器实施:

impl<T, V: Visitor<ItemType = T>> AcceptVisitor<V> for Container1<T> {
    type ItemType = T;

    fn accept_visitor(self, mut visitor: V) {
        visitor.visit(self.a);
        visitor.visit(self.b);
    }
}

在箱子中添加访客垫片model:

struct ModelVisitor<M: Model> {
    context: Context,
    phantom: core::marker::PhantomData<M>,
}

impl<M: Model> Visitor for ModelVisitor<M> {
    type ItemType = M;
    
    fn visit(&mut self, item: M) {
        self.context.add_model(item);
    }
}

最后,ModelTree针对所有实现的类型实现AcceptVisitor:

impl<
        M: Model,
        V: Visitor<ItemType = M>,
        A: AcceptVisitor<ModelVisitor<M>, ItemType = M>,
    > ModelTree for A
{
    fn integrate_model_tree(self, context: Context) {
        let visitor = ModelVisitor { context, phantom: core::marker::PhantomData };
        self.accept_visitor(visitor);
    }
}

这就是我得到和的unconstrained type parameter错误的地方。MV

问题

有什么方法可以实现我的高级问题陈述?我的具体尝试是否走错了路,还是有办法对其进行调整以使其发挥作用?谢谢!

generics
  • 1 个回答
  • 22 Views
Martin Hope
cher-nov
Asked: 2024-11-25 10:19:57 +0800 CST

为什么要通过 where 子句中绑定的通用特征来约束单位类型(如 `where () : Trait<…>`)?

  • 17

今天我在这里遇到了一个有点奇怪的语法 - where ():
https ://github.com/binator/self/tree/80ba2ade?tab=readme-ov-file#example

fn hex_primary<Stream, Context>(stream: Stream) -> Parsed<u8, Stream, Context>
where
  (): IntRadixParse<Stream, Context, u8>,
{
  uint_radix(2, Radix::HEX).parse(stream)
}

在我看来,它看起来像是“绑定在单元类型(又名空元组)上”,但我无法理解。单元类型默认不会实现所有特征,对吗?不幸的是,官方文档太模糊,不够完整(同时过于冗长),我在其中找不到任何相关内容。

原始 RFC 的 forwhere子句也提到了这种语法,但没有适当的解释:
https://rust-lang.github.io/rfcs/0135-where.html#alternatives

fn increment<T>(c: T) -> T
    where () : Add<int,T,T>
{
    1 + c
}

但除此之外,我知道不仅可以在特征泛型中指定此类界限。
那么它是什么,何时使用,为什么需要它以及它解决了哪些问题?

generics
  • 2 个回答
  • 791 Views
Martin Hope
Erik Schulze
Asked: 2024-11-11 23:49:11 +0800 CST

Const generic 无约束通用常量

  • 6

我有一个有趣的案例,我不太明白。

我尝试在迭代中不断打开一些代码。整个迭代过程中条件都是相同的,因此我没有使用常规的 if else,而是尝试使用 const 泛型布尔值来执行此操作。

一个简单的例子是这样的:

#![allow(incomplete_features)]
#![feature(generic_const_exprs)]

use const_assert::{Assert, IsTrue};

enum XorY {
    X,
    Y
}

fn foo(count: usize, do_special: Option<XorY>) {
    match do_special {
        Some(XorY::X) => foo_inner::<true, false>(count),
        Some(XorY::Y) => foo_inner::<false, true>(count),
        _ => foo_inner::<false, false>(count),
    }
}

const fn constraint(x: bool, y: bool) -> bool {
    !(x && y)
}

fn foo_inner<const X: bool, const Y: bool>(count: usize)
    where Assert<{constraint(X, Y)}> : IsTrue
{
    for i in 0..(count - 1)
    {
        foo_iter::<false, Y>(i);
    }

    foo_iter::<X, Y>(i);
}

fn foo_iter<const X: bool, const Y: bool>(index: usize)
    : where Assert<{constraint(X, Y)}> : IsTrue
{        
    if X {
        // do x stuff with index
    }
    else if Y {
        // do y stuff with index
    }
    else {
        // do default stuff with index
    }
}

但我收到“不受约束的通用常量”错误。

error: unconstrained generic constant
   |
   |         foo_iter::<false, Y>(
   |                    ^^^^^
   |
note: required by a bound in `foo_iter`
   |
   | fn foo_iter<const X: bool, const Y: bool>(
   |    -------- required by a bound in this function
...
   |     where Assert<{ constraint(X, Y) }> : IsTrue
   |                  ^^^^^^^^^^^^^^^^^^^ required by this bound in `foo_iter`
help: try adding a `where` bound
   |
   |     where Assert<{ constraint(X, Y) }> : IsTrue, [(); { constraint(X, Y) } as usize]:
   |                 

我不明白为什么 false 不受约束。另外,该建议不起作用。

generics
  • 1 个回答
  • 40 Views
Martin Hope
Hugo Balls
Asked: 2024-09-23 02:03:00 +0800 CST

Rust 中的类型不会从 impl 传递到结构体

  • 5

因此,当我学习 rust 时,我想在 stm32l0xx-hal 中为 uart 编写一个包装器,我一直收到的错误是 impl 中的 USART 模板与 struct 声明不同

代码:

pub struct Uart<USART, TX, RX> {
    _tx: serial::Tx<USART>,
    _rx: serial::Rx<USART>,
    _tx_pin: TX,
    _rx_pin: RX
}

impl<USART: serial::Serial2Ext<TX,RX>, TX, RX> Uart<USART, TX,RX> {
    pub fn new
        (usart: USART,  mut rcc: rcc::Rcc, tx_pin: TX, rx_pin: RX) -> Self {

        let serial = usart
            .usart(tx_pin, rx_pin, serial::Config::default(), &mut rcc)
            .unwrap();

        let (tx, rx) = serial.split();

        Uart{
            _tx : tx, // <- error
            _rx : rx, // <- error
            _tx_pin : tx_pin,
            _rx_pin : rx_pin
        }
    }
}

错误:

error[E0308]: mismatched types
  --> src/uart.rs:28:19
   |
17 | impl<USART: serial::Serial2Ext<TX,RX>, TX, RX> Uart<USART, TX,RX> {
   |      ----- expected this type parameter
...
28 |             _tx : tx,
   |                   ^^ expected `Tx<USART>`, found `Tx<USART2>`
   |
   = note: expected struct `stm32l0xx_hal::serial::Tx<USART>`
              found struct `stm32l0xx_hal::serial::Tx<stm32l0xx_hal::serial::USART2>`

stm32l0xx_hal::serial::USART2- 是我传递给新函数的 usart 类型

generics
  • 1 个回答
  • 30 Views
Martin Hope
Olivier Lasne
Asked: 2024-09-05 18:53:43 +0800 CST

创建一个可以添加 i64、f64 或 i64 和 f64 混合的 Rust 函数

  • 5

我想编写一个add函数,可以将这两个参数作为i64输入。f64

我得出了以下结论:

use std::ops::Add;

fn add<T: Add<Output = T>>(a: T, b: T) -> T{
    a + b
}

fn main() {
    let a: i64 = 10;
    let b: i64 = 20;
    let c: f64 = 10.5;
    let d: f64 = 20.5;

    println!("{:?}", add(a, b)); // Outputs: 30
    println!("{:?}", add(c, d)); // Outputs: 31.0
}

是否可以修改此功能以便可以实现:

  • 一个参数是i64
  • 另一个参数是f64

如果任一参数是,f64我们进行强制转换并返回f64。

类型a 类型b 返回type
i64 i64 i64
i64 f64 f64
f64 i64 f64
f64 f64 f64

主要函数将有以下输出:

fn main() {
    let a: i64 = 10;
    let b: i64 = 20;
    let c: f64 = 10.5;
    let d: f64 = 20.5;

    println!("{:?}", add(a, b)); // Outputs: 30    | i64 + i64 -> i64
    println!("{:?}", add(a, c)); // Outputs: 20.5  | i64 + f64 -> f64
    println!("{:?}", add(c, a)); // Outputs: 20.5  | f64 + i64 -> f64
    println!("{:?}", add(c, d)); // Outputs: 30.0  | f64 + f64 -> f64
}
generics
  • 1 个回答
  • 39 Views
Martin Hope
Raz Luvaton
Asked: 2024-09-03 02:18:21 +0800 CST

如何在 Rust 中使用结构泛型来使用编译时已知大小的类型作为数组长度

  • 5

如何使用在编译时已知大小的泛型Sized作为基于其大小的结构数组长度

我有以下错误:

error: generic parameters may not be used in const operations
 --> src/lib.rs:4:43
  |
4 |     arr: [Key; 1024 / std::mem::size_of::<Key>()]
  |                                           ^^^ cannot perform const operation using `Key`
  |
  = note: type parameters may not be used in const expressions

对于以下代码

Rust 游乐场

type SomeKey = u64;

// This does not work
struct NotWorking<Key: Sized> {
    arr: [Key; 1024 / std::mem::size_of::<Key>()]
}

struct Working {
    arr: [SomeKey; 1024 / std::mem::size_of::<SomeKey>()]
}

generics
  • 1 个回答
  • 34 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    重新格式化数字,在固定位置插入分隔符

    • 6 个回答
  • Marko Smith

    为什么 C++20 概念会导致循环约束错误,而老式的 SFINAE 不会?

    • 2 个回答
  • Marko Smith

    VScode 自动卸载扩展的问题(Material 主题)

    • 2 个回答
  • Marko Smith

    Vue 3:创建时出错“预期标识符但发现‘导入’”[重复]

    • 1 个回答
  • Marko Smith

    具有指定基础类型但没有枚举器的“枚举类”的用途是什么?

    • 1 个回答
  • Marko Smith

    如何修复未手动导入的模块的 MODULE_NOT_FOUND 错误?

    • 6 个回答
  • Marko Smith

    `(表达式,左值) = 右值` 在 C 或 C++ 中是有效的赋值吗?为什么有些编译器会接受/拒绝它?

    • 3 个回答
  • Marko Smith

    在 C++ 中,一个不执行任何操作的空程序需要 204KB 的堆,但在 C 中则不需要

    • 1 个回答
  • Marko Smith

    PowerBI 目前与 BigQuery 不兼容:Simba 驱动程序与 Windows 更新有关

    • 2 个回答
  • Marko Smith

    AdMob:MobileAds.initialize() - 对于某些设备,“java.lang.Integer 无法转换为 java.lang.String”

    • 1 个回答
  • Martin Hope
    Fantastic Mr Fox msvc std::vector 实现中仅不接受可复制类型 2025-04-23 06:40:49 +0800 CST
  • Martin Hope
    Howard Hinnant 使用 chrono 查找下一个工作日 2025-04-21 08:30:25 +0800 CST
  • Martin Hope
    Fedor 构造函数的成员初始化程序可以包含另一个成员的初始化吗? 2025-04-15 01:01:44 +0800 CST
  • Martin Hope
    Petr Filipský 为什么 C++20 概念会导致循环约束错误,而老式的 SFINAE 不会? 2025-03-23 21:39:40 +0800 CST
  • Martin Hope
    Catskul C++20 是否进行了更改,允许从已知绑定数组“type(&)[N]”转换为未知绑定数组“type(&)[]”? 2025-03-04 06:57:53 +0800 CST
  • Martin Hope
    Stefan Pochmann 为什么 {2,3,10} 和 {x,3,10} (x=2) 的顺序不同? 2025-01-13 23:24:07 +0800 CST
  • Martin Hope
    Chad Feller 在 5.2 版中,bash 条件语句中的 [[ .. ]] 中的分号现在是可选的吗? 2024-10-21 05:50:33 +0800 CST
  • Martin Hope
    Wrench 为什么双破折号 (--) 会导致此 MariaDB 子句评估为 true? 2024-05-05 13:37:20 +0800 CST
  • Martin Hope
    Waket Zheng 为什么 `dict(id=1, **{'id': 2})` 有时会引发 `KeyError: 'id'` 而不是 TypeError? 2024-05-04 14:19:19 +0800 CST
  • Martin Hope
    user924 AdMob:MobileAds.initialize() - 对于某些设备,“java.lang.Integer 无法转换为 java.lang.String” 2024-03-20 03:12:31 +0800 CST

热门标签

python javascript c++ c# java typescript sql reactjs html

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve