All Questions

3
answers

Working with lists without using Array () in PHP

I know that in PHP for almost every type of list, we work with Array() , but is this the only way to work with lists in PHP? Is there any other way to work with lists of objects in PHP, similar to the Collections classes ( List ,...
asked on 26.01.2016 / 14:33
4
answers

Using the keywords Throws and Throw

How do I use the words Throws and Throw in a Java code?     
asked on 25.05.2014 / 19:11
3
answers

Function to add more hours or days to a date

I do not know much about the new Date() function and I wanted a way to add days / hours to a date. Example: I have: var Time = "14/03/2014 23:54"; I want to add 2 hours to Time , so it adds 2 hours and adds 1 a day. var Time = "15...
asked on 14.03.2014 / 06:01
3
answers

Is it correct to call a method, and pass its null parameters?

For example, I have the click event of a button calling the method below: //Evento this.serviçoToolStripMenuItem1.Click += new System.EventHandler(this.Nivel_Serv_Click); //Metodo private void Nivel_Serv_Click(object sender, EventArgs e...
asked on 27.06.2017 / 12:36
3
answers

How to check if a string has only uppercase letters?

How can I check if all characters in a string are uppercase? Preferably, without the use of regular expressions.     
asked on 11.12.2013 / 17:33
3
answers

What is the meaning of the symbol || '-' || in SQL

I'm doing a query in an Oracle database and I come across this || '-' || symbology in my query . Would you like to know the meaning? Select xf0cdloc || '-' || XN4CDEMP AS LOCOMOTIVA, From Trem     
asked on 31.01.2017 / 14:07
2
answers

For with a ";" at the beginning of the loop, which means

I got a code with a for: for (; indField > 0 && indMask > 0; ) What does this ";" mean at the beginning and end of the command?     
asked on 29.12.2016 / 16:17
3
answers

What are "Magic Numbers" in JavaScript?

My IDE reported that I'm using magic numbers in my code, in the f = 12 stretch. I'd like to know more about what "magic numbers" are. I need to have a variable of value 12, but the IDE has said something about constants in JavaScript...
asked on 15.06.2016 / 15:47
3
answers

Why in Java is the size of an array an attribute of a String and a method?

In Java, the size of an array of any object can be obtained with length , which would be an attribute. But in the case of String is length() , a method. However, if you have a array of String , it uses length ,...
asked on 31.05.2017 / 02:18
8
answers

Is it recommended to use constants for a PHP project's settings?

It is very common to see constants in a configuration file in a PHP project, however I would like to know if this is really the best practice, as I think if I store the password of a database in a config.php it could be used anywhere, that is,...
asked on 18.11.2015 / 17:05