Posts by Mateus Veloso • 1,852 points
105 posts
-
2
votes1
answer76
viewsA: Return Dynamic Struct in Go
I was able to resolve it shortly after asking the question. I’ll leave the answer here to help the community. Example of the code that would solve this situation. func teste() (struct{name…
-
1
votes1
answer76
viewsQ: Return Dynamic Struct in Go
How could a dynamic return in Go using struct ? Example : func teste() (*struct, err){ type t struct { } return t, nil } The problem is that I would not like to create a struct for each method that…
-
1
votes2
answers220
viewsA: AWS Lambda Function ( versioning and integration with API Gateway )
By gathering some information obtained here in stackoverflow and in the AWS blog, I was able to solve the problem as follows. I defined stage variables I created environment variables in my lambda…
-
3
votes2
answers220
viewsQ: AWS Lambda Function ( versioning and integration with API Gateway )
Problems with lambda versioning: I have a lambda function where I use environment variables. This function is executed by an endpoint through the Gateway API ( aws ) I have 3 stages of the same…
-
0
votes1
answer164
viewsQ: JSON to String API GATEWAY ( AWS )
I need to receive a JSON in my API GATEWAY and pass to my LAMBDA ( GOLANG ) a STRING, The Structure Apigatewayproxyrequest the body is String type, when I try to call the lambda passing the json the…
-
1
votes2
answers396
viewsA: Golang language
Is there anything ready regarding AES encryption and RSA for the go language? Yes, in relation to cryptography Golang is already equal with languages that are much longer in the market. Follow an…
golanganswered Mateus Veloso 1,852 -
1
votes1
answer323
viewsQ: Status e-mail - nodemailer
Whenever I send a message using nodemailer I have how to get the example messageid : messageid: [email protected] It is possible to make a query to check the status of…
-
2
votes2
answers183
viewsA: Exchange text in icon according to text
Apparently you are very limited so I’ve used everything in the simplest way possible, let’s understand the code. tags : There goes the element you want the code to verify searchText : Text to be…
-
2
votes1
answer271
viewsA: Catch tab id - jquery
We will solve 2 problems here, first we will take the ID as follows : var id = $($(this).parents('.tab-pane')[0]).attr('id'); This code can be added instead of this :…
-
2
votes2
answers148
viewsA: Validate all required dataannotations fields in the tabs
I made an example with a custom validation using javascript and jQuery, I can do the example with 100% javascript if you need! Let’s take the example. First step is to capture the form’s Submit…
-
0
votes2
answers149
viewsA: Jquery - Multi-line Viacep autocomplete
The code below is a functional example, let’s understand it. All our zip fields receive the attribute "name":"cep". We added an event to all elements with the name=cep. When the event is triggered…
-
1
votes1
answer43
viewsA: Image of duplicated opening Collapse
A simple alternative is to add an attribute "index" and change only the one of the same index from which the click came, here is a functional example: $('.change').click(function (){ var img1 =…
-
1
votes2
answers243
viewsA: What are Variable Fonts? How do I work with them in CSS?
Variable Fonts - As the name implies, they are variable fonts. There are numerous benefits to this technology, I think the main one is that it was developed by these small companies : Microsoft,…
-
2
votes2
answers690
viewsA: Change an image every click
I made a functional example, I think it is possible to have an idea of how to do observing it, the example I created is very simple, if you need something more complex can comment below.…
-
1
votes2
answers134
viewsA: Disable Scroll for a period of time
Solution to remove scroll from page. Usually scroll is associated with body tag, I saw that you use jQuery then: $('body').css('overflow','hidden'); This chunk of code disables the scroll. At the…
javascriptanswered Mateus Veloso 1,852 -
1
votes1
answer1774
viewsA: Configure Tomcat for external access
There are two "Host" tags in your server.xml file one pointing to "localhost" and the other to "monitor.ddns.net" Just put a TAG and set the appBase to the right location, in case it would be…
tomcatanswered Mateus Veloso 1,852 -
2
votes1
answer249
viewsA: How did this site "manipulate" the mouse position?
The most plausible answer of how the site managed to do this is using Keyword values, more precisely "None" cursor: None; This way it can "hide" the cursor but it is still in place, if you…
-
3
votes2
answers147
viewsA: Javascript - Change return value using setTimeOut
I changed the answer, see if it fits into something similar to your need. $('input').click(() => { $('input').attr('disabled','true'); var cor = getRandomColor(); var i = 1; var interval =…
-
0
votes1
answer423
viewsA: Tomcat - RFC 7230 and RFC 3986
I was able to solve it this way: Edit the file Catalina.properties that is inside the conf/ Tomcat folder. At the end of the file add the following lines :…
-
0
votes1
answer423
viewsQ: Tomcat - RFC 7230 and RFC 3986
I’m having a problem : Error Parsing HTTP request header My apache server Tomcat 8 is rejecting the requests for a system which I did an integration, the error is due to characters that are in the…
-
0
votes1
answer61
viewsQ: Apache Tomcat mirroring - Work
Explanation : Currently when we update our client’s project it is "off the air" during this update, the idea is to be able to update the project without having to stop the client, I saw something…
-
1
votes1
answer56
viewsA: User see current version of Jquery and CSS without cache
I will make a summary of all possible ways and give you a hint, use at the end of import a random number. I use a java application and will leave an example: <script type='text/javascript'…
-
1
votes2
answers364
viewsA: Validation of sex with input radio is giving error?
Here is a functional example that I created, can base and modify your code. $('button').click(function(){ console.log($('input[type=radio]:checked').val()); }); <script…
javascriptanswered Mateus Veloso 1,852 -
1
votes3
answers876
viewsA: How to remove a <TR> element from a list created with append?
I made a very practical example, see if it solves your problem. Remembering that you can change indicating tr by class, id, position, etc... just modify for your needs. I modified the code, now you…
-
1
votes1
answer27
viewsA: Reuse JS code from a bootstrap-datepicker
If on all pages the element id is the same you can simply add this snippet of code to a . js and import it on all pages so when you want to make any change just modify the . js It would look…
javascriptanswered Mateus Veloso 1,852 -
0
votes2
answers1444
viewsA: SQL query taking dynamic Javascript field
Below I made an example where you can modify and send the value using an ajax and do the query. Type in the first field the word "Your" and it will complete the second and third.…
-
1
votes2
answers59
viewsA: Detect Firefox add-ons with Javascript
I resolved as follows : On my system I check the localStorage to try to find an attribute which is set by the extension, if I find it I deduce that the extension is there, and I clean the attribute…
-
0
votes2
answers59
viewsQ: Detect Firefox add-ons with Javascript
I created an extension for Chrome and Firefox, both are in their respective stores Webstore and Mozilla Addons, goal is to identify if the user has the extension installed otherwise inform that you…
-
1
votes0
answers35
viewsQ: Understanding old JAVA code
I have a code here at the company and I need to understand what it really does. By the method Name I found that it removed the characters outside the UTF-8 pattern or something like that, giving an…
-
3
votes1
answer266
viewsQ: Alternative String.replace()
I got a flea behind my ear. I have a method that removes / changes some characters from the string, it is something like this : public static String replaceCharSet(String texto) { texto =…
-
0
votes1
answer244
viewsQ: Error in convert_from() | SQL_ASCII
When trying to use the function convert_from of postgresql I am facing the following error: invalid byte sequence for encoding "UTF8": 0xe3 0x30 0x30 I’ve looked here in the stack and found nothing…
-
2
votes1
answer77
viewsQ: How to tell whom a class will extend at runtime?
I have the class public class Conhecimento{} This class extends from another class "Cteproc" Only this Cteproc class has "versions" example. V200.Cteproc V300.Cteproc My problem is that in creating…
-
1
votes1
answer225
viewsQ: Sprites Phaser JS
I have a problem in the animation of my character using Sprite, I have a Sprite with 7 frames of 100x90 for animation left and 7 frames of 100x90 for animation right, the problem is precisely in…
-
1
votes1
answer504
viewsA: How do I browse an Array in Javascript?
Here is an example using includes to check whether or not the array value exists. Other : W3 Example using foreach : W3 FOREACH var palavras = ["mateus", "veloso", "vermelho"]; $(function(){…
javascriptanswered Mateus Veloso 1,852 -
4
votes4
answers905
viewsA: Changing the background of a table
I made here a simple example for you to modify and use to solve your problem. Explanation : The colors of each div are set in the 'BACKGROUND' in your case as will be image will probably use…
-
2
votes2
answers1483
viewsA: Mandatory field message with jQuery
I used jQuery to create a div with a message, the layout issue of it can be modified to will, that div is added or withdrawn according to the KEYUP in input, I also added disable if input is not…
-
0
votes1
answer887
viewsA: Check and uncheck all checkboxes
The question was not very clear so I was able to do this, check if you answer and otherwise post in the comment so I can help you. $(function(){ $('#checkAll').click(function(){ let desmarcados =…
-
2
votes3
answers208
viewsA: Read input
You can use the events named Keyboard Events that are these : KEYDOWN The Event keydown is sent to an element when the user presses a key on the keyboard. If the key is held down, the event is sent…
javascriptanswered Mateus Veloso 1,852 -
0
votes2
answers971
viewsA: How to fix content to the right inside a navbar?
I made a quick example, see if it is this and adapt as you want, in case there are any questions just warn. body{ padding: 0; margin: 0; } header{ float:left; width: 100%; height: 50px; background:…
-
1
votes2
answers4019
viewsA: How to change the color of the text ?
I added a color to the div. See if it solves. var posicao = 0; var mensagem = "Sua mensagem aqui "; //Esse texto function rola() { document.getElementById("lugar").innerHTML =…
-
2
votes2
answers167
viewsA: How to check if several dynamically created input is empty?
I made a basic example with jQuery, see if you can adapt to your case. $('#testarInputs').click(function(){ $('.teste').each(function(){ if(this.value == ''){ $(this).css('border','1px solid red');…
-
1
votes2
answers1540
viewsA: Show and hide div by clicking button
I didn’t understand very well without code so I created this example based on the question. Any questions just use the comments, try to fit your code with this my algorithm. var testeAtual = 0;…
-
-1
votes3
answers148
viewsA: Table showing Undefined that does not exist
I was unable to post a working code using the stackoverflow tool so I created the example jsfiddle. Any remaining questions can post in the comment below that I will help you, take the code and…
-
0
votes1
answer52
viewsA: how to force one dialog box to be above the other?
As you have not posted any code or something like I made an example with Divs , if my example did not serve edit the question, and comment below so I can modify and thus help you better.…
-
6
votes3
answers590
viewsA: Image Border within Select Radio after choosing an option
Functional example $(function(){ $('input[type=radio]').on('change',function(){ $('.radio').css('border',''); $(this).parent().parent().css('border','2px solid red'); }); }); #product .radio {…
-
3
votes1
answer125
viewsA: White space JSTL
I was able to resolve by adding the following configuration to my web.xml : <jsp-config> <jsp-property-group> <url-pattern>*.jsp</url-pattern>…
-
3
votes1
answer125
viewsQ: White space JSTL
I have a very annoying problem, when my jsp is mounted I have a jstl foreach that leaves my final code absurdly giant, worse than I realized it’s just blank space. Follows the code : <c:forEach…
-
-1
votes3
answers221
viewsA: Error in "switch case"
The break is missing; There is a part of your case on github missing the break. here’s an example : int diaDaSemana = 1; switch (diaDaSemana) { case 1: System.out.println("Domingo"); break; case 2:…
-
3
votes3
answers128
viewsA: how to paint an expired date with css
Follow an example using classes. .dt-vencida-color{ color: red; } .dt-vencida-background{ background: red; } <table> <tbody> <tr> <td>Mateus</td> <td…
-
2
votes1
answer1180
viewsA: Text javascript function for uppercase and remove accents together
Function that removes accents, if any doubt remains put in the comment. $(function(){ $("#txtBusca").keyup(function(){ var texto = removerAcentos($(this).val()); $(this).val(texto); }); }); function…
javascriptanswered Mateus Veloso 1,852