* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Re: Mini CriptoCoin development step by step.
« Last post by Xor-el on Today at 08:20:15 pm »
This is how it goes.
Only developing the p2p network, and still things to do. I already found a good reference to include client listening from server, which i will include in my next update.
Things i need understand yet how to do:

- Create and store cripto keys using DLL.
- Sign and verify messages.
- Unified network time.

PS I will work to slowly make it totally coded.

this is my own review from a quick glance from your code

1). Wrong choice using *components*. you need to detach every code from components and forms. for that you need pure code run time code.

for

- Create and store cripto keys using DLL.
- Sign and verify messages.

you need to choose a signing and verifying algorithm eg ECDSA, ECNR or RSA.
for ECDSA, you need to choose a curve at which you generate the keys from. eg Secp256k1.

2
Database / Re: Raspberry pi and sqlserver
« Last post by af0815 on Today at 07:56:03 pm »
No problem here to connect with zeos and maybe with sqldb. The correct driver are more the problem.
3
General / Re: Please make your language more freedom
« Last post by Handoko on Today at 07:31:45 pm »
It's difficult for a non-pro like me to foreknow everything to declare on var section first. Imagine a very long function/procedure, everytime I want to use an additional temp variable I have to jump to the var section and declare it.

Pascal is strict, you usually need to plan it before start coding and type more (compare to some other languages). But those actually are the good things. The beauty of Pascal is its strictness makes the code easier to maintain.

Pascal is not to please novice users, many beginners give up Pascal on the learning process. They think coding in Pascal is not as easier as the others. But when you're actually programming some real project, you'll know the hardest parts are doing the maintaining and debugging. Proper planning will make the code less bugs and easier to maintain. By using Pascal, you 'force' yourself to do some simple planning by thinking what variables you will need, what data types and ranges are needed.

It's difficult for a non-pro like me to foreknow everything to declare on var section first.
Then you now should start to learn planning before touching the keyboard. In my earlier days I wrote many codes and components but most of them ended up nothing, because I didn't plan them properly. So don't repeat my mistake, always do some planning before you write the code.

Imagine a very long function/procedure, everytime I want to use an additional temp variable I have to jump to the var section and declare it.
If the function/procedure is very long, you should split it. Each of them should be kept in a screen height so you can see all the code without using page up/down. It is good for debugging and maintaining.
4
General / Re: Mini CriptoCoin development step by step.
« Last post by torbente on Today at 07:24:37 pm »
This is how it goes.
Only developing the p2p network, and still things to do. I already found a good reference to include client listening from server, which i will include in my next update.
Things i need understand yet how to do:

- Create and store cripto keys using DLL.
- Sign and verify messages.
- Unified network time.

PS I will work to slowly make it totally coded.

5
LCL / Re: LCL component to implement a ruler
« Last post by wp on Today at 07:23:22 pm »
Most Win components can be made cross-platform if you remove the units Windows, Messages and replace them by LCLIntf, LCLType, LMessages (sometimes also LCLProc). If there are messages replace the type TWMSomething by TLMSomething (e.g. TWMSize --> TLMSize), and TMessage by TLMessage. The same with the message constants: WM_SOMETHING --> LM_SOMETHING, e.g. WM_SIZE --> LM_SIZE.

A riuler is contained in the JVCL library (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/jvcllaz/run/JvCtrls/), not draggable though. But there is also a moveable panel (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/jvcllaz/run/JvCtrls/JvMovableBevel.pas)- Maybe you get some ideas about dragging from there.
6
LCL / LCL component to implement a ruler
« Last post by ermeneuta on Today at 07:12:19 pm »
Good afternoon,

  I am in search of a LCL component to implement a mouse-draggable ruler, like that shown in the attached picture. Alternatively, as I have already such a component for the Delphi VCL, how can I recode that VCL component into an LCL component (under Linux).

Thanks
7
FPC development / Re: Dynamic array extensions ?
« Last post by VTwin on Today at 06:43:03 pm »
Quote
Addendum to that: the "+" operator is now connected to a "ArrayOperators" modeswitch.

Thank you. Guess that is an acceptable solution.

Code: Pascal  [Select]
  1. {$modeswitch ArrayOperators-} // Note the "-"
Why is it "-" in this case rather than "OFF" ?

https://www.freepascal.org/docs-html/prog/progsu105.html

Quote
The syntax is as follows:
{$MODESWITCH XXX} 
{$MODESWITCH XXX+} 
{$MODESWITCH XXX-}

The first two will switch on feature XXX, the last one will switch it off.

A mode switch seems like a good solution. Thanks!
8
General / Re: Fix my code
« Last post by Handoko on Today at 06:38:20 pm »
@Maboi

They've already told you your mistakes. But if you still more clue, see the example below:

Code: Pascal  [Select]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var
  3.   i: Integer;
  4. begin
  5.   i := 10;
  6.   for i := 1 to i-1 do Sleep(10);
  7.   ShowMessage(i.ToString);
  8. end;

Try the guess the result of the code above. What's your answer? And then try run the code, was your guess correct?

Your code still have other problems, but if you read ASerge source code comments carefully you can fix them.
9
General / Re: Please make your language more freedom
« Last post by VTwin on Today at 06:23:26 pm »
But seriously, take javascript. The results of being able to declare your var wherever you want became so complex (
http://www.adequatelygood.com/JavaScript-Scoping-and-Hoisting.html ), that they needed a linter https://eslint.org/docs/rules/vars-on-top

Wow! That makes me appreciate the current approach in Free Pascal even more.
10
General / Re: Please make your language more freedom
« Last post by VTwin on Today at 06:15:21 pm »
Imagine a very long function/procedure, everytime I want to use an additional temp variable I have to jump to the var section and declare it.

This is an IDE feature. Delphi has this as ctrl-shift-V  "declare variable".

Many shorthands syntax can be better solved in IDEs/editors, something that was not available in C's years of yonder.

Having such IDE features is good, although if a function is that long, it should probably be rewritten as several functions.

Regarding the brevity of curly braces, I just type "b" and start entering code in the block. That is a great IDE feature! :)
Pages: [1] 2 3 ... 10

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus