Posts by Lucas • 1,952 points
57 posts
-
3
votes2
answers1371
viewsA: Use mysql_fetch_assoc more than once
What happens is that the mysql_fetch_assoc "consumes" lines, as it says in the PHP manual: http://php.net/manual/en/function.mysql-fetch-assoc.php Returns an associative matrix that corresponds to…
-
1
votes2
answers893
viewsA: Calculate the difference between timezone dates
I suggest you save the logs with the server Timezone and calculate the difference at the time of display (as long as you have saved each user’s Timezone). When displaying that the post was X…
-
2
votes2
answers6233
viewsA: upload multiple images at the same time to feed a slide
You should leave the SQL out of the loop and inside upload the images and store the names in an array to insert into the database afterwards: $fdata = $_FILES['img']; $uploads_dir = '/upload'; $img…
-
1
votes3
answers6516
viewsA: What HTTP status code to use to indicate validation failure?
You can use the same 400. The definition in http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html says: The request could not be understood by the server due to malformed syntax. The client SHOULD…
-
1
votes1
answer102
viewsA: Strange problem with footer
Add a <div style="clear: both;"></div> at the end of <div class="row content-index">. This will "clear" the articles' Ivs floats. If you want to know more about this, here is an…
-
2
votes2
answers621
viewsA: How do I access the indexes of a vector returned by a java method?
First, stores the return of the function in a variable: NodeVoo[] voos = vetorVoos(); and then access the indexes: NodeVoo voo = voos[1];
-
15
votes3
answers742
viewsA: How to improve the performance of static files on a website?
I will list the main practices that help in performance: Merge JS into 1 file and CSS into 1 file, both minified. There are online tools for this, for example, Javascript Minifier and CSS Minifier.…