RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

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

Mr.AntonDer's questions

Martin Hope
Mr.AntonDer
Asked: 2022-07-20 06:55:51 +0000 UTC

在邮件中启用自动转发 [C# & MailNet]

  • 1

大家好!

Mail 有一个很棒的功能 - 将收到的邮件自动转发到另一个邮箱(启用此类功能的说明)

是否可以通过代码启用转发到另一个邮箱?当前使用 MailNet 库

UPD
感谢您的评论。简而言之,MailNet 实现了与 SMTP 的基本交互,即 写作工作。原来你需要通过API发送,但是这里是如何实现的,有没有现成的解决方案,因为邮件服务的列表非常大

c# email
  • 1 个回答
  • 37 Views
Martin Hope
Mr.AntonDer
Asked: 2022-04-19 04:32:17 +0000 UTC

网络游戏如何运作?[复制]

  • 2
这个问题已经在这里得到了回答:
在客户端和服务器上同步游戏状态 1 个答案
10 个月前关闭。

大家好!在线射击游戏如何运作,即他们的游戏玩法如何运作?例如绝地求生。

在我看来,它们是这样工作的:有一个服务器和一个客户端。每一帧都会向服务器发送一个 GET 和 POST 请求,在 get 中我们获取有关玩家的信息,在 post 中我们传递我们的信息(坐标等)。但是,就我而言,这种方法非常糟糕,因为即使有 + - 良好的互联网,这种操作也可能需要很多时间,尤其是在每毫秒都很重要的射击游戏中

UPD

谢谢大家的回答和评论,据我了解,网游的玩法使用了UDP协议,还有很有趣的机制:玩家向前移动,然后如果他的连接中断,游戏将无限期地向前移动玩家。乍一看,这样的机制似乎有些奇怪,但稍加思考,就会发现它是相当合乎逻辑的。顺便说一句,在 PUBG 中,显然使用了相同的机制,因为。好几次遇到类似现象:玩家被踢出游戏,但他驾驶的车继续行驶

c#
  • 2 个回答
  • 10 Views
Martin Hope
Mr.AntonDer
Asked: 2022-03-13 00:32:50 +0000 UTC

空值组合框 C#

  • 0

我有以下代码,在更改后调用ComboBox:

private void ComboBox_Selected(object sender, RoutedEventArgs e)
{
    ComboBox cb = (ComboBox)sender;
    TextBlock tx = (TextBlock)cb.SelectedItem;
    string shir = tx.Text;
    Properties.Settings.Default.Shir1 = shir;
    Properties.Settings.Default.Save();
    MessageBox.Show(shir);
}

变量shir出来为空

这是我的 XAML 代码:

<ComboBox x:Name="combobox" SelectionChanged="ComboBox_Selected" SelectedIndex="0" Style="{Binding}" HorizontalAlignment="Left" Margin="73,139,0,0" VerticalAlignment="Top" Width="127" Height="23" Foreground="Black" BorderBrush="{x:Null}" Background="{x:Null}">
    <TextBlock><Run Text="800x600"/></TextBlock>
    <TextBlock><Run Text="1024x780"/></TextBlock>
    <TextBlock><Run Text="1280x768"/></TextBlock>
    <TextBlock><Run Text="1440x900"/></TextBlock>
    <TextBlock><Run Text="1536x1024"/></TextBlock>
    <TextBlock><Run Text="1600x900"/></TextBlock>
    <TextBlock><Run Text="1920x1080"/></TextBlock>
    <TextBlock><Run Text="2048x1080"/></TextBlock>
    <TextBlock><Run Text="2560x1600"/></TextBlock>
</ComboBox>
c#
  • 1 个回答
  • 10 Views
Martin Hope
Mr.AntonDer
Asked: 2022-02-27 19:53:56 +0000 UTC

通过 bat 启动 Minecraft 1.12.2 Forge

  • 0

我正在为带有 mods 的服务器编写一个启动器,关于通过这个启动器启动 Minecraft 的问题出现了。

事实证明,Minecraft 没有.exe文件并且是通过Java或类似的东西启动的,我对此一点也不熟悉。

问题:如何通过.bat文件启动Minecraft😂?

以为我永远不会这么说

java
  • 1 个回答
  • 10 Views
Martin Hope
Mr.AntonDer
Asked: 2022-02-14 17:01:00 +0000 UTC

如何提取花括号的内容

  • 0

有一行:Антон,{привет|пока} как {дела|жизнь}?

任务是从括号中提取内容并选择一个随机值,保持括号前/括号外的单词也很重要。到目前为止,只出来了内部词的随机化:

string input = "привет|пока";
Random rnd = new Random();
string[] str = input.Split('|');
string result = str[rnd.Next(0, str.Lenght)];

解决方案:

                string subject = "{привет|пока}";
                                        char[] chars = subject.ToCharArray();
                        bool start = false;
                        string res = "";
                        string oldString = "";
                        for (int i = 0, n = chars.Length; i < n; i++)
                        {
                            char c = chars[i];
                            if (c == '}')
                            {
                                start = false;
                                Random rnd = new Random();
                                string[] r = res.Split('|');
                                oldString += r[rnd.Next(0, r.Length)];
                                res = "";
                            }
                            if (start)
                                res += c.ToString();
                            if (c == '{')
                                start = true;
                            if (!start && c != '{' && c != '}')
                                oldString += c.ToString();
                        }
c#
  • 1 个回答
  • 10 Views
Martin Hope
Mr.AntonDer
Asked: 2022-02-13 22:21:54 +0000 UTC

发送 get 请求时的 URL 编码

  • 1

大家好!

今天我遇到了这个问题:

我为 GET 请求形成一个 URL 并发送一个 GET 请求。URL 生成正确,但据我了解,发送不正确。我调试了接收到的 URL,它是正确的,但是在我从这样的请求中插入浏览器的地址栏后:http://localhost:61513/zertixapi/api/auth&admin&adminloh123@123sq 请求变成了这个: http://localhost:61513/zertixapi/api/auth&admin%E2%80%8B&adminloh123@123sq%E2%80%8B因此服务器给出了错误的结果

有没有人遇到过这个以及如何解决它?

这是我如何发送请求的代码:

            string sURL;
            sURL =  base_url + "auth&" + _login.text.Replace(" ", "") + "&" + _pass.text.Replace(" ", "");

            WebRequest wrGETURL;
            wrGETURL = WebRequest.Create(sURL);

            WebProxy myProxy = new WebProxy("myproxy", 80);
            myProxy.BypassProxyOnLocal = true;

            wrGETURL.Proxy = WebProxy.GetDefaultProxy();

            Stream objStream;
            objStream = wrGETURL.GetResponse().GetResponseStream();

            StreamReader objReader = new StreamReader(objStream);

            string sLine = "";
            int i = 0;

            while (sLine != null)
            {
                i++;
                sLine = objReader.ReadLine();
            }

PS 直接链接有效

解决方案:

我安装了 TextMeshPro (TMP),并从中获取文本,显然以某种神奇的方式,它添加了自己的字符。一般来说,我安装了Text,一切都很好)

c#
  • 1 个回答
  • 10 Views
Martin Hope
Mr.AntonDer
Asked: 2022-02-11 17:04:58 +0000 UTC

为 POST 请求形成 URL

  • 0

我正在学习 ASP.NET Web Core API。制作了这段代码:

[HttpPost("{post}")]
public string post_get([FromBody] string g)
{
    return g;
}

我正在尝试使用以下 URL 发送 POST 请求:

http://localhost:61513/weatherforecast/post?g=gfh

给出错误信息。

如何为 POST 请求生成 URL?

c#
  • 1 个回答
  • 10 Views
Martin Hope
Mr.AntonDer
Asked: 2022-02-11 03:33:01 +0000 UTC

Unity 中的 MySql.Data.dll

  • 1

大家好!

我想包含 MySql.Data.dll 以将我的游戏与 MySql 连接起来。

我创建了一个 Plugins 文件夹并将 MySql.Data.dll 放在那里,我收到以下错误:

Assembly 'Assets/Plugins/MySql.Data.dll' will not be loaded due to errors:
Unable to resolve reference 'Google.Protobuf'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'Zstandard.Net'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'K4os.Compression.LZ4.Streams'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'BouncyCastle.Crypto'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'Ubiety.Dns.Core'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'Renci.SshNet'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.

我尝试过导入其他 dll 并且效果很好!

c#
  • 1 个回答
  • 10 Views
Martin Hope
Mr.AntonDer
Asked: 2022-02-07 18:39:08 +0000 UTC

如何将大小添加到现有数组

  • 0

大家好!今天出现的问题是向现有数组添加大小。看了文章,我意识到你需要使用List,这是正确和方便的,但是一切都已经建立在数组上,如果你改变它,那将需要很多时间!

但是,我是一个天才(讽刺),我设法在当前数组中添加了一个新单元格。

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