Questions tagged as 'constantes'

2
answers

Advantages of using const on var in JavaScript

In javascript I can declare a constant in the following two ways: const CONSTANTE = 'soy una constante'; var CONSTANTE = 'soy una constante'; Of course, using const instead of var makes the code more understandable but,...
asked by 08.01.2016 / 09:09
2
answers

Contraindications to static import?

I'm analyzing a code and I found the class Constantes , which, as its name suggests, has this structure: public final class Constantes { public static final String PREFIJO = "prefijo_"; } In another class I saw this import :...
asked by 11.04.2016 / 13:14
1
answer

error when compiling binding to reference of type discards qualifiers

when executing a program in which among other functions, I minimize a finite deterministic automaton (DFA, for more information, link ), I use the set and map containers of the C ++ stl, but it gives me errors that I do not understand in that f...
asked by 29.10.2017 / 22:05
1
answer

java properties / xml as constant

I try to collect values from a .properties to use it in an annotation, but it is not possible to do it with ResourceBundle since the annotations work with constants and the result of this, it is not. I tried to change the properties to .xml by c...
asked by 04.09.2018 / 13:01
1
answer

Constructor with POO constants. Java

I have a question about a little code I've seen. In an exercise, creating an Appliances class, you are asked to create a series of attributes (price, color, consumption, weight) and that by default, the color will be white, the energy consumptio...
asked by 13.01.2018 / 20:05
0
answers

Constants defined in PHP error Use of undefined constant

I have a file in the main folder of the project called core.php where I have defined some constants with direct addresses to project folders: define( "APP_DIR", "app/"); define( "CSS_DIR", "app/css/"); define( "JS_DIR", "app/js/"); define( "IM...
asked by 01.07.2018 / 07:10
1
answer

error when compiling binding to reference of type discards qualifiers

when executing a program in which among other functions, I minimize a finite deterministic automaton (DFA, for more information, link ), I use the set and map containers of the C ++ stl, but it gives me errors that I do not understand in that f...
asked by 29.10.2017 / 22:05
1
answer

Where should I define the global constants in Cakephp 3?

Currently I have them defined in the file paths.php but I do not get them well, should I put them in another file or do I have to add something somewhere? Thanks in advance.     
asked by 02.08.2017 / 11:21