## Automatic start of Libre/OpenOffice in a listen mode from Python

1 year, 2 months ago
Libre/Open Office give an opportunity of work with office through UNO API. In order that it was possible to address office it is necessary to start it in a listen mode.

For example:

`soffice --accept="socket,host=localhost,port=2002;urp;"`

This approach is quite logical and clear from the point of view of developers of office, but bears a number of inconveniences. In particular, it is necessary to start independently Libre/Open Office in a listen mode. Personally it is not clear to me why developers were too lazy and did not provide function of start of office. Well it is fine, everything would be made, programmers would not be necessary. Let's solve therefore a problem by own efforts.

Read more »

## Multiplication by a method of the Russian peasants

1 year, 3 months ago
Sometimes this method call "country multiplication", sometimes "Ancient Egyptian", sometimes "Ethiopian", sometimes "multiplication through doubling and halving". Some it is well-known, some – is unclear, but at the same time it is rather useful and can be used not only for multiplication, but also for exponentiation and calculations of matrixes.

#### Algorithm

```
13 x 19 -> 0
6 38 19
3 76 ->
1 152 -> 95
0 304 247
^^^
```

Let's write two multiplied numbers nearby – they will become headings of two columns. The third column will contain the increasing sum.

If number in the left column odd, we add number from the right column to the increasing sum. Initially it will be equal to zero.

Then in the left column below we write number from heading, divided in half (with discarding of a remaining balance). 13 / 2 = 6. And in the second column we write the number equal to doubling of column heading, 19*2 = 38.

As number in the left column even, we do not increase the increasing sum.

Read more »