Posts by HwapX • 542 points
11 posts
-
0
votes2
answers197
viewsA: Read a portion of the file contents
There are several means such as: With regular expressions: Search for a single record $data = '1000# Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.# 1001#…
-
1
votes1
answer57
viewsA: Query Question - Group Data
Using not exists In addition to grouping by RA, you must deny if the student has passed any course. select nome, ra, ano from aluno_legado al where ano = 2015 and not exists(select 1 from…
-
5
votes1
answer103
viewsA: Database stops working after a few hours
Your logic is wrong. while($linha = mysqli_fetch_array($sqlpegar)) { $login_db = $linha['login']; $email_db = $linha['email']; } in this section you end up only with the data of the last record, so…
-
3
votes3
answers233
viewsA: Substitution of variables in the body of the message
After seeing the discussion, I arrived at the following solutions. Could use the function preg_replace_callback. function preg_parse($template, $vars) { $re = '/\{\{([^}]+)\}\}/'; return…
-
3
votes1
answer950
viewsA: Return total of each order with Mysql?
I made the query assuming that it is necessary to multiply the quantity by the value, but if it is not just remove the multiplication. select p.id , p.tipoPedido , IF( p.tipoPedido = 'A' ,…
-
2
votes1
answer2330
viewsA: Delete a folder even if it is with files
The second parameter of the method Delete indicates whether sub-folders/files should also be removed. public static void Delete( string path, bool recursive ) path Type: System.String The name of…
-
7
votes3
answers13600
viewsA: How to get the value of a column corresponding to the maximum of another column?
The best alternative I can think of is select m.* from minha_tabela m inner join ( select codigo, max(data) data from minha_tabela group by codigo) x using(codigo, data); which is the same as select…
-
1
votes3
answers3897
views -
2
votes4
answers6417
viewsA: How to split a string into C++?
Look @Selma already answered what the problem with their code, so I’ll just share an alternative implementation. #include <string> #include <vector> using namespace std;…
-
4
votes2
answers5356
viewsA: Using methods from a DLL
This dll must be a type library(Type Library). To use it first you must register it with the utility regsvr32.exewindows. regsvr32 "caminho para a dll" After that you have two alternatives to use it…
-
3
votes2
answers5558
viewsA: Is there any way to disable Delphi’s "Debugger Exception Notification"?
It is possible yes. Put a Breakpoint at the point from which you do not want the debugger to notify you of new exceptions. Right-click on it and select Breakpoint properties click on Advanced…