Posts by LS_ᴅᴇᴠ • 253 points
8 posts
-
0
votes5
answers64148
viewsA: Difference between two dates in days, hours, minutes and seconds
More compact version: SELECT FORMAT(FLOOR(CAST(@depois-@antes AS FLOAT)),'0d ')+FORMAT(@depois-@antes,'hh:mm:ss') MS, in a series of products, defines the date internally as the number of days since…
-
0
votes2
answers195
views -
0
votes2
answers2872
viewsA: How to read a single-line txt file in VBA?
To read only the first line, do not use the cycle Do. However, it seems to me that this code does some validation to look for the first line started (or not) by "*". And this being the case, the…
-
5
votes6
answers1348
viewsA: Is there an alternative to system('cls') in PHP Console?
cls is not a Windows executable, but a command from the command interpreter (cmd.exe on Windows 7, ...). Thus, to be able to execute it must invoke the command interpreter: cmd.exe /c cls The…
-
0
votes3
answers482
viewsA: Why does Angularjs default to # in the URL?
Probably because this link is to the page itself (see RFC3986), not causing the browser to exit the current page and load a new one. This "address", which continues to be shown in the browser, is…
-
4
votes2
answers59
viewsA: Unusual way to use a jquery function
var a=[1,2]; console.log(a[1]); Equal: console.log([1,2][1]); simply the array is set and accessed on the same line!
-
2
votes1
answer90
viewsA: Javascript arithmetic error
The arithmetic of fractional numbers is never exact (at least for nonmultiple numbers of 1/2 powers). The exact solution was pure coincidence. One way to solve the problem is to convert the problem…
javascriptanswered LS_ᴅᴇᴠ 253 -
1
votes2
answers45
viewsA: Error in image gallery, return random button
#next.click does not update prev_three nor #prev.click updates next_three; prev_three not to be properly initialized: var prev_three=imgs.length-imgs.length%num_imgs; algorithm in general. I suggest…