Posts by TonCunha • 688 points
20 posts
-
1
votes1
answer46
viewsQ: GET complex in Node.js API
Following good practices, what would be the most appropriate way to perform a complex GET to retrieve the products according to their properties? Imagine we have the methods for the Product Business…
-
12
votes1
answer3213
viewsQ: Domain Driven Design, what is the difference between Domain Services, Infrastructure Services and Application Services
Is it correct to state that business rules should be written within the domain service? If yes, as a domain entity is not anemic, it also implements its business rules, then Domain Service would…
-
-1
votes3
answers320
viewsA: On fixed footer position only at the bottom of the page
Without moving too much in the structure you created and changing only the part of the footer, you can use as follows: * { margin: 0; padding: 0; text-align: center; } nav { z-index: -1; width: 25%;…
-
1
votes2
answers188
viewsA: Create multiple PHP variables in the same function
You can mount html in a php file and display it in another one like this. //filename.php <?php function ProcessarInformacao($nome, $email, $telefone) { $html = "<div>"; $html .=…
-
0
votes3
answers200
viewsA: How to Merge 3 Select into One
There are several ways to achieve the desired result, one can be more costly at the processing level, so it is worth taking a look at it. For example, you can use as subquery within a main select:…
-
0
votes1
answer252
viewsA: Increasing column sorting, but per result row
I found an efficient way to get the columns sorted according to the values shown in the rows. Thanks to Motta for suggesting the study of "unpivot/pivot". Below I leave the code of the creation of…
-
0
votes1
answer252
viewsQ: Increasing column sorting, but per result row
I have the following table structure and results: I need to create an efficient instruction able to sort the values in ascending form, but they should be sorted by column/row and not only by column.…
-
2
votes1
answer1631
viewsA: Error opening connection to SQL Server 2008 R2 database
This Exception usually appears when the specified database or user is misspelled or when the database does not actually exist. I also use the following Connection string format.…
-
1
votes2
answers58
viewsA: Are there any components that replace Windows Forms Spinedit in WPF?
There are some components in the Extended WPF Toolkit that will help you. Decimalupdown Decimalupdown control provides a Textbox with buttons that allow you to increase and decrease values Nullable…
-
1
votes2
answers190
viewsA: Entityframework Storedprocedure recover parameter output
Hello, try it this way: //Separe os parâmetros de entrada e saída var parametterWithNummvalue = new SqlParameter(); parametterWithNummvalue.ParameterName = "@ParametterWithNummvalue";…
-
0
votes2
answers11627
viewsA: Convert "hh:mm:ss" to int minutes
Replace your function with this call to return the hours in minutes: SELECT CAST(LTRIM(DATEDIFF(MINUTE, 0, '01:03:00')) AS INT) If you want to get the information directly from a table, you can do…
-
-1
votes1
answer1250
viewsQ: Best way to work with XLS and XLSX files
What is the best way to work with Excel, XLS and XLSX spreadsheets in C#? I need to perform cell readings according to the column name, which is specified in the first row. Follow an example below:…
-
4
votes2
answers3589
viewsA: Entity Framework 6 does not create database
in the constructor of your Dbcontext class try to add the following code instruction. public class ClinicaDBContext : DbContext { public ClinicaDBContext() : base("Conexao") {…
-
2
votes3
answers98
viewsA: How to consult and return all product information?
you can use the function GROUP_CONCAT to return more than one record in a single column. Since you have multiple colors for a single product instead of returning a row for each color, you may be…
-
4
votes2
answers437
viewsA: What is the best way to represent a login table with two types of Facebook and Conventional authentications?
when I needed to do this type of login I used a very simple table to record user information. CREATE TABLE Usuario ( Id INTEGER NOT NULL IDENTITY, PessoaId INTEGER NULL LoginEmail VARCHAR(200) NOT…
-
16
votes2
answers20576
viewsA: What are the differences between Myisam and Innodb?
I found a very detailed explanation and would like to share, maybe I can help you. General remarks Innodb works faster than Myisam when there are constant modifications to the data, since this type…
-
2
votes3
answers1890
viewsA: Query two tables in Mysql
one of the ways to do this query is using UNION between the Selects. Below follows an example: SELECT Info FROM Tabela_A WHERE UId = 103 UNION SELECT Info FROM Tabela_B WHERE UId = 103 If you need…
-
2
votes2
answers2679
views -
1
votes1
answer233
viewsA: SQL does not keep new recordings
For the information to remain in the database . mdf, you need to make a change to the file properties. Right click on the database found in the tab Solution Explorer; Go on properties; In the option…
-
3
votes1
answer931
viewsA: Group data related to a column
use GROUP_CONCAT to join the information in the same column. See the example below: SELECT GROUP_CONCAT(cep.strcep) AS CEP, cidade.strnome FROM Cidade INNER JOIN cep ON cep.intcidadeid =…