All Questions

2
answers

How do I make a log file in which I save every event that I want from my system?

What I have is the following: Logger logger = Logger.getLogger("MyLog"); FileHandler fh; try { fh = new FileHandler(file_log); logger.addHandler(fh); SimpleFormatter formatter = new SimpleFormatter(); fh.setFormatter...
asked on 28.08.2017 / 18:18
1
answer

Random number of 0 and 1 in C

I need to generate a random number of 0's and 1's in C. Try to make two variables with random numbers, that of 0's and 1's, and the other so that it is the limit of a cycle that is executed to generate those 0's and 1's. I hope someone can help...
asked on 12.09.2017 / 23:51
3
answers

C ++ random number generator

The problem is the following I have my code in which it generates 10 random numbers in an array, then shows them and then orders them, what I want is that when I re-execute the "fill" function that is the that generates the numbers an arrangemen...
asked on 25.09.2017 / 18:31
1
answer

Delete a file with all its contents in Python

I would like to delete a directory that contains several files inside. It has the following structure: carpeta fichero1.txt fichero2.txt I tried to delete it directly with os.removedirs('carpeta') but it gives me the error...
asked on 20.09.2017 / 20:30
1
answer

How do I detect all changes in an input type of a form?

Hi, I have this form: function balidatu(){ var pas1 = $("#pass").val(); var pas2 = $("#passC").val(); if(pas1 != pas2){ alert("Pasahitzak berdinak izan behar dira."); return(false); }else{ return(true);...
asked on 21.11.2017 / 14:05
2
answers

Take the value of the operator to perform javascript operations

I am starting to learn javascript and the fact is that we are doing a calculator and I do not know how to do it so that I do not concatenate the two numbers that I have to add: (when adding 12 and 20 in the alert I get 12 + 20 , that is, the + s...
asked on 02.11.2017 / 19:20
3
answers

Add a for cycle within an echo with php

Greetings, I'm doing a for loop in an echo and it gives me a syntax error. This is the code <?php $resultado = '<html><h2>Productos:</h2><p>'.for ($i=0; $i<count($_POST["productos"]); $i++){ echo '<b>'.$...
asked on 23.11.2017 / 23:09
1
answer

Application Security AngularJS

I am developing my web application with angularjs, previously I worked with angularjs on Ionic. In the mobile applications I used an encryption plugin that impeded being able to see the source code and with that I passed security. However, this...
asked on 01.12.2017 / 13:45
3
answers

Load two or more rows to a DataTable by means of a Button

Good morning everyone, I'm using the following method to load a DataTable that in turn will show this information within a DataGridView , the problem I have is that by pressing the button I should add each new record to the Data...
asked on 28.11.2017 / 18:37
2
answers

Error "Can not add foreign key constraint" when relating two varchar fields

I am learning about relational databases and I have a problem when relating two tables with an auxiliary with a relationship of many to many. I am trying to relate two tables that have a varchar field as the primary key generating an auxiliar...
asked on 16.11.2017 / 08:41