commenting

Function commenting conventions in R

让人想犯罪 __ 提交于 2019-11-27 13:54:09
问题 I'm fairly new to R, and I have been defining some of my own functions in script files. I'm intending for others to re-use them later, and I can't find any guides on R function commenting conventions. Is there any way for me to make help("my_function_name") show some help? If not, do I just document the function in the script file, so that someone has to print out (or open the source of) a script to see the comments? Thanks, Hamy 回答1: The canonical way to document your functions and make them

Commenting interpreted code and performance

怎甘沉沦 提交于 2019-11-27 09:26:43
I always (well try) to comment my code. I have configured my server to remove those comments/extra white space before delivery. Would it be better not to have comments in the live systems code (Javascript/php) and therefore reduce this overhead or remove or interpretation? If so how can I have my cake and eat it too? For PHP, it makes no difference. Your PHP code isn't sent out to the browser. For JavaScript, it is recommended that you minify your code. This reduces its size by changing variable names, removing white space, and removing all comments as well. There are several online tools for

How do you comment out code in PowerShell?

天大地大妈咪最大 提交于 2019-11-27 08:56:05
问题 How do you comment out code in PowerShell (1.0 or 2.0)? 回答1: In PowerShell V1 there's only # to make the text after it a comment. # This is a comment in Powershell In PowerShell V2 <# #> can be used for block comments and more specifically for help comments. #REQUIRES -Version 2.0 <# .SYNOPSIS A brief description of the function or script. This keyword can be used only once in each topic. .DESCRIPTION A detailed description of the function or script. This keyword can be used only once in each

Javascript/Jquery commenting causing errors in IE

孤街浪徒 提交于 2019-11-27 08:21:03
问题 So this post is not so much of a "please help me fix it" post as much as it is a "why would changing that make it work?". So I had some javascript/jquery written that was working in firefox and chrome, but IE threw errors. I could not figure it out even with the helpful posts from users here at stackoverflow. I eventually stumbled upon the answer (as I seem to find myself doing a lot with coding). I was doing a somewhat rigorous style of commenting taught to me by one of my computer science

How to “comment-out” (add comment) in a batch/cmd?

混江龙づ霸主 提交于 2019-11-26 23:44:36
问题 I have a batch file that runs several python scripts that do table modifications. I want to have users comment out the 1-2 python scripts that they don't want to run, rather than removing them from the batch file (so the next user knows these scripts exist as options!) I also want to add comments to bring to their attention specifically the variables they need to update in the Batch file before they run it. I see that I can use REM . But it looks like that's more for updating the user with

Commenting interpreted code and performance

扶醉桌前 提交于 2019-11-26 14:45:04
问题 I always (well try) to comment my code. I have configured my server to remove those comments/extra white space before delivery. Would it be better not to have comments in the live systems code (Javascript/php) and therefore reduce this overhead or remove or interpretation? If so how can I have my cake and eat it too? 回答1: For PHP, it makes no difference. Your PHP code isn't sent out to the browser. For JavaScript, it is recommended that you minify your code. This reduces its size by changing