All Questions

2
answers

How to put a phrase inside a form field and it disappear when clicking inside the field?

I would like to know how to put a phrase inside a form field, and it disappears when you click inside the field. Can it be in CSS? What do you do this for?     
asked on 10.12.2015 / 15:49
2
answers

How to assign a different value to the variable in each loop?

$azul = "#4285f4"; // AZUL $verde = "#34a853"; // VERDE $amarelo = "#fbbc05"; // AMARELO $vermelho = "#ea4335"; // VERMELHO $color = rand(1, 4); I'm using $color inside a loop but in this simplistic way that my code is, the value of...
asked on 07.12.2015 / 15:32
2
answers

Remove special characters and spaces from a string?

I have a problem, in an app I'm picking up contacts from the phonebook, however I want to make a treatment in the contact numbers that can come like this: (99) 9999-9999 9999-9999 9999 9999 and among other things, the only treatment I did w...
asked on 15.11.2015 / 16:53
3
answers

Class attribute does not generate error when commented

I had a question I could not solve. Here are the 3 file codes User.php class Usuario{ //protected $nome; public function getNome() { return $this->nome; } public function setNome($nome){ $this->nome =...
asked on 21.11.2015 / 16:14
1
answer

What is the best way to create accessible methods for any activity?

Hello. When I need to create a method for an Activity I simply write it in my Activity code. For example: package com.pcriot.maxsoft.testapplication; import android.os.Bundle; import android.app.Activity; public class MainActivity extends Ac...
asked on 22.04.2014 / 07:01
1
answer

Difference between hours greater than 24 hours excel

How to calculate difference between hours in Excel when it exceeds 24h? Example: A1 = 05/01/2016 11:40:53 B2 = 06/01/2016 12:29:53 B2-A1 = 24h:49min However, it returns 00:49     
asked on 19.04.2016 / 22:50
3
answers

Dynamic display of required, optional, or non-existent fields

There is a class that has 12 properties, which may be mandatory, optional or non-existent depending on the business rule specified in the registration of another class. How would I be able to compile a View that displays only the requi...
asked on 24.03.2014 / 14:22
2
answers

Use or not use CSS / JS within PHP?

Using CSS / JS within PHP, is there a difference if used in an external file for example? Many pages have CSS / JS inside and also externally, would not it be easier to put all together than splitting one part in code and another externally on t...
asked on 10.06.2014 / 23:37
3
answers

Definition of EJB

Please forgive me for the generic subject, but I have been researching for a long time in a number of places and have not found anything that would satisfactorily explain what an EJB really is and what it does. I am adept at using real exampl...
asked on 09.06.2014 / 22:52
2
answers

Clause similar to MySQL's LIMIT in MSSQL

I need to run the query below in PHP with SQL Server, however I can not use the LIMIT clause missing in Microsoft queries . $SqlTabelaAtual="SELECT * FROM BusinessCadTabPreco RIGHT JOIN BusinessCadTabPrecoItem ON B...
asked on 15.01.2016 / 15:17