Most voted "typing" questions
For data type system related issues.
Learn more…349 questions
Sort by count of
-
0
votes2
answers1756
views -
0
votes3
answers181
viewsUse of data type modifiers
Interestingly, I was very interested to know why data-type modifiers are not so widely used. It is said that the modifiers are used to "efficiently" the performance of the program, since you specify…
-
0
votes2
answers49
viewsKnowing the type of return of a given
I have a problem with the return type of a data in python. I was first trying : >>> type(record[0][keys[2]]) <class 'Bio.Entrez.Parser.StringElement'> I tried to check by if…
-
0
votes1
answer83
viewsWhy is it when I do two operations with integer numbers and save the result in a double it gives me a 0.0 return?
Example: double teste = 673/5455 * 100; System.out.println(teste); It prints 0.0 and this is not the result of the account... why it happens?
-
0
votes1
answer1139
viewsPrinting of predefined phrases at random in C
Hello, I’m a beginner in programming and I’m learning to code in C. I want to do a show that has some sentences already defined. Ex c/ vectors: char vet1[100] = {"Hello World!"}; char vet2[100] =…
-
0
votes1
answer164
viewsWhy use dice type and not just use Varchar?
I am manipulating some databases in which the vast majority of columns are with the data type VARCHAR for fields such as Date, Price, Total Value, Birth, Date/Time and etc. Briefly, practically…
-
0
votes1
answer1096
viewsWhat is the correct type to store phone and address?
As the title says, what is the correct type and correct way to store phone and address, according to database normalization? In the case of phone, what is the correct type to store, the landline and…
-
0
votes2
answers1452
viewsIn Mysql which field type is suitable for storing weight in grams?
I have this doubt, what kind of field to use for weight like 0.900, 1.200, 2.000, 0.100 and be able to treat the fields as number in the query output?
-
0
votes2
answers100
viewsHow is it still possible to calculate 1<<64-1 without issuing an overflow?
The uint64 limit is (2 64)-1, or simply 1<<64-1. When you try to do something like fmt.Print(uint64(1<<64-1)) it works normally, makes sense once it’s within the limit. However, if the…
-
0
votes2
answers51
viewsVariable declaration
I do not know what is the subject of this part of Java, but I did not understand it: Carro carro; I know that when declaring the variable we do: String carro; Why is there such a thing Carro? and…
-
0
votes2
answers981
viewsChange a text value using a C pointer
I need to change the values of the variables through their pointers but I’m not getting. #include <stdio.h> #include <stdlib.h> //Programa principal int main() {//Declaração de variáveis…
-
0
votes1
answer75
viewsAverage calculation does not return correct result
I decided to make a program to calculate the average. It works like this: 1º Pergunta o número de alunos; 2º Pergunta o nome, e as duas notas; 3º Calcula a média; 4º Imprime. But the function is not…
-
0
votes1
answer40
viewsNumeric data type with Access characters
I have a bank in Ae I have several fields that are essentially numerical. Only that the numbers can contain the sign of < or >. These fields can be used for calculations so I didn’t want to…
-
0
votes1
answer425
viewsTyping
Is it possible to use static typing in Python? For example if I declare a variable of type int and then I assign the value 'one' no error occurs, I wonder if there is any way to prevent this kind of…
-
0
votes1
answer64
views"short s = 2;" Does Java already understand 2 as short?
I know that by default when initializing a variable of an integer type Java classifies it as int, but in the case of short s = 2, Java already understands 2 as short? Or is there some conversion?…
-
0
votes1
answer3094
views"Warning comparison between Pointer and integer" - what is it?
during the compilation of the code in C language I appeared this error: [Warning] comparison between Pointer and integer for this step of the code: if(livro > TAM) { printf("------- Você já…
-
0
votes1
answer80
viewsdeclare(strict_types=1); display errors
I’m starting to use language heavily typed in PHP 7. declare(strict_types=1); But I couldn’t find a way to debug the bug and show where it is. I searched hard but couldn’t find. What should I wear?…
-
0
votes2
answers56
viewsWidening conversions and option Strict on
I’m learning about conversions and reading that article: Widening Conversions (I don’t know the term in English) The following conversions may lose precision: Integer to Single Long to Single or…
-
0
votes1
answer148
viewsPair or odd loop does not show the expected result
public class ParImpar { public int totali; public int totalp; public ParImpar(int totali, int totalp) { this.totali = totali; this.totalp = totalp; } public static void main(String[] args) { new…
-
0
votes2
answers154
viewsWhy is the average score always "Nan"?
I have a problem calculating the average of several notes typed by the user. The function returns only Nan. function calcularMedia() { var nota = parseInt(prompt("Digite uma nota:")); for (;;) { var…
-
0
votes2
answers302
viewsError trying to access an array element
How do I make the execution of mine loop generates a registration code automatically? Error on line 36 - 'book[i]. Cod = i;' [Error] subscripted value is neither array nor Pointer nor vector…
-
0
votes0
answers99
viewsHow to make explicit variable type declaration in PHP?
Taking a course on the Internet, I saw the instructor saying that from PHP 4 (he used 3, so did not test) it was possible to make the explicit declaration of type in object attributes as follows:…
-
0
votes1
answer113
viewsProblem with the use of float in vector C/C++
I need to do the following problem in C: Read 12 valid student grades and store them in an array of notes. Assuming that there may be errors in the typing process, some values stored in the vector…
-
0
votes1
answer218
viewsWhy do we use "void" typing in Angular?
Why in Angular we use typing : void? Example: ngAfterViewInit(): void {}
-
0
votes0
answers29
viewsSpecific type for attributes
I’m trying to define the type of information that attributes receive, but I’m not sure how to do it. I tried these methods, but they do nothing. class Lancamento: def __init__(self, tipo, data,…
-
0
votes1
answer82
viewsHow do I convert the php array values to the "uint" type of C#?
I need to take each value of the index of the array and convert it to return the same thing that returns in C# when we use the function (uint). <?php $arr = []; $codigo = intval(123456); $v =…
-
0
votes1
answer44
viewsProvenance of calculation
I cannot understand why you are giving 0.00 for the calculation, and if I change the order of the calculation of the expected value, the calculation has only division and multiplication. import…
-
0
votes2
answers161
views -
0
votes1
answer69
viewsHow to make strftime accept a Std::string?
I put together a small example of how I tried to do it, but the string is empty, not receiving the value. IMPORTANT I want to change only the strftime(). I tried to use, unsuccessfully…
-
0
votes2
answers43
viewsDivision does not display numbers after the comma
My algorithm in all tests println(), is working and in logic also however, the numbers after the comma it does not demonstrate. public class Exe27 { public static void main(String[] args) { // TODO…
-
0
votes1
answer36
viewsData Modeling
Good afternoon, you guys, I am studying Data Modeling and I was left with doubt regarding how the data should be specified, for example what determines in a code if I use a string or an integer for…
-
0
votes1
answer204
viewsCall a function that returns an array C#
I need the user to enter a number that will be the amount of numbers to be calculated, for example: if I type 4, there will be 4 different numbers to do a given action (add, subtract, multiply or…
-
0
votes1
answer69
viewsTypes like list and str are all primitive types?
Lists, tuples, dictionaries, integers, float, bool, etc. are all primitive types or composite variables are different?
-
0
votes1
answer54
viewsError "Argument of type is not Assignable to" in function with Rest parameters in Typescript
I got a guy Role which must be a roles object key and a function that returns all keys: export type Role = keyof typeof roles; export function allRoles(): Role[] { return Object.keys(roles) as…
-
0
votes3
answers95
viewsPass Enum value per method parameter
I have a value that stores the status of an element. For example: 1 - sending 2 - Cancelled 3 - Error. The value that will be saved in the database is the numeric value. I have a method that sets…
-
0
votes0
answers12
viewsCannot compare variables in C
My code should recognize the character "(". But unfortunately it does not recognize, and I do not know why. Breakable Ahead starts with "(", but when I compare it to '(', it falls on the last Esol,…
-
-1
votes2
answers928
views -
-1
votes2
answers224
viewsFunction values returning Undefined in Javascript
var const1 = function (a,b,c,d){ return (a*b+c-a)/d; { const1(10, 2, 2, 10, 2); console.log('a = ' + const1.a); console.log('b = ' + const1.b); console.log('c = ' + const1.c); console.log('d = ' +…
-
-1
votes1
answer279
viewsjava:7: error: invalid method declaration; Return type required
Name of the complete error: Cliente.java:7: error: invalid method declaration; return type required public cliente() { ^ Code I used: import java.net.Socket; public class Cliente extends…
-
-1
votes2
answers92
viewsZeroes only appear in the division
The result of division is only zero, which is wrong? #include <stdio.h> void main() { double Nota1, Nota2, MediaPond; printf("Escreva a nota 1: "); scanf("%f", &Nota1); printf("\nEscreva a…
-
-1
votes1
answer90
viewsConvert int to str for loop
I would like the variable of input() retain its type int were only converted to string when exclusively entered with’s' digit so that I can exit the loop, without changing the while, there is some…
-
-1
votes1
answer36
viewsInvoking methods within an Arraylist does not recognize the object method
I try to invoke the method through the method get().getNome(), but says that the method does not exist.…
-
-1
votes2
answers72
viewsInitialize object with defined type without specifying each value
I would like to initialize an object without setting each value in Typescript Let’s simulate a simple situation where we have the Car Object: export interface Carro { QuantidadePortas: number,…
-
-1
votes1
answer59
viewsThe parameter of my function, when 1, assumes Boolean value and when False assumes Number value. How do I fix this? Javascript doubt
I’m right at the beginning of my studies with JS, so I got a little lost in this exercise. I need to type check the single parameter of the 'check' function. When it is True, it returns False and…
-
-2
votes2
answers116
viewsProblem to send values of type 11.50 to SQL Server database
I have a problem formatting values type R$ when sending to the data bank 11.50 in the data bank is type 1150. This condition is from the send button to the database has a database management class…
-
-2
votes1
answer88
viewsWhy does a variable passed to function not keep the changed value when it exits the function?
I want the variables latitude and longitude to be updated, but only the variables lon and lat are being changed. I cannot add latitude = latitude - 1 or longitude= longitude + 1.…
-
-2
votes2
answers68
viewsComparison of numbers read with "io.read()" does not result in true as expected
I tried to put 1 and the second print was not. If I change x=io.read() for "x=1" it works normally Follows the code x = io.read() if x ~= 0 then print(x.." diferente de 0") end if x == 1 then…
-
-4
votes3
answers1025
viewsWhat types of data exist in Mysql for storing text and integer numbers?
The attribute I want to store refers to a class, the code of this class must contain integers and letters, and it is a primary key attribute. Example of value I want to store: SI3P39
-
-9
votes1
answer127
viewsWhat are types in the return of a method?
I used PHP and I’ve never seen it, we know there are types of return double, float, int, boolean. In Java when we want to return one int I’ll tell you what: public int soma(int numero1,int numero2)…