Posts by gato • 22,329 points
373 posts
-
6
votes1
answer640
viewsQ: What is the role and responsibility of HTML, CSS and Javascript technologies in creating the front end?
With these three technologies HTML, CSS and Javascript can be developed all front-end or client-side of a particular website. Therefore, I would like to know what is the role and responsibility that…
-
8
votes3
answers747
viewsQ: Is malloc typecast recommended?
I have read that it is not advisable to do the Typecast of malloc when we are allocating memory to a new pointer variable, and many websites and books teach this practice in memory allocation, it…
-
7
votes1
answer5232
viewsQ: What do the terms MDI and SDI mean regarding the software interface?
What do the terms mean MDI (Multiple Document Interface) and SDI (Single Document Interfaces) regarding the software interface? I read about it, but I’m still confused about the terms, perhaps for…
-
4
votes1
answer5079
views -
5
votes6
answers41177
viewsA: How to find the position of an item on a list?
You can implement your algorithm using loop, in this case the while. Look at this example: lista = [] i = 0 quantidade = int(raw_input('Qtd: ')) while (i < quantidade): numero = input("Valor: ")…
-
1
votes1
answer281
viewsA: What’s wrong with my code? It keeps giving error "[Error] Ld returned 1 Exit status"
The second function parameter scanf() (see her documentation) is the memory address from which the value of its variable is stored, to obtain its address the & commercial. See your modified…
-
12
votes1
answer2664
viewsQ: What are the characteristics of structured programming?
I would like to know what are the characteristics that define the paradigm of structured programming, and what is the difference of this paradigm with the paradigm of procedural programming? Both…
-
3
votes2
answers5194
viewsQ: What is the purpose of the "persistence.xml" file?
I’m studying about the Hibernate, And along the way I came up with several doubts, one of my doubts, and that is important for my learning, is about the purpose of the archive persistence.xml which…
-
2
votes1
answer4566
viewsQ: How do I resolve the "No Persistence Provider for Entitymanager named" error?
When I try to execute the method Persistence.createEntityManagerFactory("Aluno") class Persistence i get the following error: run: abr 04, 2016 9:11:30 PM org.hibernate.ejb.HibernatePersistence…
-
1
votes1
answer819
viewsQ: How to make a basic configuration in the persistence.xml file to access a database in SQL Server 2008?
I searched about how to set up the file persistence.xml in a basic way, however, I was even more confused about this configuration. So I would like to know how I can make a basic configuration in…
-
2
votes1
answer199
viewsA: How to provide a specific amount of strings to be tested?
You can ask the user to enter the amount of words to be read, for this, you can use the variable quantidade which will store the amount of words, and then set a variable i which will be incremented…
-
2
votes1
answer1827
viewsQ: Is there a difference between bool and Boolean?
Is there any difference compared to the types bool and Boolean? It seems to me that both have the same characteristics. I would like to know if there are differences between these types. Example of…
-
8
votes2
answers881
viewsQ: How to avoid code repetition between classes?
To report on my application I have created several classes, and each class is responsible for a report, however, there is a repetition of a lot of code by those classes that I would like to avoid,…
-
14
votes2
answers1007
viewsQ: How does a method that can receive multiple parameters work?
According to the C documentation#: The method String.Format is responsible for converting the value of objects in strings based on the specified formats and inserts them in another character string.…
-
1
votes2
answers594
viewsA: Application of Bubble Sort
You can implement the Bubble Sort using two for and an auxiliary variable which in this case is the variable a, and apply the method of substitution of values by the largest by the following…
-
7
votes2
answers692
viewsQ: What is the purpose of the super command when used in the parameter declaration of a method?
In Java the command super has the function of calling the superclass constructor. However, in the method declaration forEach() class ArrayList it is used in a different way than usual, see the…
-
3
votes3
answers2173
viewsA: How to select all tables in mysql
You can use the show tables for this purpose, see an example: show tables from minhaBaseDeDados; He accepts the clause from, and with it you can specify your database.…
-
12
votes1
answer738
viewsQ: What is Application Rules and what are the differences with Business Rules?
According to the definition of this website: Business rule is what defines the way to do business, reflecting internal policy, the defined process and/or the basic rules of conduct. That is, it is a…
-
5
votes2
answers396
viewsQ: How to play relationship in Objects?
According to the definition of this website: CARDINALITY Is the maximum and minimum number of occurrences of an entity that are associated with the occurrences of another participating entity…
-
6
votes1
answer947
views -
5
votes2
answers1863
viewsQ: What is the purpose of the default when used in the signature of a method?
Within the interface List<E> of Java there is the method replaceAll() the purpose of which is to replace all occurrences of a specified value of a list. However, in his signature he uses the…
-
4
votes4
answers11902
viewsA: How to validate a standard EAN 13 barcode?
EAN13 Barcode The EAN13 barcode belongs to the GS1 System which is an official model of standardization of the processes of product identification and commercial management, which exists since 2006,…
-
1
votes0
answers90
viewsQ: How is the database of a WEB application created and configured?
How is created and configured database of an application WEB? Routines responsible for the creation of the database and all CRUD in the application itself when it is first started on the server or…
-
1
votes1
answer357
viewsA: Formatting of data output
If you are working with four zeros left, you can use the following expression: %04.0f it indicates that the left side of the comma must be filled with four zeros and the right side must not contain…
-
3
votes1
answer1902
viewsA: I can’t get Joptionpane on Eclipse
Perform the following procedures to resolve this problem: Menu "Window" -> "Preferences" In the window that opens, expand "Java" -> "Compiler" and choose "Errors/Warnings" On the right side…
-
3
votes4
answers11902
viewsQ: How to validate a standard EAN 13 barcode?
I would like to know how to validate a standard EAN 13 barcode like this 9788576356127, this code has 13 digits and the criteria for validation are: Perform the check digit calculation; Check if the…
-
3
votes2
answers277
viewsA: Display the first 5 divisional numbers by 3, discarding the number 0
To display the first 5 numbers just count the number divisible by 3, when the quantity is equal to 5 ends the loop, see the example: #include <stdio.h> int main(void) { int cont = 0, numero =…
-
23
votes3
answers6210
viewsQ: What is the purpose of the symbol :: in Java?
I implemented a method that sums all the numbers in a list of the kind List<Integer> as follows: int soma = 0; for (Integer num : numeros) soma += num; return soma; However, the Netbeans IDE…
-
7
votes2
answers515
viewsQ: Are Ltenatives for complex conditions in a lambda expression?
With lambda expressions it is possible to filter elements from a collection of objects, creating a data stream according to the criterion passed in the expression for the method filter(), This…
-
20
votes4
answers2408
viewsQ: What is buffer overflow?
Whenever I use the function gets() the compiler returns me the following warning: Function is Dangerous and should not be used Translation: this function is dangerous and should not be used I hear a…
-
5
votes1
answer55
viewsA: Where increasing condition
Use the command in, it will check if there are occurrences in the fields, and return the record where there have been occurrences, the purpose of it is to replace several clauses, where the command…
-
2
votes2
answers574
viewsA: How to find out if a number is subnumber
With the method find you can check if occurrences in the string target, see the example below: if '101'.find(str(011001101)): print('101 eh sub numero de 011001101') I converted to string the number…
-
1
votes2
answers463
viewsA: Display empty directories only with the ls command
You can use the following commands: find ~/meuDiretorio -not -empty -type d -ls The above command will list only folders that have some content. The command find serves to search folders and files,…
-
6
votes1
answer3474
viewsQ: Functional requirements, non-functional requirements and domain requirements, what are the differences between them?
Functional requirements in my understanding are those that describe what the system will do, ie the main functionalities of a system (I do not know if it is the best definition). See the example of…
software-engineeringasked gato 22,329 -
7
votes5
answers322
viewsA: Python how to print output
Use the method Join and the map. This also has the advantage of being portable between versions Python 2.x and 3.x. Take the example: l=[4,26,32] print(' '.join(map(str, l))) Exit: 4 26 32 Source:…
-
4
votes3
answers272
viewsA: Use of increments in C
The expression ++n increments the value and then returns the incremented value. And in the expression n++ returns first the value of n and then the value is increased. It is a subtle difference and…
-
12
votes3
answers2210
viewsQ: What is the purpose of the builder of an Enum?
In Java constructors are required to create an object in memory, i.e., to instantiate the class that has been defined. Meanwhile, I discovered that a Enum has a builder, but he is not a class, and I…
-
38
votes3
answers53541
viewsQ: How does the DAO Standard work?
I researched and read about DAO (Data Access Object Standard), but I’m not getting to understand how it works and how is its structure, it is also responsible for the business rules of an…
-
6
votes1
answer297
views -
3
votes3
answers1099
viewsA: How to keep the default Textbox look changing the value of the Readonly property?
Following the content of the link cited by @Felipe Assunção TextBox keep the look standard when property ReadOnly was set to true. Directly manipulating the events ReadOnlyChanged and…
-
1
votes3
answers1099
viewsQ: How to keep the default Textbox look changing the value of the Readonly property?
If the value of the property ReadOnly of a TextBox for false means that I can change the content. However, when the value is true content can no longer be changed, however, when we change the value…
-
4
votes2
answers1560
viewsA: Check that SQL Server is installed C#
One way to check whether SQL Server Local DB is installed is through the record HKLM\SOFTWARE\Microsoft\Microsoft SQL Server Local DB\Installed Versions already quoted in @daniloloko’s reply,…
-
1
votes1
answer29
viewsA: Stop Generator
A good way to deal with this is to use the Stopiteration, he is cast by next() of iterator, method to signal that there are no more values, in this case the use is within the method get_fruits(). It…
-
16
votes3
answers675
views -
3
votes4
answers385
viewsA: Obtaining the Rest of a Floating Point
You can make a cast to obtain the integer value of 1.13 that is 1, then just make this equation: partedecimal = valordouble - parteinteira to get the value 0.13, i.e., its decimal part. See the…
-
2
votes3
answers211
viewsA: Regex to ignore invalid file names
The expression below allows you to match only the alphabetic characters letters of A..Z and a..z and numbers 0..9 and the symbols -, _, . and the blank space , see. Expression: ^[\w\-. ]+$ To do the…
-
7
votes3
answers4285
viewsQ: Use of colon character ":" in Python
In Python there is the character colon :, therefore, what I understand of this character is that it is used in functions def soma(x,y):, conditional commands if soma > 100: and for classes class…
-
7
votes1
answer3570
viewsQ: What is the purpose of using inline functions in the C language?
I would like to know what is the purpose of functions inline in the language C? Is there any difference in performance or other characteristics that should be taken into account in comparison to…
-
8
votes2
answers10301
viewsA: How to give a SELECT in multiple databases at once?
You’ll need to use sp_addlinkedserver, see the documentation. Once the server link is established, you can build your own query, using the name of your database with another server. 1° Example…
-
7
votes2
answers8390
views