Posts by Henrique Marti • 312 points
14 posts
-
0
votes1
answer532
viewsA: PC Phone Integration
There’s a lot going on together, let’s sort things out: 1 - AT commands What you’re doing is sending commands AT to the serial port modem. You’re not actually doing anything, you’re giving commands…
delphianswered Henrique Marti 312 -
0
votes2
answers141
viewsA: Database data by days of the week
If I understood your doubt correctly, it would be so: # Para segunda: SELECT * FROM tabela WHERE dia_da_semana = 'SEGUNDA-FEIRA' # Para terça: SELECT * FROM tabela WHERE dia_da_semana =…
-
1
votes1
answer93
viewsA: What is the "function" in Oracle equivalent to a "set Generator"?
According to the Oracle documentation the way to change the value would be to delete and then recreate with the start value you want. DROP SEQUENCE GEN_ID_TABELA CREATE SEQUENCE GEN_ID_TABELA START…
-
1
votes1
answer988
viewsQ: Scheduling of Tasks in Django
Guys is the following, in Django things only happen when some user accesses your application. AN EXAMPLE (fictional) Let’s imagine that you created an application in which the user enters and…
-
0
votes1
answer198
viewsA: How to set email as a Django username
You must write a custom Authentication backend. Something like this will work: from django.contrib.auth import get_user_model class EmailBackend(object): def authenticate(self, username=None,…
-
2
votes2
answers1547
viewsA: Analyzing strings in a text file and returning the string that appeared most
I have little information about your case so I will consider the following: File "A" has one word per line You need to find which word appears more often, but you don’t have a list of possible…
-
1
votes2
answers1783
viewsA: print matrix in Phyton
First way matriz = ((2, 3), (4, 6)) for linha in matriz: print(linha) The result of this will be: (2, 3) (4, 6) Second way matriz = ((2, 3), (4, 6)) for linha in matriz: for coluna in linha:…
python-3.xanswered Henrique Marti 312 -
1
votes1
answer910
viewsA: Run application through Delphi service with administrator rights
Man, I was doing a quick search and I found this here: uses ShellApi; ShellExecute(Handle, 'runas', 'regedit', nil, nil, SW_SHOWNORMAL); I tested here on Delphi XE5 with a common application and it…
delphianswered Henrique Marti 312 -
3
votes3
answers7489
viewsA: How do I make a Delphi application run as an administrator?
To do this you will need to create a Manifest customized. Tip: To learn more about Manifest customized you can give a look at this link from Embarcadero: Customizing the Windows Application Manifest…
-
0
votes1
answer113
viewsA: Securing a Transaction
A solution that can impact performance but that will solve the problem is every loop iteration you give the "select max + 1" in the field of rg. I don’t know exactly what the size of your…
-
1
votes1
answer1591
viewsA: How to assign an image to a Listview Item?
If I understood your question correctly, the simplest way would be to link an Imagelist to Listview and then indicate in the Listview item the index of the image that will be used. It is possible to…
-
1
votes1
answer131
viewsA: Delphi Add line in SQL error LIST OF BOUNDS (3)
Dude, I think the SQL which is in its component qryAgrupaValoresorData is different from the one you’re hoping will be there. You expect to change the contents of the fourth line (the index line 3,…
-
1
votes1
answer1958
viewsA: Applying Richedit text style in Delphi
From what I could identify when debugging the code you have put, the problem is that each line break adds an invisible special character (the character CR or #13#10). With each new line break the…
-
1
votes2
answers495
viewsA: Type of list elements - Python
As the Lista2 comes filled with the names of data types of your database we can not do direct conversion, we will have to create a dictionary that will make the "de->to" of the database types for…