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 / 问题

问题[loops](coding)

Martin Hope
SomeNameUser
Asked: 2025-02-07 04:09:25 +0800 CST

Rust 如何在迭代过程中创建结构并将其收集到 Result <Vec <Struct>,Error>

  • 5

我有以下可以工作并编译的代码,但我想知道是否可以仅使用构建器模式来执行此操作,因此,在第二个函数中,我将使用 .for_each() 或 w/e,而不是 for 循环

use std::path::PathBuf;

use walkdir::{DirEntry, Error};

fn main() {
    println!("Hello, world!");
    match rewalk(walker()) {
        Ok(v) => v.iter().for_each(|f| println!("{:?}", f.path)),
        Err(_e) => (),
    }
}

fn walker() -> Result<Vec<DirEntry>, Error> {
    walkdir::WalkDir::new("clear")
        .max_depth(1)
        .into_iter()
        .filter(|e| {
            e.as_ref().unwrap().path().is_file() && e.as_ref().unwrap().path().extension().is_some()
        })
        //is it possible to continue to iterate from here
        //and collect Result<Vec<MyStruct>,MyError>
        .collect()
}

fn rewalk(ars: Result<Vec<DirEntry>, Error>) -> Result<Vec<MyStruct>, MyError> {
    let mut ve: Vec<MyStruct> = vec![];
    match ars {
        Ok(e) => {
            for x in e {
                ve.push(MyStruct {
                    path: x.path().to_path_buf(),
                });
            }
            Ok(ve)
        }
        Err(e) => Err(MyError::Io),
    }
}
#[derive(Debug)]
enum MyError {
    Io,
    Fs,
}

struct MyStruct {
    path: PathBuf,
}

所以基本上我在代码中注释的地方,是否可以完成我在 rewalk() 函数中所做的操作。别介意我有 2 个函数,可以是一个,但作为示例的一部分,我想将 rewalk 函数合并到 walker 函数中,并让它使用构建器模式

loops
  • 1 个回答
  • 43 Views
Martin Hope
xpt
Asked: 2025-01-02 11:00:10 +0800 CST

在 Go 中使用反射,如何迭代已知切片

  • 6

和

    m := map[string]any{"a": 1, "b": 2, "c": []int{2, 3, 4}}
    v := reflect.ValueOf(m)

如何在"c"中进行迭代v?

参见https://go.dev/play/p/KQ_UNjm-Vqd

package main

import (
    "fmt"
    "reflect"
)

func main() {
    m := map[string]any{"a": 1, "b": 2, "c": []int{2, 3, 4}}
    v := reflect.ValueOf(m)

    // Access the "c" key
    cKey := reflect.ValueOf("c")
    cValue := v.MapIndex(cKey)

    if cValue.IsValid() && cValue.Kind() == reflect.Slice {
        fmt.Println("Iterating through 'c':")
        for i := 0; i < cValue.Len(); i++ {
            fmt.Println(cValue.Index(i).Interface())
        }
    } else {
        fmt.Println("'c' is not a valid slice or key does not exist.")
    }

    if !cValue.IsValid() {
        fmt.Println("Key 'c' not found in the map")
        return
    }
    if cValue.Kind() != reflect.Slice {
        fmt.Println("Value for key 'c' is not a slice")
        return
    }
}
loops
  • 2 个回答
  • 63 Views
Martin Hope
garej
Asked: 2024-12-17 02:29:24 +0800 CST

如何正确循环具有方程动态的 GAMS 模型?

  • 5

我正在尝试了解在 GAMS 中创建递归动态模型的正确方法。为此,我制作了一个由 2 个线性方程组成的玩具示例(又称蛛网模型)。现在它从随机点开始P(t=1)=40并移动到平衡点(系统解)。

t在循环内运行带有索引的简单代码似乎有些棘手。GAMS 总是抱怨 (!):

错误 50:循环控制指数出现在模型方程中

我一直在查看其他代码片段(例如),但找不到完整的示例来重现。玩弄代码时,我刚刚将另一个z和 循环放入 中z。我工作正常。

到目前为止一切顺利,但请注意 howt仍然在循环内。我有点困惑。(至少我不知道这种编码的副作用。)

Set t /t1*t10/
 * HERE IS THE TRICK
    z /z1*z10/;

Parameters a /100/, b /2/, c /20/, d /1/;

Variables P(t), Qd(t), Qs(t), obj;

Positive Variables P, Qd, Qs;

Equations Demand(t), Supply(t), Equilibrium(t), Objective; 
    Demand(t).. Qd(t) =E= a - b * P(t);
    Supply(t).. Qs(t) =E= c + d * P(t-1);
    Equilibrium(t).. Qd(t) =E= Qs(t);
    Objective.. obj =E= 1; 

P.l('t1') = 40;

Model cobwebModel /all/;

Loop(z,
    Solve cobwebModel using LP maximizing obj;
    P.l(t+1) = (a - c + d * P.l(t)) / (b + d);
);

问题是:如何重构上述代码以使其符合适当的 GAMS 风格并准备扩展?

loops
  • 1 个回答
  • 19 Views
Martin Hope
Nicholas Davies
Asked: 2024-12-08 08:14:41 +0800 CST

在 MASM 汇编语言中体验直角三角程序的无限循环

  • 6

我目前正在尝试用 MASM 汇编语言编写一个程序,该程序将根据用户输入的整数值打印出一系列直角三角形。例如,如果用户输入的是 3,则程序将输出:

*

*  * 

*  *  *

-

*  *  *

*  *

*

-

      *

   *  *

*  *  * 

-

*  *  *

   *  *

      *

我已经弄清楚了除第三个三角形之外的所有三角形。我遇到了spaces1三角形 3 以下的无限循环。程序将正确打印出三角形,直到它达到比用户整数值小一的值,然后它会无限循环。我已经研究这个问题一段时间了,但我不知道如何修复这个错误。这是我的代码:

org 100h      

.model small

.stack 16

.data
; question the user is asked
input db "Enter the size for the triangles between 3 and 9, or 0 to quit $"
size dw ?

.code

main proc
    mov AX, @data                           ; move location of data segment into AX
    mov DS, AX                              ; points ds register at data segment
    
    prompt: 
        mov AH, 09h                         ; opcode to print string
        lea DX, input                       ; string to print out
        int 21h
        
        mov AH, 01h                         ; opcode to read in single char
        int 21h
        cmp AL, '0'                         ; check to see if user wants to quit
        je exit
        
        sub AL, '0'                         ; convert user input to literal value
        mov AH, 0                           ; blank out top half of AX
        mov size, AX                        ; make copy of user input as literal value     
        
        mov CX, AX
        mov BX, 1                           ; sets up BX register for star counter loop    
        
        call crlf                               
        
    ; First Triangle
    lines1: 
        push CX                             ; store the outer (lines) loop
        mov CX, BX                          ; the number of stars to print out
        
        stars1: 
            mov AH, 02h                     ; opcode to print string
            mov DL, '*'                     ; char to print out
            int 21h   
            
        loop stars1                         ; end loop
        
        call crlf
        inc BX                              ; increment BX (stars)
        pop CX                              ; recover value from CX for the outer lines loop
        
    loop lines1                             ; end loop
       
    call crlf
    mov CX, size                            ; reload CX with copy of size for next triangle
    mov BX, 1     
    
    ; Second Triangle   
    lines2:
        push CX                             ; store the outer (lines) loop    
        
        stars2: 
            mov AH, 02h                     ; opcode to print single char
            mov DL, '*'                     ; char to print out
            int 21h              
            
        loop stars2                         ; end loop
        
        call crlf                   
        pop CX                              ; recover value for outer loop
        
    loop lines2                             ; end loop   
    
    call crlf                               ; call crlf proc
    mov CX, size                            ; reload CX with copy of size for next triangle
    mov BX, 1                               ; set up BX for star loop
    
    ; Third Triangle
    lines3:
        push CX                             ; Store the outer loop counter
        mov CX, size                        ; Calculate spaces needed
        sub CX, BX                          ; Adjust CX for the number of spaces

        spaces1:
            mov AH, 02h                     ; Opcode to print single char
            mov DL, ' '                     ; Print a space
            int 21h
        loop spaces1                        ; End loop for spaces

        mov CX, BX                          ; Set number of stars for this line
        stars3:
            mov AH, 02h                     ; Opcode to print single char
            mov DL, '*'                     ; Print a star
            int 21h
        loop stars3                         ; End loop for stars

        call crlf                           ; Move to the next line
        inc BX                              ; Increment the number of stars for the next line
        pop CX                              ; Restore outer loop counter

    loop lines3                             ; End outer loop

    call crlf                               ; call crlf proc
    mov CX, size                            ; set up CX for fourth triangle
    mov BX, 1                               
    
    ; Fourth Triangle
    lines4:
        push CX                             ; store copy of CX for outer loop       
        mov CX, BX                          ; set up number of spaces for spaces loop
        
        spaces2:
            mov AH, 02h                     ; opcode to print char
            mov DL, ' '                     ; char to print out
            int 21h
        loop spaces2                        ; end loop
        
        pop CX                              ; recover CX for stars loop
        push CX                             ; for outer lines loop
        
        stars4:   
            mov AH, 02h                     ; opcode to print char
            mov DL, '*'                     ; char to print out
            int 21h   
        
        loop stars4                         ; end loop   
        
        call crlf
        
        inc BX                              ; increment BX for next line 
        pop CX                              ; recover value for outer lines loop
    
    loop lines4
    
    call crlf                               ; call crlf proc
    mov CX, size                            ; set up CX for fourth triangle
    mov BX, 1   
    
    exit:
        mov AX, 4C00h
        int 21h
                                                               
main endp

crlf proc
    mov AH, 02h                             ; opcode to print single char
    mov DL, 13                              ; ASCII carriage return
    int 21h
    mov DL, 10                              ; ASCII line feed
    int 21h
    ret

crlf endp
end main

这是问题的屏幕截图。在程序中,它在第 92 行和第 95 行之间循环。spaces1 在此处输入图片描述 有人能给我指出正确的方向吗?谢谢!:)

loops
  • 1 个回答
  • 26 Views
Martin Hope
Yago
Asked: 2024-10-10 07:30:43 +0800 CST

无法在 do 中将类型“IO”与“[]”匹配

  • 5

我是 Haskell 新手 :)。我想从 IO 中迭代读取一个元素,如果存在,则从列表中删除该元素。在其他情况下,重复读取直到输入的元素在列表中。我有以下代码:

import Data.List (delete)

main = do
let initialDieRoll = [23,45,98,34]
strength <- askStrength
let dieRollWithoutStrength = removeStrengthFromDieRollLoop strength initialDieRoll
print dieRollWithoutStrength

removeStrengthFromDieRollLoop :: Int -> [Int] -> [Int]
removeStrengthFromDieRollLoop = removeStrengthFromDieRoll

removeStrengthFromDieRoll :: Int -> [Int] -> [Int]
removeStrengthFromDieRoll strength dieRoll = do
if strength `elem` dieRoll then
  delete strength dieRoll
else do
  "Please, choose an element from the initial die roll"
  newStrength <- askStrength
  removeStrengthFromDieRollLoop askStrength dieRoll


askStrength :: IO Int
askStrength = do
putStr "Strength : "
readLn::IO Int

但是,当我请求新的强度时,出现以下错误:

Couldn't match type ‘IO’ with ‘[]’
  Expected: [Int]
  Actual: IO Int
In a stmt of a 'do' block: newStrength <- askStrength
In the expression:
do "Please, choose an element from the initial die roll"
   newStrength <- askStrength
   removeStrengthFromDieRollLoop askStrength dieRoll
In a stmt of a 'do' block:
  if strength `elem` dieRoll then
    delete st

最好的处理方法是什么?如何修复错误?如果值不在初始列表中,每次请求值循环的最佳方法是什么?谢谢。

loops
  • 1 个回答
  • 60 Views
Martin Hope
Yoann Lesueur
Asked: 2024-10-08 17:29:30 +0800 CST

Ansible 在 when 条件下改变变量

  • 5

我想知道是否可以使用 Ansiblewhen在循环中改变的条件下测试 2 个值。

disksizefromjson是我从 json 文件中提取的变量(当我删除when条件时,这个值被正确改变)。

item['Size']是我使用 powershell 命令从上一个任务中提取的变量。

---
- name: get disk info on windows vm 
  ansible.windows.win_powershell:
    script: |
      Get-ciminstance win32_volume -Filter DriveType=3 | where-object{$_.Label -notlike "*Reserved*" -and $_.SystemVolume -ne $true} | Select-Object Name, Label, FileSystem, BlockSize, @{'Name'='Size'; 'Expression'={[math]::Ceiling($_.Capacity / 1GB)}}, @{'Name'='Freespace'; 'Expression'={[math]::Ceiling($_.Freespace / 1GB)}}, @{'Name'='Free'; 'Expression'={[math]::Ceiling(($_.Freespace * 100)/$_.Capacity)}} | Sort-Object Name
  register: diskNewVm

- name: test disk size
  set_fact:
    disksizefromjson: "{{ diskinfosfromjson | from_json | selectattr('Name', 'equalto',  item['Name']) | map(attribute='Size') | first | default(10) }}"
  when: item['Size'] > disksizefromjson
  loop: "{{ diskNewVm.output }}"

这会导致以下错误:

The conditional check 'item['Size'] > disksizefromjson' failed. The error was: error while evaluating conditional (item['Size'] > disksizefromjson): 'disksizefromjson' is undefined

当我删除该when条件时,disksizefromjson定义就很好了......

那么,when 条件中可能有 2 个变量吗?

loops
  • 2 个回答
  • 27 Views
Martin Hope
Gioni_Bletsch
Asked: 2024-07-26 23:21:16 +0800 CST

我的循环应如何正确替换值?

  • 5

我正在撰写一篇科学医学论文,使用 HADS-Score 评估患者的焦虑和抑郁程度。该评分由 14 个项目组成,分为两个子量表(HADS-D、HADS-A),每个子量表有 7 个项目,可能的值从 0 到 3 分。我有缺失数据,想替换它们。根据评分手册,如果一个子量表中有多个缺失项目,我必须删除该观察结果。如果每个子量表只缺少一个项目,我可以用当前六个项目的平均值替换缺失项目。我将每个观察结果的 HADS-Score 项目存储在以下变量中:

  • 子量表 HADS-D(加起来等于总子量表 = hads_anx_score)。变量:hads_tense_rec、hads_glad_rec、hads_omen_rec、hads_laugh_rec、hads_trouble_rec、hads_happy_rec、hads_relax_rec
  • 子量表 HADS-A(加起来等于总子量表 = hads_depr_score)。变量:hads_limited_rec、hads_scary_rec、hads_looks_rec、hads_restless_rec、hads_future_rec、hads_panic_rec、hads_enjoy_rec

我把代码分解为以下步骤:

  1. 初始化子量表分数:为子量表 HADS-D 和 HADS-A 创建变量。

  2. 识别缺失值。我创建了一个新变量is_missing_来识别它是否缺失。

  3. 使用 来计算缺失项目,egen以rowtotal计算每个子量表中缺失项目的数量。

  4. 删除观察结果:我删除了任一子量表中缺少多个项目的观察结果。

  5. 替换每个子量表中缺失的项目。如果某个项目缺失,则用子量表中其他六个项目的平均值替换。

  6. 计算总分:将各分量表的分数相加,得到最终分数。

问题:不知何故,我的代码没有用我在步骤 5中创建的循环替换每个子量表中缺失的项目,并且留下了缺失的数据(==。)

*STEP 1: Initialize the HADS-A and HADS-D subscales
gen hads_anx_score = .
gen hads_depr_score = .

* STEP 2:Loop over each observation
foreach var in hads_tense_rec hads_glad_rec hads_omen_rec hads_laugh_rec hads_trouble_rec hads_happy_rec hads_relax_rec hads_limited_rec hads_scary_rec hads_looks_rec hads_restless_rec hads_future_rec hads_panic_rec hads_enjoy_rec {
    gen is_missing_`var' = missing(`var')
}

* STEP 3: Calculate the number of missing items per subscale
egen missing_hads_anx = rowtotal(is_missing_hads_tense_rec is_missing_hads_glad_rec is_missing_hads_omen_rec is_missing_hads_laugh_rec is_missing_hads_trouble_rec is_missing_hads_happy_rec is_missing_hads_relax_rec)

egen missing_hads_depr = rowtotal(is_missing_hads_limited_rec is_missing_hads_scary_rec is_missing_hads_looks_rec is_missing_hads_restless_rec is_missing_hads_future_rec is_missing_hads_panic_rec is_missing_hads_enjoy_rec)

* STEP 4. Drop observations with more than one missing item in any subscale
drop if missing_hads_anx > 1 | missing_hads_depr > 1

**STEP 5.** Replace single missing items with the mean of the present six items
foreach var in hads_tense_rec hads_glad_rec hads_omen_rec hads_laugh_rec hads_trouble_rec hads_happy_rec hads_relax_rec {
    qui replace `var' = (hads_tense_rec + hads_glad_rec + hads_omen_rec + hads_laugh_rec + hads_trouble_rec + hads_happy_rec + hads_relax_rec - `var') / 6 if is_missing_`var' == 1 & missing_hads_anx == 1
}

foreach var in hads_limited_rec hads_scary_rec hads_looks_rec hads_restless_rec hads_future_rec hads_panic_rec hads_enjoy_rec {
    qui replace `var' = (hads_limited_rec + hads_scary_rec + hads_looks_rec + hads_restless_rec + hads_future_rec + hads_panic_rec + hads_enjoy_rec - `var') / 6 if is_missing_`var' == 1 & missing_hads_depr == 1
}

现在,如果我运行**第五步**,仍然有缺失的数据(例如 hads_limited_rec == . )。

loops
  • 1 个回答
  • 37 Views
Martin Hope
Razumov
Asked: 2024-06-12 03:27:20 +0800 CST

具有自定义 int 类型的 Zig for 循环范围迭代器

  • 5

我正在使用for循环来迭代整数范围,例如:

for (0..256) |i| {

我的问题是我需要i是 类型u21,但目前是。我可以直接在循环内usize使用手册来执行它,但我想知道是否有更好的方法。@intCast

我希望下面的方法可以工作,但它仍然给我一个usize:

for (@as(u21, 0)..256) |i| {

有什么建议可以优雅地实现这一点吗?

loops
  • 1 个回答
  • 25 Views
Martin Hope
Tien
Asked: 2024-02-19 21:44:09 +0800 CST

sendEmails 函数中出现“未找到范围”错误,并且调试不够具体,无法识别

  • 5

有人能够确定发生了什么事吗?这似乎是某种类型的循环错误,但我自己也不确定。

我收到的“异常:未找到范围”错误消​​息引用了以下行: rows.forEach(function(row) 和 var eventEmail = eventsData.getRange(row[5]).getValue();。

我的列设置为: 复选框列 标题 开始日期 结束日期 描述 电子邮件 联系人

在此输入图像描述

function SendEmails ()
{
// Extract events data
  var eventsData = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("SHEET_NAME"); 
  var rows = eventsData.getDataRange().getValues();
  var templateText = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("SHEET_NAME_2").getRange(1, 1).getValue();

// Discount header row
  var headers = rows.shift();
 
// Identify only rows that are checked to apply function and run log
  rows.forEach(function(row) 
  {
    if(row[0])
    {
      Logger.log(JSON.stringify(row));

// Extract reminder template and send reminder emails for selection
      var eventEmail = eventsData.getRange(row[5]).getValue();
      var eventTitle = eventsData.getRange(row[1]).getValue();
      var eventPOC = eventsData.getRange(row[6]).getValue();
      var eventDesc = eventsData.getRange(rows[4]).getValue();
      var messageBody = templateText.replace("{name}",eventPOC).replace("{title}",eventTitle).replace("{description}",eventDesc);
      var subjectLine = "Reminder: " + eventTitle + " Upcoming Event";

      MailApp.sendEmail(eventEmail, subjectLine, messageBody);
    }
  });
}

在我进行一些编辑之前,此函数一直有效,以便它仅针对选中复选框的行运行。

它似乎成功地识别了已选中复选框的行。它似乎也贯穿了第一个循环,但之后发生了一些我无法识别的事情。

我尝试更改范围引用以确保引用正确的列。

我很感激任何指导!

loops
  • 1 个回答
  • 21 Views
Martin Hope
eramm
Asked: 2024-02-14 08:04:19 +0800 CST

AWK - 在继续下一场比赛之前处理比赛

  • 7

我有一个包含多个段落的文件,这些段落使用括号作为分隔符,如下所示

{
KEYWORD
a = 1
b = 2
c = 3
}
{
d = 4
KEYWORD
e = 5
f = 6
}

我想循环每个段落并将其分配给变量 $foo 同时保留换行符,因此 echo $foo 将导致该段落以多行格式输出。处理 $foo 的输出后,例如echo $foo | grep bar程序应该转到下一段并覆盖 $foo

我一直在使用 awk,因为它似乎是这种情况下最好的工具,但我不知道如何执行某种 while 循环,以便我可以单独处理每个段落。

到目前为止我所拥有的是:

grep -Pzo "{[^}]*KEYWORD[^}]*}" FILENAME | awk "/{/{flag=1; 

paragraph=\"\"; next} /}/{flag=0; print paragraph} flag {paragraph = 

paragraph \$0 \"\\n\"}"

这会产生像这样整齐的段落

KEYWORD
a = 1
b = 2
c = 3

d = 4
KEYWORD
e = 5
f = 6

我陷入困境的是,我想在继续第 2 段之前对第 1 段执行进一步的操作。

我最接近的解决方案是将结果写入数组,但后来我丢失了该段落,所有内容都在一行上,并且我无法进行我想要的匹配后处理。

更新:

本着有不止一种方法可以做到这一点的精神,如果你只有一把锤子,那么一切看起来都像钉子,我提供我的解决方案:

# Read paragraphs into an array
while IFS= read -r paragraph; do
    paragraphs+=("$paragraph")
done < <(awk '/\{/{flag=1; paragraph=""; next} /\}/{flag=0; print paragraph} flag {paragraph = paragraph $0}' testoutput.txt)

# Print each paragraph separately
for ((i=0; i<${#paragraphs[@]}; i++)); do
    # Assign each paragraph to a variable using eval
    eval "foo_$i=\"${paragraphs[$i]}\""

    # Print the variable recreating the line breaks
    echo "Variable foo_$i:"
    eval "echo \"\$foo_$i\"|sed 's/\s\{2,\}/\n/g'"
done

成功的关键是使用 sed's/\s\{2,\}/\n/g'而不是\sor\s+或一个或多个 vs 两个或多个。

loops
  • 4 个回答
  • 71 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