Skip to main content

All Questions

3 votes
0 answers
219 views

Do I have to worry about patent issues for code posted on Stack Overflow?

I purposely named this question similar to Do I have to worry about copyright issues for code posted on Stack Overflow?. Since Fedora is banning CC-0 licensed source code citing issue of explicitly ...
Yao Wei's user avatar
  • 69
6 votes
1 answer
150 views

How should I represent/display pseudo code in Stack Exchange?

This semester I'm attending a course on Algorithms and Data Structures. I will probably have a few questions to post to Computer Science or Mathematics. The slides of my teacher use math symbols such ...
ilam engl's user avatar
  • 235
7 votes
1 answer
186 views

When someone adds a "language identifier" to a code block does the specified syntax highlighting show in the "suggested edits" "queue"?

When I edit someone's code block with a language identifier: Example: from: ``` def py ``` to: ```python def py ``` Is that change reflected in the Suggested edits queue in the Inline or side-by-...
NotStanding with GoGotaHome's user avatar
0 votes
0 answers
49 views

Please allow to edit questions that are mostly code [duplicate]

There are some low-quality questions that consist mostly of wrongly formatted code. When trying to format it correctly (i.e., code actually becomes code), you get a notification that "your" ...
Leonard's user avatar
  • 117
2 votes
0 answers
87 views

Prefer code fences or indenting? [duplicate]

Personally, code fences are cleaner (less whitespace) and are parsed more quickly due to the ability to hint at the language via cpp,lang-none,js, etc. Other than requiring indenting to use code in ...
Casey's user avatar
  • 159
3 votes
1 answer
421 views

Why does copying a code block line contain a trailing newline?

Using macOS and Chrome, triple clicking a line to select and copy in a code block results in a trailing newline. When pasting a command into a shell, this results in the cursor being placed on a line ...
jsuth's user avatar
  • 141
317 votes
38 answers
58k views

Goodbye, Prettify. Hello highlight.js! Swapping out our Syntax Highlighter

Update 2020-09-24 This is now live network-wide. Update This is now live on Meta Stack Exchange and Meta Stack Overflow. Any bugs and feedback can be posted here as an answer. I’m Ben and I’m a dev ...
Ben Kelly's user avatar
  • 5,407
5 votes
2 answers
118 views

Should Ctrl+K in the editor use the code fences instead of indentation?

Now that the Stack Exchange network has switched to CommonMark, some features appear to be deprecated. In particular, comment-style language hints may eventually stop working. So instead of using 4-...
Ruslan's user avatar
  • 367
1 vote
0 answers
269 views

How can I explicitly show the return value of a code snippet/sample

Is there an commonly accepted way (best practice if you wish) to show the return value of example code in markdown? One solution is to add a comment at the end of the function, but I am concerned ...
Nate's user avatar
  • 219
1 vote
2 answers
78 views

Editing code with security issues or performance issues

I often edit code on stackoverflow when I see a security issue or a big performance issue that can be changed without altering the meaning of the answer, so in all fairness I would call it an useful ...
Tofandel's user avatar
  • 119
-10 votes
1 answer
98 views

Inserting code method should be changed

I realize this suggestion would affect only the Stack Exchange sites that use code as part of their questions. However, since my suggestion would involve a re-code, if it's accepted, I thought it best ...
KoshVorlon's user avatar
3 votes
1 answer
81 views

Another user updated the code snippet on my answer & it's incorrect/introduced an error. What's my course of action?

Another user updated the code snippet on my answer & it's incorrect/introduced an error. What's my course of action? I can't seem to send them a message, so do I have to manually fix their edit? ...
tatlar's user avatar
  • 141
9 votes
1 answer
157 views

What happened to code fences and Stack Snippets?

I just noticed that something weird happened today with code fences and Stack Snippets. Examples: <h1>Hello World!<h1> Hello World! Seems like the boxes are bigger. What is ...
double-beep's user avatar
  • 6,341

15 30 50 per page
1
2 3 4 5
12