The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,262 other subscribers

Archive for April 20th, 2020

macOS and Windows Excel Shortcut: Toggle absolute and relative references | Exceljet

Posted by jpluimers on 2020/04/20

Since I tend to forget the Mac shortcut (the Windows one feels like it is in my autonomic nervous system):

  • F4    Windows shortcut
  • ⌘T   Mac shortcut 
While editing a formula, this shortcut toggles cell references from relative to absolute, to partially absolute, back to relative again: A1 –> $A$1 –> A$1— > $A1 — > A1 It’s much faster and easier than typing $ characters manually.
To convert an existing formula, enter cell edit mode, place the cursor in or next to the reference you’d like to convert, then use the shortcut.
Note: in Excel 2016 for the Mac, you can also use fn + F4. 

Source: Excel Shortcut: Toggle absolute and relative references | Exceljet

–jeroen

Posted in Excel, Office, Office 2011 for Mac, Power User | Leave a Comment »

Passing parameters to a Bash function – Stack Overflow

Posted by jpluimers on 2020/04/20

Since I tend to forget this:

  1. you can declare bash functions with parenthesis
  2. you pass parameters to functions space delimited (often people quote each parameter)
  3. within functions you can refer to parameters by number just like the parameters passed to a shell script

More info at:

I think for functions, you can apply what is linked from Some useful links on bash parameters: $1, $*, $@, quotes, etc., so a loop over all parameters in a function is the same as in a script, see [WayBack] shell – how to loop through arguments in a bash script – Unix & Linux Stack Exchange from Gilles:

There’s a special syntax for this:

for i do
  echo "$i"
done

More generally, the list of parameters of the current script or function is available through the special variable $@.

for i in "$@"; do
  echo "$i"
done

Note that you need the double quotes around $@, otherwise the parameters undergo wildcard expansion and field splitting. "$@" is magic: despite the double quotes, it expands into as many fields as there are parameters.

print_arguments () {
  for i in "$@"; do echo "$i"; done
}
print_arguments 'hello world' '*' 'special   !\characters'    # prints 3 lines
print_arguments ''                                            # prints one empty line
print_arguments                                               # prints nothing
 –jeroen

Posted in bash, Development, Scripting, Software Development | Leave a Comment »

How to install patterns in openSUSE and SUSE – TechRepublic

Posted by jpluimers on 2020/04/20

This was much easier than I hoped for: the zypper verbs search and install both support the --type pattern argument.

After that, the names for them are pattern names instead of the normal package names.

So for instance:

zypper search --type pattern
zypper install -type pattern kde kde_plasmaaa

Sources:

–jeroen

 

Posted in *nix, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »