Posts by Melissa • 838 points
15 posts
-
2
votes2
answers283
viewsQ: jwt.Decode - what is the need for a list of algorithms?
I am studying Python and needed to solve an exercise using JWT (JSON Web Tokens). It was necessary to create a token and verify the validity, searching for example codes, found in the documentation…
-
2
votes3
answers336
viewsA: Catch Fatherless Children in a MYSQL hierarchical structure
Being the same table, if there was the foreign key of the relationship, the exclusion would not be possible. As there was the exclusion, I understand that the codes of the "parent records" are still…
-
3
votes1
answer208
viewsA: UNION - SQL Server
The command Union eliminates repetitions, as explained in the message: The type of text data cannot be used [...] because it is not comparable. and for the elimination of repetitions, it is…
-
0
votes2
answers150
viewsA: Error in primary and secondary keys
The foreign key must have the referenced fields that are the primary key in the referenced table. In this case you are referencing the table key Pupil and this key consists of 3 fields: id_student,…
-
3
votes2
answers113
viewsQ: Tabstop de Radiobuttons independent of the Checked property
I have a set of Radiobuttons, Edits and Labels inside a Groupbox, as in the image below: I would like in the use of Tab the focus did not pass in any Radiobutton, and yes only in the Edits, for…
-
4
votes2
answers113
viewsA: Tabstop de Radiobuttons independent of the Checked property
The solution I found was to force the Tab or Shift + Tab at the Radiobuttons Onkeyup Event: if (Key = VK_TAB) and (Shift = [ssShift]) then begin Perform(WM_NEXTDLGCTL, 1, 0); end else if Key =…
-
4
votes3
answers58
viewsA: Field referring to the MAX
In addition to the answer already given, it is also possible with an equivalent sub-consumption using max(): SELECT P1.VEICULO, P1.DATAINCLUSAO, P1.REVISAO FROM PLANOS P1 WHERE P1.DATAINCLUSAO =…
-
2
votes1
answer216
viewsA: Problem with the sum of 10 numbers with for
answer given in the comments and accepted as correct: Delphi is very weak with memory management, without initializing the variable it can receive "junk" from memory.…
-
1
votes2
answers48
viewsA: Apply condition depending on value
Yes! You can structure a condition within the where matching or and and. Example: and ((not ISNULL(SD3.D3_CC)) and (SD3.D3_CC BETWEEN '' AND 'zzzzzzzzz') or ISNULL(SD3.D3_CC)) This will work like a…
-
3
votes2
answers75
viewsA: Add or subtract value according to the "release type" (MSSQL)
Use case to do as you wish! With it you can condition the value field with the feature you want (negative, positive, zeroed...) and then add up everything. Conditions for the field…
-
8
votes2
answers335
viewsA: Union problem in mysql
That’s exactly what’s talking about in the message, the selects need to have the same number of columns. In case you tried to bring only the last column FILIAL in the last select with the table…
-
3
votes3
answers200
viewsA: How to Merge 3 Select into One
Remove the filter for each flag and add conditioning, using the case when, you can put more clauses. The idea is: select sum(case when [condição específica que conta no campo_1] then 1 else 0 end)…
-
1
votes1
answer362
viewsA: Doubt with handling of Treeview and delimited TXT files
As you pointed out in the comments, your difficulty is to assemble a Treeview, I’ll leave a solution with this focus. For the solution I used: A Tmemo as a basis for the file. A Ttreeview. A…
-
5
votes2
answers1095
viewsA: Declare const array of Variant
If you have the types and the data will be structured, the ideal is to escape from the Variant, as you do not want to use variable, index "const array of record": type TCampos = record CampoA:…
-
4
votes1
answer140
viewsA: Delphi simulate subtraction of angles expressed in degrees °, minutes ' and seconds "
Following solution in Delphi, I highlight that Edit1 and Edit2 expect a valid string, with the format: ggº mm' ss" procedure TForm1.Button1Click(Sender: TObject); function GetValorNumerico(const…