Posts by Bruno Trócolis • 51 points
6 posts
-
0
votes2
answers140
viewsQ: Batch counter
I am trying to get the lines of a tmp.txt file set n=0 echo %n% for /F "tokens=*" %%l in (tmp) do ( set d[%n%]=%%l set /A n+=1 ) echo %d[14]% but when I execute: 'echo %n%' -> '25' and 'echo…
batchasked Bruno Trócolis 51 -
2
votes3
answers69
viewsQ: standard argument in javascript function
Which of these, or other, is the best way to set default value for a javascript function? function func(arg){ //Esse: arg = arg || "valor padrão"; //Ou esse: if(arg === void 0 ) { arg = "valor…
javascriptasked Bruno Trócolis 51 -
0
votes2
answers53
viewsA: How to slideToggle() from div that was requested via ajax?
I’ve had a problem like this before and I’ve solved it like this: function atualizaConteudo(){ $.ajax({ url: 'getters/conteudo_amanha.php', success: function(data) {…
-
0
votes1
answer149
viewsA: Load specific content from a div that is in another jQuery html file
Try to do that: $("#content").append($("<div>" + data + "</div>").find("#div_"+id));
-
0
votes2
answers30
viewsA: Upload image and grab its dimensions
One way I found it was: var image = new Image(); image.src = './image.png'; image.onload = function () { var w = image.width; }
javascriptanswered Bruno Trócolis 51 -
1
votes2
answers30
viewsQ: Upload image and grab its dimensions
When executing: var image = new Image(); image.src = "./image.png"; var w = image.width; the variable 'w' is equal to '0', there is a way to capture the image dimensions'?…
javascriptasked Bruno Trócolis 51