A shell script that prevents all processes performed by a user from running in the past "x" hours. The user's name and "x" are position parameters

So basically I need one Shell script to end all processes that have been carried out by a particular user in the past x hours … If someone could help me and explain it to me a little, I would be so grateful. I am a beginner and I need help with it somehow.

Thank you very much!!!!!

OpenGL Terrain Vertex Ordering prevents cards of uniform height

Evening everyone. I'm working on implementing a simple terrain editor and I have a problem that I couldn't solve. In the attached screenshot you can see whether I am lifting a quad in the field. The slope on the left side of the hill has the distinct edge that rises with the hill, while the right quad only lifts the upper left triangle in the quad. This is due to the vertex order of the terrain, as shown in the red cloudy area of ​​the quick sketch. I tried to switch to even quad mirror triangulation clockwise (shown in black) versus consistent vertex triangulation (purple line), but with the 3rd quad (right slope) the triangle is still parallel to the 1st quad ( left slope) creates different types of slopes.

Is there an algorithm or vertex ordering scheme where both vertices are the same? Do I have to recalculate the indexes every time I change them, search for gradients and change the index order?

Thanks in advance for any help!

Enter the image description here

Enter the image description here

E-Commerce – Prevents a user from pasting from the clipboard into a mandatory form field

I would avoid this behavior as it violates people's basic expectations of being able to copy / paste.

October 2011 – An article by blogger, speaker and serial entrepreneur Boris Veldhuijzen van Zanten about The Next Web (which he founded) – 10 ways to screw up a web form and make me angry

Number 1 – that is Number one: Do not ask users to re-enter email addresses

Number 3: Do not disable the insertion of copies

Here are some numbers from a short survey. I've looked at over a hundred top-class websites that ask for email addresses in their registration forms:

From over 100 websites, Only 10% asked twice for the email address – –

Of the 11 websites that asked for emails twice, more than 90% allow copying / pasting (Facebook, Skype, Amazon, Slashdot, DeviantArt, Ning, Barnes & Noble, Mint, Technorati, Habbo).

while eBay was one and only it did Not Allow copy / paste (and gave no explanation).

also – I know that the Sunday Times (UK) asked for emails twice, but no longer does.

Number 2 was: Activate automatic filling

macos – Prevents FaceTime from answering a call with the play / pause key F8

When a call comes in via FaceTime in macOS Catalina, the call is answered with the pause / play key (usually f8). The problem is that if you are listening to music with something like Tidal and are used to controlling it using the same pause / play button, you are trying to pause the music that you can accept. If you do this, the music will continue to play, but FaceTime will answer the call.

I've checked the FaceTime settings and general keyboard shortcut settings, but apparently can't find anything anywhere to turn this off.

Is there a way to disable the pause / play key (F8) for answering / ending calls in Catalina?

Permissions – Ubomeu 18.04 Gnome Settings: How To Fix "System Policy Prevents Changes. Contact Your System Administrator"

I have an Ubuntu 18.04 machine with 2 users. Both are admins. The 1st user works well. Some system settings are greyed out for the second user, e.g. For example, the unlock button to change users. When I hover over it it says, "The system policy prevents changes. Please consult the system administrator":

Enter the image description here

… or the unlock button to change the printer settings and the printer settings themselves – both are greyed out!

Enter the image description here

What's wrong with you? How can I give User 2 the ability to change printer settings or change users? You are a member of the sudo Group and an administrator, and all of these settings work well for User 1.

Maybe has something to do with polkit? <- no idea what that is and I don't understand it at all.

Update: If one of these files is somehow related to the problem, I have this:

/usr/share/polkit-1$ tree
├── actions
│   ├── com.hp.hplip.policy
│   ├── com.ubuntu.apport.policy
│   ├── com.ubuntu.languageselector.policy
│   ├── com.ubuntu.release-upgrader.policy
│   ├── com.ubuntu.softwareproperties.policy
│   ├── com.ubuntu.systemservice.policy
│   ├── com.ubuntu.update-notifier.policy
│   ├── com.ubuntu.usbcreator.policy
│   ├── com.ubuntu.welcome.policy
│   ├── com.ubuntu.whoopsiepreferences.policy
│   ├── io.snapcraft.snapd.policy
│   ├── org.a11y.brlapi.policy
│   ├── org.debian.apt.policy
│   ├── org.dpkg.pkexec.update-alternatives.policy
│   ├── org.freedesktop.accounts.policy
│   ├── org.freedesktop.bolt.policy
│   ├── org.freedesktop.color.policy
│   ├── org.freedesktop.fwupd.policy
│   ├── org.freedesktop.hostname1.policy
│   ├── org.freedesktop.locale1.policy
│   ├── org.freedesktop.login1.policy
│   ├── org.freedesktop.ModemManager1.policy
│   ├── org.freedesktop.NetworkManager.policy
│   ├── org.freedesktop.packagekit.policy
│   ├── org.freedesktop.packagekit.system-network-proxy-configure.policy
│   ├── org.freedesktop.pkexec.nomachine.policy
│   ├── org.freedesktop.policykit.policy
│   ├── org.freedesktop.RealtimeKit1.policy
│   ├── org.freedesktop.resolve1.policy
│   ├── org.freedesktop.systemd1.policy
│   ├── org.freedesktop.timedate1.policy
│   ├── org.freedesktop.UDisks2.policy
│   ├── org.gnome.controlcenter.datetime.policy
│   ├── org.gnome.controlcenter.remote-login-helper.policy
│   ├── org.gnome.controlcenter.user-accounts.policy
│   ├── org.gnome.DejaDup.policy
│   ├── org.gnome.gparted.policy
│   ├── org.gnome.settings-daemon.plugins.power.policy
│   ├── org.gnome.settings-daemon.plugins.wacom.policy
│   ├── org.gtk.vfs.file-operations.policy
│   ├── org.kde.kio.file.policy
│   ├── org.nemo.root.policy
│   ├── org.opensuse.cupspkhelper.mechanism.policy
│   ├── org.xfce.thunar.policy
│   └── org.x.xf86-video-intel.backlight-helper.policy
└── rules.d
    ├── 20-gnome-initial-setup.rules
    ├── 60-network-manager.rules
    ├── geoclue-2.0.rules
    ├── gnome-control-center.rules
    ├── org.freedesktop.bolt.rules
    ├── org.freedesktop.fwupd.rules
    ├── org.freedesktop.packagekit.rules
    ├── org.gtk.vfs.file-operations.rules
    └── systemd-networkd.rules

2 directories, 54 files

Maybe also related:
Source: https://www.admin-magazine.com/Articles/Assigning-Privileges-with-sudo-and-PolicyKit

Enter the image description here

Relatives, but don't seem to help:

  1. https://superuser.com/questions/980921/cant-unlock-system-settings-such-as-network-settings-to-edit-in-xubuntu
  2. How can I give a user permission to unlock the user GUI to create new users when connected through xRDP sessions?
  3. https://www.linuxquestions.org/questions/slackware-14/system-policy-prevents-modification-of-network-settings-for-all-users-4175420519/
  4. ***** https: //wiki.archlinux.org/index.php/Polkit
  5. https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html
  6. https://help.ubuntu.com/stable/ubuntu-help/user-admin-change.html.de – does not work for me – button is greyed out
  7. How can I create an administrator from the command line? – doesn't seem to be what I need and I've already run sudo usermod -aG sudo user2, then logged out and logged in again and user2 is now displayed sudo as one of the groups when I run groups, but it still won't work

windows – Prevents the connection to UNC paths from being cached in NET USE

If you connect to a network device via the UNC path \ , e.g. For example, a NAS hosting backup images and entering the credentials for the connection, the connection is added to your NET USE list, and can later reconnect to the same path without having to re-enter your credentials.

Is there any way to prevent this or force the server to delete the corresponding network session once the explorer window is closed?

Note: I'm not talking about cached credentials here, but the session being added to NET USE. If it is not deleted, you can go back to the same path without credentials.

Plot – PlotRange prevents PlotLabels from being displayed

(I'm using MMA v.12.0.0 OSX.)

As it appears PlotRange prevented PlotLabels from the display of the labels of the curve that have the same last data value.

I actually have this problem with DateListLogPlot but it seems to happen for different types of actions.

Here is a simple example using ListLinePlot ::

data = {{1, 2, 3, 4, 5}, {6, 7, 8, 9, 5}, {11, 12, 13, 14, 5}, {4, 5, 
6, 7, 8}};

ListLinePlot(data, PlotLabels -> {"1", "2", "3", "4"}, Frame -> True)

Enter the image description here


ListLinePlot(data, PlotRange -> {{0, 5.5}, All}, 
PlotLabels -> {"1", "2", "3", "4"}, Frame -> True)

Enter the image description here

and I don't like this workaround PlotRangePadding (The labels are too wide):

ListLinePlot(data, PlotRangePadding -> {{0, 1}, Automatic}, 
PlotLabels -> {"1", "2", "3", "4"}, Frame -> True)

Enter the image description here

Disk Utility – Corrupted partition table in Catalina prevents Mac from starting

After deleting a partition from my Mac using Ubuntu, I cannot start the operating system due to a damaged partition table. I started the system in recovery mode and tried to use Disk Utility, but got the "Disk Error" message (see screenshot). Unfortunately, I have not backed up my data for years and cannot afford to delete it.

Below are the screenshots of the execution of the "discussils list" and "gpt -r show" commands disk0 and disk1. How can I restore the partition table without losing my data on the computer? I am grateful for any advice I can get.

Enter the image description here

Enter the image description here

Enter the image description here

windows – Why calling HEAD at this URL prevents the following error: ERROR: Message: SSL peer certificate or SSH remote key was not OK

This is a problem I have with a particular package, but it looks like the software is using a version of CURL for Windows or something else. I want to understand this specific behavior because it doesn't make sense to me.

I use this software, which is a custom distribution of Clamav for Windows: https://oss.netfarm.it/clamav/

Specifically this version: https://oss.netfarm.it/clamav/files/clamav-x64-

I call an exe in this package: & 'c:clamavfreshclam.exe'
And I get the following error:

Trying again in 5 secs...
daily database available for download (remote version: 25759)
ERROR: Download failed (60) ERROR:  Message: SSL peer certificate or SSH remote key was not OK
ERROR: getcvd: Can't download daily.cvd from https://database.clamav.net/daily.cvd
Giving up on https://database.clamav.net...
ERROR: Update failed for database: daily
WARNING: fc_update_databases: fc_update_database failed: Connection failed (5)
ERROR: Database update process failed: Connection failed (5)
ERROR: Update failed.

Don't get it because I can access this URL without any problems. I then determined if HEAD is running on that URL before running the exe. It works:

Invoke-WebRequest -Uri 'https://database.clamav.net/daily.cvd' -Method HEAD
# Now this will work
& 'c:clamavfreshclam.exe'

I think they may have implemented wrong curl libraries or something? I don't understand what it could cause. Does Invoke-Webquest retrieve and cache certificates, but Curl (or the apps that use it) don't?