小编ite*_*ong的帖子

"警告:部分"__const_coal"已弃用"在Mac OS上将Xcode更新为最新版本后出现错误

我的C++程序的g ++编译器工作正常,直到我将我的Xcode更新到最新版本并接受了许可协议.我也尝试使用clang而不是g ++进行编译,但是出现了错误.现在我得到了很多错误.任何人都知道出了什么问题?

Ivans-MacBook-Pro:CS6771A3-GenericDirectedWeightedGraph ivanteong$ g++ -std=c++14 -Wall -Werror -O2 -o test6 tests/test6.cpp
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:1:11: warning: section "__textcoal_nt" is deprecated
        .section __TEXT,__textcoal_nt,coalesced,pure_instructions
                 ^      ~~~~~~~~~~~~~
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:1:11: note: change section name to "__text"
        .section __TEXT,__textcoal_nt,coalesced,pure_instructions
                 ^      ~~~~~~~~~~~~~
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:211:11: warning: section "__textcoal_nt" is deprecated
        .section __TEXT,__textcoal_nt,coalesced,pure_instructions
                 ^      ~~~~~~~~~~~~~
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:211:11: note: change section name to "__text"
        .section __TEXT,__textcoal_nt,coalesced,pure_instructions
                 ^      ~~~~~~~~~~~~~
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:604:11: warning: section "__textcoal_nt" is deprecated
        .section __TEXT,__textcoal_nt,coalesced,pure_instructions
                 ^      ~~~~~~~~~~~~~
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:604:11: note: change section name to "__text"
        .section __TEXT,__textcoal_nt,coalesced,pure_instructions
                 ^      ~~~~~~~~~~~~~
Run Code Online (Sandbox Code Playgroud)

c++ macos xcode compiler-errors g++

15
推荐指数
1
解决办法
4825
查看次数

@method_decorator(csrf_exempt)NameError:名称'method_decorator'未定义

我正在按照以下指南(https://abhaykashyap.com/blog/post/tutorial-how-build-facebook-messenger-bot-using-django-ngrok)了解如何创建聊天机器人,直到我更新的部分views.py.方法声明似乎存在一些问题,我不知道出了什么问题.除此之外,代码几乎与指南完全相同(指南创建者忘记添加一些导入).以下是我在虚拟环境中运行服务器时遇到的错误:

(ivanteongbot) Ivans-MacBook-Pro:ivanteongbot ivanteong$ python manage.py runserver
Performing system checks...

Unhandled exception in thread started by <function wrapper at 0x1097a2050>
Traceback (most recent call last):
  File "/Users/ivanteong/Envs/ivanteongbot/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/Users/ivanteong/Envs/ivanteongbot/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 121, in inner_run
    self.check(display_num_errors=True)
  File "/Users/ivanteong/Envs/ivanteongbot/lib/python2.7/site-packages/django/core/management/base.py", line 385, in check
    include_deployment_checks=include_deployment_checks,
  File "/Users/ivanteong/Envs/ivanteongbot/lib/python2.7/site-packages/django/core/management/base.py", line 372, in _run_checks
    return checks.run_checks(**kwargs)
  File "/Users/ivanteong/Envs/ivanteongbot/lib/python2.7/site-packages/django/core/checks/registry.py", line 81, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/Users/ivanteong/Envs/ivanteongbot/lib/python2.7/site-packages/django/core/checks/urls.py", line 14, in check_url_config
    return check_resolver(resolver)
  File "/Users/ivanteong/Envs/ivanteongbot/lib/python2.7/site-packages/django/core/checks/urls.py", line 24, in check_resolver …
Run Code Online (Sandbox Code Playgroud)

python django bots method-declaration server

5
推荐指数
1
解决办法
3617
查看次数

解析没有列的空文件

我有一个函数可以读取文本文件,然后将其解析为数据框。

通常输入文件将是这样的:

A   B   M
1   2   100
2   1   20
Run Code Online (Sandbox Code Playgroud)

我希望能够解析一个不包含任何内容的文本文件,并返回一个空的数据框,但它不允许我这样做,并且在使用 python pandas 读取文件的行中出现错误。还有其他方法吗?

import pandas as pd

def read_data(file):
    df = pd.read_csv(file, delim_whitespace=True)
    return df
Run Code Online (Sandbox Code Playgroud)

错误:

pandas.io.common.EmptyDataError: No columns to parse from file
Run Code Online (Sandbox Code Playgroud)

python parsing

2
推荐指数
1
解决办法
9357
查看次数

== 15341 ==错误:AddressSanitizer:地址0xb59007e0处的堆缓冲区溢出,位于pc 0x8048ca7 bp 0xbfb47388 sp 0xbfb4737c

我是动态内存管理的新手,并使用Fsanitise标志来查找内存管理问题.我不能使用vector来存储数据 - 我需要使用原始数组,以及"new"和"delete"来管理堆对象.

当我尝试运行EuclideanVectorTester编译的程序但是不确定问题是什么时,我得到以下错误,请有人开导我吗?

weill % make
g++ -std=c++14 -Wall -Werror -O2 -fsanitize=address -c EuclideanVectorTester.cpp
g++ -std=c++14 -Wall -Werror -O2 -fsanitize=address -c EuclideanVector.cpp
g++ -fsanitize=address EuclideanVectorTester.o EuclideanVector.o -o EuclideanVectorTester
weill % ./EuclideanVectorTester
1
=================================================================
==15341==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xb59007e0 at pc 0x8048ca7 bp 0xbfb47388 sp 0xbfb4737c
WRITE of size 8 at 0xb59007e0 thread T0
    #0 0x8048ca6 in main (/tmp_amd/kamen/export/kamen/3/z3386180/cs6771/evec/EuclideanVectorTester+0x8048ca6)
    #1 0xb6ecae45 in __libc_start_main (/lib/i386-linux-gnu/i686/cmov/libc.so.6+0x16e45)

0xb59007e0 is located 0 bytes to the right of 16-byte region [0xb59007d0,0xb59007e0)
allocated by thread …
Run Code Online (Sandbox Code Playgroud)

c++ constructor heap-memory dynamic-memory-allocation address-sanitizer

1
推荐指数
1
解决办法
6361
查看次数

为Azure Resource Manager模板部署DSC扩展时遇到问题

我正在尝试为Windows虚拟机的配置部署Azure资源管理器模板。

目前,我正在将IIS Powershell脚本引导至DSC模块,以为通过ARM设置的Windows虚拟机设置IIS。

我不断收到与WinRM相关的错误:

New-AzureRmResourceGroupDeployment : 5:04:53 PM - Resource Microsoft.Compute/virtualMachines/extensions 'vmSVX-TESTAU-SQL1/dscExtension' failed with message '{
  "status": "Failed",
  "error": {
    "code": "ResourceDeploymentFailure",
    "message": "The resource operation completed with terminal provisioning state 'Failed'.",
    "details": [
      {
        "code": "VMExtensionProvisioningError",
        "message": "VM has reported a failure when processing extension 'dscExtension'. Error message: \"DSC Configuration 'vmDSC' completed with error(s). 
Following are the first few: The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer …
Run Code Online (Sandbox Code Playgroud)

iis powershell azure

1
推荐指数
1
解决办法
581
查看次数