问题标签 [quotation-marks]

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 投票
3 回答
999 浏览

python - 如何删除引号(和其他标记)?

从变量打印时,有什么方法可以避免打印出数据(如引号、括号、逗号和其他重要的数学符号)?

上面的代码打印了这个:

打印上述内容的正确方法应该是这样的:

0 投票
1 回答
938 浏览

r - 在R中使用粘贴和替换与引号组合

请注意,我已经看过这个那个,但仍然无法解决我的问题。

假设一个最小的工作示例:

在这里,最后一行显然返回一个Error: undefined columns selected. 返回此错误是因为要选择的列是xy,它们不是数据框的一部分dftest

问题:我需要如何制定函数的定义以获得所需的输出,即

我想通过调用函数来获得foo

请注意,为了使解决方案对我的目的有用,函数调用的格式foo应被视为固定的,即仅对函数本身进行更改,而不是对调用进行更改。iefoo(a, b, data = dftest)是唯一允许的输入。

方法:我尝试将pasteandsubstitute结合使用eval,首先将xand替换y为函数调用的参数,然后评估调用。但是,在这里转义引号似乎是一个问题:

在这里,foo(a, b, data = dftest)返回:

但是,在评估时eval()(仅关注paste部分),

返回:

而不是我希望的那样c("a","b"),因此再次导致与上述相同的错误。

0 投票
1 回答
170 浏览

codeigniter - HTML Purifier & CodeIgniter 引号

基本上我得到了简单的文本作为博客帖子的标题 - >

我得到的结果是这个

HTML Purifier 将第一个引号之后的所有内容都删掉,我正在寻找一种使用引号的方法,并且不要在它们之后剪掉字符串。

谢谢

0 投票
1 回答
165 浏览

postgresql - PostgreSQL : what are simple quotation marks for?

How could I remove simple quotation marks that appear in empty cells? See image below

View of a table including simple quotation marks

The columns can be either TEXT or CHARACTER VARYING(), these signs are still present. I have other tables with no quotation marks in empty cells... The extract above is the result of an importation of an ORACLE table into my PGSQL database. This is probably the reason why.

0 投票
1 回答
593 浏览

ruby - Ruby中双引号和单引号的区别

Ruby中的双引号""和单引号有什么区别?''

据我所见,这似乎只是一种偏好选择,除非两者意外混合,否则功能没有变化,即"Some String'.

0 投票
1 回答
23 浏览

javascript - 如何在点击语句的返回和结尾获得正确的报价?

我在使用这个 javascript 代码时遇到了一些问题,我正在寻找建议。我正在使用 javascript 以编程方式向表中添加一行,但我需要为每一行添加一个 onclick 事件。问题是当行添加到页面时,引号和大写/小写已全部转换为小写,导致网页出现问题。

这是当前代码

如果有人可以解释如何获得它,以便最终结果看起来像这样

我猜这与转义字符及其放置顺序有关,但我似乎无法弄清楚。

0 投票
2 回答
360 浏览

xml - DOS Batch : dealing with double quotes from XML files

I have written the code below to read XML files (file_1.xml and file_2.xml) and to extract the string between tags and to write it down into a TXT file. The issue is that some strings include double quotation marks and the program then takes these characters as being proper instructions (not part of the strings)...

Content of file_1.xml :

Content of file_2.xml :

My code :

I get this in result.txt :

In fact, 3 out of the 8 lines are missing. These lines include double quotation marks or follow lines that include double quotation marks...

How can I deal with these characters and consider them as parts of the strings ?

0 投票
1 回答
150 浏览

xml - Scala XML 输出引号'"'

我正在尝试将一些信息输出到 .html 文件。

我正在从文件中读取并获取值以了解我的表将有多少项目,如下所示:

我想将 colspan 与我得到的值一起使用,但我需要插入引号'"'。

但它不起作用,因为它需要类似的东西:

相反,我得到:

我该怎么做,因为'"'不起作用?

0 投票
1 回答
82 浏览

objective-c - Objective C 中引号的替换

我在一个方法中有这行代码:

如您所见,我有两个引号,由于这些终端命令必须如此具体,我需要知道另一种从 ObjC 运行系统命令的方法。我已经尝试过使用 '' and/方法,但没有成功。

0 投票
0 回答
30 浏览

php - 在回显字符串时用引号转义问题

我有一个错误的情况,我不知道如何解决:我试图在测试数据库中存储一些连续的双引号("""""""")。value现在,当我将它们作为字段打印时input type="text",我得到的是:

数据库中的数据通过sanitize_text_field(stripslashes())第一个是 wordpress 核心功能),因此根本不包含斜杠。我怎样才能解决这个问题?我是否以错误的方式存储数据?