All Questions

1
answer

Error with Random in JAVA

I get this exception, related to Random. Exception in thread "main" java.lang.IllegalArgumentException: bound must be positive at java.util.Random.nextInt(Random.java:388) at gestorgrupos.Grupo.opcionAleatoria(Grupo.java:78) at ges...
asked on 11.05.2018 / 13:07
1
answer

Bootstrap 4 Center vertically and horizontally

With the bootstrap classes, I achieve to center both div horizontally, but nevertheless I also wish that they are centered vertically, that they remain in the center of the screen, I attach the code that I have ... <!doctype ht...
asked on 29.06.2018 / 21:19
3
answers

BASH: compare two arrays with IF

I have the following problem: I compare two arrays, the first is a file and the second array stores the previous data from the first array. The idea is that when comparing the arrays a repeated data is not inserted to perform the operation on...
asked on 23.05.2018 / 21:07
1
answer

await and async replace the promises?

In the following code works async and await, my doubt is that if I use async it is no longer necessary to use promises? async function getMain() { var film = 'hola mundo' console.log(film); return film }; getMain()....
asked on 08.09.2018 / 04:57
2
answers

SQL using LIKE within a variable

Good friends, I want to know how to use like inside a variable to know if there are 6,7,8 numbers. Does anyone know what would be the correct syntax for this case? @listaMenus = '4,5,6,7,8,9,10' if (@listaMenus like '%8%' or '%6%') begi...
asked on 10.09.2018 / 22:57
3
answers

How to compare the field of a current record with the next, in order to know if it is repeated or not?

I have the following query: SELECT pa.codigo, @rownum:=@rownum+1 AS nro FROM presupuestosa pa , (SELECT @rownum:=0) r WHERE pa.obra=18 AND pa.empresa=1 ORDER BY codigo ASC I wish that for each repeated code field, I can save the value 1...
asked on 29.07.2018 / 23:22
3
answers

Format percentage in C #

I'm having a little problem with formatting numbers by percentage, I have a List<decimal> that has these elements 0.006250 0.010000 0.012500 0.016600 0.025000 0.050000 I intend to get back: 0,0625% 1% 1,25% 1,66% 2,5% 5% I...
asked on 03.09.2018 / 20:19
1
answer

Use Task with database connection in C #

I am developing a task that basically executes a series of stored procedures for each branch that exists in our company, for this I use the task that comes in the .net framework 4.0 but when executed 50 times the procedure throws an exception in...
asked on 07.05.2016 / 01:39
1
answer

Error opening the Mac Terminal

For some time now, my MAC terminal has given me an error every time I open a new screen of my terminal, I have been searching for information from Google and the truth is that I have not found anything convincing, I show you the error: -bash...
asked on 10.05.2016 / 19:34
1
answer

Join tables with JPA

I request your help because I need to make a union of two tables in a query in order to create a list, but I do not know how to do it, this is the query that you create: SELECT p.id, p.nombre_departamento, p.ciudad_departamento,...
asked on 15.05.2016 / 17:57