Questions tagged as 'algoritmo'

1
answer

How to create random filenames with ffmpeg?

I'm compiling a custom version of ffmpeg, and I want it to generate random file names but it does not support this, so I need some function that does this with X the quantity is not important, as long as it is above 10 and below 20), if pos...
asked by 30.10.2016 / 18:37
1
answer

Search for text in a String as a "like"

I want to do a text search, like the ones I do in MySQL. Ex: LIKE "9% 4" I tried to implement a find_if() , but without success. #include <iostream> #include <string> #include <algorithm> using namespace std; int m...
asked by 12.07.2016 / 09:44
1
answer

Test output value to see if it is INTEGER

I set the function below to check whether the output value is integer or real. funcao menu_8():inteiro var logaritmo :real inicio para contador de 0 ate 12 faca logaritmo <- ((log(i[contador])) / (log(2)))...
asked by 17.06.2016 / 16:32
1
answer

Database in tuple

I need a code that receives data (values) and prints them according to its key. Each entry corresponds to a hypothetical person's data, which contains Age, Name, Sex, Marital Status, Number of friends and Number of Photos. I am writing using a d...
asked by 27.04.2016 / 15:09
1
answer

Adding positives in an interval using just while

I need to write a program using a loop ( while ) that receives two numbers as input, and can be positive or negative and not necessarily in ascending order, and the program should print the sum of all positive numbers in that range. I star...
asked by 19.03.2016 / 15:26
1
answer

How to create an indeterminate algorithm using visualg?

I need to create an algorithm that returns different values each time I run, even though I get the same input values. It aims to solve an issue where I need to analyze the generation of a certain living being who is more likely to have no chi...
asked by 03.05.2016 / 20:16
4
answers

How to print multiples of N in a range?

The program should receive three N, A, and B values as input, and should print the multiples of N contained in the interval between A and B. I am doing this, but it is going wrong: N = int(raw_input()) A = int(raw_input()) B = int(raw_input())...
asked by 04.04.2016 / 14:01
1
answer

How to generate an array of 3 columns where for each column there are 3 different possibilities?

The problem is this: In a vector I have 3 sets (A, B and C). Each set can have up to 3 distinct values (0, 1 or 2). That way I need to generate all the possible combinations for this case, with formula 3³ = 27 possibilities. Example: print...
asked by 01.03.2016 / 01:38
1
answer

How to implement a linear regression algorithm in python?

I'm running a job in college and would like to implement a function that calculates a regressão linear . Given the points and the number of desired exponents, I want as a return the coefficients of the equation. For example, given the poin...
asked by 05.11.2015 / 23:35
1
answer

Bundle / Cache of CSS files in PHP

I'm developing a mechanism in PHP that performs a cache of CSS files in order to decrease the number of requests of a page and the loading time. The engine evaluates in a first entry whether there is any cache file on the...
asked by 10.08.2015 / 13:44