Posts by GustavoAdolfo • 396 points
14 posts
-
2
votes1
answer31
viewsA: Why does vuejs say that this function does not exist? if it is working ok
This happens because this inside socket is another context. The method you call belongs to the external "this". So, before you call "this.socket...", create something like this: const self = this;…
-
0
votes2
answers45
viewsA: Create a person object as an array within another object
1) I believe that the switch is not suitable to solve your situation because it expects a unique object/value to compare with the cases and in yours you’re passing an expression (nomecoletado ==…
-
1
votes4
answers487
viewsA: IF condition according to option field selection
If I understood your question correctly, you could use the values you need as value of each option: <select id="tipo_unidade" name="tipo_unidade"…
-
0
votes1
answer26
viewsA: Problem with Data Lock datatable editor
When building an object with new Date(), you can enter 3 parameters: year, month (starting with 0) and day). Maybe, in your case, you could wear something like this: const hoje = new Date(); let…
javascriptanswered GustavoAdolfo 396 -
2
votes2
answers124
viewsA: Junction of 2 Linq Queries
Try to use something like db.Questoes.Include(i => i.Opcoes) to bring the options in the result.
-
0
votes1
answer32
viewsA: Typeerror: board[Row] is Undefined - Javascript
First you must make sure that boardSize.legth > 0, otherwise you will not be able to travel it properly in boardOnScreen(boardSize). The first method you call is createTurtleBoard(8) that makes a…
-
1
votes1
answer50
viewsA: Pick up and save a Class by specifying only the beginning of it
Well, to search all the elements that contain a class containing a certain word you can do the following: let elementos = [...document.querySelectorAll('[class*="vitrine"]')]; In this way, in…
-
1
votes1
answer40
viewsA: List a date period by the day of the week?
Hello @Rodrigo-Henry, I made this prototype on Jsfiddle to try to help you understand and improve the process. It is well "raw" and can (and should) be improved. See if it meets you. Any doubt, feel…
-
0
votes2
answers150
viewsA: how to select items in while counter, in php
Try to do something like this: Create the class that will define the color: .corContador { background-color: #0f0; } Inside the loop, check the counter and assign the class: <div class="<?php…
-
3
votes1
answer277
viewsA: web request and json no c#
When you use ReadToEnd() You go to the end of Stream and you don’t come back. If you really want to read all the content at once, store it in a variable and only then use it to manipulate in other…
-
0
votes2
answers301
viewsA: Keyup function in input when loading a modal
Hi @Duardo-krakhecke! I believe you can achieve better results by separating the validation function and calling it both in the keyup event and in the modal show event. If you are using a framework…
-
1
votes4
answers957
viewsA: Multiple Contexts Migrations Entity Framework
Multiple contexts are useful for structuring/isolating project areas; obviously this increases complexity. Then you can create each context by pointing to the same basis and perform the work…
-
2
votes3
answers436
viewsA: error saving or updating with Entityframework
I believe that before performing the action you need to make sure it is an inclusion or update. This way you can set the action state as follows: context.Entry(PacienteModel).State =…
-
9
votes4
answers1111
viewsA: How to delete the database registration if the user does not activate it by email within "X" hours?
You can create a script that will be run by the server at any given time to remove users with value from the table ativo=0 if the expiration time has already been reached. Or maybe a parallel…