Questions tagged [standards]

Standards are officially published or well agreed upon formats, procedures, or protocols. They allow individuals or organizations to collaborate by setting ground rules or boundaries. Standards often come with a set of preconditions or assumptions, which allow collaborators to take those conditions or assumptions as ground truth.

The concept of "standard" is at least as old as the Roman Empire, where the standard was a rod of wood often decorated with a headpiece or banner and carried at the front of an army's march. This one rod was used to establish a common length for contructing camps and buildings. By using the same length, workers constructing a door could operate independently of other workers constructing a door frame. And when the pieces were brought together, they fit.

Modern standards are often created by jurisdiction-based entities like national standards organizations (like ANSI in the USA) or the International Standards Organization (ISO).

3387 questions
215
votes
7 answers

Why are Standard iterator ranges [begin, end) instead of [begin, end]?

Why does the Standard define end() as one past the end, instead of at the actual end?
Puppy
  • 144,682
  • 38
  • 256
  • 465
213
votes
10 answers

How to determine the version of the C++ standard used by the compiler?

How do you determine what version of the C++ standard is implemented by your compiler? As far as I know, below are the standards I've known: C++03 C++98
jasonline
  • 8,646
  • 19
  • 59
  • 80
199
votes
20 answers

Use CSS to automatically add 'required field' asterisk to form inputs

What is a good way to overcome the unfortunate fact that this code will not work as desired:
In a perfect…
brentonstrine
  • 21,694
  • 25
  • 74
  • 120
198
votes
7 answers

Is the order of iterating through std::map known (and guaranteed by the standard)?

What I mean is - we know that the std::map's elements are sorted according to the keys. So, let's say the keys are integers. If I iterate from std::map::begin() to std::map::end() using a for, does the standard guarantee that I'll iterate…
Kiril Kirov
  • 37,467
  • 22
  • 115
  • 187
188
votes
5 answers

Proper URL forming with a query string and an anchor hashtag

When both a query string and anchor tag (hash tag) are visible in a URL, what is the proper order for them to appear? http://www.whatever.com?var=val#anchor or http://www.whatever.com#anchor?var=val Is there any documentation on this? The URLs are…
Dan
  • 3,750
  • 5
  • 24
  • 38
164
votes
5 answers

What is the proper declaration of main in C++?

Questions What is the proper signature of the main function in C++? What is the correct return type, and what does it mean to return a value from main? What are the allowed parameter types, and what are their meanings? Is this…
fredoverflow
  • 256,549
  • 94
  • 388
  • 662
159
votes
26 answers

Are there any suggestions for developing a C# coding standards / best practices document?

I'm a recent AI graduate (circa 2 years) working for a modest operation. It has fallen to me (primarily as I'm the first 'adopter' in the department) to create a basic (read useful?) C# coding standards document. I think I should explain that I'm…
TK.
  • 46,577
  • 46
  • 119
  • 147
155
votes
2 answers

Set element width or height in Standards Mode

Is it possible to set width or height of HTML element (ex.
) in JavaScript in Standards Mode? Note the following code: