Questions tagged as 'tipagem'

1
answer

How to set the parameters in the parameters that should be sent?

Gross example of what I want (which does not work): # -*- coding: utf-8 -*- def a(int(b), str(c)): # Isso não funciona, mas quero algo assim. print('Isso é um Numero: %i' %b) print('Isso eh uma String: %s' %c) a(10, 'Texto') # -*-...
asked by 09.07.2018 / 04:33
1
answer

Print pre-defined phrases, randomly in C

Hello, I'm a beginner in programming and am learning to program in C. I want to make a program that has some already defined phrases. Ex with vectors: char vet1[100] = {"Hello World!"}; char vet2[100] = {"segunda frase"}; ... and wit...
asked by 05.06.2017 / 15:25
1
answer

Column type for support table

I have a client table and would like to create a support table to avoid creating many columns (address, phone, telephone1, email, email1, email2, car nameplate, mother name, etc.). The support table consists of the customer code, field and va...
asked by 05.04.2016 / 19:58
1
answer

Comparing a variable with 1 is the same as comparing with true?

I have the following code: $(function() { var logado = _userdata["session_logged_in"]; if (logado == 1) { $('#rankPersonalizado').after('Você está logado.'); } }); Here: if (logado == 1) { 1 means that it...
asked by 10.10.2015 / 16:48
1
answer

Why use data type and not just use Varchar? [duplicate]

I'm manipulating some databases where the vast majority of columns are with data type VARCHAR for fields like Date, Price, Total Value, Birth, Date / Time, and so on. Briefly, virtually everything is in varchar. At least the tables t...
asked by 01.07.2017 / 07:55
1
answer

Doubt about getSource () instanceof

Instanceof is a binary operator that tests whether an object is the subtype of a given type. Ex: Object fonte = e.getSource(); if (fonte instanceof JButton){ ... } If getSource () returned information from a JButton the result of the...
asked by 09.12.2015 / 15:18
0
answers

D3.js selection type

I'm developing a script using the D3 lib to draw a graphic, but I wanted to make a method for coloring the "Axis" of my chart and for that I need to pass the selection to a method, just like the color I want "paint" only I am not able to use the...
asked by 11.12.2018 / 18:37
7
answers

Best data type to work with money?

I'm developing a project for commercial automation, using PAF-ECF and everything else. What would be the best data type to work with SQL Server and C # for money issues? Especially in relation to rounding and truncations. I imagine the bes...
asked by 13.02.2014 / 23:33
1
answer

What is the correct way to save an IP in the database?

How to save both types of IP the IPV4 and IPV6 in a MySQL database? What is the correct typing and column size? Any other comments? I get the IP through $_SERVER['REMOTE_ADDR'] with PHP.     
asked by 25.10.2017 / 17:05
1
answer

What is the correct type for storing phone and address? [duplicate]

As the title says, what is the correct type and the correct way to store phone and address, according to database normalization ? In the case of telephone, what is the correct type to store, the landline and cell phone? With formatting ma...
asked by 29.09.2017 / 15:49