All Questions

1
answer

Do not allow insertion of a later date to another already inserted

I have an HTML form in which I give the user the ability to enter a start date and an end date, and of course I do not want the end date to be earlier than the start date. Inputs for the dates are of the "datetime-local" type. My goal would b...
asked on 22.03.2017 / 18:41
2
answers

How to make a vertically zebrated table (toggle column colors)?

I know how to make a horizontally zebrated table, ie each row with alternating colors (the famous color yes and no color). I wanted to know now how I could by css to change the colors of the columns: the first column of a color and the second...
asked on 08.04.2017 / 17:56
3
answers

Store in the database or in sessions

When doing a search, I found that some colleagues store the cart products in sessions like this: $_SESSION[cesta][$indice][produto] In particular, I usually store client products in a database table and after a certain open period (I have a...
asked on 14.03.2017 / 22:27
2
answers

Return xml to asp.net mvc browser view

I have the following situation, I need to make an XML file available to be viewed in browser , without the user having to download the file, I do this by saving the file in a directory and then I send the directory of this file and the browse...
asked on 10.04.2017 / 22:25
2
answers

How can I transform a variable (0-10) into 3 categories?

The variable GLEASON of the database is 0 to 10. And I wanted to change this variable into 3 categories, for example: 0-4: not very aggressive, 5-7: aggressive intermediate and 8-10: very aggressive. In programming R. Thank you     
asked on 13.04.2017 / 10:03
4
answers

Why "html, body" and not just "body" to delete page margins?

When you want to delete the default margins of the page, I always see the following CSS code: html, body{ margin: 0; padding: 0; } Why use html, body if using only body what is the body page already solves? Example:...
asked on 09.02.2018 / 02:17
3
answers

Why does GROUP BY not work with MySQL in this case?

I'm using the MySQL language and am trying to group a profession table with GROUP BY through the query below. SELECT name, occupation FROM OCCUPATIONS GROUP BY occupation; But I get this error when trying to group the professions....
asked on 02.12.2017 / 19:37
2
answers

Is it wrong to have a class with methods only?

Is it wrong to have a class with methods only? Or would it be better to use namespaces to save functions?     
asked on 05.05.2018 / 00:36
1
answer

Reset Auto-increment SQL Server

Good morning, I created a new table in SQLServer and I'm testing some scripts to popular the table and I came across the following situation, in my tests I'm doing the insert in the table checking the information and if they do not agree I ma...
asked on 22.02.2018 / 16:29
2
answers

Saving the same file at the same time on different threads

In my software I have a thread that every second updates the file X. This same file can also be updated through a user action that will be in another thread (can be any time). My question is: what will happen if both threads...
asked on 04.05.2018 / 15:52