说我有这条javascript/jQuery代码,我想注释掉标记的代码块.
<script>
function checkValues() {
// Important function
}
$(document).ready(function () {
$(".item").click(function () {
// Important action
});
/* I want to comment this block out, from here...
$("#<%=Application("InstID")%>").blur(function () {
});
$("#<%=Application("ComID")%>").blur(function () {
});
...to here */
});
</script>
Run Code Online (Sandbox Code Playgroud)
但服务器标签不允许使用常规注释块/* comment */.在这种情况下是否有另一种方法来制作代码块?
Visual Studio也不会识别Ctrl+ K+ C.
我在所有文件(js,css,php,...)中添加了许可文本,但是在尝试在.html.twig文件中添加文本时遇到了麻烦.我试过以下代码:
<!--
Itransformer.es is an online application to transform images
Copyright (C) 2013 Manolo Salsas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty …Run Code Online (Sandbox Code Playgroud) 为什么CSS中的评论甚至相当可观?我之前正在测试一个网站,只是在分号后添加一些纯文本:
#myId {
property: value; this is my comment
}
Run Code Online (Sandbox Code Playgroud)
并且没有引发任何错误,该值仍然应用于选择器,一切正常.为何使用/* */?我在Chrome和Firefox中测试了它,是否还有其他浏览器可能无法解析CSS,如果我这样做,我不知道?
我见过程序员使用以下格式的评论:
/*! This is a sample comment
*/
Run Code Online (Sandbox Code Playgroud)
我在ios开发时第一次看到了这样的评论,即在objective-c中.这里有'!'(感叹号)有什么意义?
我发现这个代码将图像插入excel 2013,但图像比他们进入的单元格大.我认为将图像作为注释加载的最佳选择.
有人可以在下面修改此VBA以将其添加为评论吗?
Sub URLPictureInsert()
Dim cell, shp As Shape, target As Range
Set rng = ActiveSheet.Range("R2:R5") ' range with URLs
For Each cell In rng
filenam = cell
ActiveSheet.Pictures.Insert(filenam).Select
Set shp = Selection.ShapeRange.Item(1)
With shp
.LockAspectRatio = msoTrue
.Width = 50
.Height = 50
.Cut
End With
Cells(cell.Row, cell.Column + 5).PasteSpecial
Next
End Sub
Run Code Online (Sandbox Code Playgroud) 以下行写在C程序中
in/*hello*/t k; error or not
Run Code Online (Sandbox Code Playgroud)
据我说,第一个预处理器会从代码中删除注释,然后代码将转到编译器,因此编译器的代码是
int k;
Run Code Online (Sandbox Code Playgroud)
这完全没问题.
但实际上,当我在gcc编译器上运行它时,它会给出编译器错误
in,k,t没有定义
fontName = b"\xC8\xC1\x10" \
# Representación del tipo de fuente en bytes.
+ fontNamesInBytes[fontName] \
# Tipo de atributo: attr_ubyte | Atributo: FontName (Nº 168)
+ "\xF8\xA8"
Run Code Online (Sandbox Code Playgroud)
python3 test.py
File "test.py", line 14
+ fontNamesInBytes[fontName] \
^
IndentationError: unexpected indent
python3 test.py
File "test.py", line 13
\# Representación del tipo de fuente en bytes.\
^
SyntaxError: unexpected character after line continuation character
python3 test.py
File "test.py", line 15
""" Tipo de atributo: attr_ubyte | Atributo: FontName (Nº 168)"""\
^
SyntaxError: …Run Code Online (Sandbox Code Playgroud) 我应如何深入描述算法的工作原理?
例如,我正在开发一个简单的俄罗斯方块游戏,我想解释一下如何旋转tetrominoes,这样的解释不能覆盖100行,但读者可以完全理解我在做什么。
我的算法的javadoc现在是:
/**
* Rotates the tetromino 90 degrees clockwise.
* <p>
* The rotating algorithm guarantees O(n^2) time complexity and O(1) space
* complexity, n being the width/height of the tetromino's layout.
* <p>
* The algorithm works by rotating each layer of the layout. A layer is
* rotated by choosing 4 elements, one from each of the layout's sides, and
* swapping them with each other in a clockwise manner. See an illustration
* …Run Code Online (Sandbox Code Playgroud) 根据标题,我如何评论内联css属性?喜欢高度:
<div style="width:100%; height:30%;">
Run Code Online (Sandbox Code Playgroud)
提前致谢
我正在使用Java中的一个项目,我需要在每个方法上面添加一个注释框来解释每个方法的作用.它应该看起来像这样:
**************(星号线)**************************************************************************@ param
*
***************(另一条线)*********************************************************************
我正在使用eclipse,我知道有一个快捷方式可以制作这个盒子,但我似乎无法记住它或在网上找到它...