All Questions

2
answers

Declare type of data structure

#include <stdio.h> #include <stdlib.h> #include <conio.h> struct estudiante { int ced; int aniocarrera; char grupo; }; estudiante e; //<-error: unknown type name 'estudiante' int I; void ingresar(estudiante* e) {...
asked on 01.09.2017 / 20:47
2
answers

How to determine the time elapsed until midnight

I need to determine the time until midnight. These calculations are correct: From 11:00 am to 12:00 pm = 01:00 From 00:00 am to 11:00 pm = 11:00 From 11:00 am to 01:00 pm = 02:00 But when the next time is calculated the result is...
asked on 25.08.2017 / 15:17
1
answer

JS - alternative to return false?

More than a question, it's a question that I want to read from those of you who have been bumping heads with this for a long time. I am in JavaScript, I am doing a form validator and I see myself in the situation that I want to cut completely...
asked on 01.09.2017 / 11:48
1
answer

NoReverseMatch and Post Token in the URL in Class Based Views

I'm trying to do a simple "edit and delete" with views based on Django classes. The problem is that I'm getting these errors with UpdateView and DeleteView . One occurs when I want to redirect to its DetailView after the...
asked on 30.08.2017 / 20:53
2
answers

factorial of a number without overflowing the long variable?

I have a code that performs permutations, and at first seems to work, the problem is that when you enter a number greater than 20 the results are erroneous and as I read and it is because they leave so many result characters that are not possibl...
asked on 01.08.2017 / 07:59
1
answer

How to show zeros to the left of a binary number in java?

I am trying to convert a hexadecimal number into binary and count the positions where the 1 are, but at the time of doing so, it does not show the 0 on the left side, so the position is affected. For example, I have the hexadecimal number 28...
asked on 26.07.2017 / 03:39
2
answers

How to pass data in DataGridView to Other DataGridView?

I have two DataGridView in this way: What I need is that the CheckBox that are selected from the first DatagridView when pressing the Button "add" are passed to the second DataGridView .NOTA: The total...
asked on 31.07.2017 / 15:22
3
answers

Replace point by comma in Python 3

Hello, I have a list of decimals that I converted to String, in order to change the points by commas. But with "replace" it does not allow me to make the change, I'm doing it this way: for i in range(len(UCL)): #UCL de corte UCL[i].re...
asked on 25.07.2017 / 21:42
1
answer

Connect SQL Server database with Python

I have this code that I started, to be able to connect to my server of SQL Server by means of Python in Ubuntu , all the components of: server, user, password, base already make sure they are correct. But when I ru...
asked on 25.07.2017 / 22:16
1
answer

Add all the values and add the value at the end

I have the following code in Python: import numpy as np from math import pi t = np.linspace(-2*pi,2*pi,16300) #Creo un vector de 16300 puntos de -2*pi a 2*pi x = np.sinc(t) print(x) I want to algebraically add all the points of x and add t...
asked on 25.07.2017 / 18:38