Posts by tvdias • 2,953 points
153 posts
-
0
votes1
answer72
viewsA: Is there any other way to run my mongodb other than by Docker?
Mongodb was compatible with Windows 32-bit until version 3.2 (inclusive). Therefore, it is possible to download a version prior to 3.4 and install it. Download: https://www.mongodb.org/dl/win32/i386…
-
1
votes2
answers393
viewsA: How to create a volume of a single file on Docker?
There are some differences in how volumes work on Windows hosts and Linux/Mac. If you are using Windows (host), NAY it is possible to map files, only directories. And anyway, whether in Windows or…
-
1
votes1
answer801
viewsA: The specified framework 'Microsoft.AspNetCore.App', version '3.1.0' was not found
The problem is not with Docker, but with switching to . net core 3.1. Check that TodoApp.csproj is with . net 2.* or 3.*. If the project has a . net other than the version of the container image…
-
1
votes1
answer137
viewsA: Container Jenkins cannot find Docker command
You shouldn’t start a container inside another container. Although not impossible, it simply should not be done and "hurts" the purpose of containers. This article (in English) talks a little about…
-
0
votes1
answer960
viewsA: Run sequelize migrate on a Docker container
The problem with running Migration on the terminal is that your computer does not know what it is my_db. There are 2 alternatives to solve this Add my_db to your operating system hosts file (do not…
-
1
votes2
answers721
viewsA: Mysql sequelize error in Docker
By described, the database is in Docker and the API is running on the local machine. However, the API is configured to connect to the database at the localhost address (IP 127.0.0.1 and port 3306).…
-
0
votes1
answer228
viewsA: how to receive data dynamically via websocket?
From what I’ve been presented, I’d say doubt is just like "getting started". The best way would be to look at the Socket.IO documentation and try to apply "Getting Started" to your project. However,…
-
1
votes1
answer38
viewsA: Firebase replaces information instead of adding
Consider only the title and the code presented, more specifically users/$uid-posts, I believe your goal is to have a list of "posts" and are using the method incorrectly setValue for this. In this…
-
0
votes2
answers248
viewsA: Error while trying to connect to another Rabbitmq server
The problem occurs of the confusion between the doors used by Rabbitmq. The messaging service correctly at the door 5672. However, the admin plugin runs on the port 15672. Described in the…
-
0
votes1
answer35
viewsA: Can anyone tell me if there is an easier or more correct way to call two selects from different tables?
It is possible. This requires the UNION. Taking your case as an example: SELECT COD, Nome FROM ( SELECT COD_REC AS COD, Nome FROM RECRUTADOR UNION ALL SELECT COD_VAGA, Nome FROM VAGA ) AS t1 WHERE…
-
1
votes1
answer200
viewsA: Foreign key breach error only in inclusion via API, via insertion bank is correct
The problem is in your model. tbaditivo_idtbaditivo is an INTEGER and therefore the default value is 0 (zero). Since there is no entry with id = 0, you receive this error from the database. Change…
-
0
votes1
answer109
viewsA: Assign the value of an input to a php variable
As the form makes a post, you can pick up the value in confirmacao-avaliacao.php with $_POST["NOME_DO_CAMPO"]. The name is identified by name in HTML. In your case, it would then…
-
0
votes2
answers67
viewsA: How to calculate departure time based on input time
Don’t think about the time difference. Think about the interval you need to work on. From your description, it’s 588 minutes. Therefore, the following PHP code can be used: $horario = new…
-
0
votes4
answers491
views -
3
votes2
answers120
viewsA: Approximation mysql filter
According to the Mysql documentation, the Full-text search. https://dev.mysql.com/doc/refman/8.0/en/fulltext-search.html There are several ways to use, such as taking first and last names: SELECT *…
-
2
votes1
answer270
viewsA: How to set up a certificate to make a connection to Javascript Websockets
The original example (below) uses the latest version of SuperSocket, beta version and only for . net core (as indicated in the repository readme). However, the project documentation contains…
-
1
votes1
answer129
viewsA: How do I download an FTP directory via php?
By the FTP protocol, there is no possibility to download a directory. Although this option exists in many programs, it is managed by the application itself. This is done by listing the directory…
-
1
votes1
answer28
viewsA: Condition in SQL Server query
In this case we need to use ... where IdGroup IS NULL
sql-serveranswered tvdias 2,953 -
3
votes1
answer483
viewsA: How do for a Docker container to resolve a HOST DNS name?
In this case you need to change the container hosts and not the host hosts. The correct way to "change" the container hosts file is with the flag --add-host, according to the documentation of the…
-
1
votes2
answers103
viewsA: Error giving python Mysql Insert
How is it possible to check for the error message, more specifically on near 'Pessoal, recebi, the problem is not in the cited characters, but in the quotation marks of the text. In this link there…
-
3
votes2
answers365
viewsA: Do not create folder when cloning Gitlab project
The git clone command takes 2 parameters: the repository address and the path to the clone. This 2nd parameter is optional and, if omitted, a directory with the same name as the repository is…
-
2
votes1
answer32
viewsA: The same variable is used by different methods, but the second does not take the information captured by the first
Objects declared within a method are different from those created in other methods, even if they have the same name and type. Like item which is declared within the method insereBanco is not…
-
1
votes1
answer38
viewsA: How to Put Elses If in Layout
It is necessary to change @else if for else if. Ex: https://www.w3schools.com/asp/showfile_c.asp?filename=try_razor_cs_012 @{var price=25;} <html> <body> @if (price>=30) {…
-
1
votes3
answers160
viewsA: Javascript function works only once
EDIT based on the comments In this case, to follow the way it’s being done, I would change the code to: $(document).ready(function() { $(this).find('#tabela a[name=botaoExemplo]').click(function() {…
-
0
votes1
answer641
viewsA: How to search all elements of an array in Mongodb
There is an error in your query. In this case the method find receives only one parameter, one object, and will use it to query. As it is, Mongo is looking for a document with the past id and in…
-
-1
votes1
answer1649
viewsA: Read content from a PDF in Javascript
Base64 is an encoding. You must use the method atob() to convert from Base64. If you are more curious about the subject, there is a lot of documentation in English, such as this…
-
4
votes2
answers991
viewsA: Transform matrix into vector
By "I’m doing some exercises with matrix and array" I understand it is a case of exercising logic and in general asked to remove the loops. This could be done in a single for: for (var i = 0; i <…
-
1
votes1
answer58
views -
2
votes1
answer52
viewsA: Error searching local database in Visual Studio 2019?
There’s a mistake in yours connection string. The line SqlConnection con = new SqlConnection(@"Data Source = (LocalDB)\MSSQLLocalDB; AttachDbFilename =…
-
0
votes2
answers49
viewsA: How to make the custom select of the screen "Suppliers" search information (Company name) in the table "Company"
Considering Visual Studio’s own MVC template and adding Controllers and Views using the option Add > New Scaffolded Item..., the result you expect can be obtained with the following creation and…
-
0
votes2
answers217
viewsA: Problem passing Angular time to C# Core
From the image shown, there is no error. Part of DateTime is the time zone, which in Brazil is always GMT-3 (since there is no longer daylight saving time). The time shown in Angular indicates that…
-
0
votes1
answer104
viewsA: List within a Dictionary
Apparently the mistake is on the line key += Produto.CNAE;. By doing the += within a foreach your key doesn’t have the value you expect. Put the key creation (string key = "items";) within the…
-
0
votes1
answer32
viewsA: Split by modifying the sorting of the text file
Using the code below will not take a substring from your original string (resultado). resultado = array[i]; string[] returnDataSplited = resultado.Split(' '); string code = returnDataSplited[65]; If…
-
0
votes1
answer160
viewsA: Build failed. - error creating migration
Make sure your project compiles correctly before executing the commands dotnet ef. Errors can be checked by your IDE (like visual studio) out editor (like VS Code), out even from the command line,…
-
1
votes1
answer49
viewsA: SQL script to find winners on auction site
Assuming that no bids can be repeated for each auction, it is possible to do the following query SELECT c1.* FROM comentario c1 INNER JOIN (SELECT ci.id_user, MAX(ci.proposta) AS maiorproposta FROM…
-
1
votes1
answer129
viewsA: Questions about folders in ASP.NET Core
I don’t know if this is the case, but this folder structure seems to have been removed from the template Web Application (Razor pages) of Visual Studio. In this case: obj: Serves for the compiler to…
asp.net-coreanswered tvdias 2,953 -
0
votes1
answer44
viewsA: create a new Child with the same name instead of overwriting-firebase
In this example you need to use the push in place of set, as stated in the documentation: Add to a list of data in the database. Every time you push a new Node onto a list, your database generates a…
-
-1
votes1
answer39
viewsA: Order By Doubt with LINQ to generate report
It’s really hard to answer without the full context, but I’ll try to guide you through how to solve this problem. The first thing to do would be to remove the DbFunctions.TruncateTime(c.DataBaixa).…
-
0
votes1
answer143
viewsA: Mysql procedure does not recognize WHERE and displays error
Mysql is considering both ID_PRO and Id_Pro in your Where as Id_Pro which is passed as input from your database. In this case, if the Safe Update, all records would be updated if found any column…
-
0
votes1
answer48
viewsA: I have a conversion error running a C#code
By the image shown, the error is in converting a string to an integer. The only places where such a conversion is made are Convert.ToInt32(item[0]) and Convert.ToInt32(item[5]). When looking at your…
-
0
votes1
answer102
viewsA: Problems in Object Reference not defined for an object instance
Try making transactionScope?.Complete();. This way only the complete will be done if a Scope transaction is passed. It can also be interesting to put a transaction rollback on the catch. This way,…
-
3
votes2
answers129
viewsA: What is the difference between LINQ research forms with Datetime.Now?
I imagine that Listar execute a query in the database. If so, when Where, Line adds the conditions to the query sent to base, which nay must have the Brazilian time zone (-3 hours). In the other…
-
1
votes1
answer36
viewsA: Count how many id you have in the table based on other data
It is necessary to understand what makes the GroupBy. What you were doing was grouping the events by your id, which created a group of events with the same id. In this case, a group would be created…
-
0
votes1
answer122
viewsA: Retrieving item from mongoDB array using C#
There is a difference between the Mongo object and its class. In Mongo, the properties TmoMonDiretorio and UltimoMonDiretorio are in Diretorio (although it has the singular name, it is a list). To…
-
0
votes1
answer32
viewsA: Error comparing database data with empty form field
Before making the comparison it is necessary to verify if the value is not null. var verificaDocumentoExistente = pontoAtendimentoRecuperados.Where(p => p.Documento != null &&…
-
1
votes2
answers331
viewsA: What should I return in an Httppost and Httpput in an API?
The Return type of an API is often neglected, despite having as much importance as any other part. The return of each endpoint depends on what exactly is done by the API. In the case of a POST the…
-
0
votes1
answer49
viewsA: How to assemble a foreach list at different positions
There seems to be no error in the presented code, although it can be rewritten. Apparently it is a problem in your data: Model.DadosEmpresa.Count You must always have the same value. In this fiddle…
-
1
votes1
answer49
viewsA: What is the best way to search for many variables in the database?
If you have the exception System.StackOverflowException is because you are having a lot of calls on the runstack. This should have nothing to do with your switch (which is nothing more than a…
-
0
votes1
answer104
viewsA: How to insert a Dictionary as an array in the Mongo using c#
When using the C# Mongodb driver it is not necessary to create the Bsondocument manually. In this case, it would be possible to do it directly colecao.InsertOneAsync(processo); For the dictionary to…
-
0
votes2
answers377
viewsA: Fetch stock balance on a given day (or day)
See if that’s not what you want. Within the reporting date, fetch the latest balance. Do not find a value in the period, find the most recent. If not, return 0. In this case, the start date of the…