All Questions

2
answers

Encryption and its bits. How to explain?

I have this table of encryption taken from a book, however I did not understand how it works. Why is the number of alternative keys 2 raised to 32? Why does each bit fit 0 and 1? Why is the number needed to decrypt the number of bits minus...
asked on 09.06.2015 / 19:53
2
answers

What is the inverse of: visible in jQuery?

The :visible selector in jQuery is used to search for an element when it is visible. Example: $(this).find('li:visible').addClass('color-red'); However, when trying to search for invisible elements, we do not have the :invisibl...
asked on 11.08.2015 / 14:29
2
answers

Sql - Delete records in bulk - Delete in bulk

I have a table with about 4 million records. What is the best method to delete all of them to get the best time? Does Indexing help anything, since it is just a reference for finding data? OBS 'DELETE FROM tb_name;' // Demorou em torno d...
asked on 09.10.2015 / 15:39
3
answers

Program does not read scanf

I'm doing a school job, doing a blackjack (21) in C. In a certain part of the program, I created a while (while the option is yes) to show the cards, the score and ask if the user wants to bet again (yes or no) at the end of the while. Except th...
asked on 12.12.2014 / 16:28
3
answers

How to use gets () in C ++?

How to use gets() in C++ , when prompted to type and store in a variable type char ?     
asked on 30.05.2015 / 19:20
2
answers

How to get all the constants of a class?

My project has a helper class with multiple constants representing pre-defined roles . public static class RolesHelper { public const string ModuloUsuarios = "Usuarios"; public const string ModuloMenus = "Menus"; public const st...
asked on 07.02.2017 / 18:37
4
answers

In Object Orientation, does an inheritance violate the encapsulation?

Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides , write the following statement: "... inheritance violates the encapsulation." Below is the paragraph that contains this statement:    " ... class inheritance also has some...
asked on 22.03.2016 / 19:36
2
answers

How do I use nested replicates to do this example?

* ** *** **** ***** ****** ******* ******** ********* ********** How do I do this with nested repeats using% of JavaScript, or in VisuAlg? For you to have an idea of what the code would look like: for(var linha = 0; linha < 10; lin...
asked on 12.09.2016 / 23:05
3
answers

Uploading file with php

I'm using the following code: $uploaddir = '../vagas/'; $uploadfile = $uploaddir . basename($_FILES['img']['name']); echo '<pre>'; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "Arquivo válido e enviad...
asked on 19.10.2015 / 00:46
7
answers

How to test if an EditText is empty?

I would like to know how do I test if an EditText is empty or populated in Android. For example, I want to make an app that will perform a registration, but there are fields that can not be empty so I would like to know how to do this test, in...
asked on 12.09.2015 / 02:20