All Questions

2
answers

How to print only the first 5 characters?

I need to display up to 5 characters of the contents of each table cell at a specific resolution. I do not know if there is any Pseudo Elemento that does what I need, something like: Example: @media (max-width: 548px) { p:only-fi...
asked on 18.01.2017 / 12:35
1
answer

What character encoding (Collation) should I use in Mysql?

What is the most appropriate Collation for a database in Mysql that will store Portuguese language data?     
asked on 01.07.2015 / 01:31
2
answers

How to perform methods overload with PHP?

How to perform overloading of methods with PHP? In order to declare methods with the same name but with different parameters.     
asked on 12.02.2015 / 18:05
3
answers

What is the purpose of the __clone magic method?

In PHP we have the magic method __clone . It is used to define behavior when you clone an object through the keyword clone . So far so good. But I do not quite understand why having this magic method, since the word clone p...
asked on 30.06.2016 / 15:47
1
answer

Send email with attachments in php

I'm sending an email, everything works fine. Now I wanted to add some files as an attachment. I have the following code: $from = $_SESSION['email_cliente']; $email_destino = "[email protected]"; $subject = "Assunto"; $messagem = "Isto é uma mens...
asked on 02.04.2014 / 15:59
3
answers

W3C HTML Validator accuses "Empty heading"

I'm trying to validate my html and it's giving me the following message: Line 328, Column 34: Empty heading. <h3 class="titulo-chamada">A internet no controle</h3> You have implied that the title is empty, but see that it has a...
asked on 03.06.2014 / 19:28
2
answers

String interpolation has a better performance than string.Format?

I use Resharper and a few days ago I started using some C # 6 features. In several parts of the code I use string.Format() and I noticed that the Resharper suggests that these snippets be replaced by string interpolation . The ques...
asked on 19.10.2015 / 14:27
2
answers

What are the for loop syntaxes in java?

Hello Everyone programming in Java should already be tired of using for looping, which almost always has a syntax similar to this: for (int x = 0; x < y; x++) { ... } I was analyzing some codes and came across a different s...
asked on 31.03.2014 / 04:42
4
answers

How to validate date taking leap year into account?

How to validate date with leap year in JavaScript?     
asked on 18.06.2014 / 13:35
4
answers

How to create a function to page dynamically created PHP page and change certain text

I have a PHP page that is dynamically mounted, and I need to change certain texts, depending on the user being male and female. I was using it like this: function mudasexocaps($sexo) { if ($sexo == "feminino") { echo "A"; }...
asked on 11.11.2015 / 18:28