Posts by Filipe.Fonseca • 1,955 points
43 posts
-
0
votes2
answers2239
viewsA: Variable result with IDHTTP
Use the HEAD method, remembering that if the answer is not 200 (ok), the routine will fall into exception and this should be treated. Follow example as requested in the question: procedure…
delphianswered Filipe.Fonseca 1,955 -
2
votes1
answer609
viewsA: Encrypt a function in Delphi
Easy answer: You can’t. Contour: I don’t even want to get into the merits of why, so that the compiler "understand" what was written, the code must be readable. One way around it would be to create…
delphianswered Filipe.Fonseca 1,955 -
2
votes3
answers1370
viewsA: Use of parameters in the "in" clause in a Tibquery
Since you’re interested in an outline, follow: Instead of passing a parameter only with everything you want to put, try the following. IBQuery1.SQL.Clear; IBQuery1.SQL.Text := Format('Select…
delphianswered Filipe.Fonseca 1,955 -
4
votes2
answers25999
viewsA: How to position one div under another with varying sizes?
If you change your logic to split the database fields into columns you can implement the following: JSFIDDLE CSS: #left { float:left; width:220px; } #teste { border: 1px solid;…
-
2
votes3
answers8001
viewsA: What is the right way to remove the edge with CSS?
Either one of you is worth. According to the specifications, you use a or the other. Value: [ <border-width> || <border-style> || <'border-top-color'> ] | inherit Size: 0 or Style:…
cssanswered Filipe.Fonseca 1,955 -
2
votes1
answer542
viewsA: Listview, do not repeat records
I didn’t know which one you wanted, so I did both jobs. With respect to logic, with the empty listview you always add, after all, no items, no repetitions and from the second apply the function you…
delphianswered Filipe.Fonseca 1,955 -
3
votes1
answer633
viewsA: Working with Autosize Form
Do the opposite. If you make a stack of top align, the form will respect the original order. Follow sources: (to adapt dfm, right click on the form, view as text) DFM: object Form1: TForm1 Left = 0…
-
1
votes1
answer220
viewsA: Insert data from a TXT into a DB
Two doubts arose: Why the inc(i)? How your code compiled with with DataModule1.ZQuery1 do? But back to your question: Why doesn’t it work? Your TXT is not formatted according to what you have…
-
3
votes1
answer817
viewsA: Fortesreport at Delphi
First a comment on its architecture. Try to condense your report into a query, you’re probably making the information redundant. Returning to the subject, I found here a master-detail example for…
delphianswered Filipe.Fonseca 1,955 -
3
votes1
answer1478
viewsA: Integrate Qrcode reader into Delphi system!
Both simple and more complex readers use keyboard input or usb to impute data on your system. To read QRCode it is customary to use a 2d reader. This imputes in the focus field the QRCode(or the 2d…
delphianswered Filipe.Fonseca 1,955 -
1
votes1
answer250
viewsA: Get Firefox DLL Ddeclient Source Code
If you already have the URL, to get the source do the following: Add a idHttp at the Form; Add a Memo at the Form; Perform the following: Memo1.text := IdHTTP1.Get('URL DESEJADA'); Your source will…
delphianswered Filipe.Fonseca 1,955 -
2
votes1
answer308
viewsA: How to read the 'Title' property in the Details tab of a FONT TRUE TYPE file?
It is worth answering to have the history and in case in the future someone needs. The simplest way is to install, check and uninstall, thus having access to the source name. Routine: Function…
delphianswered Filipe.Fonseca 1,955 -
4
votes2
answers1043
viewsA: Progress Bar locks application
Try it this way: ProgressBar1.Position:=0; While ... do begin //codigo aqui ProgressBar1.Position:= ProgressBar1.Position+1; Sleep(500); Application.ProcessMessages; end; The command…
delphianswered Filipe.Fonseca 1,955 -
4
votes1
answer6289
viewsA: Save Clientdataset data to an XML file
To save the TClientDataSet in an xml file: ClientDataSet1.SaveToFile('c:\teste.xml', dfXML); //Como bem lembrado pelo @Caputo To carry the TClientDataSet of an xml file:…
delphianswered Filipe.Fonseca 1,955 -
3
votes2
answers6247
viewsA: Remove comma with jQuery
var noCommas = $('.tags').text().replace(/,/g, ''), asANumber = +noCommas; Just use the function replace If you want to check the last character, follow full function: if…
jqueryanswered Filipe.Fonseca 1,955 -
5
votes3
answers146
viewsA: Handle single while record
You have two ways to do this via css, the simplest is the following: Vide Fiddle table tr:nth-child(1){ background-color:#bbccaa } table tr:nth-child(2){ background-color:#aabbcc } table…
-
0
votes1
answer47
viewsA: Repair in Checkadas tables
Once again you are rolling with the Queries. Define names "friendly" not to give next in the wrong query, for example QryTabelas, QryStatus, etc.. Try it this way: while not DataModule1.ZQuery2.Eof…
-
1
votes1
answer82
viewsA: Check the tables that appear on my first Dbgrid
I can’t be sure without seeing who dbShow is, but try the following: DataModule1.ZQuery1.Close; DataModule1.ZQuery1.SQL.Clear; DataModule1.ZQuery1.SQL.Add('SHOW TABLES FROM '+edtDB.Text);…
-
7
votes2
answers338
viewsQ: JSON performance to power an entire website
Adapting a Drupal theme to pure HTML with a tight schedule as expected, the code came out a little more complicated than I’d like. In this way, I had the opportunity to explore JSON and some of its…
-
3
votes1
answer7056
viewsA: Select Dbgrid Line and Stringgrid recognize the line NUMBER
First set the following option in your Dbgrid: dgrowselect := True; Then his DBGrid has a DataSource and this is linked to a Dataset (be this one Query, ClientDataset, whatever). This has an index.…
delphianswered Filipe.Fonseca 1,955 -
1
votes3
answers138
viewsA: Cannot capture sql error
I don’t know your data access component, but I think it’s worth trying: Substitute DModuleGrid.ZQuery1.Close; DModuleGrid.ZQuery1.SQL.Clear; DModuleGrid.ZQuery1.SQL.Add('SELECT * FROM tdcupant');…
-
0
votes2
answers369
viewsA: Compare txt data with database data
Getting the indentation of your code (very important) I reached some conclusions. Follow: First the code: var txt: TextFile; l,treg,treg2, coo, ccf: integer; valortxt, valorbd : double; lTemp,…
delphianswered Filipe.Fonseca 1,955 -
3
votes1
answer7707
viewsA: Version configuration options in Debug and Release mode in Delphi
Simple answer: Not. Not so simple answer: As far as I know, there is no way, the way you are trying to achieve the desired effect. After all, if you are using auto increment in build, he is…
-
3
votes1
answer175
viewsA: How to know if Lan’s IP was set manually or dynamically?
Following answer "using another technique": We can always check the log to see if the device is using DHCP or not: Uses Registry; var Reg:TRegistry; begin Reg:=TRegistry.Create;…
-
1
votes1
answer1523
viewsA: Import data from a TXT and play required positions in Stringgrid
Let’s go in pieces: First, you do not create the TStringGrid at runtime. Create the component in time design. According to, the syntax of the command copy(arq[c][l],1,3);, if I got it right, it’s…
-
12
votes2
answers3841
viewsA: Best practices for sending emails and avoiding spam
There are several questions you have there. I will try to answer in the best way possible. Remembering that depending on the case, the use of services such as the Mailchimp is the best option. The…
-
4
votes1
answer2266
viewsA: Importing data from a TXT to a Stringgrid
I’m not really in favor of giving the fish to the guys, so I’m going try to teach you to fish: We have the following text file, called test.txt(that must be in the same executable folder, to…
delphianswered Filipe.Fonseca 1,955 -
1
votes1
answer215
viewsA: Ormlite Inner Join in five tables
Follows adapted response from here: It’s gonna be something like this (adapting to your example): // Começa a primeira query QueryBuilder<TableA, Integer> TableAQb = TableADao.queryBuilder();…
-
6
votes3
answers4774
viewsA: How to improve file recording speed for a Clientdataset?
I don’t know the details of your system, but 780 lines of a text file per minute seems low to me, unless you’re pulling the file from somewhere on the network. From what I’ve seen, all the comments…
-
1
votes2
answers260
viewsA: Threads with size set via code
I found a way to solve my problem without appealing to the BeginThread. Follows: At the beginning of my project I can set the size of all threads of the system, hence those created by the…
-
14
votes5
answers1927
viewsA: Why is multiplication faster than division?
As far as I know, this applies to all languages, after all the operation takes place in the processor. And if the processor does not have the division function, it needs to be emulated using other…
-
4
votes4
answers19992
viewsA: How to transport data from R to excel?
The command to be executed using the package xlsReadWrite must be: library(xlsReadWrite) write.xls(mydata, "c:/arquivo.xls") Or you can use one of the following Packages: Writexls xlsx…
-
0
votes4
answers1842
viewsA: How to know the Kb size of a string?
I did not find a simple answer to your first question, but it follows: What you can do to get an idea of the size of your XML is to stress your font. I did a stress test in 5 minutes. It probably…
-
9
votes1
answer60239
viewsA: Script that sends Whatsapp message?
Formulating a response. As well informed by @Ricardo Giaviti, there is an API called Whatsapi, that allows you to do what you want to do. However this only works with your Whatsapp password. The…
-
4
votes2
answers260
viewsQ: Threads with size set via code
I have a system that at certain times uses more than a thousand threads simultaneous and unfortunately accurate run in environment 32-bits. For default, the Delphi allocates 1kb for each thread new,…
-
4
votes2
answers2290
viewsA: Can I use the same WPF view for Desktop and Web?
Since it wasn’t an answer, I chose to send it by the comments, but here it goes: I haven’t heard any complaints from WPF in any browser yet. If you use Silverlight then you will surely have the…
-
14
votes2
answers4769
viewsA: Apply, sapply, mapply, lapply, vapply,rapply, tapply, replicate, Aggregate, by and correlates in R. When and how to use?
Translating from here. R has many *apply functions that are well explained in help (e. g. ?apply). As there are many, some new Usuarios may have difficulties deciding which one is appropriate for…
-
0
votes3
answers3204
viewsA: Button next to text bar with Bootstrap
Change the following property: Of .form-control { display: block; width: 100%; height: 34px; padding: 6px 12px; font-size: 14px; line-height: 1.42857143; color: #555; background-color: #fff;…
-
4
votes3
answers19566
viewsA: Customize the browser message for a "required" field
Or, in Html5, simplifying "a little" the solution, follows: <div class="controls"> <input class="span4" type="text" name="Campo" placeholder="Campo" value="" required…
-
1
votes3
answers145
viewsA: Mark html element
You don’t need to mark the titles. Just build your list into a script. Follow tested code: var headings = Sizzle('h2'); for( var i = 0; i < headings.length; i++ ) { document.write('<ul>');…
-
3
votes1
answer67
viewsA: Is there any way to get visual studio 2012 to support windows mobile 5.0
Unfortunately it is not yet possible. There is a patch for windows mobile, but it is only from version 6.5. The site itself advises against use in windows mobile 5.0, as there are necessary…
-
3
votes3
answers1115
viewsA: Classic ASP out of IIS? Windows x64
You can use the Utildev Cassini. I used it for a long time here and I had no problems. Or else the iis express embedded in a pen drive, but then you’ll have to set up whenever you use, laborious,…
-
2
votes3
answers5697
viewsA: Download images
You can upload the image to a canvas and take the canvas URL to save. Here’s an example from from here: // Pegue uma referencia para o elemento da imagem var elephant =…