All Questions

3
answers

Is it possible to have more than one Primary key in a table?

I have a gym and I'm using Pk so all gym members have their own ID. Can I use other PK in the same table? For example: to prevent Número da Matricula or even CPF/RG are repeated, can you add PK to them?...
asked on 20.06.2017 / 20:00
3
answers

How to create a static method using Kotlin?

In JAVA when we want to create a static method, we use static . See: public static String getDragonGlass(){ return String.valueOf("All the dragon glasses."); } And in Kotlin , what better way to represent a static method?     
asked on 08.08.2017 / 15:27
3
answers

Select Active Lot

I am studying about queries in SQLServer and I have the following scenario: I have a batch table that has the following fields: Lot Table Id INT ProdutoID INT Preco SMALLMONEY Inicio DATETIME Fim DATETIME Product Table (Produc...
asked on 16.08.2017 / 00:15
2
answers

Text on image [duplicate]

Hi, I'm new to this and I need to know how to make a text appear on the img by hovering a mouse over it for a school project, can anyone help me?     
asked on 12.08.2017 / 02:41
2
answers

Delete a macro using another

How to program one macro to exclude another? It would be something like, like when, do I need to call? Ex.: Sub callmacro() Call macro1 End sub And, even better, if I want to program it to self-delete? Eg: Sub macro1() Dim i as... Fo...
asked on 17.02.2016 / 16:35
3
answers

Jquery: calculate number of ballots of the service value (deliver as few numbers as possible)

I am solving an exercise that I am having doubts, it is referring to a bank system, in which when presenting the value of draw, I must receive the smallest number of possible notes for the indicated value, I must also use the recursive method. H...
asked on 25.06.2017 / 00:12
2
answers

Save values in Hashtable

When I save the value of this Hastable it gives me error. Follow the code: Hashtable ht = new Hashtable(); ht.Add("index", index); ht.Add("tipo", "1"); string tipo = ht["tipo"];     
asked on 09.06.2016 / 16:58
5
answers

use if on sql server

I have 3 tables in my database, CUSTOMERS, DISTRIBUTORS and EXPORTS and I have a production order table where I get the type of customer (Distributor, customer or export) and the ID of each one. the doubt is: how can I put a if in sele...
asked on 10.06.2016 / 19:21
4
answers

Generate random numbers that do not repeat

How can I generate a large string of random numbers that do not repeat? I have to generate 10 000 thousand numbers from 1 to 1 million and save to a file and they can not be repeated. Although the sequence is large, it has some repeating numb...
asked on 21.06.2016 / 05:11
2
answers

Show more precision in C ++

I have this program: int main(){ double x=2; cout << sqrt(x); } I would like to show the result as accurately as possible. Thanks!     
asked on 22.12.2015 / 20:21