maandag 7 augustus 2017

Uniq, Sort, Count, Seq and Rev commands in Bash

The title speaks for itself.
Three commands to remember.

Don't forget the seq command (sequence)
Rev (reverse)

vrijdag 4 augustus 2017

Moving through code


"Browsing through code
:set mps+=<:>

matchpairs does the job for me in Vim. See above.

This is the page that discusses it and more: http://vim.wikia.com/wiki/Moving_to_matching_braces

There is also a vim plugin that offers more but I haven't looked into it.

Thank you for your answers, both of you.

zaterdag 22 juli 2017

Polymorphism and inheritance

Inheritance refers to using the structure and behaviour of a super class in a subclass.
Polymorphism refers to changing the behaviour of a super class in the subclass.
https://stackoverflow.com/questions/6308178/what-is-the-main-difference-between-inheritance-and-polymorphism

vrijdag 14 juli 2017

Regex match until you find letter

WhatMShallTweMdoT

/^.+?(?=M)/g

(.+?) makes the regex non-greedy.
(?=M) is the condition. This is a postive lookahead assertion.

What is matched is: What

For more information:
https://stackoverflow.com/questions/7124778/how-to-match-anything-up-until-this-sequence-of-characters-in-a-regular-expres

For the regex engine:
http://regexr.com

dinsdag 11 juli 2017

zaterdag 8 juli 2017

Ranger: BELANGRIJK

Use in the program Ranger the command :filter to make selections of certain files.
For instance:
:filter .mp4

To undo the filter, just type :filter to empty it.

New style for Libreoffice Writer

Creating a new style for Libreoffice Writer:
1. Style/New Style/
Give a name to the new style.
Then Modify and assign values to it in Font.

2. Assign a new shortcut for it by Tools/Customize/Keyboard/Styles/Paragraph/Monaco.
And then Modify: F4


Enlarging Libreoffice window completely with command

 You can open the LibreOffice window completely by pressing the CTRL+Shift+J keys together.