Python class/method comment and intellisense - visual-studio-code

I have seen that the comments I write at the top of my Python methods and and classes is the same text that pops up when I am using them in my code. I have also seen that some formatting hints can be made in the comments, and that will translate into pretty rendering in the popup text (for instance, putting a bunch of "-"'s under a heading makes the font bigger and bolder). What other formatting is there and what are the hints? Specifically, is there "code" formatting that renders in monospace? I like to put code samples in my comments sometimes and that would look great.
Finally, does this all have a name? I tried googling what I was trying to do and it was hard because I didn't know what it was called.

Related

VS Code cursor jumps before I can type input in the field

I use HTML, CSS, and JavaScript mostly as I'm new to frontend development. The cursor is driving me crazy every time I am using VS code. I have disabled my format Pettier and JS-CSS-HTML and it still moves around. I am so confused and have tried multiple "solutions" of which none have worked. I'm sure it's a setting but I can't seem to find it. I wanted to put a video so someone could see the problem but can't only screen shots which I don't think will help. Let's take CSS => When I type #title-container {} the cursor just jumps out of the input brackets. Also the cursor won't let me add extra lines and returns the line after, back before I even get a chance to type anything.
Hopefully you understand this....

What is the purpose of faded text in VS code?

In VS code (for my Javascript file), the text sometimes fades when I edit my code. Does anyone know what this means? I have researched it online, but can't find its purpose. I know arguments and variables in functions fade out until they are written in the function, but I haven't seen it before for entire functions.
I've included all my installed extensions in the picture in case one of these is doing the fade. I can also include all my code if I did not provide enough information. Thank you!
Edit: to clarify, the faded text I am speaking of is the entire function placeInTable(y,x) I am not speaking of the commented code.
EDIT: answered about the commented part first, not reading the entire question
The function is faded because it hasn't been called, so no actions inside it have been executed.

Why suddenly some things have disappeared from the body section?

I've been working on a website and from time to time some elements are disappearing from the document. I've figured out that it's because in CSS document the early lines are not fully commented. I would like to ask why if even such a tiny thing like Skeleton's default version text is not fully commented or some of the classes or id's don't have a closing bracket then the whole website has layout problems. What skeleton's version has to do with page's body color ? This is really confusing.
Here is the HTML and CSS :
http://codepen.io/anon/pen/vIchA
I would be glad with any help. Yours truly,
D.
Browsers have to guess how to render bad code. Sometimes they will guess and render it correctly, other times it will look weird.
Different browsers are likely to render it differently (though error handling standards are improving)
In this case, your demo lacks a "/" at the start, which means it is trying to render the comments as css. The comments are not css, so it gets confused and does the best it can.
A quick way to find any bugs in the css is to use this:
http://jigsaw.w3.org/css-validator/

jQuery Show/Hide divs using same class not working because of html.push?

The object is to Show-Hide text located under their respective Titles, so a User reads the title and shows or hides text belonging to that title if the User wants to read more.
I tried whatever I could find so far on here, we're talking dynamically setting text coming from a spreadsheet, can't use IDs, must work with .class, must be missing something, I have this piece of code:
... html.push('<div class="comments">' + comment + '</div></div></div>');
but when I try this Show-Hide code nothing happens, even if the error console shows nothing. Basically I want to Show-Hide the .comments class divs with a show-hide toggle link located under each of them. I say them because the .comments divs are reproduced dynamically while extracting text coming from Google spreadsheet cells/row (one .comments div per spreadsheet row). I tried .next, child and parent but they all divorced me so I dunno looks like a dynamic issue. So far I only managed to globally toggle all divs to a visible or hidden state but I need to toggle independantly individual divs.
I prefer a jQuery solution but whatever worked so far was achieved with native javascript.
Note: If a cross-browser truncate function which would append a more-less link after a number of words (var) in each .comments divs would be easier to implement then I would gladly take that option. Thx for any help, remember I am still learning lol!
I have been working on an entirely JS UI project and have brought myself to using $('', { properties }).appendTo(BaseElement) to work best for adding HTML elements because it appropriately manipulates the DOM every time.
If you are having good luck with push elsewhere, however, breakpointing on the line where you do your $('.class').hide() and see what $('.class').length is. Alternately, you can just add alert($('.class').length) to your code if you are unable to breakpoint the code. If it is 0, then your elements have not been properly added to the DOM. Changing to append will ensure they are part of the DOM and therefore targetable via JQuery.

MVC2 Quote handling / escaping within a style attribute

I have no idea how to handle this code within a style attribute. How do I correctly code this markup or properly escape it? I could use a string.format and emit the entire div but that seems like an awkward solution.
(I figured all those slant brackets would pose an issue in this posting so I am including an image.)
I see this all the time in my editor as well, for some reason, it doesn't color the attributes properly sometimes in CSS and JS. However, the attribute that you are spitting out will should still perform like you are expecting.