Questions tagged as 'tipagem'

5
answers

Induction type for any type of object

I want to make a method of a given class accept an object as a parameter. But this object could be of any type. Example: class classeExemplo { public function meuMetodo(Object $objeto) { // Seguiria aqui o bloco de código }...
asked by 24.11.2015 / 20:59
1
answer

Can a class be a data type?

What I understand about data type is that they are formed by three properties, they are: Address set; Operations Set; Memory Space; Assuming what is above I can understand that a class I create for example class Pessoa : pub...
asked by 17.02.2016 / 01:04
2
answers

Converting string to long int

I have an activity to do in which the teacher asks that the names of the numbers be converted into integers ( long int ). I would like to know if there is a function in Java that does this ... I searched in some places, but found nothing that...
asked by 18.11.2017 / 14:04
1
answer

Making the insert in SQL Server in a float field?

I have the following problem in my code, I have a textbox that receives the value 0.900 , but when I am writing this value to the bank, it is only recording 900, and I need to record the 0.900 and I can not write this way, the field...
asked by 08.08.2017 / 15:00
1
answer

What is the correct way to declare a struct in C?

Also how to rename struct data types? I have doubt about this because of a Windows Manager that I use has the following code: typedef struct exem exem; struct exem { tiposdedado variavel; };     
asked by 29.10.2016 / 13:52
1
answer

When to use each data type of mysqli_stmt_bind_param

According to documentação :    i - corresponding variable has type integer - d - corresponding variable has type string b - corresponding variable is a blob and will be sent in   packets So I wanted to know when exactly to...
asked by 25.09.2015 / 22:18
1
answer

How to use more than two types in function parameters?

Suppose the following function in PHP: function parse (string $text, array $callback) { # ... } In theory, the parameter $callback must be an array , but can also be accepted as string . How do I accept both arrays and str...
asked by 29.12.2017 / 22:07
1
answer

In PostgreSQL, which field to use for percentage?

In the table I am creating, I will have a column that will indicate the discount percentage, for example, "for a certain agreement I will have a 20% discount, for another agreement I will have a 50% discount", and I will need to use it in calcul...
asked by 27.02.2015 / 15:36
1
answer

In a repetitive structure are there differences between working with Object or Array?

When I query the database by PHP and want to return that data with while , I usually use fetch_object() , which returns the data in type object . For example: $query = "SELECT * FROM TABELA"; $exect = $conn->query($query);...
asked by 14.12.2015 / 12:03
4
answers

What is the difference between SMALLINT (3) and INT (3)

I have a question about the difference between two types of data in MySQL: This document has this table: The default construct of these types is SMALLINT(M) and INT(M) where M = numero máximo de dígitos que o campo ir...
asked by 28.06.2018 / 17:15