Questions tagged as 'tipagem'

2
answers

What would a parameter call before the string in a function

I've seen several times do this: interface LoggerAwareInterface { public function setLogger(LoggerInterface $logger); } Put a parameter before the variable, in case what would it be and what does it do?     
asked by 06.03.2016 / 20:05
2
answers

Receive by parameter a Varied object list

I have the following problem described in the comment: public class Funcionario{ public long Id {get; set;} public string Nome {get; set;} public DateTime DataContrato {get; set;} } public class Carro{ public long Id {get; set...
asked by 26.10.2016 / 21:26
3
answers

Data types in SQL Server 2012 and HTML forms with PHP: date and monetary values

How can I put a mask in an HTML form in the date and monetary value fields, then send that data to the database without having to convert the strings to types date and money ? I explain: I have a form with date mask in DD/M...
asked by 08.12.2015 / 10:54
1
answer

Conversion from Farenheit to Centigrade always gives zero

This is the exercise:    1.12.3. The conversion from Farenheit to Celsius degrees is   5   C = 9 (F - 32)   Make an algorithm that computes and writes a centigrade table based on Farenheit degrees, ranging from 50 to 150 from 1 in 1. I m...
asked by 06.04.2017 / 17:22
1
answer

float64 precision

Why Go when performing the calculation: (1 * 0.09) + 0.36 returns a float64 in the following format 0.44999999999999996 ? I'm trying to make comparisons with tests and the calculation should be 0.45 because this behavior and...
asked by 03.10.2018 / 02:40
1
answer

Binary conversion limit in C

I developed this code in C to convert integers to binary, but the limit is 1023. Any number above that, conversion is no longer performed What is the possible reason for this? int binario(int num) { if (num == 0) return 0;...
asked by 15.02.2017 / 23:10
1
answer

Unexpected value is being displayed

   Make a program that receives the number of hours worked, the value of the minimum wage and the number of overtime worked, calculate and show the salary to be received, following the rules below:    a. The hour worked is 1/8 of the minimum...
asked by 11.04.2015 / 02:42
2
answers

Error: Can not find data type long

I'm trying to create a procedure in SQL Server 2012, but it's giving the following error in signing it. Mensagem 2715, Nível 16, Estado 3, Procedimento MINHAPROCEDURE, Linha 6 Column, parameter, or variable #1: Cannot find data type long. Para...
asked by 27.09.2015 / 17:24
3
answers

Space occupied between different types of integers

From the official MySQL documentation table, and a question here on SOpt , I had a question. Considering the table: Let'ssayI'mgoingtouseaTINYINTandaBIGINTtostorethesamevalue(eg240).Iask:Itdoesnot"reserve" all bytes for that record (wo...
asked by 28.06.2018 / 18:07
1
answer

How to decide the type of a function?

In many C codes I see on the internet, I only see functions of type void and int and can declare functions of other types? For example struct and float . I made a simple test with the types char and float...
asked by 23.06.2016 / 00:41