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
    • 最新
    • 标签
主页 / user-5790653

Saeed's questions

Martin Hope
Saeed
Asked: 2024-10-31 01:20:01 +0800 CST

如何检查另一个列表中字典键的出现次数并创建新的输出

  • 5

我有一个list和一个dictionary像这样的:

mydict = {
    'some-id-string1': {'name': 'Saeed1', 'phone': '+989307333730', 'id': 'abc'},
    'some-id-string2': {'name': 'Saeed2', 'phone': '+989307333731', 'id': 'def'},
    'some-id-string3': {'name': 'Saeed3', 'phone': '+989307333732', 'id': 'ghi'},
    'some-id-string4': {'name': 'Saeed3', 'phone': '+989307333733', 'id': 'jkl'},
    'some-id-string5': {'name': 'Saeed3', 'phone': '+989307333730', 'id': 'abc'},
    'some-id-string6': {'name': 'Saeed3', 'phone': '+989307333730', 'id': 'abc'},
    'some-id-string7': {'name': 'Saeed3', 'phone': '+989307333731', 'id': 'def'},

}
mylist = [
    {'id': 'abc', 'name': 'some_name1'},
    {'id': 'def', 'name': 'some_name2'},
    {'id': 'ghi', 'name': 'some_name3'},
]

我将检查id的值是否mydict匹配mylist并将 添加name到mylist。mydict如果不存在,我将有两个输出(因为我目前不确定要保留哪一个,所以我将同时保留这两个,以便稍后决定):

如果存在则预期输出 1 ,如果不存在则name添加:NOT_FOUNDname

newmydict1 = {
    'some-id-string1': {'name': 'Saeed1', 'phone': '+989307333730', 'id': 'abc', 'id_name': 'some_name1'},
    'some-id-string2': {'name': 'Saeed2', 'phone': '+989307333731', 'id': 'def', 'id_name': 'some_name2'},
    'some-id-string3': {'name': 'Saeed3', 'phone': '+989307333732', 'id': 'ghi', 'id_name': 'some_name3'},
    'some-id-string4': {'name': 'Saeed3', 'phone': '+989307333733', 'id': 'jkl', 'id_name': 'NOT_FOUND'},
    'some-id-string5': {'name': 'Saeed3', 'phone': '+989307333730', 'id': 'abc', 'id_name': 'some_name1'},
    'some-id-string6': {'name': 'Saeed3', 'phone': '+989307333730', 'id': 'abc', 'id_name': 'some_name1'},
    'some-id-string7': {'name': 'Saeed3', 'phone': '+989307333731', 'id': 'def', 'id_name': 'some_name2'},
}

如果存在则预期输出 2 name,并为没有对应的创建一个新列表name:

newmydict2 {
    'some-id-string1': {'name': 'Saeed1', 'phone': '+989307333730', 'id': 'abc', 'id_name': 'some_name1'},
    'some-id-string2': {'name': 'Saeed2', 'phone': '+989307333731', 'id': 'def', 'id_name': 'some_name2'},
    'some-id-string3': {'name': 'Saeed3', 'phone': '+989307333732', 'id': 'ghi', 'id_name': 'some_name3'},
    'some-id-string5': {'name': 'Saeed3', 'phone': '+989307333730', 'id': 'abc', 'id_name': 'some_name1'},
    'some-id-string6': {'name': 'Saeed3', 'phone': '+989307333730', 'id': 'abc', 'id_name': 'some_name1'},
    'some-id-string7': {'name': 'Saeed3', 'phone': '+989307333731', 'id': 'def', 'id_name': 'some_name2'},
}
newmydict3 = {
    'some-id-string4': {'name': 'Saeed3', 'phone': '+989307333733', 'id': 'jkl'},
}

我不知道该做什么,该写什么,因为key的mydict(我的意思是some-id-string)在中不存在mylist,并且的某些成员mydict['id']出现了多次。

我试过

new = [{
    'string_id': d, 
    'id': l['id'], 
    'id_name': l['name'], 
    'phone': mydict[d]['phone'], 
    'name': mydict[d]['name']
    } for l in mylist for d in mydict if mydict[d]['id'] == l['id']
]
python
  • 1 个回答
  • 60 Views
Martin Hope
Saeed
Asked: 2024-10-29 14:25:26 +0800 CST

如何使用 len() 函数对字典进行排序[重复]

  • 6
此问题这里已有答案:
如何按值对字典进行排序? (34 个答案)
Python 的 sorted 函数中 key 参数如何工作? (4 个回答)
根据字符串的长度对 Python 列表进行排序 (8 个答案)
18 小时前关闭。

这是我的一本字典:

mydict = {
    4: {'K', 'H'},
    2: {'Y', 'X', 'Q', 'U'},
    8: {'A', 'T', 'S'},
}

似乎有一些我尝试过但没有奏效的字典排序方法:

sorted([(value,key) for (key,value) in mydict.items()])

但是我将len()根据每个值有多少个值来使用函数进行排序。

这是当前len()输出:

for x in mydict: print(x, mydict[x], len(mydict[x]))

我怎样才能按预期对字典进行排序?

预期输出为:

mydict = {
    2: {'Y', 'X', 'Q', 'U'},
    8: {'A', 'T', 'S'},
    4: {'K', 'H'},
}
python
  • 1 个回答
  • 67 Views
Martin Hope
Saeed
Asked: 2024-09-11 17:52:08 +0800 CST

如何检查某个主题是否不在电子邮件的 all_subjects 中

  • 5

我有今天发送的电子邮件主题列表(我连接到我的 IMAP 服务器并获取所有电子邮件):

sent_subjects = [
    'subject1 backup up completed', 'subject2-2 backup failed', 'subject4 backup partial complete', 'email3 done', 'ak47 failed', 'mp5 is good', 'm4 is good'
]

我有一个json文件,并且我拥有的几乎所有脚本以及发送电子邮件均在那里输入:

emails = [
    {'subject': 'mp3 is good', 'date': '2020-02-02'},
    {'subject': 'mp5 is good', 'date': '2020-02-02'},
    {'subject': 'm4 is good', 'date': '2020-02-02'}
]

我是subjects这样创建的:

subjects = [x['subject'] for x in emails]

这些是所有应该发送的主题(其中一些未发送):

static_subjects = [
    'subject1', 'subject2-2', 'subject4', 'email3', 'ak47', 'subject10', 'email11', 'final destination'
    ]
subjects += static_subjects
subjects.sort()

我知道我可以做到这一点,但这不会返回预期的输出:

final = list(set(subjects) - set(sent_subjects))

因为有些主题不像subject1并且subject4没有静态主题,它们可能会根据某些条件而改变(这些主题不是我的,我不会发送带有这些主题的电子邮件。我只是收到它们)。

因此,我需要检查是否有任何主题subjects不在中sent_subjects,这样我就可以追踪我没有收到的电子邮件,看看是否存在任何问题。

在这种情况下,我没有收到这些主题,而输出应该有它们:

mp3 is good
subject10
email11
final destination

我知道的另一件事是使用if ==不起作用,因为email11例如像subject1并且subject2-2有两个或多个主题(如果失败或成功)。

你能帮我一下吗?

python
  • 1 个回答
  • 45 Views
Martin Hope
Saeed
Asked: 2024-08-26 16:47:17 +0800 CST

如何找到以某些字符串结尾的条件名称并将它们分开

  • 6

我有以下清单:

list1 = [
    {'itemid': '264', 'name': 'Interface Gi1/17(Port1:TP TPIA-CL03-017-G15-14): Bits sent', 'some_other_keys': 'some_more_values'},
    {'itemid': '215', 'name': 'Interface Te1/50("Port1:CL-PO-G22-23"): Bits received', 'some_other_keys': 'some_more_values'},
    {'itemid': '425', 'name': 'Interface Gi1/46(no description): Bits sent', 'some_other_keys': 'some_more_values'},
    {'itemid': '521', 'name': 'Interface Te1/50("Port1:CL-PO-G22-23"): Bits sent', 'some_other_keys': 'some_more_values'},
    {'itemid': '310', 'name': 'Interface Gi1/46(no description): Bits received', 'some_other_keys': 'some_more_values'},
    {'itemid': '123', 'name': 'Interface Gi1/17(Port1:TP TPIA-CL03-017-G15-14): Bits received', 'some_other_keys': 'some_more_values'},
]
list2 = [
    {'itemid': '264', 'clock': '1724146566', 'value': '6246880', 'ns': '120003316'},
    {'itemid': '264', 'clock': '1724146746', 'value': '6134912', 'ns': '113448784'},
    {'itemid': '215', 'clock': '1724144406', 'value': '5786832', 'ns': '157177073'},
    {'itemid': '215', 'clock': '1724144766', 'value': '5968784', 'ns': '760851309'},
    {'itemid': '425', 'clock': '1724148366', 'value': '6590424', 'ns': '403316048'},
    {'itemid': '425', 'clock': '1724148726', 'value': '6549984', 'ns': '484278803'},
    {'itemid': '521', 'clock': '1724148906', 'value': '6346488', 'ns': '306999249'},
    {'itemid': '521', 'clock': '1724147106', 'value': '6139008', 'ns': '459391602'},
    {'itemid': '310', 'clock': '1724147286', 'value': '6000208', 'ns': '826776455'},
    {'itemid': '310', 'clock': '1724147466', 'value': '6784960', 'ns': '152620809'},
    {'itemid': '123', 'clock': '1724147826', 'value': '6865272', 'ns': '70247389'},
    {'itemid': '123', 'clock': '1724148186', 'value': '6544328', 'ns': '610791670'},
]

现在我要这样做:

首先,根据itemid存储每个值的总和和平均值(例如,对于264,将其所有值相加,然后除以 len() 函数):list2valueitemid

其次,找到其中的每两个itemidslist1并查看它们的名称是否匹配:

第三,将具有的值received除以sent。

我将所有相同的值添加itemid如下:

from collections import defaultdict
new_list = defaultdict(list)
for entry in list2:
    if int(entry['value']) > 0:
        new_list[int(entry['itemid'])].append(int(entry['value']))

# >>> new_list
# defaultdict(<class 'list'>, {264: [6246880, 6134912], 215: [5786832, 5968784], 425: [6590424, 6549984], 521: [6346488, 6139008], 310: [6000208, 6784960], 123: [6865272, 6544328]})

现在我应该查找 id 为 264 的name(name.split(': Bits')[0]事实上)是否list1与哪个 id 匹配,然后除以.endswith('Bits received') / .endswith('Bits sent')。

我们假设一下:

id 264 的名称是 Interface Gi1/17(Port1:TP TPIA-CL03-017-G15-14),另一个具有此名称的 id 是 123。现在,我们将 id 为 123 的所有值的总和(因为它是received)除以 id 为 264 的所有值的总和(因为它是sent)。

应该是这样的:

    [
        {'name': 'Interface Gi1/17(Port1:TP TPIA-CL03-017-G15-14)', 'received': 13409600, 'sent': 12381792, 'ratio': 1.0830096322083265} # ( (6865272 + 6544328) / (6246880 + 6134912) )
    ]

使用此代码,我可以对每个值求和并计算平均值itemid(但这不是我要做的):

import datetime
for x in new_list:
    print(f"Item ID: {x}, Ratio: {float(str(sum(new_list[x]) / len(new_list[x]) / 1000 / 1000)[:3])}")

电流输出:

Item ID: 264, Ratio: 6.1
Item ID: 215, Ratio: 5.8
Item ID: 425, Ratio: 6.5
Item ID: 521, Ratio: 6.2
Item ID: 310, Ratio: 6.3
Item ID: 123, Ratio: 6.7

完全预期的输出:

output = [
    {'name': 'Interface Gi1/17(Port1:TP TPIA-CL03-017-G15-14)', 'received': 13409600, 'sent': 12381792, 'ratio': 1.0830096322083265}, # ( (6865272 + 6544328) / (6246880 + 6134912) )
    {'name': 'Interface Te1/50("Port1:CL-PO-G22-23")', 'received': 11755616, 'sent': 12485496, 'ratio': 0.941541769746272}, # ( (5786832 + 5968784) / (6346488 + 6139008) )
    {'name': 'Interface Gi1/46(no description)', 'received': 12785168, 'sent': 13140408, 'ratio': 0.9729658318067446}, # ( (6000208 + 6784960) / (6590424 + 6549984) )
]

你能帮我怎样到达那里吗?

python
  • 1 个回答
  • 47 Views
Martin Hope
Saeed
Asked: 2024-05-26 20:03:28 +0800 CST

在两个字典列表之间找到一个值,然后根据第一个相似度找到另一个相同的值

  • 7

这是我的代码:


from collections import defaultdict

ip_port_device = [

    {'ip': '192.168.1.140', 'port_number': 4, 'device_name': 'device1'},
    {'ip': '192.168.1.128', 'port_number': 8, 'device_name': 'device1'},
    {'ip': '192.168.1.56', 'port_number': 14, 'device_name': 'device1'},
    {'ip': '192.168.1.61', 'port_number': 4, 'device_name': 'device1'},
    {'ip': '192.168.1.78', 'port_number': 8, 'device_name': 'device1'},
    {'ip': '192.168.1.13', 'port_number': 16, 'device_name': 'device1'},

    {'ip': '192.168.2.140', 'port_number': 4, 'device_name': 'device2'},
    {'ip': '192.168.2.128', 'port_number': 8, 'device_name': 'device2'},
    {'ip': '192.168.2.56', 'port_number': 14, 'device_name': 'device2'},
    {'ip': '192.168.2.61', 'port_number': 4, 'device_name': 'device2'},
    {'ip': '192.168.2.78', 'port_number': 8, 'device_name': 'device2'},
    {'ip': '192.168.2.13', 'port_number': 16, 'device_name': 'device2'},

    {'ip': '192.168.3.140', 'port_number': 4, 'device_name': 'device3'},
    {'ip': '192.168.3.128', 'port_number': 8, 'device_name': 'device3'},
    {'ip': '192.168.3.56', 'port_number': 14, 'device_name': 'device3'},
    {'ip': '192.168.3.61', 'port_number': 4, 'device_name': 'device3'},
    {'ip': '192.168.3.78', 'port_number': 8, 'device_name': 'device3'},
    {'ip': '192.168.3.13', 'port_number': 16, 'device_name': 'device3'},

]

ip_per_node = [

    {'node_name': 'server9.example.com', 'ip_address': '192.168.1.140'},
    {'node_name': 'server19.example.com', 'ip_address': '192.168.1.128'},
    {'node_name': 'server11.example.com', 'ip_address': '192.168.2.140'},
    {'node_name': 'server21.example.com', 'ip_address': '192.168.2.128'},
    {'node_name': 'server17.example.com', 'ip_address': '192.168.3.140'},
    {'node_name': 'server6.example.com', 'ip_address': '192.168.3.128'},

]

ips_and_ports_in_switch = []
for compute in ip_per_node:
    for port in ip_port_device:
        if compute['ip_address'] == port['ip']:
            port = port['port_number']
            for new_port in ip_port_device:
                if port == new_port['port_number']:
                    ips_and_ports_in_switch.append({
                        'port_number': new_port['port_number'],
                        'ip_address': new_port['ip'],
                        'node_name': compute['node_name'],
                        'device_name': new_port['device_name']
                        })

concatenated = defaultdict(list)
for entry in ips_and_ports_in_switch:
    concatenated[(entry['device_name'], entry['port_number'], entry['node_name'])].append(entry['ip_address'])

逻辑是:

如果ip_per_node['ip_address']匹配ip_port_device['ip'],则ip_port_device查找所有 ip 具有相同的端口号。

然后像这样保存(预期输出):

node server9.example.com, port 4, device device1, ips ['192.168.1.140', '192.168.1.61']
node server19.example.com, port 8, device device1, ips ['192.168.1.128', '192.168.1.78']
node server11.example.com, port 4, device device2, ips ['192.168.2.140', '192.168.2.61']
node server21.example.com, port 8, device device2, ips ['192.168.2.128', '192.168.2.78']
node server17.example.com, port 4, device device3, ips ['192.168.3.140', '192.168.3.61']
node server6.example.com, port 8, device device3, ips ['192.168.3.128', '192.168.3.78']

我当前的代码无法按我的预期工作。它为所有节点多次保存一个端口。

我尝试为样本添加最少但需要的数据。

python
  • 2 个回答
  • 89 Views
Martin Hope
Saeed
Asked: 2024-04-16 18:07:34 +0800 CST

openpyxl 在 for 循环中创建不正确的工作表名称

  • 5

这是我的代码:

import os
import sys
my_path = 'C:/Users/S.Fazlollahzadeh/Desktop/shell-scripts/test only/excel'
os.chdir(my_path)
sys.path.append(my_path)
from openpyxl import Workbook

names = ['name1', 'name2', 'name3', 'name4']
wb = Workbook()
ws = wb.active

for name in names:
        ws.title = name
        wb.create_sheet(name)

wb.save("sample.xlsx")
quit()

工作表名称为:

name4
name11
name21
name31
name41

虽然应该是:

name1
name2
name3
name4

我究竟做错了什么?

python
  • 2 个回答
  • 34 Views
Martin Hope
Saeed
Asked: 2024-04-12 01:19:58 +0800 CST

如何根据字典列表的值写入不同的文件并连接 for 循环和三个字典列表

  • 5

首先,如果问题太长,我很抱歉。我试图包含最少的数据,但那是我可以添加的。

这些是我的清单:

products_income = [
    {'client_group': 'A', 'count': 2, 'product': 'A', 'monthly_income': 370},
    {'client_group': 'B', 'count': 1, 'product': 'B', 'monthly_income': 215},
    {'client_group': 'C', 'count': 3, 'product': 'C', 'monthly_income': 495},
    {'client_group': 'A', 'count': 2, 'product': 'D', 'monthly_income': 304},
    {'client_group': 'B', 'count': 1, 'product': 'E', 'monthly_income': 110},
    {'client_group': 'B', 'count': 2, 'product': 'F', 'monthly_income': 560},
    {'client_group': 'A', 'count': 1, 'product': 'G', 'monthly_income': 196},
    ]

client_package = [
    {'client_group': 'A', 'total_income': 870},
    {'client_group': 'B', 'total_income': 885},
    {'client_group': 'C', 'total_income': 495}
]

client_group_user_counts = {
    'A': ['user1', 'user2', 'user3', 'user4', 'user5'], # 5 users
    'B': ['user21', 'user22', 'user23', 'user24'], # 4 users
    'C': ['user41', 'user42', 'user43'], # 3 users
}

这些是我商店的输出,这是写入“ client_group.txt”调用的不同文件的预期输出:

A.txt:

group A has 2 product A, monthly income is 370.
group A has 2 product D, monthly income is 304.
group A has 1 product G, monthly income is 196.

group A total income is 870.

group A has total 5 users, and this is its users:
user1
user2
user3
user4
user5

B.txt:

group B has 1 product B, monthly income is 215.
group B has 1 product E, monthly income is 110.
group B has 2 product F, monthly income is 560.

group B total income is 885.

group B has total 4 users, and this is its users

user21
user22
user23
user24

C.txt:

group C has 3 product C, monthly income is 495.

group C total income is 495.

group C has total 3 users, and this is its users:
user41
user42
user43

这是我当前的代码,我尚未达到预期的输出(实际上,除了我的代码的其他问题之外,目前我不知道如何在这种情况下写入单独的文件):

# I added this function, because I had error in the last line of next code block inside the `f-string`, so I thought that could be a workaround for this
def to_join():
    return '\n'.join(client_group_user_counts[user])

for product in products_income:
    for client in client_package:
        for user in client_group_user_counts:
            if product['client_group'] == client['client_group'] == user:
                print(f"""group {product['client_group']} has {product['count']} product {product['product']}, monthly income is {product['monthly_income']}.
total income is {client['total_income']}.
group {product['client_group']} has total {len(client_group_user_counts[user])} users, and this is its users:
{to_join()}
""")

这是当前输出:

group A has 2 product A, monthly income is 370.
group A total income is 870.
group A has total 5 users, and this is its users:
user1
user2
user3
user4
user5

group B has 1 product B, monthly income is 215.
group B total income is 885.
group B has total 4 users, and this is its users:
user21
user22
user23
user24

group C has 3 product C, monthly income is 495.
group C total income is 495.
group C has total 3 users, and this is its users:
user41
user42
user43

group A has 2 product D, monthly income is 304.
group A total income is 870.
group A has total 5 users, and this is its users:
user1
user2
user3
user4
user5

group B has 1 product E, monthly income is 110.
group B total income is 885.
group B has total 4 users, and this is its users:
user21
user22
user23
user24

group B has 2 product F, monthly income is 560.
group B total income is 885.
group B has total 4 users, and this is its users:
user21
user22
user23
user24

group A has 1 product G, monthly income is 196.
group A total income is 870.
group A has total 5 users, and this is its users:
user1
user2
user3
user4
user5
python
  • 4 个回答
  • 39 Views
Martin Hope
Saeed
Asked: 2024-02-06 02:28:37 +0800 CST

python while循环如果所有条件都相等,则从列表中进行另一个随机选择

  • 4

这是我的Python代码:

import secrets
from time import sleep

ids = [{'id': number} for number in range(1, 5+1)]

rand1 = secrets.choice(ids)
rand2 = secrets.choice(ids)
rand3 = secrets.choice(ids)

n = 0
while rand1['id'] == rand2['id'] == rand3['id']:
        n += 1
        print('Before')
        print(rand1['id'], rand2['id'], rand3['id'])
        sleep(1)
        rand1 = secrets.choice(ids)
        rand2 = secrets.choice(ids)
        rand3 = secrets.choice(ids)
        print('After')
        print(rand1['id'], rand2['id'], rand3['id'])

我要达到这个目标:

执行 while 循环并选择一个随机 id,直到 rand1['id']、rand2['id'] 和 rand3['id'] 都不相等。

即使其中两个相等,然后再进行一次 for 循环。

python
  • 3 个回答
  • 52 Views
Martin Hope
Saeed
Asked: 2024-02-04 03:32:48 +0800 CST

python 电报机器人对话机器人水平按钮而不是垂直按钮

  • 5

在此示例中,它显示如下按钮:

Number1ToChoose Number2ToChoose Number3ToChoose Number4ToChoose Number5ToChoose

当我要看到这个时:

Number1ToChoose
Number2ToChoose
Number3ToChoose
Number4ToChoose
Number5ToChoose

到目前为止我还没有找到办法做到这一点。

python
  • 1 个回答
  • 35 Views
Martin Hope
Saeed
Asked: 2024-02-03 06:43:24 +0800 CST

python如何使用范围函数在字典中添加新键

  • 2

这是 json 文件:

[
  {"name": "Saeed"},
  {"name": "Joseph"},
  {"name": "Mary"},
  {"name": "Peter"}
]

我将对其进行迭代,然后id为每个键添加一个名为的新键,并且它的值是唯一的。

这是我当前的 for 循环,但仅增加第一项:

import json

with open('db.json', 'r') as file:
    data = json.load(file)

data.sort(key=lambda x: x['name'])
for i in range(1, len(data) + 1):
    for d in data:
        d['id'] = i
        break

电流输出:

for i in data:
{'name': 'Joseph', 'id': 4}
{'name': 'Mary'}
{'name': 'Peter'}
{'name': 'Saeed'}

预期输出是:

{'name': 'Joseph', 'id': 1}
{'name': 'Mary', 'id': 2}
{'name': 'Peter', 'id': 3}
{'name': 'Saeed', 'id': 4}
python
  • 2 个回答
  • 50 Views
Martin Hope
Saeed
Asked: 2023-08-17 23:14:18 +0800 CST

awk 查找并替换为正则表达式和环境变量

  • 5

这是我的文字:

    set $domain_name some-not-important-name.com;

我想达到这个目标:

    set $domain_name test.com;

这是我到目前为止所尝试的:

DOMAIN_NAME=test.com
awk '{ sub(/ set $domain_name(.*)/, " set $domain_name $DOMAIN_NAME;") }1' file

当前结果:

    set $domain_name some-not-important-name.com

更新1

我添加多个的原因whitespaces是,该行属于nginx配置并且它有多个空格。

由于我的文件中有 和charset,set而且它们不是该行的第一个字符,所以我应该 set在前面替换为空格。

bash
  • 3 个回答
  • 64 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