Posts by Havenard • 547 points
11 posts
-
3
votes1
answer58
viewsA: Delphi if structure
memo40.Lines.BeginUpdate; for j := 3 to 12 do if StringGrid1.Cells[1, j]('') then for i := 1 to 100 do memo40.Lines.add(StringGrid1.Cells[i, j]); memo40.Lines.EndUpdate; It is necessary to declare j…
-
3
votes1
answer5093
viewsA: How to create direct link to download a video
Use the attribute download. <a download href="video.mp4">DOWNLOAD</a> You can use the attribute to define the name the file should be saved to: <a download="Férias da Família…
-
5
votes2
answers835
viewsA: How to make an effect by adding a new item to a list
What the site is doing is very simple: setInterval(function() { var i=0; if($("ul.senasteList li:first").hasClass("odd")) i = 1; $.ajax({ type: "POST", url: "senaste.php", dataType: "html", data: {…
-
6
votes2
answers2414
viewsA: #pragma Once or #ifndef?
Because #pragma once is not part of the C/C++ standard and is only adopted by some compilers, such as Microsoft Visual Studio. To universalize your code to multiple compilers, the best approach is…
-
2
votes3
answers1760
viewsA: Performance issues using UPDATE
You can try updating multiple records by query using CASE. For example, instead of: UPDATE tabela SET valor = 123 WHERE indice = 1; UPDATE tabela SET valor = 456 WHERE indice = 2; UPDATE tabela SET…
-
1
votes4
answers309
viewsA: How to deal with a comet process?
I think using the killall would be the only solution that does not involve tampering with the system kernel. But as you said yourself it can curl since the constant creation and elimination of…
-
0
votes4
answers1099
viewsA: When to implement header functions?
One of the problems of doing this is that the compiler will recompile this function several times, one for each .c or .cpp that include this header, and the compiler will also understand that this…
-
1
votes1
answer260
viewsA: Detected an untreated exception. Generated code: [68MJGTMV] and [XJEL5QC6] - Expected exception
Any class or function launched an Exception while running out of a block try { } catch. This can be for several reasons. You’ll have to see what the function classeBean.salvar() may be doing that…
-
1
votes2
answers1487
viewsA: Accent + $http.get
JSON only works with UTF-8, trying to mount a JSON string using symbols incompatible with that encoding will cause the string to be converted to null by function json_encode() of PHP. Make sure that…
-
14
votes5
answers24456
viewsA: AJAX request with pure Javascript (no Apis)
try { var loader = new XMLHttpRequest(); } catch (err) { // versões antigas do Internet Explorer não tem a classe XMLHttpRequest, precisa usar esse componente ActiveX …
-
5
votes4
answers4278
viewsA: Mysql performance with Innodb in large data mass table
A simple selection like this should be no seven-headed bug for Mysql to run, even in a table of 6 million records. You should however make sure that the fields involved in the condition are indexed,…