RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

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

OneGuy's questions

Martin Hope
OneGuy
Asked: 2021-11-12 01:25:01 +0000 UTC

程序主要组件的Qt布局

  • 0

我想弄清楚如何在网格上显示主要组件。基本上一切都显示在图片中。有一个标题 - 程序的上部,水平变化时可以拉伸。表单的主要部分(也很灵活,在中间),其中已经显示了文本输入字段和按钮。帮我弄清楚如何将标题和正文放在程序窗口中。

qt
  • 1 个回答
  • 10 Views
Martin Hope
OneGuy
Asked: 2021-11-09 09:50:32 +0000 UTC

VK API 向群组发送自定义消息

  • 0

现在可以向群组发送自定义消息吗?如果是这样,请提供一个示例请求。

vkontakte-api
  • 1 个回答
  • 10 Views
Martin Hope
OneGuy
Asked: 2020-09-02 01:28:25 +0000 UTC

将类函数参数设置为默认值

  • 1

有一个 A 类的对象,它有一个值为 0 的变量 a。是否可以默认将此值分配给函数参数func?示例变体:

struct A{
    int a = 0;
    int func(int a = a){
        return a;
    }
    
};
c++
  • 2 个回答
  • 10 Views
Martin Hope
OneGuy
Asked: 2020-09-24 17:38:24 +0000 UTC

快速编写 VS C++ 语言结构

  • 0

我目前在 Visual Studio C++ 2017 中工作。有没有办法在编辑器中更快地编写基本语言结构?例如,他在他的代码中写了“for ++i n”,他将其扩展为我

for(int i = 0; i < n; ++i){

}

PS我不知道这个动作叫什么,我尽我所能解释了。如果可能,请告诉我们它是什么以及它是否适用于其他 Visual Studio 编辑器。

visual-studio-2017
  • 2 个回答
  • 10 Views
Martin Hope
OneGuy
Asked: 2020-09-16 03:10:06 +0000 UTC

在 C++ 方法中使用对

  • 7

有一种方法适用于双端队列对的队列。对于某些输入数据,该方法必须适用于该对的第一部分或第二部分。例子:

void max3(deque<pair<int, int>> & q, [first or second] ) {
    int a = q[0].[first or second];
    cout << a << endl;
}
c++
  • 2 个回答
  • 10 Views
Martin Hope
OneGuy
Asked: 2020-05-13 02:47:21 +0000 UTC

使用实例字段 C#

  • 0

有一个带有多个叶子的 Options 类和另一个 Form1 类。在 Form1 类中创建 Options 类的一个实例。如何开始使用此实例的字段(Array、ColorPenBrush、Thickness)?

class Options
{
    public List<Point> Array { get; set; }
    public List<Color> ColorPenBrush { get; set; }
    public List<String> Thickness { get; set; }
}

class Form1
{
    Options options = new Options();
    //далее пример работы
    Point point1;
    point1.X = 100;
    point1.Y = 200;
    options.Array.Add(point1);
}
c#
  • 2 个回答
  • 10 Views
Martin Hope
OneGuy
Asked: 2020-03-25 19:01:04 +0000 UTC

Linux 中的别名

  • 3

熟悉 Linux。如果一切顺利,我想创建一个输出 DONE 的递归复制别名。

$ alias cpRI="cp -ri $ $ && echo "DONE""

如何让用户输入目录的路径来代替美元符号?

linux
  • 1 个回答
  • 10 Views
Martin Hope
OneGuy
Asked: 2020-10-20 20:22:39 +0000 UTC

显示在 C# 中不起作用

  • 2

我目前正在使用 C# 表单。我有两种形式。我希望只要按下第一个表单中的按钮,就会打开第二个表单,并在输出此表单后执行代码。我使用了 Shown 方法,但由于某种原因它不起作用。仅当您将其放在 MessageBox 方法的最开始时才包含它。

private void Form2_Shown(object sender, EventArgs e)
    {

        float h;
        int division = 10;
        Graphics gr = pictureBox1.CreateGraphics();
        Pen p = new System.Drawing.Pen(System.Drawing.Color.Gray);
        //Разметка
        h = 0;
        while (h <= pictureBox1.Width)
        {
            gr.DrawLine(p, h, 0, h, pictureBox1.Height);
            h += division;
        }
        h = 0;
        while (h <= pictureBox1.Height)
        {
            gr.DrawLine(p, 0, h, pictureBox1.Width, h);
            h += division;
        }
        //Координатная ось
        p.Color = Color.Red;
        gr.DrawLine(p, pictureBox1.Width / 2, 0, pictureBox1.Width / 2, pictureBox1.Height);
        gr.DrawLine(p, 0, pictureBox1.Height / 2, pictureBox1.Width, pictureBox1.Height / 2);


    }

在此处输入图像描述

在此处输入图像描述

c#
  • 1 个回答
  • 10 Views
Martin Hope
OneGuy
Asked: 2020-09-26 01:32:13 +0000 UTC

C++ 结构的问题

  • 0

有一个结构有两个参数:一个单词(str)和一个数字(cnt;不要问为什么,没关系)。已创建此结构的数组。我的目标是交换(str, cnt)这个数组中的集合,如果结果证明这些集合cnt是相等的,但按字母顺序,一个小于另一个。一旦我输入一个新char s的替换,它就会抛出一个错误“表达式必须对左侧值的更改有效”。问题是什么?

const int   WORDLEN = 80;
const int   MAXWORDS = 100;

struct Elem {
    char str[WORDLEN + 1];
    int cnt;
};

Elem list[MAXWORDS];
int last = 0;

void Letter() {
    char s[WORDLEN + 1];
    for (int i = 0; i < last; i++) {
        for (int j = i; j < last - 1; j++) {
            if (list[i].cnt == list[j + 1].cnt) {
                if (list[i].str > list[j + 1].str) {
                    s = list[i].str;
                    list[i].str = list[j + 1].str;
                    list[j + 1].str = s;

                }
            }
        }
    }
}
c++
  • 2 个回答
  • 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