Questions tagged as 'algoritmo'

1
answer

(JAVA) Help in order of sorting (Selection Sort and Insertion)

   / * EXERCISE: Write a method that puts an unordered sequence of n integers in ascending order. Home   (a) Using sorting by selection   (b) Using insertion ordering * / I tried to solve the exercise, but I'm getting that result: Or...
asked by 03.07.2017 / 05:18
1
answer

1) Write a function that receives two integers, positive, and determine the product of them, using the following multiplication method [pending]

1) Write a function that receives two integers, positive, and determine the product of them, using the following multiplication method. a. Divide, successively, the first number by 2, until 1 is obtained as a quotient; B. Simultaneously, fold...
asked by 03.04.2017 / 01:55
1
answer

How to calculate the year from the number of days?

Without using any library, and ignoring small scientific facts about the rotation of the earth. The function receives the number of days and must determine how many years have passed judging the following: Multiple years of 4 have 366 days...
asked by 04.05.2017 / 15:42
2
answers

Visualg - Boolean Result

I mounted this algorithm in Visualg: algoritmo "semnome" var inicio se 3 = "a" entao escreva("igual") senao escreva("diferente") FimSe fimalgoritmo And I did not understand, why is the condition returning true?     
asked by 07.04.2017 / 14:41
1
answer

List operations (static) c ++

Good afternoon guys, I'm having trouble understanding operations on static lists, I know how to create and display, but how do I remove and search within the list, sort algorithms I've already understood some, can help me, please? I'm kind of des...
asked by 12.03.2017 / 20:57
0
answers

Dynamic date mask in JavaScript [closed]

Recently I had to perform a mask for dates with autocompletion, I searched and did not find answers to solve my doubts. When you type '4' in the first field, you should already enter '0', and so on. Well, I was able to come up with a code...
asked by 12.02.2017 / 12:19
1
answer

Algorithm for popular tables in PostgresSQL

I'm writing an algorithm to populate all tables in a database in Postgres. I already get popular all tables that do not have a relationship , as follows: I get all the tables with the following query: SELECT table_name FROM information_s...
asked by 26.12.2016 / 16:33
3
answers

When should we declare a method as static?

As a general rule it is considered bad programming practice to use static methods. But in what situations is it justified (or not justified)? For example : If I were to create a simple method to read a text file: Creating this method in...
asked by 11.04.2014 / 16:29
5
answers

Remove last comma from an array

In this code below I have an array that returns me a comma at the end  exe: '98602', '98603', '98604', How can I remove this comma? if (isset($_POST['checkbox'])) { foreach ($_POST['checkbox'] as $key => $value) { $id = mysql_re...
asked by 06.03.2015 / 16:09
0
answers

How to detect fraud through a text field? [closed]

I must make a simple service contracting program with service evaluation completed and deal with fraud in this hiring. Fraud in this case would be a server that would create multiple profiles that hire it and give ratings to increase its reputat...
asked by 11.09.2016 / 05:05