Posts by ivomarsan • 311 points
8 posts
-
3
votes1
answer140
viewsQ: {} at require() return
I’m creating a module, but when I use it, I get an empty object in require() Codes below: dev/index.js module.exports = () => { 'use strict'; const names = require('./names.js'), findSuperman =…
-
0
votes2
answers67
viewsA: Problems with navigation bar
You could try hiding with css: seu-elemento { overflow-x: hidden; overflow-Y: hidden; }…
-
2
votes1
answer177
viewsA: What is the best way to hide visible JS functions when specifying HTML?
You won’t be able to hide it, but you can make things difficult, minify your script and swap explicit names for vowels or symbols, make your code illegible by a human. I use the uglify for that…
-
2
votes1
answer33
viewsQ: What is the most peformatic way to declare array in JS?
I have been watching a lot people declare arrays the following way monthShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_') But I’ve also seen them use it like this: monthShort :…
javascriptasked ivomarsan 311 -
0
votes2
answers118
viewsA: Problems with ng-repeat
It’s not exactly the same, but I used this technique for ng-repeat: How to send data from a form received from an ng-repeat with Angularjs…
-
-1
votes3
answers1020
viewsA: How to send data from a form received from an ng-repeat with Angularjs
Yesterday I had a similar doubt and solved so: ... ng-repeat="i in [] | range:example.QTD"> <input ... ng-model="example.NOME[i]" /> <input ... ng-model="example.MATRICULA[i]" />…
-
2
votes1
answer1986
viewsA: Get street address from latitude and longitude
Edvaldo, a very cool example of this application, you can check on: Convert Lat and Long to Address It uses a google maps API to perform the address search. I hope it helps :)…
google-mapsanswered ivomarsan 311 -
8
votes5
answers32771
viewsA: How to calculate the age of a person with JS, from the date of birth?
How about calculating in a much more minimalist way? The calculation with ms is highly superior considered performance. Ex: I was born on 17/12/1995. So: function calcAge(dateString) { var birthday…
javascriptanswered ivomarsan 311