Posts by Dudaskank • 1,876 points
76 posts
-
1
votes1
answer899
viewsA: Trying to create a score with javascript
The way you were doing the count was wrong. The function animate expects in the 4th parameter a function to be executed when completing the animation, but in this case you tried to associate the…
-
0
votes1
answer39
viewsA: $.fn.data - jQuery
The function $.fn.data serves for you to add or recover data in general of the element in question. It is widely used by other libraries and plugins, such as Bootstrap. For more information, you can…
-
4
votes3
answers1597
viewsA: How to open a. php file that is in a subdirectory?
You should find a way to pass the name of the post to your php script. You could even use the same attribute p and change the current code, or use another attribute and pass the name of the post. I…
-
3
votes1
answer94
viewsA: First and Last record including night
At first, your query is correct, it took the smallest and largest data_hora every day. But if that "night" you say would consider certain times as the previous day, what you can do is, before…
-
3
votes2
answers106
viewsA: Help with select and repeat records
Some points to note: Instead of using a field like date, that seems to only keep the date in this example, use a timestamp or similar, because if there is more than one update on the same date, you…
-
1
votes2
answers118
viewsA: Leave left and right side with height 100% independent of the content size
It seems that the flex container mixed with scroll is giving problems. Check out my solution, with HTML slightly modified in both items, which now join item and left/right in the same div, and in…
-
0
votes2
answers66
viewsA: href with single click until page Reload
Another suggestion, add a class to the links you want to click just once, and when the links to this class are clicked, check for a certain property. If it exists, cancel the event, if it does not…
-
1
votes2
answers3123
viewsA: Inserting a page from one site into another
Look, I’m using Chrome 67 and with iframe worked... I opened the second link, for me gave an error 404, but I edited by the code inspector and in place of the error message I entered the iframe…
-
1
votes1
answer83
viewsA: Programming Problem C - Vectors
You are reading the 3 vectors correctly, and comparing the vectors A and B correctly and in the order of A. The problem is the third loop, when you search for the content of C. Here, you are…
-
0
votes3
answers94
viewsA: Lock to not show another div while one is already visible to the user
When you click on the icon, just hide all the others that are being displayed before showing, if they don’t have the class block: //Código Js, função para exibir a div .configsOp e também…
-
1
votes3
answers458
viewsA: Javascript check broken links
If the links are not for the same domain, you will have problems with the @dvd solution there, due to CORS. In this case, only with javascript you won’t be able to. You’ll need a proxy halfway…
javascriptanswered Dudaskank 1,876 -
4
votes1
answer76
viewsA: Temporary table with underscore
This is a feature of MS SQL Server. It adds these _ and then an identifier to know which connection it came from, so if another connection creates a temporary table with the same name will not have…
-
0
votes1
answer57
viewsA: How to open a form from another site with pre-populated fields with PHP / HTML / JAVASCRIPT?
It depends a lot on the bank. I don’t know if this is documented anywhere, but for example, in Banco do Brasil you can pass the parameters by GET:…
-
1
votes2
answers322
viewsA: Add Mysql column with increment not to repeat
First of all, I have a few stitches to add: Column names with . are nothing common If a table X has several fields in this format (campo1, campo2, campo3), consider normalizing and creating a table…
-
0
votes3
answers314
viewsA: unite 2 vectors (a[10], b[10]) into a vector c[20]
You even came close in your attempt, but time to copy to the vector c, you did not take the value of the other vectors, but generated another randomly. There in the loop that fills the c, you should…
-
1
votes2
answers535
views -
2
votes3
answers110
viewsA: How to call the same method with different arguments but inherited from the same mother class?
Change the method signature to: private void trataFiltro(Set<? extends Coluna> colunas) According to user explanation utluiz in another answer, This is called covariance: Just to put it in…
-
1
votes1
answer232
viewsA: Wget with wildcard in url
According to the wget manual and that answer in the Unix part of the Stack Exchange, it is possible yes, and would look something like this: wget -r -l1 --no-parent -A.pdf…
-
0
votes3
answers1667
viewsA: Prevent redirect after submitting the form
I find the solution with iframe very good, simple and effective, and the solution with Ajax is very powerful too, and is not much more complicated, but requires that the user has enabled javascript…
-
4
votes1
answer563
viewsA: Run simultaneous java threads with parameters, run method
Unable to pass parameters to the method run(), but you can create a class that implements Runnable, or extension Thread, and in the constructor (or via get/set methods or whatever creativity allows)…
-
1
votes3
answers84
viewsA: Why is adding two values to decimals not an exact result?
It is because there is no way to represent the 20.99 exactly with a floating point number. Not only does javascript have this side effect, all languages that use some kind of floating point suffer…
javascriptanswered Dudaskank 1,876 -
1
votes1
answer36
viewsA: Search via POST by clicking on div
This effect is achieved with the event blur which occurs when losing focus of the text field. It would be something like: $('#user_id').on('blur', function () { ... }); More information Blur (event)…
-
0
votes1
answer492
viewsA: Add a column by Jquery
First of all, you are using the attribute in the columns id with fixed values. This in practice, when adding the 2nd line, will create elements with id repeated, which is not correct. Change them…
-
1
votes2
answers529
viewsA: Bootstrap: sort by column instead of row
With Bootstrap 3 itself there would be no way, but with a little help of CSS and the grid-auto-flow: column; you can. .wrapper { display: grid; /* linhas por coluna, até 4 no exemplo, e tamanho da…
-
0
votes3
answers98
viewsA: Error returning lower value
2 things. One is that the signal was switched in if, already said by colleagues, the other is that you provided 5 numbers, but said you had 8, so your loop for tries to access parameters that do not…
-
0
votes1
answer54
viewsA: PHP returning json as string
They are returning as strings because in the Database I believe they are strings, and the function fetchObject/fetchAll do not automatically convert column to object (not that I know rs). You have 2…
-
0
votes2
answers242
viewsA: Multiple upload to PHP online server
FTP nay It’s the only way you can use it, it actually has several. By the way, if you are already going to run in that target PC of the images the FTP server, could run any server. Other ways to…
-
7
votes2
answers1420
viewsA: How to prevent the user from making changes to the input?
Use the attribute readonly of the element input for that reason: <input type="text" name="pais" value="" readonly />
-
3
votes1
answer15411
viewsA: Creating a . BAT and executing the code with administrator privileges
Unfortunately, there is no command to raise the privileges in Windows, such as a sudo no Unix, but it is possible yes. Just below, I will put the code with more votes of this another question in the…
-
1
votes4
answers829
viewsA: Javascript / Jquery - Means to remove the contents of a <TD>
To remove child elements from <td>s, use the method empty() jQuery, or pure javascript would suffice something like elementoTd.innerHTML = '';.…
-
0
votes1
answer50
viewsA: Return datatable of select
It doesn’t work because you’re not adding the function to your select, because this javascript runs before it exists in the document. The way this would work is by using delegated events. You add…
-
2
votes3
answers2230
viewsA: Code to show screen resolution
Object screen I believe you’re searching for the object screen in javascript. It gives you the screen resolution where the window is. // escrevendo a resulução no console console.log('Total…
-
2
votes2
answers260
viewsA: How to save changeable parameters in the system?
I propose the solution "4": Use the Database that is already in the application, create a table with all parameters, with name and value, and in the value field, as is String, you can use objects in…
-
2
votes1
answer73
viewsA: Monitor if the change event occurred in a short time
Yes, it will accumulate events. As with each change and pressed key you schedule the execution of a function with setTimeout, you can press several keys before this interval ends, and in each key a…
-
2
votes3
answers455
viewsA: javascript onclick event with three functions
In fact, the 3 are working, as the error-free console shows. What happens is that regardless of what you did before, the last call will overwrite or delete the value of tr[i].style.display. What you…
javascriptanswered Dudaskank 1,876 -
3
votes1
answer455
viewsA: json_encode returning empty
This happens because you are trying to turn your object into Json format, json_encode will only work by default on primitive types and fields public of objects. For json_encode to work, implement…
-
3
votes3
answers3345
viewsA: Go through jquery inputs and check if you have a certain class in input
As you already have the list of elements you will use to filter the class, var itensTabelaPresentation = ('#tabelaPresentarion > li');, just use the filter method: var soOsComClasse =…
-
5
votes5
answers357
viewsA: How to dim the blue light on a website?
After reading the other answers, I decided to implement my filter as well. It removes 1/4 of the blue component of all colors. I took advantage and created another also, which darkens all color…
-
4
votes3
answers473
viewsA: Doubt char C pointer
In C/C++, the name of the array is a pointer to the first element of the array, so you can do the following: ptr = array; Another thing, if you want to save a string in a character array, don’t…
-
3
votes1
answer1486
viewsA: PHP - Add watermark to a DOC or PDF
It seems that it is possible without big problems... For PDF, you have the library PDF Watermarker. Example of her use: <?php require_once('pdfwatermarker/pdfwatermarker.php');…
-
1
votes3
answers2682
viewsA: How to do horizontal scroll with screen size Divs
You got very close. Remember that the sizes with % are relative to the parent of the element. In your example, the class wrapper_child is 400%, so far so good, but the definition of the daughter…
-
2
votes1
answer92
viewsA: list-style does not return to default
The style list-style is applied to the element li. How your disk reset is only on ul, in the case of the definition in * is applied. To fix, set the rule for the elements li: * { color: inherit;…
-
2
votes4
answers4366
viewsA: How to ensure an image is centralized and responsive
Well, to be responsive, besides the margin: 0 auto;, need to leave the image with display: block; and, more importantly, max-width: 100%;. Thus, images larger than the screen are resized.…
-
0
votes1
answer230
viewsA: HTML + JSP form
Is JSP in the same file as this right form? The first time, you don’t have any parameters passed, then it tries to convert null to integer, and causes the exception. You need to check if you have…
-
2
votes3
answers709
viewsA: How to capture repetitions of a given group with regex?
You need to capture everything in a single regular expression? I believe I got something close to what you need here with this one. I left @ and # out: const regex =…
-
0
votes1
answer195
viewsA: How to determine a fixed size for fancybox image gallery?
You need to create a fixed size element around the image, and with a little CSS you get the result you’re looking for: img.max-fit { max-width: 100%; max-height: 100%; } div.img-fit { float: left;…
-
0
votes2
answers471
viewsA: Question using while
There are actually 2 problems: You need to read the salary inside the loop, otherwise it never changes either. The reading of the question if you want to continue also needs to be within the loop,…
-
1
votes3
answers818
viewsA: Update does not work
In your query, UPDATE participantes SET REALIZADO='$realizado' WHERE id='$id', the WHERE clause attempts to use the $id variable, which was not declared before, and is also not being passed by the…
-
0
votes3
answers1110
viewsA: How to find "holes" in SQL Server tables?
Another method, which works on any BD: SELECT min(id) FROM tabela WHERE id+1 NOT IN (SELECT id FROM tabela ) ; If you need to know all idIf you don’t have the next one, just do it like this: SELECT…
-
2
votes1
answer587
viewsA: How to concatenate 2 Strings with Java in HTML
In case you tried to sum two objects that are not numbers. Try the following: <input type="text" class="read-only" value="${FORM.dataAgendamento} ${FORM.horaAgendamento}" readonly="readonly"…