Posts by Augusto Henrique • 647 points
25 posts
-
1
votes1
answer50
viewsQ: React/Redux - Function connection
Hello! I have a file containing a single function, it should return a boleano from a condition using the data from the Redux Storage. I can connect the file without being a Reactcomponent to Redux?…
-
1
votes1
answer32
viewsA: Create function to change a data in the database table
Documentação Laravel: $flight = App\Flight::find(1); $flight->name = 'New Flight Name'; $flight->save(); That is, you search for the data, change what you need and save it after the change. In…
-
1
votes1
answer241
viewsQ: Docker
I am setting up a development environment with Docker. In it I need NGINX (webservice) PHP 7.2 (app) MARIADB 10.3 (database) In the container app I must install Composer, I will work using Windows.…
-
2
votes4
answers44
viewsA: Copy multiple records to the same table with change of values
INSERT INTO tags (group_tags, title, active) SELECT 1 as 'group_tags', title, active FROM tags WHERE group_tags = 2; Run only the second line and see if it is the expected result.…
-
2
votes1
answer47
viewsA: Change the position of a Commandfield in gridview
Within your TAG of Columns add the Boundfields, are fields already predefined in the code, with this you lose a little of the dynamism of the Grid, but I think it is one of the outputs, and I could…
-
3
votes1
answer176
viewsQ: API with JWT authentication
Hello, I am building an API for studies and I am implementing JWT in the authentication of it. All the contents I found refer to Asp.Net Core, as I do for validate tokens in the. Net Framework? I…
-
1
votes2
answers66
viewsA: See table by period
I did a test on the structure I have here, and so it worked, if you want exactly the amount and not the amount of record, you should replace the columns with a Count() and include a group by at the…
-
2
votes1
answer102
viewsA: How to organize HTML?
<div class="form-inline"> <label for="inputEmail3" class="control-label">Período:</label> <input autocomplete="off" id="idPeriodoInicio" class="form-control monthPicker…
-
2
votes1
answer400
viewsA: Cout string c++
The problem was importing one of the libraries. I traded #include <string.h> for #include <string>
-
1
votes1
answer400
viewsQ: Cout string c++
I have a function Show() which traverses a list and should display it on the screen, but I cannot concatenate the value of a list with a string. Follows code: #include "pch.h" #include…
-
1
votes1
answer29
viewsA: Change scaffold C#generated controllers
Yes, you can and you must. Each application has its particularities, what the framework generates is very generic, adapt it to your needs.
-
0
votes1
answer63
viewsA: SQL "Where" problem
Try it that way: DECLARE @DATAINICIO DATETIME; SET @DATAINICIO = CONCAT(YEAR(GETDATE()), '-', MONTH(GETDATE()) - 1, '-', '01') SELECT * FROM TABELA WHERE DATA >= @DATAINICIO AND DATA <=…
-
1
votes2
answers383
viewsA: Hide div for mobile version with css
@media only screen and (max-width: 480px) { #img{ display: none !important; } } #img{ background-color: blue; width: 150px; height: 150px; } <div class="col-sm-6" id="img"> <img…
cssanswered Augusto Henrique 647 -
1
votes1
answer36
viewsQ: Asynchronous method
Good morning, I have an ASP.NET MVC 5 application that opens IT calls, I have a procedure that triggers e-mail to users at the end of the task execution (completion, opening, forwarding, etc. of the…
-
4
votes1
answer1323
viewsA: CS0116 C# A namespace cannot directly contain members, such as fields or methods
Everything within a project must be contained in a class. Seen, maybe that’s the problem. Involve your methods, properties and variables all in one class.
c#answered Augusto Henrique 647 -
2
votes1
answer36
viewsA: How To Make My Save, Change My Database Data
Note that in your SQL query both parts of if do the Insert operation, which in your case would be an update and an Insert. UPDATE Produto SET Nome = @NOME, Descricao = @DESCRICAO, PRECO = @PRECO,…
-
1
votes4
answers288
viewsA: What’s this Join’s syntax error?
You should always use the inner join as follows: INNER JOIN tbEquipamento ON tbEquipamento.NUMERO_ATIVO = tbEquipamento_Movimentacao.NUMERO_ATIVO_FK That is, do the Inner/left/right Join in the…
-
2
votes1
answer53
viewsA: How to send the Data Time Picker date to the Mysql database
Try instead of passing the concatenated parameters, go through Mysql. That is to say: Inserir.CommandText = "INSERT INTO Pacote (peca, Nome, Quantidade, Data_entrada) VALUES (@peca, @nome,…
-
2
votes2
answers46
viewsA: How to search for information in two different tables and return the ID of the table where the information is?
Utilize LEFT JOIN instead of INNER JOIN in the desired tables, so it will always contain one or the other table. Take a better look here…
-
0
votes3
answers59
viewsA: Convert inside a lambda
Try using ternary operator in the assignment. Read: campo2 is null ? then 0 else campo2. int Campo1 = int.Parse(campo2 == null ? "0" : campo2); Syntax: condition ? expression1_se_true :…
-
5
votes4
answers197
viewsQ: Correct syntax way in object instance
In the instance of an object, we can: Pessoa pessoa = new Pessoa(); and we can also: Pessoa pessoa = new Pessoa(){ Nome = "Nome", Id = 0, Situacao = true }; What is the best or most correct way to…
-
2
votes4
answers152
viewsA: How to know the exact line of a Nullreferenceexception error when creating a new instance of an object with multiple properties
Not long ago I also had the same problem, the only solution I found was first instantiating and then set to the properties.
c#answered Augusto Henrique 647 -
1
votes3
answers360
viewsA: Return View using View Data ASP . NET MVC
A more interesting way would be to pass the data to the model and retrieve it in the View. Example: Fill in your list, or your model details; Then return the values inside the View, return…
-
2
votes5
answers258
viewsA: How to open more than one View in a controller?
In the controller, I don’t think I can return two views at once. I don’t know if that’s your case, but you can reroute to different routes, return RedirectToRoute(new { controller = "controlador",…
-
2
votes2
answers166
viewsA: Query return comparison with "N" status
if (arcerarDt.Rows[0][2].ToString() = 'N')// erro Equal operator in C#: ==. Using "=" is when you will set some value to a variable or property. In the case of IF / ELSE it is used operand "=="…