Questions tagged as 'tipagem'

1
answer

How do I correctly pass the data type by PDO

In the php snippet below, what kind of PDO :: PARAM should I use? $cnx = new PostgreSQL(); //Classe de conexão do banco $data = '2015-02-13'; $select = 'SELECT * FROM eventos WHERE "data" = :data'; $query -> prepare($select); $query -> b...
asked by 13.02.2015 / 18:33
2
answers

Find the maximum and minimum number in list in a string

I have the following file: a = '1 0 10 2 3' I want to print the highest and lowest values, so I used max() and min() but it only counts the unit. I did this: a='joao 1 0 10 2 3' b=a.split() c=max(b[1:]) print(c) c=min(b[1:])...
asked by 29.11.2018 / 22:17
1
answer

How to declare an integer variable in C #?

I'm learning C # to migrate a system in VBA to C #. I'm really enjoying the .Net language. How do I declare a variable of integer type?     
asked by 30.06.2016 / 23:41
4
answers

Cast of byte type integer

I have the following code: public class Principal { public static void main(String[] args){ int i = 10; byte b = 5; b = (byte)i; b += i; i = b; System.out.println( i ); } } I know the value r...
asked by 18.01.2016 / 19:53
2
answers

Why can not I assign a list of a more specific type than the declared type?

I have this class example: public class User : APerson { private string _userName; [DataMember] public virtual string UserName { get { return _userName; } set {...
asked by 21.09.2017 / 19:29
2
answers

Should I use int_least8_t or int_fast8_t?

I'm studying the type boundaries that c ++ 11 brought and noticed that there are officially several types of integers. In addition to the common int statement I can now declare: int8_t int_fast8_t int_least8_t In this question y...
asked by 28.02.2017 / 17:10
4
answers

When a String is considered a primitive type in web development?

I was in doubt in a class when the teacher said that a String type was considered primitive! But I've learned in Object Oriented Programming that they're just primitive: Byte: 1 byte. Short: 2 bytes. Int: 4 bytes. Long: 8 bytes. Float:...
asked by 29.08.2015 / 23:21
1
answer

Type conversion in Python

When writing some didactic examples in Python 2.7, I came across the following situation in the following program: a = 0b101 b = 0b111 c = a+b print c The result of this program is 12 (decimal). If I want a binary value to be displayed in t...
asked by 01.05.2017 / 21:10
1
answer

What kind of data do you use to store URIs in the database?

What kind of data do you use to store URIs in the database, taking into account an undetermined or very large URI length?     
asked by 10.09.2016 / 03:00
1
answer

How does Python handle static and dynamic variables?

Static variable, is the one where we have separated the memory of the computer already beforehand in a defined way (I read this in the book "Basic structure of data"). The dynamic variable is the one in which it appears in the execution of the p...
asked by 16.10.2018 / 18:22