group

Every now and then a group of people assumes the traits and behaviors of sociopaths

This is a fun response from this Ask Polly Q&A:

“Your in-laws are next-level, off-the-charts batshit.

Every now and then, a group of people assumes the traits and behaviors of sociopaths. Maybe one person in the group completely and permanently lost their doughnuts several decades prior, and slowly, each member of the group learns that playing along with this singular menace is the only way to survive. Eventually, the members of the group are so utterly confused and gaslit by each other that they enforce the will of the group and nod along with bizarre opinions until they can’t even remember what it means to think logically or have free will or behave like other regular human beings on the face of the planet.

Because these people are confused and weak and angry — and because they’re rendered increasingly more confused, weak, and angry by their exposure to each other — they tend to have less and less contact with those outside the group. And when they do encounter someone who’s not in the fold, they recoil and attack. Anyone who questions the group is attacked with words and actions. Anyone who questions the group is bad, and the group is good.”

Scala: How to extract parts of a String that match regex patterns alvin July 10, 2017 - 8:32am

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 1.9, “Extracting Parts of a String that Match Patterns.”

Problem

You want to extract one or more parts of a Scala String that match the regular-expression patterns you specify.

Solution

Define the regular-expression (regex) patterns you want to extract, placing parentheses around them so you can extract them as “regular-expression groups.” First, define the desired pattern:

The Linux `chmod` command

Linux file permissions FAQ: Can you share some examples of the Unix/Linux chmod command? (Also written as, "How do I change permissions on Unix files and directories?")

The chmod command name stands for "change mode", and as that name implies, the chmod command is used to change the mode of Unix/Linux files.

I'll start with some simple examples, then add some more details as we go along.

How to delete a list (collection) of files

Perl FAQ: How do I delete a list of files in a Perl script?

This is very similar to deleting one file in a Perl program. You just use Perl's unlink function, but this time pass it a list of filenames. Let's take a look at a simple example.

A simple example

First, create some sample files in the current directory:

JFormDesigner - How to create a ButtonGroup

I just learned how to create a ButtonGroup using JFormDesigner, and it's pretty easy and pretty cool.

First, add all the related buttons you want on your JFormDesigner form. Next, click all the buttons while holding down the [Control] or [Apple] key, depending on your platform, so the all the buttons are selected at one time. Then right-click one of the buttons, then select the "Group Buttons" option from the popup menu.