Posts by Paulo Souza • 356 points
7 posts
-
0
votes3
answers198
viewsA: What javascript code can I use to replace all html images with webp extension to png when the browser is Safari?
You don’t need javascript for this! You can use the tag picture and place the two images (webp and png), so if the first image error when being loaded, the browser itself understands that it should…
-
2
votes1
answer59
viewsA: Is there any way to import a dependency into an object? NODE.JS
The error really is on the line you placed the comment on. Not because of the require, but rather because of = where the correct would be to use :. To create an object in javascript you must follow…
-
2
votes1
answer217
viewsA: How to keep setState using Router in React?
Your bug is being caused by the use of TAG <a href="/" onClick={this.props.handleSave}>Salvar</a>. Using this tag you force the page to be updated by assembling all its components again,…
-
2
votes2
answers104
viewsA: Set final variable inside a lambda gives error, but if it is not final, gives another error
The use of the reserved word final in java restricts that that variable will receive a value in the definition and can never be changed again. Since you did not give any initial value, the variable…
javaanswered Paulo Souza 356 -
5
votes3
answers12057
viewsA: Differences between localStorage Vs sessionStorage?
I have separated some points that can be compared between localStorage, sessionStorage and cookies, since they can also be used for storage. Initialization Cookies can be defined both on the client…
-
8
votes4
answers11232
viewsA: JPA Object References an Unsaved Transient instance - save the Transient instance before Flushing :
The Transientpropertyvalueexception error occurs when you are persisting an object that references another that is not persisted. In case when saving the Address your City object has not yet been…
-
1
votes2
answers244
viewsA: What is a heuristic?
There are problems in computation that are currently impossible to obtain an optimal solution in polynomial time, that is, we will not be alive when the processing is finished and this is due to the…