Category:Code snippets: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
Marti (talk | contribs)
m Included legend for various types of good, fair and bad examples.
No edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
List of pages with code snippets. Browse around, you might learn something new.
List of pages with code snippets. Browse around, you might learn something new.


{{Good example|If you see code like this it is usually a Good example.}}
<pre class='sample-bad'>
Code samples highlighted in red like this are bad ideas.
Usually, this code does not work, and the sample is to point out _that_ this code does not work.
</pre>


{{Fair example|If you see code like this it is usually a Fair example and may have some pitfalls.}}
<pre class='sample-good'>
 
Code samples highlighted in green, however, _do_ work.
{{Bad example|If you see code like this it is usually a Bad example and may have a high security risk.}}
They are usually presented beside the bad examples, as an idea what should be done instead.
</pre>

Latest revision as of 21:27, 3 February 2010

List of pages with code snippets. Browse around, you might learn something new.

Code samples highlighted in red like this are bad ideas.
Usually, this code does not work, and the sample is to point out _that_ this code does not work.
Code samples highlighted in green, however, _do_ work.
They are usually presented beside the bad examples, as an idea what should be done instead.

This category currently contains no pages or media.