All Questions

3
answers

How to add Directory to the Windows Path variable during installation?

I developed a Console application in C # with Visual Studio 2013 and wanted the installer to add the solution directory to the Windows Path variable during installation. It is possible? What is the procedure to perform this change in th...
asked on 22.05.2015 / 21:24
4
answers

How to check the variables that are not used?

There is some way to check which variables are not used within the scope > of a class? As in the example below, the variables test1 and test4 have no utility within the application, how could it find such variables? using System; using...
asked on 26.10.2016 / 20:27
5
answers

Refactoring: When is a method "too big"?

I have a project that "retrieves" certain information from an HTML page, parses with the help of Beautiful Soup, and returns values in the form of dictionary , to that in another method I generate a JSON object. The problem is that because...
asked on 10.02.2014 / 01:58
3
answers

How to create a function to validate time in PHP

I'm trying to validate a time field in PHP, and with the help this topic on an external site I came across this script: function validaHoras($campo){ if (preg_match('/^[0-9]{2}:[0-9]{2}$/', $campo)) { $horas = substr($campo, 0, 2...
asked on 21.04.2017 / 21:43
3
answers

How to simulate JSON responses?

I need something that simulates JSON responses for me. Some time ago I had seen a site that did the following: You pass parameters by a URL, eg ?nome=Wesley&idade=21 I got the call in the JSON object like this: { nome:"...
asked on 14.07.2014 / 19:22
3
answers

Is it mandatory to put the same attributes in different constructors?

I have these builders: // 1st Builder - Create a bike with a new frame public Motociclo (String marca, String modelo, float peso, int robustez) { //Nivel 2 this.marca = validarMarca(marca); this.modelo = validarModelo(modelo);...
asked on 05.12.2018 / 19:59
4
answers

Some way to get the price of the dollar

Do you know of any api or other php way to get the price of the dollar? I just need the price of the dollar for the real thing. I've tried these two api's, but the two are off the air. link link Thank you!     
asked on 06.03.2017 / 15:30
3
answers

Is it a good practice to use composite keys as a primary key? [duplicate]

I do not have much knowledge in database design. I have tried to hone myself better and am looking for best practices on how to create and structure tables. I currently create binding tables and combine the ID's of each table by turning the...
asked on 08.08.2016 / 16:54
2
answers

JAVA: What is the difference between OutputStream and getOutputStream ()?

I'm studying java and I came across various input and output classes, but I had a question about the difference between OutputStream and getOutputStream() . As far as I understand, getOutputStream() takes what you're going...
asked on 10.10.2017 / 20:57
3
answers

Best Practices in Declaring Variables in JavaScript

In the MDN variables section we have the following statement:    For that reason, it is recommended to always declare variables at the   top of their scope (the top of global code and the top of function   code) so it's clear which variable...
asked on 13.12.2016 / 20:26