小编Ami*_*yan的帖子

有没有类似编程语言的XML?

有没有类似编程语言的XML?

例如C中的这段代码:

int add(int a, int b)
{
  int result;
  result = a+b;
  return result;
}
Run Code Online (Sandbox Code Playgroud)

像这样写:

<function name="add">

  <parameters>
    <parameter name="a" type="int" />
    <parameter name="b" type="int" />
  </parameters>

  <body>

    <variables>
      <variable name="result" type="int" />
    </variables>

    <statements>

      <statement>
        result = a+b
      </statement>

    </statements>

  </body>

  <return>result</return>

</function>
Run Code Online (Sandbox Code Playgroud)

xml programming-languages

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

这个领域叫什么名字?

图像接受人文作为输入数据的应用程序,应用程序处理文本然后用户从应用程序中提问,最终应用程序根据输入数据回答问题.

AI中上述字段的名称是什么?

是否有任何开源项目实现第一段?

例如:

User> My name is Amir.
Machine> OK.
User> What's my name?
Machine> Your name is Amir.
Run Code Online (Sandbox Code Playgroud)

nlp artificial-intelligence

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

GIT:当项目处于稳定版本时,我应该提交输出文件(如 *.exe、*.lib)吗?

我的项目 1.0 版本在 Visual Studio 2008 中成功构建,但是当我将 Visual Studio 升级到版本 2010 时,构建我的项目失败(由于某些原因)。

我的项目发生了变化,新版本已准备就绪(2.0 版)。它成功地构建在 Visual Studio 2010 上。

现在,如果我想访问“my-project-version-1.0.exe”,我应该签出版本 1.0,安装 Visual Studio 2008 并通过 Visual Studio 2008 构建它。我无法通过 Visual Studio 2010 构建它。

我没有提交项目的任何输出文件。

当项目处于稳定版本中时,我是否应该提交输出文件(例如 *.exe、*.lib)以便下次访问项目的旧版本?

还有更好的主意吗?

git

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

当鼠标指针在RichTextBox中的粗体字上时,如何更改光标?

我希望当鼠标指针位于RichTextBox中的粗体字上时,将光标更改为HAND .这该怎么做?

c# richtextbox cursor

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

C11是否允许函数中任何位置的变量声明?

C11标准(注意我不是指C++ 11)是否允许您在函数中的任何位置声明变量?

以下代码在ANSI C(C89,C90)中无效:

int main()
{
  printf("Hello world!");
  int a = 5; /* Error: all variables should be declared at the beginning of the function. */
  return 0;
}
Run Code Online (Sandbox Code Playgroud)

它是C11中的有效源代码吗?

c variable-declaration c11

3
推荐指数
2
解决办法
1638
查看次数

为什么C#编译器不会对具有默认参数的方法感到困惑?

为什么C#编译器不会对具有默认参数的方法感到困惑?

在下面的代码中SayHello()可以参考:

  • 问好()
  • SayHello(字符串arg1 = null)
  • SayHello(字符串arg1 = null,字符串arg2 = null)
  • SayHello(string arg1 = null,string arg2 = null,string arg3 = null)

但是这段代码编译成功没有任何模糊错误.

class Program
{
    private static void SayHello()
    {
        Console.WriteLine("Hello 1");
        return;
    }

    private static void SayHello(string arg1 = null)
    {
        Console.WriteLine("Hello 2");
        return;
    }

    private static void SayHello(string arg1 = null, string arg2 = null)
    {
        Console.WriteLine("Hello 3");
        return;
    }

    private static void SayHello(string arg1 = null, string arg2 = null, string arg3 = null)
    { …
Run Code Online (Sandbox Code Playgroud)

c# ambiguous default-parameters

3
推荐指数
2
解决办法
298
查看次数

随机数生成以及之前和之前的支持?

如何编写两个函数来生成支持next和previous的随机数?

我的意思是如何写两个函数:next_number()并且previous_number(),该next_number()函数生成一个新的随机数,previous_number()函数生成以前生成的随机数.

例如:

int next_number()
{
   // ...?
}

int previous_number()
{
   // ...?
}

int num;

// Forward random number generating.
// ---> 54, 86, 32, 46, 17
num = next_number(); // num = 54
num = next_number(); // num = 86
num = next_number(); // num = 32
num = next_number(); // num = 46
num = next_number(); // num = 17

// Backward random number generating.
// <--- 17, …
Run Code Online (Sandbox Code Playgroud)

random algorithm

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

哪个更好?碳或可可?(苹果电脑)

哪个更适合编程?碳开发还是可可开发?碳被苹果停止了吗?为什么没有任何关于Carbon的新书,但为Cocoa出版了许多新书?

macos cocoa macos-carbon

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

在ISO C++中对i18n和L10n有什么好的参考吗?

标准ISO C++中有一个标题("<locale>").

ISO C++中的国际化和本地化是否有任何好的参考?

c++ locale localization internationalization

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

如何在使用 Visual Studio 创建可执行文件/DLL 文件时删除私人信息?

我使用 Visual Studio 2010 创建一个 DLL 项目。当我my_project.dll用记事本打开时,我找到项目的路径(例如D:\Solutions\my_project\my_project_1\lib\Release\my_project.pdb

我的老板想删除有关该项目的任何私人信息。

如何在创建可执行文件/DLL 文件时删除私人信息?

visual-studio visual-c++

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