All Questions

2
answers

How to change the value of a variable through function in Python?

How can I change the value of a variable through a function? Here's an example of what you'd like to do: def func(t): t = 2 + 3 t = 7 func(t) print(t) The output of the print (t) function returns me the value 7 and not 5 as the desired...
asked on 04.08.2017 / 22:46
1
answer

Primary key return of an INSERT

I have tabela_x , where the first field ( campo1 ) is primary key and autoincrement . I make a simple INSERT : $ins = " INSERT INTO tabela_x ('campo2','campo3','campo4') VALUES ($c2, $c3, $c4) "; $con -> qu...
asked on 09.04.2018 / 14:16
1
answer

Classic Asp debug with visual studio 2017

I do not know anything of classic asp and appeared a demand where I have to do debugging of a classic asp application, since one of the filters are not working. And the response.write / notepad ++ will not help me in this case, because I already...
asked on 08.05.2018 / 19:15
3
answers

Search for tuple in an array

I have the following vectors: a = [('FI', 'SE'), ('SE', 'DK'), ('DK', 'DE'), ('DE', 'PL'), ('PL', 'BY')] b = [['NL', 'DK', 0], ['NL', 'DE', 0], ['NL', 'BE', 0], ['FI', 'SE', 0.054]] I need to go through the a vector and find it in the ve...
asked on 02.05.2018 / 20:00
1
answer

Store more than one value in a variable with &&

Can I store more than one number in a variable? For example: m= a&&b&&c&&d&&e I need to indicate which is the largest and the smallest number that the user entered, wanted a way to do this without having to t...
asked on 03.04.2018 / 16:02
1
answer

Add 1 minute to hour

I have a problem solving an exercise. It may be easy but I can not seem to find the right solution. I have the following class Time public final class Time { private final int hours; private final int minutes; publ...
asked on 06.07.2018 / 00:34
2
answers

How to make a ScheduledExecutorService launch a new task while the previous one is not yet finished?

I'm implementing a scheduler to run some threads on my system at x time intervals. The big problem is that if thread 1 still has not finished running, a 2 does not start, even its time having arrived. In the example below I "forced" this erro...
asked on 05.07.2018 / 21:34
2
answers

Color of the record, referring to quantity

I have a table with multiple records , and these have a " data " field. I generate a list of these records, I make the difference of days by comparing the " date " with the " current date ". Example: $dias = $data_hoje - $data_registro;...
asked on 04.05.2018 / 21:40
3
answers

function in R which also returns the execution time itself

I know there is Rprof (), but it seems rather inaccurate compared to the microbenchmark (). However, if I want to use the microbenchmark () I have to call the function 2 times, one to have the output of it and another to run the time of it (whic...
asked on 02.06.2018 / 23:42
2
answers

How to filter a HashMap returning another HashMap using Java 8 lambda?

The following code runs through Set and filters only objects that isActive() is true . public Set<InvoiceLineDocument> getActiveLines() { Set<InvoiceLineDocument> activeLines = new HashSet<>();...
asked on 15.05.2018 / 20:15