Posts by tvdias • 2,953 points
153 posts
-
0
votes1
answer117
viewsA: The latest versions (after version 5.0.0 ) of the Entity core framework are experiencing a failure to install in my project. Is this a general error?
As explicit in the message, this version of Microsoft.EntityFrameworkCore is not compatible with the framework used in your project. In this case you have 2 options: use another version; or change…
-
0
votes1
answer76
viewsA: PHP html table generator
The problem is not in the PHP, but in your html/css. To create a "zebrada" table you must use the following CSS: tr { background-color: #EEEEEE; } tr:nth-child(even) { background-color: #D9E2F3; }…
-
1
votes1
answer47
viewsA: How to host a website on my own pc?
Considering that the site is static (HTML + JS) there are a dozen excellent free options for this, making it even more inadvisable to follow this idea. If the goal is merely educational, then you…
-
1
votes1
answer33
viewsA: Entityframework - Error table or view does not exist
I don’t know Oracle well, but drawing a parallel to SQL server, I would say that the correct notation would be ... FROM "sms"."Usuario" Where Usuario is the table and sms is the DB schema.…
-
0
votes1
answer116
viewsA: How to make a div occupy the entire screen, superimposing the parent element?
I believe that this way that you are thinking will not be possible, but if you change a little the way of thinking should already get the desired result. Instead of "open a list," you could add an…
-
0
votes2
answers49
viewsA: Problem when receiving data from the database with if/Else
There seem to be two problems in your logic You expect the data to be ordered starting on Sunday, but you don’t order it Every loop prints every day Change your query to $consulta2 = $MySQLi ->…
-
1
votes1
answer14
viewsA: "Uncaught Typeerror: number[i] is Undefined"
number.length will return the length of the array number. However, since arrays indexes in javascript (and in most programming languages) start with 0 (zero), the last index of the array is equal to…
javascriptanswered tvdias 2,953 -
1
votes1
answer145
views -
2
votes1
answer27
viewsA: PHP Receive the ID of a value via select option
Your mistakes are just "in the part that’s working". The first problem (it may just be failure to ask the question) is that the TAG is missing select with a name involving your option group. If this…
-
0
votes2
answers42
viewsA: How to authenticate via headers and access API
In accordance with the documentation, can add headers to http requests by making: XMLHttpRequest.setRequestHeader(header, value). The method should be used after open and before send. Already…
-
1
votes1
answer40
viewsA: Javascript IF and ELSE difficulty - Return result text on screen
In many programming languages, as well as in javascript, the operator = is not a comparator, but assigns the value to a variable. In this case, substitute it, wherever you are making comparisons,…
-
0
votes1
answer38
viewsA: clear message php
If your goal is to present only once the message (and it is not included in the question, but I imagine there is one if(isset($_SESSION['message'])), then just do unset($_SESSION['message']); after…
-
0
votes1
answer28
viewsA: Page redirects and the contact form is not sent via email
The Event listeners are executed before the action. The logic of this is that the action is already executed outside the page and when executing the Event listeners before allows the javascript to…
-
0
votes1
answer67
viewsA: JSON increment multiple request items in php
Perhaps its difficulty lies in the fact that its input is done with arrays. Transforming it into an object would be simpler to manipulate. Anyway it follows code changed to include a foreach from a…
-
0
votes3
answers307
viewsA: How to save parts of a json in variable?
The relevant part of the question is asking for a Rest api and deserialize its content. For the code shown, only the part below must be taken into account: var client = new RestClient(url); var…
-
0
votes1
answer47
viewsA: Use of multiple conditionals in an SQL query
There’s nothing wrong with having ( ) in the database queries and the same works like anywhere else, even as in the mathematics we learn in school. As there are no examples of database and input…
-
0
votes1
answer27
viewsA: I wanted to know why I can get the parameters of the verbs POST, PUT and DELETE in PHP only with Jquery, how do I do this pure JS?
You need to serialize your object to send it doing xhr.send(JSON.stringify(data)). The documentation can be found at https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/send. PS: when…
-
0
votes1
answer25
viewsA: How to insert time together with date in c# with Mysql sgbd -
As you are writing the query, the language of your application is indifferent. Whereas your column data is in the correct format you can use the functions UTC_TIMESTAMP() or NOW(), depending on…
-
1
votes2
answers121
viewsA: Query to PHP database with WHERE does not return value
Without having the DB creation script and the data no response can be 100% acerctive, but since the script works without the where and with the where has no return and also no errors, most likely…
-
1
votes1
answer91
viewsA: File . suo appears changed in the repository, but I have not modified anything
The archive .suo (Solution User Options) accompanies the .sln (Your project’s Solution) and both are used by Visual Studio to present their project. As the name already says, it is a specific file…
-
-1
votes1
answer35
viewsA: ASP NET CORE 5 EF with DLL database-connected
It is possible to use a database connection DLL in an ASP NET CORE 5 project with Entity Framework? Yes, and you certainly have. The Entity Framework, for example, is "a DLL connection to the…
-
1
votes1
answer122
viewsA: How to make an error handling for search not found in ASP.NET API?
In fact the ActionResult does not work with this your return, but if you stop using an interface, can already be used. This method of yours could be: [HttpGet("{id}")] public…
-
0
votes2
answers28
viewsA: Visual Studio (C#): Use web.debug.config without publishing
Apparently you are using the . Net "Full" framework, although it is not specified in the question. In this case, it would indicate the use of the slow Cheetah package/extension. The extension will…
-
1
votes2
answers72
viewsA: Why does "0" not appear? Once the logic of "do while" is: do yourself then check
Are you confusing some concepts of while and do while, as well as the incrementer "i++" (and "i--"). remembering that he enters the paritir of the 9 in the "of the while" so do not know why has a 10…
-
1
votes1
answer180
viewsA: Mongoerror: Unknown top level Operator: $expr
The most important thing in this type of question is to specify all the differences between the environments. If it works in one place and does not work in another, the most likely is that there is…
-
1
votes1
answer65
viewsA: Cursor search: the number of variables declared in the INTO list must match the number of columns selected
In addition to being repeated, @rateio should simply be rateio in this part DECLARE AtualizaItens CURSOR FOR Select Indicador,ContabilCred,ContabilDeb,ContabilPessoa,ContabilHistorico,FinancCred,…
-
1
votes1
answer25
viewsA: I’m having an error in my c++ exercise. What can I do to fix it?
The entrance R is requested afterward to be used in the calculation. You need to change the code for something like #include <math.h> #include <iomanip> #include <iostream> using…
-
1
votes1
answer129
viewsA: Problem trying to connect Mongodb via Docker-Compose with Robo3t. How to complete the connection?
Your Docker-Compose is correct. The problem is in connecting to the database. As specified in Docker Hub: These variables, used in Conjunction, create a new user and set that user’s password. This…
-
0
votes1
answer47
viewsA: Github sub-folder link to another repository
What this repository does is "link" other repositories using "submodules". The command to do this in git is git submodule add <git@github ...> and should run at root in your repository. To add…
-
0
votes1
answer29
viewsA: Button always returning the last ID
Although you have a button like submit on each line there is no form in the code presented. Most likely you forgot to add this part to the question, otherwise your code would not call…
-
3
votes2
answers77
viewsA: I have a ploblema in my JS code
There are some problems with your code. Some are even problems, which do not allow the code to work properly, others only hinder the reading and construction of the code. ex: var b =…
-
2
votes1
answer92
viewsA: How to convert XML field to decimal
As stated in microsoft documentation, when receiving a string, you can convert it to the various numeric types with the methods Parse or TryParse The difference between the two methods is the ease…
-
0
votes1
answer48
viewsA: filter list of registered assets by room
How do you have a table/template for Local, the ideal would be to use a combobox (or autocomplete) to list existing options and select the location. This way, instead of passing the name, would pass…
-
1
votes1
answer42
viewsA: INNER JOIN in 2 tables from 2 different databases
Assuming the user used has access to the tables, it can be done SELECT * FROM <DB1>.definicao_variaveis INNER JOIN <DB2>.lancamentos_clientes ON ... Where DB1 and DB2 are the names of…
-
0
votes1
answer19
viewsA: Hi, I was wondering why this error occurs in my scipt . php: mysql_num_rows() expects Parameter 1 to be Resource, Boolean Given in
There is some error in executing your select, so $verify is false and how it is passed on to mysql_num_rows this error is then presented. You need to check the success of query with, for example, if…
-
1
votes1
answer60
viewsA: How to access the local Rails puma server inside a Docker container?
To access the host from within a container, there is a specific address of the Docker, and it is not necessary to use the IP, since it may vary. Use the address host.docker.internal and the port you…
-
1
votes1
answer64
viewsA: Truncated incorrect DOUBLE value?
Change commad.Commandtext to UPDATE pdv_historico SET sangria = @sangria , valor_abertura = @valor_abertura ORDER BY idpdv_historico DESC LIMIT 1, Once sangria and opening value are added as…
-
0
votes1
answer177
viewsA: How to Disable caching on specific links via htaccess?
It seems that the purpose and operation of caches is not very clear to you. The goal of using caching is to avoid "heavy" and low probability processing. Cache mechanisms should be created for…
-
0
votes1
answer51
viewsA: Query of two values for a Column
It is not very clear in the question, but by queries and description it is possible to notice that each product has 2 price records in the table TabelaPreco. When TabelaPreco.Nome = 'Custo' one has…
-
2
votes1
answer48
viewsA: How to mount a regex for certain strings c#?
We use regex to search for patterns and not "random strings". In this case, it seems you want to search for Guids. With the exception of a - at the end of the pattern, your regex looks correct, but…
-
1
votes3
answers133
viewsA: Is it possible to leave the delay argument of the dynamic setInterval?
Depending on your logic you may prefer to use the method setTimeout in place of setInterval. The difference to this method is that callback (Once) is executed after the given time. So at the end of…
-
0
votes1
answer29
viewsA: Use date without creating page loop
Your code loops because you’re using window.location which, as the name suggests, changes the "location" of the window to a new address. I don’t think it’s a good idea to use this method for this…
-
1
votes2
answers655
viewsA: Docker Compose + Postgres + Nodejs + knex API Connect in Bank
Since the error shows that you tried using port 5433, I believe you are using the configuration production and trying to "connect" one container directly to the other. In this case, the port that…
-
0
votes1
answer69
viewsA: Cloudflare and Github Pages with DNS error
DNS propagation can take up to 48 hours to occur worldwide. However, it usually takes a few hours. To check the spread of DNS recommend using the site https://www.whatsmydns.net/, putting your…
-
1
votes1
answer58
viewsA: How to perform the calculation of updating a product’s stock in a table within the PHP code of another table?
Since you want to make more than one change "atomically" you need to use a transaction. Copying your original code and adding a transaction: try { $conexao->beginTransaction(); $insercao =…
-
2
votes1
answer203
viewsA: What’s wrong with this code?
maisBaratosQue and maisCarosQue return arrays, not being possible to do precos.filter( maisBaratosQue() && maisCarosQue(), valor). Given the retractions presented, to implement this method…
javascriptanswered tvdias 2,953 -
1
votes1
answer73
viewsA: What is a "multi-target" Nuget package?
In general, when creating a package nuget it is intended to be as inclusive and less restrictive as possible, and can be used in many different projects, regardless of the version of the framework…
-
1
votes1
answer39
viewsA: Relationship Problems Entity Framework Core 3,
To avoid unnecessary slower queries, despite the properties found in other tables in your model, the Entity Framework will not automatically bring their values. To solve this your specific case,…
-
1
votes1
answer40
viewsA: How to wait for my functions to run for it to increment Java Script
You can rewrite this logic as follows function teste(i) { setTimeout(function () { if (i < 10) { console.log("opaopa"); console.log(i); teste(++i); } return; }, 1000); } teste(0); Note that the…
-
0
votes2
answers51
viewsA: How to pick a Function From a string
There are a few ways to do this. The most common is to invoke the desired method, picking it up via Reflection. As shown example, where the class in which the method is found is known, something…