RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / user-218984

aaa's questions

Martin Hope
aaa
Asked: 2020-01-11 15:13:27 +0000 UTC

安装 Windows 更新

  • 4

Windows Server 2008 有一个可启动的闪存驱动器。安装后,您需要从 Microsoft 站点下载并安装许多更新。关于一切的一切平均需要 2 小时(取决于汽车)。现在的问题是:我怎样才能加快这个过程?可以做什么?

windows
  • 2 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-11-27 16:48:18 +0000 UTC

执行程序时出错:“进程返回 -1073741819 (0xC0000005)”

  • -1

为什么程序S_object.findShortestWord(S_object.get(), str_value2);以终止Process returned -1073741819 (0xC0000005) execution time : 3.804 s?

#include <iostream>
#include <stdio.h>
#include <cstring>

using namespace std;

class FirstClass {
    public:
        char* str_value;
    public:
        FirstClass(const char* value = ""):str_value(0) {
            set(value);
        }

        FirstClass(const FirstClass &obj):str_value(0) {
            set(obj.str_value);
        };

        ~FirstClass() {delete[] str_value;}

    void set(const char* value) {
        delete[] str_value;
        str_value = new char[strlen(value)+1];
        strcpy(str_value, value);
    }

    const char* get() const {
        return str_value;
    }
};

class SecondClass : public FirstClass {
    public:
        SecondClass(const char* str_value = "") : FirstClass (str_value) {}
    void findShortestWord(const char* in, char* out) {
        int len = strlen(in);

        int beginWord = 0;
        int lengthWord = 0;

        for (int i = 0; i < len; i++) {
            while ( (in[i] == ' ') && ( in[i] != '\0')  ) i++;
            int begin = i;
            while ( (in[i] != ' ') && (in[i] != '\0') ) i++;
            int end = i;
            char tmp[256];
            for(int j = begin, k=0; j < end; j++, k++)
                tmp[k] = in[j];
            tmp[end - begin] = '\0';

            int currentLen = end - begin;
            if (currentLen < lengthWord) {
                lengthWord = currentLen;
                beginWord = begin;
            }
}

        for (int i = beginWord, k = 0; i < beginWord + lengthWord; i++, k++)
            out[k] = in[i];

        out[lengthWord] = '\0';
    }
};

int main() {
    char* str_value2;
    FirstClass F_object("Hello my world 1");

    printf("\nFirstClass init: %s", F_object.get());

    F_object.set("Hello my world 2");

    printf("\nFirstClass set: %s", F_object.get());

    FirstClass F_object2 = F_object;

    SecondClass S_object(F_object.get());

    printf("\nSecondClass init: %s", S_object.get());

    S_object.findShortestWord(S_object.get(), str_value2);

    //F_object = S_object;

    printf("\nSearch and delete: %s", str_value2);

    return 0;
}
c++
  • 2 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-11-20 20:43:45 +0000 UTC

如何使用 const char* 中的字符

  • 3

有一个变量声明为const char* str_value. 您需要在其中找到最短的单词。例如,循环输出时,printf("%s = ", str_value[i]);程序结束,与比较时," "发誓char*。这应该如何解决?即使有完成printf("%s = ", str_value[1]);

输出时printf("%d = ", str_value[1]);号码出来。是字符代码吗?为什么?

c++
  • 1 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-11-20 14:26:52 +0000 UTC

帮我理解作业

  • 4

创建表示简单继承的类层次结构。基类是字符串 (char *)。派生类 - 使用基类数据的方法。在派生类中实现方法以查找和删除基类字符串中的最短单词

我需要在哪里搜索和删除一个单词?我实现了继承,基于基类创建了一个类。我已经初始化了基础和派生。现在我需要在哪里搜索和删除一个单词?在导数中,在导数的变量中,还是在导数中,在基数的变量中?任务说:“在基类的行中”,我是否需要从基类中的派生中搜索和删除,或者这是否意味着我继承了基变量,现在在派生中我必须在导数变量?

#include <iostream>
#include <stdio.h>
#include <cstring>

using namespace std;

class FirstClass {
    protected:
        char* str_value;
    public:
        //FirstClass() {}

        FirstClass(const char* value = ""):str_value(0) {
            set(value);
        }

        FirstClass(const FirstClass &obj):str_value(0) {
            set(obj.str_value);
        };

        ~FirstClass() {delete[] str_value;}

    void set(const char* value) {
        delete[] str_value;
        str_value = new char[strlen(value)+1];
        strcpy(str_value, value);
    }

    const char* get() const {
        return str_value;
    }
};

class SecondClass : public FirstClass {
    public:
        SecondClass(const char* str_value = "") : FirstClass (str_value) {}
    void findShortestWord()
    {
        str_value = "kokoko";
    }
 };

int main() {
    FirstClass F_object("aaaaaaaaaa");

    printf("\n%s", F_object.get());

    F_object.set("bbbbbbbbbb");

    printf("\n%s", F_object.get());

    FirstClass F_object2 = F_object;

    SecondClass S_object();

    printf("\n%s", F_object.get());

    return 0;
}
c++
  • 1 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-11-09 22:28:32 +0000 UTC

SQL Server 2000 的远程监控程序有哪些?

  • 1

我一直无法在互联网上找到任何东西(也许我没有很好地搜索)。用于远程监视 SQL Server 2000 的提示程序。

sql-server
  • 1 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-11-03 15:33:14 +0000 UTC

如何在派生类中获取基类变量的值?

  • 1
class FirstClass {
    protected:
        char* str_value;
}

class SecondClass : FirstClass {
    public:
        SecondClass() : FirstClass (str_value)
        {}
};

如何获取str_value基类的值?

更新

#include <iostream>
#include <stdio.h>
#include <cstring>

using namespace std;

class FirstClass {
    protected:
        char* str_value;
    public:
        FirstClass() {}

        FirstClass(const char* value) {
            set(value);
        }

        FirstClass(const FirstClass &obj){};

        ~FirstClass() {delete[] str_value;}

    void set(const char* value) {
        delete[] str_value;
        str_value = new char[strlen(value)+1];
        strcpy(str_value, value);
    }

    const char* get() {
        return str_value;
    }
};

class SecondClass : FirstClass {
    public:
        SecondClass(const char* str_value) : FirstClass (str_value) {}
 };

int main() {
    FirstClass F_object("aaaaaaaaaa");

    F_object.set("bbbbbbbbbb");

    printf("%s", F_object.get());

    FirstClass F_object2 = F_object;

    SecondClass S_object();

    S_object.get();

    return 0;
}
c++
  • 2 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-11-02 17:16:53 +0000 UTC

c++中的字符串输入

  • 2

你能告诉我我是否正确实现了字符串输入吗?

#include <iostream>
#include <stdio.h>

using namespace std;

class FirstClass
{
    protected:
        int str_size;
    public:
        char* str_value;

    FirstClass() {}

    FirstClass( int size ) {
        str_size = size;
        str_value = new char[str_size];
    }

    void set(char* value) {
        str_value = value;
    }

    char* get() {

        return str_value;
    }
};

int main() {
    FirstClass object(11);

    object.set("dddddddddd");

    printf("%s", object.get());

    return 0;
}

正确输出所有内容且没有错误。

c++
  • 1 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-11-01 20:41:20 +0000 UTC

如何确定构造函数中数组的大小?

  • 1
class vector {
    public: int x;
        vector();
        int ar[10];
};

vector::vector(int size):ar{} {

}
c++
  • 1 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-10-31 15:31:49 +0000 UTC

我是否正确实施了“()”操作的重新加载?

  • 1

创建已开发类的多个对象(例如 a 和 b)。该类是一个向量(一维数组)。为此类的对象实现操作的重载() (a(i)=b(j))。

class vector {
    public:
        int ar[10];

    int &operator ()(int i)
    {
        if(i >= 0 && i < 10)
            return ar[i];
        else
            cout << "Выход за пределы массива" << endl;
    }
};

int main()
{
    vector obj1, obj2;
    int a = 1, b = 11;
    for(int i = 0; i <= 9; i++) {
        obj1(i) = a++;
        obj2(i) = b++;
    }

    int tmp;
    for(int i = 0; i <= 9; i++) {
        tmp = obj1(i);
        obj1(i) = obj2(i);
        obj2(i) = tmp;
    }

    return 0;
}
c++
  • 1 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-10-27 18:11:19 +0000 UTC

是否可以在 Java 中实现 () 运算符的重载?

  • 3

创建已开发类的多个对象(例如 a 和 b)。
该类是一个向量(一维数组)。实现
操作的重载 (): 对于此类的对象(a(i)=b(j))。

java
  • 2 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-10-27 15:38:41 +0000 UTC

“实现运算符重载 () (a(i)=b(j)).”是什么意思?

  • 1

请解释一下这个任务需要做什么?

创建已开发类的多个对象(例如 a 和 b)。该类是一个向量(一维数组)。为此类的对象实现操作 () (a(i)=b(j)) 的重载。

我无法理解它是什么样的操作,也无法理解这里需要什么。

c++
  • 1 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-10-21 18:38:19 +0000 UTC

如何在不破坏任何东西的情况下终止睡眠进程?

  • 3

该程序会创建挂起的锁和进程。使用 T-SQL 帮助终止进程。但是有一个问题,随之而来的是,完成了必要的流程,结果键入的数据没有保存(多次注意到)或者在另一个程序窗口中工作时,主窗体的流程结束了。

DECLARE @v_spid INT
DECLARE c_Users CURSOR
   FAST_FORWARD FOR
   SELECT SPID
   FROM master..sysprocesses (NOLOCK)
   WHERE spid>50 
   AND status='sleeping' 
   AND DATEDIFF(mi,last_batch,GETDATE())>=5
   AND spid<>@@spid

OPEN c_Users
FETCH NEXT FROM c_Users INTO @v_spid
WHILE (@@FETCH_STATUS=0)
BEGIN
  PRINT 'KILLing '+CONVERT(VARCHAR,@v_spid)+'...'
  EXEC('KILL '+@v_spid)
  FETCH NEXT FROM c_Users INTO @v_spid
END

CLOSE c_Users
DEALLOCATE c_Users
sql-server
  • 1 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-07-02 02:02:36 +0000 UTC

从 cmd 管理 Windows 服务器用户

  • 2

如何使用命令行向所有用户发送消息并在一段时间后结束他们的会话?

windows
  • 1 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-06-22 17:40:47 +0000 UTC

硬件问题

  • 9

使用更新进行全新安装。启用从所有来源下载驱动程序。扬声器或耳机没有声音。不在 ubuntu 和 elementary 操作系统中。一切都包含在操作系统中,没有错误。声音设置中存在某种虚拟输出。麦克风也未定义,在相机应用程序中无法切换到第二个前端。触摸屏也有问题(例如,我无法在浏览器中滚动页面,它只是突出显示。笔记本电脑型号HP x2-10-p0005;我可以解决这个问题吗?是否有我需要的驱动程序?

在此处输入图像描述

$ lspci -vnn
00:00.0 Host bridge [0600]: Intel
Corporation Device [8086:2280] (rev 36)     Subsystem: Hewlett-Packard
Company Device [103c:827c]  Flags: bus master, fast devsel, latency 0
    Kernel driver in use: iosf_mbi_pci

00:02.0 VGA compatible controller [0300]: Intel Corporation Device
[8086:22b0] (rev 36) (prog-if 00 [VGA controller])  DeviceName: 
Onboard IGD     Subsystem: Hewlett-Packard Company Device [103c:827c]
    Flags: bus master, fast devsel, latency 0, IRQ 311  Memory at
90000000 (64-bit, non-prefetchable) [size=16M]  Memory at 80000000
(64-bit, prefetchable) [size=256M]  I/O ports at f000 [size=64]
    [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
    Capabilities: <access denied>   Kernel driver in use: i915  Kernel
modules: i915

00:03.0 Multimedia controller [0480]: Intel Corporation Device
[8086:22b8] (rev 36)    Subsystem: Hewlett-Packard Company Device
[103c:827c]     Flags: fast devsel, IRQ 255     Memory at 91000000 (32-bit,
non-prefetchable) [disabled] [size=4M]  Capabilities: <access denied>

00:0a.0 Non-VGA unclassified device [0000]: Intel Corporation Device
[8086:22d8] (rev 36)    Subsystem: Hewlett-Packard Company Device
[103c:827c]     Flags: fast devsel, IRQ 255     Memory at 9193c000 (32-bit,
non-prefetchable) [disabled] [size=4K]  Capabilities: <access denied>

00:0b.0 Signal processing controller [1180]: Intel Corporation Device
[8086:22dc] (rev 36)    Subsystem: Hewlett-Packard Company Device
[103c:827c]     Flags: fast devsel, IRQ 312     Memory at 9193b000 (64-bit,
non-prefetchable) [size=4K]     Capabilities: <access denied>   Kernel
driver in use: proc_thermal     Kernel modules: processor_thermal_device

00:14.0 USB controller [0c03]: Intel Corporation Device [8086:22b5]
(rev 36) (prog-if 30 [XHCI])    Subsystem: Hewlett-Packard Company
Device [103c:827c]  Flags: bus master, medium devsel, latency 0, IRQ
310     Memory at 91900000 (64-bit, non-prefetchable) [size=64K]
    Capabilities: <access denied>   Kernel driver in use: xhci_hcd

00:1a.0 Encryption controller [1080]: Intel Corporation Device
[8086:2298] (rev 36)    Subsystem: Hewlett-Packard Company Device
[103c:827c]     Flags: bus master, fast devsel, latency 0, IRQ 313
    Memory at 91700000 (32-bit, non-prefetchable) [size=1M]     Memory at
91600000 (32-bit, non-prefetchable) [size=1M]   Capabilities: <access
denied>     Kernel driver in use: mei_txe   Kernel modules: mei_txe

00:1c.0 PCI bridge [0604]: Intel Corporation Device [8086:22c8] (rev
36) (prog-if 00 [Normal decode])    Flags: bus master, fast devsel,
latency 0, IRQ 309  Bus: primary=00, secondary=01, subordinate=01,
sec-latency=0   Memory behind bridge: 91800000-918fffff     Capabilities:
<access denied>     Kernel driver in use: pcieport  Kernel modules:
shpchp

00:1f.0 ISA bridge [0601]: Intel Corporation Device [8086:229c] (rev
36)     Subsystem: Hewlett-Packard Company Device [103c:827c]   Flags: bus
master, medium devsel, latency 0    Capabilities: <access denied>
    Kernel driver in use: lpc_ich   Kernel modules: lpc_ich

01:00.0 Network controller [0280]: Intel Corporation Wireless 3165
[8086:3165] (rev 81)    DeviceName: Intel Stone Peak I  Subsystem: Intel
Corporation Wireless 3165 [8086:8010]   Flags: bus master, fast devsel,
latency 0, IRQ 314  Memory at 91800000 (64-bit, non-prefetchable)
[size=8K]   Capabilities: <access denied>   Kernel driver in use:
iwlwifi     Kernel modules: iwlwifi
linux
  • 2 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-06-21 00:19:09 +0000 UTC

访问本地网络外的windows服务器文件系统

  • 1

你好。我们用的是windows server 2003和2008,在某些机器上,不清楚为什么,通过OVPN访问文件系统时,访问不到文件系统。在本地网络中,我没有注意到此类问题。写道,如果我没记错的话,也不可能通过 RDC 连接、ping 通行证和连接。要访问某些机器,它可以(Windows 7 和 >)在凭据管理器中为此地址添加用户和密码,好吧,一切都清楚了,可能需要在网络设置中指定没有密码的访问机器。

如何正确配置此类访问权限?什么设置影响这个?

windows
  • 1 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-06-20 22:16:33 +0000 UTC

如何打开对特定互联网资源的互联网访问?

  • 0

在 Windows 中,在网络设置中,未注册调制解调器地址和 DNS 服务器地址;具有 Internet 访问权限的网络。那么,如何开放对某些资源的访问呢?喜欢 Google.com 吗?也许需要在控制台中写入一些东西?明确指定站点地址、调制解调器、DNS?例如,虽然 yandex 地址不断变化 (ip)。比方说 DNS 服务器,我会在网络设置中注册调制解调器地址,没有网关地址仍然无法上网。

windows
  • 1 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-06-13 17:57:01 +0000 UTC

如何查找和删除优先级队列中的条目?

  • 2

是否可以在给定的示例中实现一条记录的搜索和删除?

有必要实现一个基于列表的队列,使用组合算法来服务它。然后演示队列元素的基本操作性能:搜索、添加、删除。

import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;

public class test {
    public static void main(String[] args) {
        //Компаратор
        Queue<Customer> customerPriorityQueue = new PriorityQueue<>(7, idComparator);
        add(customerPriorityQueue);
        poll(customerPriorityQueue);
    }

    //Класс компаратора
    public static Comparator<Customer> idComparator = new Comparator<Customer>(){
        @Override
        public int compare(Customer c1, Customer c2) {
            return (int) (c1.getId() - c2.getId());
        }
    };

    //Метод добавления элементов в очередь
    private static void add(Queue<Customer> customerPriorityQueue) {
        Random rand = new Random();

        for(int i=0; i<7; i++){
            int id = rand.nextInt(100);

            customerPriorityQueue.add(new Customer(id, "Name "+id));
        }
    }

    //Метод для обработки данных очереди
    private static void poll(Queue<Customer> customerPriorityQueue) {
        while(true){
            Customer cust = customerPriorityQueue.poll();
            if(cust == null) break;
            System.out.println("Обработка клиента с id=" + cust.getId() + " \\\\ " + cust.getName());
        }
    }
}

class Customer {
    private int id;
    private String name;

    public Customer(int i, String n){
        this.id=i;
        this.name=n;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }
}
java
  • 1 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-06-13 03:51:30 +0000 UTC

给LinkedHashMap<Integer, ArrayList>添加值

  • 0
LinkedHashMap<Integer, ArrayList> LHM = new LinkedHashMap<Integer, ArrayList>();

如何添加元素ArrayList?

LHM.put(1, new ArrayList().add("1"));
java
  • 2 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-06-12 04:09:00 +0000 UTC

获取字符串中的字符代码

  • 0

如何通过索引从字符串类型变量中获取字符代码?很明显,要在一个循环中寻址到一个索引。究竟如何获取代码以及返回什么类型的数据,int?如果可能,请提供功能描述的链接。

java
  • 1 个回答
  • 10 Views
Martin Hope
aaa
Asked: 2020-05-22 03:20:58 +0000 UTC

从中缀到后缀和前缀

  • 1

请帮助将代数表达式从中缀形式转换为后缀和前缀形式的公式,以提供具有不同优先级和括号的表达式的出现。

java
  • 1 个回答
  • 10 Views

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    我看不懂措辞

    • 1 个回答
  • Marko Smith

    请求的模块“del”不提供名为“default”的导出

    • 3 个回答
  • Marko Smith

    "!+tab" 在 HTML 的 vs 代码中不起作用

    • 5 个回答
  • Marko Smith

    我正在尝试解决“猜词”的问题。Python

    • 2 个回答
  • Marko Smith

    可以使用哪些命令将当前指针移动到指定的提交而不更改工作目录中的文件?

    • 1 个回答
  • Marko Smith

    Python解析野莓

    • 1 个回答
  • Marko Smith

    问题:“警告:检查最新版本的 pip 时出错。”

    • 2 个回答
  • Marko Smith

    帮助编写一个用值填充变量的循环。解决这个问题

    • 2 个回答
  • Marko Smith

    尽管依赖数组为空,但在渲染上调用了 2 次 useEffect

    • 2 个回答
  • Marko Smith

    数据不通过 Telegram.WebApp.sendData 发送

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

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

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5