All Questions

1
answer

Is it safe to save multiple entities at the same time in the ASP.NET MVC Controller?

I need to save 12 entities to the same method in Controller , I do not know if I'm doing it right. In my method Create of Controller , I call all entities and add all attributes in the same View . When you click the save button, you...
asked on 26.01.2015 / 20:35
2
answers

What can Model do in validation in MVC?

In an MVC project developed in PHP, should I validate what in model and what in controller ? Hash of passwords I'm doing in the set method of the model classes. Some validations that are not returned to the user I believe I should do...
asked on 07.06.2015 / 18:28
1
answer

Break lines in CSS without using extra elements

I have 2 elements inline and I need to cause the line to be broken, without needing to add display: block; or if possible add but not occupy 100% of the line: <div class="box-error-page cb"> <h1 class="title-page-err...
asked on 21.08.2014 / 15:50
2
answers

Checking a branch nearest to a zip code

I'm working on a multi-branch course system. Within the register I have a zip code field and would like this zip code to find the nearest branch. Is there any API or some way to handle this problem?     
asked on 03.10.2014 / 20:18
1
answer

Function to generate random alphanumeric characters

I need a C # function that generates a String of random alphabetic and numeric characters of size N .     
asked on 01.09.2015 / 21:38
4
answers

What is the function of the "| "Inside the catch?

I read that || (OR) is for boolean operations and | (Bitwise operation) for bit operations. What is its function inside a catch with multiple exceptions , then? I mean, I know it eliminates duplicate code but I've always considere...
asked on 22.04.2015 / 20:15
2
answers

How to do this using @RenderBody from Asp.net MVC?

All screens in my system are Views and are rendered in the @RenderBody in the main _Layout I'd like to change my layout and make it look like this: So basically it's how I explained it in the image, Click the Menu will render there, an...
asked on 09.09.2014 / 16:19
2
answers

Why does date_diff count my date range wrong?

In my code: date_default_timezone_set('America/Sao_Paulo'); $DataEntrada = new DateTime('19-10-2014');//data no formato d-m-Y $DataSaida = new DateTime('21-10-2014'); $interval = date_diff($DataSaida, $DataEntrada); $totalDiarias = $interval-...
asked on 10.09.2014 / 20:24
2
answers

Does passing objects in Java simulate passage by reference?

Everyone says that Java goes by value, including Objects. These are passed by copy and can not be reassigned to a new object within the method. The problem is that it is possible to change the value of objects within the method. Does not this ch...
asked on 21.04.2015 / 15:52
2
answers

Resource in an enum

I have enum and would like to change the Description with Resource: public enum SystemArea { [Description("Gestor")] Gestor = 3, [Description("Administrador")] Administrador = 2, [Description("Professor | Prof...
asked on 27.08.2015 / 19:46