Questions tagged as 'algoritmo'

1
answer

How to convert image from gray to RGB?

Converting an image into RGB to grayscale is relatively easy, just do a linear (or average) combination of the 3 channels. For example: Gray = 0.3*R +0.59*G +0.11*B By the above expression you get a matrix in shades of gray. My question...
asked by 13.02.2018 / 17:39
2
answers

The contents of the array are not being printed, but the reference to the object [duplicate]

Hello, I'm making an algorithm that prints only repeating elements, eg: {2,2,3,4,5,5} -> {2,5} I do not know if my algorithm is correct, but I can not see the array itself, something like [I @ 71e7a66b. Can anyone help me? public class main...
asked by 19.02.2018 / 14:05
0
answers

How to detect Ajax requests of any kind with Jequery?

Is there a way to identify if a request any Ajax request with Jquery? I've implemented a timeout in my application, to move the user off when the application goes idle. Idle time is refreshed every time I make a request to my server. My in...
asked by 25.01.2018 / 17:58
0
answers

ShellSort C ++ Algorithm

Good afternoon everyone! Can someone help me by explaining this code to me in c ++: #include < stdlib.h> #include < stdio.h> #include < ctime> void shellSort(int numbers[], int array_size); int main(int argc, char const* a...
asked by 02.12.2017 / 20:08
5
answers

Simple solution for Fibonacci algorithm

I have this statement in hand:    Given the Fibonacci sequence 1 1 2 3 5 8 13 ... n, write an algorithm to generate the sequence up to the nth term, which should be provided by the user. For example, if the user entered the number 40, 40 numb...
asked by 09.06.2017 / 05:46
0
answers

Browse Binary Tree

I would like to make a function in PHP that runs through the entire binary tree, so I made this code. function getTree($id, $count, $conn) { if ((!isset($count)) || ($count = null)) { $count = 1; } $query = $conn->prepare("SELECT logi...
asked by 10.09.2017 / 18:55
1
answer

How to use the Cycle Check Algorithm in Graphs?

Hello, I would like to know how to use the Cycle Check Algorithm in Graphs to find a cyclic condition, if you can put me the algorithm usage in this Graph below:     
asked by 09.08.2017 / 16:03
2
answers

How to create a category tree in C #

Database I have a database with product codes and services (for public contests) and wanted to find a way to create a "tree" for those codes. See how I have configured my database in the following image: ObjectiveTheParentIDisthecolumnwhe...
asked by 09.06.2017 / 17:28
1
answer

Problems with code from a priority list in C

I'm creating a priority list in C (topological ordering) using vectors and within those vectors a linked list pointing out who has to come before whom. But it's giving the pointer error and I really can not figure it out. #include <stdlib.h...
asked by 14.06.2017 / 00:39
2
answers

Calculation of similarity between words with Java

For two string A and B, we define that the similarity of these strings is the length of the prefix that is common to both. For example, the similarity of strings abc and abd is 2, while the similarity of strings aaa...
asked by 24.05.2017 / 23:14