Posts by Rogerio Santos • 552 points
47 posts
-
-1
votes2
answers32
viewsA: Input and reset problems
Both must be inside the form, in your case you are closing the tag form before the input.
-
0
votes1
answer15
viewsA: Convert datatable to Json
I use this function I found in community in English public string DataTableToJsonObj(DataTable dt) { DataSet ds = new DataSet(); ds.Merge(dt); StringBuilder JsonString = new StringBuilder(); if (ds…
-
1
votes1
answer29
viewsA: Limit the number of characters in a textbox
If your method returns a String you can delete the characters following the amount you want, for example limit to 5 characters: Random random = new Random(); tb_noRobot.MaxLength = 1;…
-
0
votes2
answers84
viewsA: Align search bar vertically to image
There are several ways, one of them is to give an absolute position to the element, I changed the css: .topo{ background-color: #4F4F4F; padding-top: 15px; position: relative; /*para o input ter…
-
0
votes1
answer14
viewsA: I cannot update a statically div via Jquery
Your form is being sent after the validations, you avoiding it, it will keep the message. Place a false Return at the end of the function, it will remain on the same page. ... div.innerText = "Bem…
-
0
votes1
answer47
viewsA: how to save data to localStorage with this agenda
You need to put the Return before the onsubmit function for the page to stay (returns true if you want to send the form anyway): <form onsubmit="return salvar()"> In your Save() function, you…
-
0
votes1
answer26
viewsA: Search day, time and add class to a form
You got the code done, just adapt. now.getDay() == 5 && now.getHours() >= 19 ? '' : $(idBotaoEnviar).addClass('desativado');
-
2
votes2
answers33
viewsA: Query SQL listing shopkeepers by id and status
You are selecting everyone who has id = $id OR any other status, do loja_id = "id do lojista " AND status < 6 Logic error, is using or instead of "and" If you need to use several OR like you did,…
-
0
votes1
answer35
viewsA: How to make a pagination that only shows Previous - 6 records - Next per page?
Using the Jquery you developed can do this way, would be the current page, and 3 more previous and 3 later pages: var pagina = 5; //aqui você atribui a página atual, 5 é exemplo var qtdPagina =…
-
0
votes1
answer28
viewsA: Substituting and displaying parameters in PHP
You assign the value of $cont equal to the number of words and the value $i equal to 0, then you say while $i is greater than $cont. Your code never enters the loop, $i will never be bigger than the…
-
-1
votes2
answers57
viewsA: Name of the Linq Dynamics column?
I ended up finding a simple way: var propertyInfo = typeof(Resultados).GetProperty("nomeDaColuna"); _context.Tabela.AsEnumerable().OrderByDescending(x => propertyInfo.GetValue(x, null)) Net core…
-
0
votes2
answers57
viewsQ: Name of the Linq Dynamics column?
I have a column that will receive the orderBy dynamically, by example: _context.Tabela .Where(p => p.colunaA.Contains(searchBy) || p.colunaB.Contains(searchBy) || p.colunaC.Contains(searchBy) ||…
-
-1
votes1
answer752
viewsA: How to link a . php file to an HTML page?
Don’t need to put what comes before on the way, use the ./ current path, ie: The current page is www.seusite.com/pagina and you use the <a href="./exemplo.php"></a>, click goes to…
-
0
votes1
answer183
viewsA: How to edit identation in Vscode (amount of space per Tab)
Go to File > Preferences > Settings Then change the property "Tab size", is in the "Text Editor" tab or "Commonly Used", you can also, in the search bar of the window "Settings" type "Tab…
visual-studio-codeanswered Rogerio Santos 552 -
0
votes1
answer40
viewsA: What’s Mathf.abs for.
Returns the absolute value. The absolute value of a Decimal is its numerical value without its sign as in the example in the Unity documentation Debug.Log(Mathf.Abs(-10.5f));// prints 10.5…
-
0
votes2
answers80
viewsA: How do I use the for command to solve the same problem?
You can add another variable to make the base turn. quant = int(input('Quantos andares você quer que tenha a meia pirâmide? ')) p = quant for x in range(quant): print('* ' * p, end ='') print('') p…
-
0
votes1
answer48
viewsA: select brings up input and select fields
First change the id of select "state", it was the same of type: <select name="estado" class="form-control" id="estado" required> In the example I did I put status Then in Js, check the value…
-
0
votes1
answer28
viewsA: How do I make my application understand which delete button I am clicking and delete the right list?
I believe the easiest way without changing your code too much is to search for the parent elements and remove. I changed the delete function. function deleteField(t) {…
javascriptanswered Rogerio Santos 552 -
0
votes1
answer26
viewsA: Header problem, padding-top is changing header height
Padding changes the height yes, in short padding is an internal margin, so add the height. If you want to add a "distance" outside the box, you should use the margin, which basically does the same,…
-
0
votes1
answer32
viewsA: How to start a download automatically when the user enters a specific page
You need to return the file: return File(nomeArquivo, contentType, nomeArquivoV + extensao);
-
1
votes1
answer288
viewsA: Mysql: How to find string from a given character?
You can use the SUBSTRING function: SELECT * FROM mytable WHERE SUBSTRING(CAMPO1 ,12,11) = 'cpf'; Explaining the function -> SUBSTRING(Coluna, a partir deste carcter, quantidade de caracteres).…
-
1
votes2
answers137
viewsA: How to filter JS only with numbers and letters (no special characters)
I put an excerpt in if, basically what you did, eliminating the special characters in one of the conditions: if(valor == i.Cod[' Marca'].replace(/[^a-z0-9]/gi,'').match(reg) || valor == i.Cod['…
-
1
votes1
answer90
viewsA: Change widget position with Javascript
I added an id to the li, to make the example easier: HTML: <li id="li"> <a> <i>a</i> </a> </li> JS: //Salva os nodes em variaveis var li =…
-
1
votes2
answers53
viewsA: PHP because $_SESSION[name] - without quotation marks - is accepted and does not give error in INSERT and when destroying Sessions gives error in unset($_SESSION[name]
$_SESSION is a list that takes (in this case) a String as "parameter" (which is actually the name of the index), not the quotes, but "what" you put there. In the first case $chave is a String…
phpanswered Rogerio Santos 552 -
0
votes1
answer57
viewsA: Enable select only when the previous select option is chosen
See if the value is equal 3 place or remove the attribute disabled, do not need to call the function in the second select, following the code you did: function verifica(v) { if(v ==…
-
0
votes1
answer22
viewsA: How can I reduce this function? (Simple problem)
You can use the foreach in the number list: var numeros = document.getElementsByName('numeros') function reiniciar(){ numeros.forEach(function(n){ n.innerHTML = ''; }); }…
javascriptanswered Rogerio Santos 552 -
0
votes1
answer51
viewsA: Insert a default image if no
You need to check that the file was uploaded if you do not set the default value: if (isset($_POST["insert"])) { if(isset($_FILES['inpFile'])) $file =…
-
0
votes3
answers52
viewsA: How do I self-play and stop a video when I open and close a modal
Use an Iframe pointing to the video in Modal, on the open button you assign a function to reload this Iframe.
-
1
votes2
answers5514
viewsA: How to simplify the logical expression (~x Ʌ ~y Ʌ ~z) V (x Ʌ ~y) V (z Ʌ ~y)?
Reply c) ~y. Let’s call with the 'til' negative and without positive, to facilitate understanding. If observed, if y is negative (~y) will satisfy in at least one of the other propositions,…
-
1
votes1
answer165
viewsA: jQuery Ajax File Upload error serialize
You can’t use it filter_input_array() for $_FILES as you can see in manual: mixed filter_input_array ( int $type [, mixed $definition ] ) type One of INPUT_GET, INPUT_POST, INPUT_COOKIE,…
-
1
votes3
answers173
viewsA: Mysql query return with PHP+Javascript
When you click on the "Submit" button it sends the form, then after executing the onClick function the page is reloaded, a solution is the preventDefault() your js code would be:…
-
0
votes1
answer81
viewsA: Modal with Ajax PHP
What’s happening is that when you call url: $('#updateimg').attr('action') it receives the of the first element with this ID found (do not use the same ID on more than 1 element), so it will always…
-
1
votes1
answer68
viewsA: CSS: top bar aligned
Put it in #Bi: display:inline-block; margin-left: 20px; //margi de acordo com o que desejar Fiddle: https://jsfiddle.net/atjLfhpg/…
-
0
votes2
answers144
viewsA: Problem with Carousel HTML AND CSS
The ideal is to use javascript for this, because when clicking on the link the browser places the element at the top of the page, maaaaas, in the scenario in question, you can do with a small…
-
0
votes1
answer47
viewsA: Data filtering by Url
The Marvel API itself gives this option: You can test on the page: https://developer.marvel.com/docs#! /public/getCreatorCollection_get_0…
-
1
votes2
answers50
viewsA: How do I reference a context in Entityframework?
Put -Context (-context if using CLI dotnet) after that the context path, something like: dotnet ef migrations <COMANDO> --context solução/models/NomeContext
-
1
votes2
answers64
viewsA: Constraint Layout cannot align to the corner of the screen - bottom of
In the case of the first, you are aligning the top of the Fab with the base of the text: app:layout_constraintTop_toBottomOf="@+id/text_cadastroBoi" Align with the Parent:…
-
1
votes1
answer74
viewsA: Insert data into the database with foreach
I can not comment yet, so I will reply, I see that: 1 - ID is auto increment, do not pass in query, remove id, and value; 2 - It is passing float with comma, must be point. I believe it’s a start, a…
-
0
votes1
answer11
viewsA: How to consume Razor data in a javascript file
You can put the script on the cshtml page inside the tag <script>, then you use the tag <text> for the compiler to understand that it is not C#: <script> <text> if (dados ===…
-
0
votes1
answer971
viewsA: Uncaught Rangeerror error: Maximum call stack size exceeded
You are entering an infinite loop. when you call "tap" on #herobotslider you call tap on yourself. Even if you indicate the class #herobotslider .qualquer will be called first the click on…
jqueryanswered Rogerio Santos 552 -
1
votes2
answers330
viewsA: javascript response does not appear on the page, only on the console
If the console.log(res); Displays the right answer, "res" is the answer, so: $('meio-pag').append("<span>"+ res +"</span>"); </div>'); Just watch out for the possibility of res be…
-
0
votes2
answers33
viewsA: identify a value in the key of an array
One way would be to use the foreach to identify the key and use a preg_match to pull the numbers: foreach ($_POST as $key => $value) { preg_match_all('!\d+!', $key, $numero); print_r($numero); }…
-
1
votes1
answer61
viewsA: Help with using $_POST in PHP
I think I understand, you put in the same file, so if you do not send the POST it searches the index and does not find. And since you’re opening the page to display the form, php tries to fetch the…
-
0
votes1
answer560
viewsA: View data via ajax/jquery from the database
The return of ajax post is what you 'printa' on the screen in PHP, for example: $login = mysqli_num_rows(mysqli_query($con, "SELECT `nomecompleto`, `cpf`, `password` FROM `users` WHERE…
-
0
votes1
answer21
viewsQ: Cannot reolve Symbol "@drawable/", image exists and application runs ok
Android Studio shows this warning, but the application runs normal and the picture is shown normally. My question is why the IDE shows the error if everything is ok. Image in the folder: Error in…
-
0
votes2
answers81
viewsA: Force user to mark at least 5 input type number fields
There’s an error in the check, I changed some lines: var inputs = $('input'); // Chama a função de verificação quando as entradas forem modificadas // Usei o 'change', mas 'keyup' ou 'keydown' são…
-
0
votes1
answer140
viewsA: How to get the percentage of similarity between strings?
From what I understand you are trying to get the percentage of equal words. I created this function. She’s spinning on the Fiddle: https://jsfiddle.net/uybxw51z/1/ function semelhanca(s1, s2) { var…