About 50 results
Open links in new tab
  1. What are magic numbers and why do some consider them bad?

    Symbolic Constant: When to replace? Magic: Unknown semantic Symbolic Constant -> Provides both correct semantic and correct context for use Semantic: The meaning or purpose of a thing. "Create a …

  2. ruby on rails - uninitialized constant ActiveSupport ...

    Jan 7, 2010 · uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError) Asked 1 year, 1 month ago Modified 6 months ago Viewed 69k times

  3. How to declare a constant in Java? - Stack Overflow

    Oct 9, 2012 · You can use an enum type in Java 5 and onwards for the purpose you have described. It is type safe. A is an instance variable. (If it has the static modifier, then it becomes a static variable.) …

  4. c++ - What is the difference between const int*, const int * const, and ...

    Jul 17, 2009 · Exception, a starting const applies to what follows. const int* is the same as int const* and means "pointer to constant int". const int* const is the same as int const* const and means "constant …

  5. How to keep one variable constant with other one changing with row …

    207 Lets say I have one cell A1, which I want to keep constant in a calculation. For example, I want to calculate a value like this: =(B1+4)/(A1) How do I make it so that if I drag that cell to make a …

  6. c - Constant pointer vs Pointer to constant - Stack Overflow

    Jan 31, 2014 · A constant pointer is a pointer that cannot change the address its holding. In other words, we can say that once a constant pointer points to a variable then it cannot point to any other variable.

  7. .net - C# naming convention for constants? - Stack Overflow

    Oct 28, 2008 · The IDEs of today catch a lot of problems before compilation. I don't think recognizing constant by name is important, otherwise shouldn't you add some special name for readonly …

  8. How do I create a constant in Python? - Stack Overflow

    Apr 21, 2010 · 12 You can use a namedtuple as a workaround to effectively create a constant that works the same way as a static final variable in Java (a Java "constant"). As workarounds go, it's sort of …

  9. Assign constant values to structs in C - Stack Overflow

    Sep 6, 2023 · Assign constant values to structs in C Ask Question Asked 2 years, 5 months ago Modified 2 years, 5 months ago

  10. Is it possible to use std::string in a constant expression?

    Be aware that whenever you pass this constant to a function taking a const std::string& a new std::string has to be constructed. That is usually the opposite of what one had in mind when creating a constant.