Posts by tvdias • 2,953 points
153 posts
-
1
votes1
answer166
viewsA: Add days to a date in mysql and compare it to the current date?
What you need to be able to "join" 2 conditions is an "OR". For the date, it is possible to add. Vc can do "date" + INTERVAL 30 DAY. example: SELECT pagamento FROM emissao_nf WHERE pagamento =…
-
0
votes1
answer35
viewsA: How to authenticate user correctly?
The problem is in the query made to SQL, because, by default, this search will be case insensitive, as stated in the Mysql documentation. To solve this problem, as suggested in the documentation…
-
0
votes2
answers505
viewsA: Count in recursive function
I always wonder if I should answer this kind of question. Because if I give the answer you will hardly learn to make recursion; and if I answer in a "generic" way, the answer simply should not be…
-
1
votes2
answers70
viewsA: Which files should be ignored by Git in a Mongodb database?
The files in data are precisely from Mongo and should be ALL ignored. We should not add database data to the repository. It doesn’t even make sense that they are next to your code and should be…
-
0
votes1
answer31
viewsA: How can I create an image on Docker but instead use copy for the files use git clone
The mistake is in the confusion between CMD and RUN. According to Docker’s documentation, the instruction CMD serves primarily to indicate the parameters to be used by the entrypoint of a container.…
-
0
votes1
answer40
viewsA: How can I create images with various sizes in wordpress (in the upload folder) by inserting images manually?
There are several ways to (re)create thumbnails. The easiest one is with plugins, but it will also be the slowest. An alternative would be to use the wordpress cli, for example. Or, if you use a CDN…
-
0
votes1
answer72
viewsA: How can I improve/simplify my structure?
Taking the phrase Nesse where, só adicionamos a condição quando o valor da variável for "S". as a premise, one can do something like: var retorno = query .Select(x => x.n) .Distinct() .Where(x…
-
1
votes1
answer877
viewsA: I can’t git pull on the server
This error has no relation to the server, because the error occurs in a PULL ("pull") and not PUSH ("push"). This is the first clue in GIT that the problem is actually on your side. The first step…
-
2
votes1
answer65
viewsA: Detect which button was pressed (html) and change variable in (js)
The question and the code presented are a little confused, but it seems that the intended is to identify which button was pressed and change a variable accordingly. Assuming this as a premise, you…
-
0
votes1
answer45
viewsA: Search only if you click the button
The most important thing about copying code from somewhere is understanding what it’s really doing. In this case, jQuery’s "on" method is used to add an Event Handler to "$input", which is the…
-
0
votes1
answer89
viewsA: Create an expired date alert on a Gridview in ASP.NET in C#
The comparison of dates is never performed because of Response.Redirect. You can remove the redirect code and replace the IF of the dates by the code below to check the comparison of the dates.…
-
1
votes1
answer29
viewsA: Error handling with PHP image upload library
To access the exception details use the methods exposed: public __construct ([ string $message = "" [, int $code = 0 [, Throwable $previous = NULL ]]] ) final public getMessage ( void ) : string…
-
0
votes1
answer36
viewsA: How can I fire onclick click on this function with firebase?
Apparently it is only necessary to put the initializeApp firebase OUT of onclick. Since you didn’t include error messages or more information, I assume the rest is correct and firebase has been…
-
3
votes1
answer2785
viewsA: Error executing Yarn start/ npm start command
In such cases, try to include the executed step-by-step in your question. From the description of the problem, the most likely is that you created the project and did not enter in the folder of his.…
-
-2
votes2
answers120
viewsA: Do not allow the Curl command to download my entire website. Is it possible?
The curl always returns the HTML of the site. What you are seeing in your test is a redirect of the http for https. If you change these tests to make the request with https in place of http will…
-
0
votes1
answer221
viewsA: Access specific item within a Firebase Collection using angular
It is possible to check some problems in the method read_feddUser. get is a method. Therefore, it is necessary to change to get(). Although receive a parameter (key:string), it is not used. In this…
-
0
votes1
answer119
viewsA: I wonder how you do to get the phone number with Avascript
I was in doubt whether it answered the enunciation or the purpose of the code... Starting with the purpose: function abreLink(link) { var url = 'https://api.whatsapp.com/send?phone=55' + link.text +…
javascriptanswered tvdias 2,953 -
3
votes2
answers99
viewsA: Should I use a Docker-Compose.yml or multiple
Although I think it’s the kind of response that will be based on opinions, I believe it can be useful for many people if suggestions for this problem are shared. I’ve been through this situation,…
-
1
votes1
answer200
viewsA: How to insert target _Blank in this java script code?
target="_blank" can be added to links as follows: <a href="https://www.w3schools.com" target="_blank">Visit W3Schools</a>. In your example, it would be: if(result[i]['link']=="") {…
-
2
votes1
answer28
viewsA: Do you have a problem adding more than one CSS library to an Angular project?
How many can I add? As many as you want or need. Is there any recommended limit? No. The sky is the limit. This interferes with application performance? No (directly). As a counterpoint to direct…
-
3
votes1
answer50
viewsA: Should I upload to my Git repository the static files generated by Django’s collectstatic?
More important than the answer, I would say that are 2 questions that should be asked: por que? and para que? you would do that. Static content is not versioned code, it is generated code. It would…
-
1
votes2
answers154
viewsA: How to create an "Area" in MVC in . net core 3.1?
According to the framework documentation, to create an area you need: The directory structure with the areas (required for views only) Controllers decorated with [Area("nome da área")] Creation of…
-
6
votes2
answers2220
viewsA: What is the difference between Docker-Compose and Dockerfile?
The purpose of 2 is quite different. dockerfile describes a container IMAGE that can be used later, including in a Docker-Compose. Docker-Compose can be compared to container orchestrators. It…
-
0
votes1
answer154
viewsA: COPYING ONE REPOSITORY TO ANOTHER
GIT is a distributed repository, so you can simply push to any server. So the steps to "migrate" from one server to another can simply be to push to the new server on your own machine. If Object…
-
0
votes1
answer54
viewsA: Result is always 404, but the records exist. Where can the error be?
I don’t know Python, but looking at his code you can see that there is a problem in his logic. The endpoint with put does not exist (you test with put, but the endpoint created is with post. In this…
-
0
votes1
answer27
viewsA: How do I select between two dates and bring in the query the value 0 on the dates that do not exist?
This will require a JOIN between your data and a "table" with all dates. To avoid creating this table, you can use CTE. To have the value 0 where there is no value, you can use the COALESCE. So your…
-
9
votes1
answer1543
viewsQ: What exactly is "Clean Architecture"? How and where to use?
I have seen several times in replies and in other pages the term Clean Architecture. What exactly is this? How was it created? Where and how should it be used? There are alternatives or…
-
0
votes1
answer48
viewsA: Send Email Asp.net Mvc
According to the Documentation of Office365, to make use of SMTP server it is necessary to activate encryption STARTTLS. IMAP Server: outlook.office365.com Port: 993 Encryption: SSL/TLS POP Server:…
-
1
votes1
answer166
viewsA: Asp.net core User Authentication and Authorization
It is possible to change the tables used by Identity, however, it would still be necessary for its table structure to be compatible with it. For any other "ready" alternative the problem would be…
-
5
votes2
answers626
viewsA: What is the . gitattributes file for?
The . gitattributes file serves as a control for a number of GIT actions. I do not know any contraindications to its use, however, as always, it is important to make its use consciously, avoiding…
-
0
votes2
answers140
viewsA: How to return error message with API
To solve your problem just change the return on the signature to ActionResult<IEnumerable<User>>. Other amendments no longer needed. It should be noted that this option is only available…
-
6
votes2
answers740
viewsA: How do I perform a "merge commit" or "merge pull request" on "Github"?
There is no need to worry about Github, as the Project Owner can decide what to do with your PR. 3 possibilities will be presented: "Create a merge commit" (all commits enter the branch) "Squash and…
-
3
votes1
answer59
viewsA: Serialization problems in . Net Core 3
The problem is not exactly in the relationship, but in the serialization, as you can see by its type (JsonException) and also the exposure of the serializer used (System.Text.Json). Although it was…
asp.net-coreanswered tvdias 2,953 -
1
votes1
answer193
views -
1
votes2
answers111
viewsA: How to send data to PHP in real time?
There are several problems in the presented code and in the question itself. Several questions are asked, which makes it difficult to know exactly what you expect to receive as an answer. The title…
-
2
votes1
answer27
viewsA: Random values with Jquery do not work
According to the jQuery documentation, the method css changes the style of ALL elements that match the selector. Get the value of a computed style Property for the first element in the set of…
-
0
votes1
answer82
viewsA: PHP and Mysql Text Pagination
The "page" can be made both in your database and in the code. Regardless of where it is made, the logic is the same. The first step is to determine the font size of each page and this can be fixed…
-
1
votes2
answers54
viewsA: Insert from a table with for
By filtering the checkboxes your arrays will get different amounts. I see two ways to solve this: change your data structure to an object (it will take more work, but it was best) or simply correct…
-
0
votes1
answer204
viewsA: Pagination with search
You missed adding filters to the paging link. In your view, in Url.Action("Listar", new { pagina })), add CPF filters and last name. Url.Action("Listar", new { pagina, cpf = ViewBag.Cpf, ultimoNome…
-
2
votes3
answers1361
views -
0
votes2
answers105
viewsA: fopen(/home/loyusgyp/public_html/logs/log_jurosefine/log_2020-02-02_18-00-01.txt): failed to open stream: No such file or directory in (Cpanel)
That answer is correct in stating that the problem is in the path to your file. However, I would like to point out an alternative, so that it is not necessary to check all the relative path uses.…
-
2
votes1
answer64
viewsA: "Like" and "Dislike" buttons don’t work without updating the page
This error is pq "$" not found. Usually it is jQuery. Therefore, missing it as a reference to your page. For that reason, download it on the official website and add this code to your page:…
-
2
votes1
answer97
viewsA: How to specify in javascript the set of inputs that have been cloned
I confess it was quite difficult to understand what you intend to do. From the description in the question it seems much more complicated than actually (I believe) it is the goal. The question is…
-
0
votes1
answer260
viewsA: Redirect 301 with web.config
In this case you should use the url rewrite module. <rewrite> <rules> <rule name="Redirect from blog"> <match url="^site-antigo" /> <action type="Redirect" url="site-novo"…
-
3
votes3
answers171
viewsA: Is there a native Javascript method that returns the sum of the elements of an Array ? How does array_sum() do in PHP
You can use the reduce and add the current element to the "previous sum". array_soma = [5, 4, 3, 2, 1]; let resultado = array_soma.reduce((acumulador, valorAtual) => acumulador + valorAtual, 0);…
javascriptanswered tvdias 2,953 -
2
votes1
answer34
viewsA: query with c# and xml
For framework documentation, the method XPathEvaluate returns an object that can be a bool, one double, one string or a IEnumerable<T>. An Object that can contain a bool, a double, a string,…
-
0
votes1
answer31
viewsA: Error using class to filter by student names
The problem is that when opening the page for the first time no POST was made, so $_POST['filtro'] does not exist. Consequently, the method exibirUm, that expects to receive a string, receives NULL.…
-
1
votes1
answer70
viewsA: Delete element from string array in mongodb
Replacing the PullFilter for Pull should result. var update = Builders<Person>.Update.Pull(c => c.Profiles, "profile1"); await this.DBset.FindOneAndUpdateAsync(c => c.PersonId ==…
-
1
votes2
answers603
viewsA: How do I remove and replace files from the master branch with files from another branch? (Github)
As explained in the question, where the goal is to replace the code of origin/master with local branch content, you can do git push --force or git push --force-with-lease. Note: The use of this…
-
-1
votes1
answer47
viewsA: Search for terms out of order php MYSQL
For this it is necessary to make a filter with LIKE. To make match in parts and have more than one word in the filter you can use the % where you want to accept parts that do not match. ex: SELECT *…