Questions tagged as 'algoritmo'

1
answer

Javascript script help SyntaxError: missing; before statement

Good night, I'm having trouble making if / else if / else conditions in javascript, in the course of js codecademy works, but when I try to do some algorithms in the sublime using the conditional, it gives the error described in the title. p> &...
asked by 18.03.2016 / 05:16
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

Algorithm to match department, category and subcategory of a DB with an incoming string?

From a nonstandard string, sometimes I get the department / category equivalent, sometimes equivalent to category / subcategory, sometimes equivalent to department / subcategory, sometimes department / category / subcategory ... etc. . I need...
asked by 23.08.2016 / 14:52
0
answers

How to convert wavelength to RGB?

Does anyone know of an algorithm that performs the conversion of a wavelength to RGB?     
asked by 30.10.2015 / 19:25
1
answer

Tool to Measure Java Software Performance

I would like to know if anyone knows of any tool to measure d esempenho de um algoritmo . I'll give you an example: I have two sorting algorithms, and I wanted to measure how much tempo , memória and etc ... each one spe...
asked by 07.06.2015 / 02:11
1
answer

Check items from a list in another list

I'm having a hard time making a method to check 2 lists. This method will receive a list that is the list that was added to the order and the purchase requisition ID to which that order was associated. The method calls another method that return...
asked by 30.10.2014 / 21:01
0
answers

Electronic distribution algorithm

I'm trying to think of a different way of doing electronic distribution. The way I did it was this: display the amount of electrons in each layer. However, in the distribution that I want (1s² 2s² 2p 6 ...) the order of the layers are not resp...
asked by 17.10.2014 / 04:28
2
answers

Create loop in templates with php

I'm having a hard time creating an algorithm to implement using loops in a simple template class. I have my class below, it gets an HTML file, looks for specific strings that are in this file from values of an array and replaces it wi...
asked by 16.05.2017 / 13:22
1
answer

Schedule Remains using Monte Carlo Method [closed]

I have little experience in Java and am trying to apply the Monte Carlo Method in Combinatorial Game Theory. I am trying to demonstrate the Method in the Undead Game where it will have to be solved using random steps. For the method to be effect...
asked by 13.04.2015 / 03:45
2
answers

Calculate the smallest element in a list

Given a sequence of integers (read via Scanner ), determine the smallest of these values. My code: import java.util.Scanner; public class MenorValorSequencia { public static void main (String args []) { Scanner sc = new Sca...
asked by 16.07.2016 / 23:22