Skip to content

Generics-GUI
Generics - GUI

When you face the matter of writing duplicated code, an idea generally rises about how to not waste time.

In strongly typed coding languages a simple mechanism exists, aiding the coder to solve the problem.
The so called Template.

They are designed so that classes and functions able to work with generic types, giving them the possibility to operate on different data types without the need of rewriting code for each of them.

Maybe you've just thought about the concept key: the abstraction.
Indeed we're dealing with it in the sense described above: a template is a try to avoid useless repeating code writing, and to do this we're forced to find a more general way than the direct and boring one.

...continue reading "Generics and templates"

Interfaces2-GUI
Interfaces2 - GUI

By reading the introduction of the interfaces, you obtained a mechanism that makes a class really and completely abstract.

From the article we highlighted their total abstraction.
We noticed that it's contained methods must be overridden by the inherited class(es).
Furthermore a interface does not have any attributes.

Finally we wrote - just on the rush - that the Interfaces mechanism overpasses one compiler's weak point, about the inability to support the multiple inheritance.

In brief: the multiple inheritance in FreePascal grants that an inheriting class can inherits from more than one more abstract class.
It so expands its possibility to enrich itself, always  by keeping the order and the hierarchy achieved with the interfaces.

And that's very good... in theory.

...continue reading "Interfaces and multiple inheritance"

Interface-GUI
Interface - GUI

We've finished the previous article on inheritance talking about the way used in FreePascal (and in Delphi too) to make a class abstract; we've learned that by declaring just one method as virtual abstract is enough to get the result.

But again we've seen that is not true, indeed.
Theory says one thing, and reality another one! This is a rule you should always keep in mind, because reality always doesn't care of your thoughts. 😉

Back to our example... is there a way to get a true abstract class? Luckily yes!

Ladies and Gentlemen, here the interfaces!

...continue reading "Interfaces. An introduction"

Ok, let's say you want to do a measurement of the short-circuit impedance relating to the electrical system of a house/room/lab/whatever. This is something you usually have to do if you want to choose the correct level of the protective devices.

I'll show you how to do a measurement of:

  • short-circuit impedance in case of a single-phase failure;
  • short-circuit impedance in case of a two-phase failure.

All you need is an impmeter and a multimeter.

...continue reading "How to do a short-circuit impedance measurement"

Insert CF Card
Insert CF Card

We have seen the first part of installation in the pfSense installation to a CF Card.
The first step is to insert our CF Card with pfSense into our hardware device.
Find the dedicated slot and insert carefully your CF Card.

We are using a 4G Compact Flash card.
Once inserted the card close your enclosure.
Do not plug the unit into power for the moment.

Now connect your null modem to the dedicated RS232 slot.

Use your serial to USB cable and connect the null modem with your PC.
Remember to install the drivers of your serial to USB cable.

Connect-Null-Modem
Connect Null Modem
Connect Serial to USB Cable

 

 

 

 

...continue reading "pfSense installation second part"