问题标签 [directive]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
7 回答
438 浏览

c# - C# if directive

Can I write in code to set the variable to true or false depending on a button I pressed? See example below.

If not, what other ways are there to achieve similar effects? I have already marked the codes for different modes using directives and only want developers to have the option of switching the modes, but now I wish to give the user the option of switching between the modes. The choice of the mode will only be given at the start of the program, and user is not allowed to switch the mode. To switch the mode, he can only restart the program again.

If cannot use directives, what is the fastest way can I use? (note: the statements are all around the solution)

In pseduocode of what I wish to achieve:

0 投票
1 回答
554 浏览

php - PHP HOST 指令

我使用 [HOST=subdomain.mydomain.com] 进行一些设置,但现在我想将设置应用于除 subdomain.mydomain.com 之外的所有内容。

这是我的 php.ini 文件:

我想要除 subdomain.mydomain.com 之外的所有其他域的 disable_functions = phpinfo。我怎样才能做到这一点?

问候,凯文

PS 我正在使用 Ubuntu、Apache2 和 PHP5。

0 投票
1 回答
243 浏览

iphone - iPhone 汇编 GAS 指令声明一个外部函数

在 iPhone GCC4.2 的汇编代码中,如何定义外部函数?例子:

我们知道,如果一个普通的编译器,我们可以使用“import myfunc”或“extern myfunc”来声明这个函数,但是iOS开发者中的GCC44.2并不能识别它们。

0 投票
2 回答
75 浏览

c++ - 处理指令异常

我有一个代码,它使用#import 从计算机中的某个位置获取 .dll。现在我应该在有或没有这个文件的计算机上使用这个程序。如果它没有文件,它甚至不会编译,所以我能做些什么,类似 oa try catch throw?

谢谢,

0 投票
2 回答
196 浏览

apache - 在 Apache 服务器上更改 PHP 指令

我有一个 Apache Web 服务器,但默认情况下 display_errors 设置为 '0'

我可以使用 ini_set 在我的网站上手动更改它,但我希望这会影响我的所有网站,而不必将其放在每个页面上。

如何登录我的服务器并更改指令?

0 投票
1 回答
1417 浏览

assembly - 数据指令中的 MIPS 指令

我试图弄清楚这个程序做了什么,但我感觉 MARS 没有正确处理 .data 指令。

如果在 .data 指令下给出汇编指令,数据段中存储了什么?当我在 MARS(MIPS 汇编器和运行时模拟器)中运行它时,它只是将零值存储在 0x10010000(应该存储静态数据的位置)。我期待它存储机器代码lui $r1, 0xFFC0(即00111100000010011111111111000000)。

谢谢!

0 投票
2 回答
497 浏览

c - 编译器如何处理 OpenMP 指令

  1. 我想知道编译器如何处理 OpenMP 指令,例如 gcc?
  2. 例如,在这段代码中

    gcc 的预处理器是否通过将 OpenMP 指令替换为其他代码来修改 C 代码?

    预处理之后和组装之前的代码是什么样的?

谢谢并恭祝安康!

0 投票
3 回答
3268 浏览

c - “预编译器指令” “预处理器指令”

我想知道“预编译(r)指令”和“预处理器指令”是否相同?我对前者不熟悉,只是听说过,并在网上通过这个Google搜索找到了一些关于它的信息,例如Dirk Henkemans 和 Mark Lee的“ C++ 编程绝对初学者”的 p40。

0 投票
1 回答
251 浏览

html - 为什么 <%@ include 指令在 IE 中正确呈现,但在 Firefox 或 Chrome 中不正确(最新版本)

我正在尝试使用以下语法包含一个 html 文件:

但是我在使用 Firefox(最新)和 Chrome(最新)浏览页面时遇到问题,可能还有其他我没有测试过的问题。据我所知,这包括在 IE 9 上运行良好。

谁能解释一下?

笔记:

父文件是 index.html,我怀疑该 include 指令仅适用于*.jsp文件,但我无法确认这一点,因为我正在一个只有读取权限的目录中工作!

0 投票
1 回答
995 浏览

apache - 更改 php.ini 中的 arg_separator.output 分隔符指令

如果我更改 php.ini 文件中的 arg_separator.input 指令并将其设置为 'a' 并且我的表单有两个名为 "name and age" 的文本文件,谁能告诉我会发生什么。然后,如果我提交它,那么 url 将类似于 www.yourdomain.com?name=tempaage=12 这会混淆服务器还是运行正常。是否有任何规则只能将特定字符作为 arg 分隔符。