“以编程方式”执行/确定某事意味着什么?

发布于 2024-07-14 00:10:01 字数 1732 浏览 6 评论 0 原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(17

花之痕靓丽 2024-07-21 00:10:01

以编程方式执行某些操作通常意味着您可以使用源代码来执行此操作,而不是通过直接的用户交互或宏。

例如,考虑调整列大小以适合 Excel 的问题。

您可以通过在列之间双击来手动完成此操作,但这需要用户交互。

您可以使用 Excel 宏记录器,但这相当复杂。

或者,您可以使用 VBA 编写代码来执行此操作。

我怀疑字典里确实有这个词。

Doing something programatically generally means that you can do it using source code, rather than via direct user interaction or a macro.

For example, consider the problem of resizing columns to fit in Excel.

You could do it manually by double clicking between the columns, but that requires user interaction.

You could use the excel macro recorder, but that is fairly complicated.

Or, you could use VBA to write code that would do it.

I doubt it's actually in the dictionary.

心凉怎暖 2024-07-21 00:10:01

以编程方式是一个真实的单词。 来自另一本随机词典:在线精简版 OED

Programmatically is a real word. From another random dictionary: Compact OED online.

最偏执的依靠 2024-07-21 00:10:01

在 .NET 中,“以编程方式”通常意味着在代码中而不是在模板、标记、配置或 xml 中执行某些操作。

例如,在 ASP.NET 页面中,您可以在 ASPX 标记中添加文本框:

<asp:TextBox runat="server" />

或者您可以在 ASPX.cs 代码隐藏中以编程方式添加控件:

this.Controls.Add(new TextBox());

同样,您可以通过编辑 App.config 文件中的 xml 来手动更改配置,或者您可以编写代码以编程方式修改配置。

In .NET, "programmatically" generally means doing something in code rather than in a template, markup, configuration, or xml.

For instance, in an ASP.NET page you can add a textbox in the ASPX markup:

<asp:TextBox runat="server" />

Or you can add the control programmatically in the ASPX.cs codebehind:

this.Controls.Add(new TextBox());

Similarly, you can change configuration manually by editing the xml in the App.config file, or you can write code that will modify the configuration programmatically.

完美的未来在梦里 2024-07-21 00:10:01

http://www.merriam-webster.com/dictionary/programmatically

“以编程方式”是副词。 它是对动词的描述。 在这种情况下,这意味着某件事将由程序完成,而不是由手动、人为操作完成。

http://www.merriam-webster.com/dictionary/programmatically

"Programatically" is an adverb. It is descriptive of the verb. In this case, it means that something will be done by a program and not by a manual, human operation.

农村范ル 2024-07-21 00:10:01
  1. 执行执行此操作的代码。 暗示之前已编写过代码。
  2. 也许在大多数情况下,这对于人类来说相对容易做到,但挑战在于使其自动化。 您描述的假设可能适用,也可能不适用。
  3. 我不知道。 我在很多情况下见过很多次。 顺便说一句,我断然否认这样一种观点,即一个单词必须出现在某个人的列表中的某个地方才能成为“真正的单词”,特别是当它是一个来自众所周知的根源的清晰结构时,就像“程序化”的情况一样。
  1. To execute code that does it. Previously having written the code is implied.
  2. Probably in most cases it's something that's relatively easy for a human to do, with the challenge being automating it. The assumption you describe may or may not apply.
  3. I have no idea. I've seen it many times and in many circumstances. Incidentally, I categorically deny the idea that a word has to be on somebody's list somewhere to be a 'real word', especially when it's a clear construction from well-known roots, as in the case of 'programmatically'.
素食主义者 2024-07-21 00:10:01

1)“以编程方式”执行/确定某件事意味着什么?

从你的第二个问题来看,我假设你已经知道这个问题的答案;)。*

2)为什么要这样做许多人问如何“以编程方式”做/确定某事? 难道不是假设,如果您在编程帮助板上询问如何做某事,那么您是在询问如何“以编程方式”完成它吗? 是

的,但是使用这个词并没有什么害处!

3) 为什么我在其他地方从未见过“以编程方式”这个词?

你看的还不够仔细! http://www.google.com/search?q=programmatically

1) What does it mean to do/determine something "programmatically"?

I assume from your second question that the answer to this is already known to you ;) .*

2) Why do so many people ask how to do/determine something "programmatically"? Isn't it assumed that, if you're asking how to do something on a programming help board, you're asking how to do it "programmatically"?

Yes, but no harm comes from using the word!

3) Why is it that I've never seen the word "programmatically" anywhere else?

You're not looking hard enough! http://www.google.com/search?q=programmatically

去了角落 2024-07-21 00:10:01
  1. 用程序/代码来完成它。 示例:以编程方式吃三明治意味着您编写一个吃三明治的程序。
  2. 我同意。
  1. To accomplish it with a program / in code. Example: eating a sandwich programmaticly would mean you write a program that eats a sandwich.
  2. I agree.
提笔落墨 2024-07-21 00:10:01

我认为人们(包括我自己)使用术语“以编程方式”来指代在源代码(例如 C#)中执行的函数,这与以声明方式完成的操作(例如 XAML)不同。

I think people (myself included) use the term 'programmatically' to refer to a function performed in source code (eg C#), as distinct from something done declaratively(eg XAML).

薄荷梦 2024-07-21 00:10:01
  1. 以编程方式做某事是通过执行程序代码做某事
  2. 而不是假设。 它使 U 和 ME 成为 A** :) 问题是,许多人可能会问与编程无关的问题(例如“如何在 Linux 中覆盖只读文件?”)
  3. 通常很清楚上下文是否以编程方式完成。 因此这个词常常是多余的并且不被使用。 在这里,人们希望确保他们的问题得到理解,并且他们的问题不会以错误的方式得到回答(“我如何以编程方式覆盖 Linux 中的只读文件?”)将引发与二分之一不同的答案.)
  1. doing something programmatically is doing something by executing program code
  2. do not ASSUME. It makes an A** of U and ME :) the thing is, many people can ask questions that are not programming-related (e.g. "how do i overwrite a read-only file in linux?")
  3. Usually it is clear by the context if things are done programmatically or not. Therefore the word is often redundant and not used. In here, people want to make sure they are understood, and their question is not answered in a wrong way ("how do i programmatically overwrite a read-only file in linux?" will provoke a different kind of answer than the one in 2.)
九厘米的零° 2024-07-21 00:10:01

我使用“编程方式”或有时“程序方式”的方式最好使用以下代码来描述:

int[] arr = new int[] { 1, 2, 3, 4, 5 };

以编程方式执行相同的操作将是:

int[] arr = new int[5];
for (int i = 1; i < 6; i++)
  arr[i] = i + 1;

现在虽然是一个非常有限的示例,但如果数组有数百或数千个元素,您宁愿输入什么。 在现实情况下,一次最好使用哪种方法通常有利有弊,但对于复杂的操作,如果“以编程方式”完成,通常会更有效。

也许更好的例子是 alt Pi 精确到小数点后 100 位。 您可以使用一个函数,也许类似于 alt function

** 参考维基百科 http://en.wikipedia.org/wiki/Pi*

The way I use "programatically" or sometimes "proceedurally" is best described using the following code:

int[] arr = new int[] { 1, 2, 3, 4, 5 };

to do the same thing programatically would be:

int[] arr = new int[5];
for (int i = 1; i < 6; i++)
  arr[i] = i + 1;

Now while a very limited example, what would you rather type if the array was hundreds or thousands of elements. In real-world situations, there are usually pros and cons as to which is best to use at a time, but for complicated operations, generally things are more efficient if they're done "programatically".

Perhaps a better example of this is the value of alt Pi. You could simply input the number 3.141592653589793238, but it would be very difficult to type it in if you needed alt Pi it accurate to 100 decimal places. You would instead use a function, perhaps something like alt function.

** Reference wikipedia http://en.wikipedia.org/wiki/Pi*

与风相奔跑 2024-07-21 00:10:01

就 iPhone 开发而言,以编程方式基本上意味着不使用 Interface Builder。

In the case of iPhone development, programatically basically means not using Interface Builder.

凉薄对峙 2024-07-21 00:10:01

非编程:

如何配置WCF 通过互联网使用 x509 证书?

编程:
以编程方式全局添加自定义 WCF 客户端端点行为基本

相同的问题,回答不同的方式,各有利弊。

Non-programmatic:

How can I configure WCF to use x509 certificates over the internet?

Programmatic:
Programmatically and globally adding a custom WCF client endpoint behavior extension

Basically the same question, answered different ways, with pros and cons to each.

小红帽 2024-07-21 00:10:01

正如其他人所说,这意味着以代码的形式寻求特定问题的解决方案。 这在 GUI 无处不在、操作系统庞大且具有无数功能的现代时代尤其重要。 作为人类,找出特定的信息或手动执行特定的操作可能非常容易,但如何通过代码来做到这一点并不那么明显,需要研究。

例如,考虑如何在Windows中删除文件并将其移动到回收站。 手动,这很简单,在资源管理器中选择文件并点击删除。 或者将文件拖到回收站。 在代码中,如何执行此操作并不直观。

As others have said, it means asking for a solution for a particular problem in the form of code. This is particularly relevant in the modern era where GUIs are everywhere and operating systems are big, sprawling things with innumerable functions. It may be incredibly easy to find out a particular piece of information or perform a certain action manually as a human but how to do so as code is less obvious and requires research.

For example, consider how to delete a file and move it to the recycle bin in windows. Manually, this is trivial, select the file in explorer and hit delete. Or drag the file to the recycle bin. In code it's not remotely intuitive how you perform this action.

沒落の蓅哖 2024-07-21 00:10:01

开发人员通常会尝试尽可能准确地陈述问题。 他们试图陈述环境、语言以及他们已经知道的任何其他东西。 问题越精确,答案就越精确。 但是,当他们无法说明任何内容时(比如他们只是想知道是否有 API 调用来执行某些操作),他们只会询问如何以编程方式执行此操作。

Developers usually try to state the question as precisely as possible. They try to state the environment, the language, whatever else they already know. The more precise is the question the more precise hopefully is the answer. But when they can't state anything (like they just want to know if there is an API call to do something) they just ask how to do it programmatically.

她如夕阳 2024-07-21 00:10:01

我主要在上下文中使用这个词 davogenesash 解释一下。

不过,我想补充一点,在这种情况下,同义词将是“动态”,因为您可以在运行时而不是在设计时添加控制元素。

I mostly use the word in the context davogenes and ash explain it.

However I'd like to add that in this case, a synonym would be "dynamically" because you can add control elements at run-time and not already at design-time.

深陷 2024-07-21 00:10:01

对我来说,这是在设计器中工作或在代码(运行时)中工作之间的区别。

您可以在设计模式中执行很多操作,将数据源设置为数据网格、布局列并设置颜色以及许多其他操作,而无需执行任何代码。 如果我想知道如何在代码中执行此操作而不是在设计模式中设置它,我会问如何“以编程方式”执行此操作。

我的5美分。

For me its the difference between working in the designer or in code (runtime).

You can do a lots of things in designmode, set a datasource to a datagrid and layout the columns and set colors and a lot of other things without do a single line of code. If I want to know how to do it in code instead of setting it in the design mode I would ask how to do it "programatically".

My 5 cents.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文