Posts by Ricardo Silva • 168 points
8 posts
-
0
votes3
answers105
viewsA: How to change the value of a variable with a function?
You are returning the value and passing the variable as argument. To have the effect you want it would have to be something like: var x = 2 Function alter() { x += 2; Return x } alter()…
-
1
votes1
answer50
viewsA: Problem rendering the Component that has a function in useEffect
The useEffect can be disregarded if you return false. You can include a check at the beginning of useEffect: useEffect(() => { if(codicao) return false }, [])…
-
-2
votes1
answer73
viewsA: Is it possible from a function parameter to call the value of a variable with Template strings?
Place the texts inside an array or an object: const text = {1:'bla',2:'blabla',3:'blablabla'}; elemento2.innerHTML = `${text[propName]}`
javascriptanswered Ricardo Silva 168 -
0
votes1
answer46
viewsA: integrate Slick slider to my project
If you are not passing any config you do not need {} as argument. But maybe it’s not the problem, I think you need each element to be inside a div. Here a codepen (not mine) example:…
-
0
votes1
answer45
viewsA: Promise - Read Javascript File
Your function is not returning anything. You arrow readFile = as a function but nothing is returned in 'readFile'. Try: function lerArquivo (caminho) { return new Promise ((resolve, reject) => {…
-
0
votes1
answer290
viewsA: jQuery . on('change', Function() {} does not work on select cloned
The question is a bit confusing, but if you are creating elements dynamically. signing events in the load will not work. There are 2 ways to solve this: 1 - pass Event to Parent and brush to the…
-
0
votes3
answers1999
viewsA: Is it possible to develop mobile multiplatform using Java?
Honestly, I don’t think you can take advantage of native Java code to, say, build directly for iOS or Windows Phone. Somehow you will always have to adapt your code to suit some specific system…
-
0
votes1
answer204
viewsA: Find Modules according to Permissions
You need to change your query to fetch the modules by relating to the table permissions. Then return the list of modules with access to a certain user for example. But I don’t see a link between the…