Stuck in the “Log in as another user” screen loop

All of my Ubuntu 18.04 LTS installations eventually gets stuck in a loop where the screen shows the last user who logged in and is prompting for a password.

It has the following options:

Cancel, Unlock, Log in as another user, and Entering the password.

The user can’t enter the password because he doesn’t know the other user’s password. The power button at the top right only has the option to put the machine to sleep. It doesn’t have the option to reboot.

I’m aware that someone can use the Ctrl+Alt+F# hotkey to switch consoles. However, this has many people locked out of the computer unless they perform a hard reboot.

Does anyone know what can be done to stop this loop from happening?

Add another cell A2 to the email Template. What code changes required?

function getRowsData(sheet, range, columnHeadersRowIndex) {

columnHeadersRowIndex = columnHeadersRowIndex || range.getRowIndex() – 1; var numColumns = range.getEndColumn() – range.getColumn() + 1; var headersRange = sheet.getRange(columnHeadersRowIndex, range.getColumn(), 1, numColumns); var headers = headersRange.getValues()[0]; return getObjects(range.getValues(), normalizeHeaders(headers)); }

function getObjects(data, keys) { var objects = []; for (var i = 0; i < data.length; ++i) { var object = {}; var hasData = false; for (var j = 0; j < data[i].length; ++j) { var cellData = data[i][j]; if (isCellEmpty(cellData)) { continue; } object[keys[j]] = cellData; hasData = true; } if (hasData) { objects.push(object); } } return objects; }

function normalizeHeaders(headers) { var keys = []; for (var i = 0; i < headers.length; ++i) { var key = normalizeHeader(headers[i]); if (key.length > 0) { keys.push(key); } } return keys; }

function normalizeHeader(header) { var key = ”; var upperCase = false; for (var i = 0; i < header.length; ++i) { var letter = header[i]; if (letter == ‘ ‘ && key.length > 0) { upperCase = true; continue; } if (!isAlnum(letter)) { continue; } if (key.length == 0 && isDigit(letter)) { continue; // first character must be a letter } if (upperCase) { upperCase = false; key += letter.toUpperCase(); } else { key += letter.toLowerCase(); } } return key; }

function isCellEmpty(cellData) { return typeof(cellData) == ‘string’ && cellData == ”; }

function isAlnum(char) { return char >= ‘A’ && char <= ‘Z’ || char >= ‘a’ && char <= ‘z’ || isDigit(char); }

function isDigit(char) { return char >= ‘0’ && char <= ‘9’; }

function sendEmails() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var dataSheet = ss.getSheets()[0]; var dataRange = dataSheet.getRange(2, 1, dataSheet.getMaxRows() – 1, 4);

var templateSheet = ss.getSheets()[1]; var emailTemplate = templateSheet.getRange(‘A1’).getValue();

var objects = getRowsData(dataSheet, dataRange);

// For every row object, create a personalized email from a template and send // it to the appropriate person. for (var i = 0; i < objects.length; ++i) { // Get a row object var rowData = objects[i]; var file = DriveApp.getFilesByName(‘2019_MA_BenefitsGuide.pdf’) var file1 = DriveApp.getFilesByName(‘List of Acceptable Documents.pdf’)

var emailText = fillInTemplateFromObject(emailTemplate, rowData); var emailSubject = 'Mail Merge Test';  MailApp.sendEmail(rowData.emailAddress, emailSubject, emailText, {attachments: [,]} ); 

} }

function fillInTemplateFromObject(template, data) { var email = template; // Search for all the variables to be replaced, for instance $ {“Column name”} var templateVars = template.match(/$ {\”[^\”]+\”}/g);

// Replace variables from the template with the actual values from the data object.

for (var i = 0; i < templateVars.length; ++i) {

var variableData = data[normalizeHeader(templateVars[i])]; email = email.replace(templateVars[i], variableData || ''); 


return email; }

I am currently using the following code to send mails from google sheets. I wanted to know what changes would be required to add another cell ‘A2’ to the template as I have to add an image at the end of the template. Is there any other work around? Or what changes would be required in the code?

Copying Text from SharePoint into another website not recognized

I was not able to find any answers based upon this one yet, but we have a few Enterprise Wiki pages that have items such as case numbers or Jira tags that need to be copyable and then searchable on other sites, as well as sometimes exact words that need to be able to be entered into other fields.

However, lets say I have a specific case # that I want to search elsewhere, 123456. I copy that directly from the wiki page text into my clipboard and paste it into the search on the external website, I get no results / it does not recognize the entry. I delete this and type out 123456; and the search works. The text to my eyes looks exactly the same as the entry I copied from the wiki page, but for some reason it is not recognized from the copy.

This is happening with multiple external sites from the information I have on the wiki pages on my SharePoint and I’ve been scratching my head at this one for a while now. To recap, this is information copied FROM a wiki page on our SharePoint, a pasted TO a external search or site.

Has this been experienced by anyone else with the wiki pages before? Is there anywhere specific I should look regarding trying to find out what may be causing this issue?

When to couple output from one class as the input to another class?

I am trying to better plan the class structures of a large code base in python. The project is a data science project involving data cleaning, data analysis, etc. I model all the data cleaning tasks as one class object, and all the data analysis tasks as another class object. Under the Data_Cleaning class, I will output certain processed data, and this data will in term feed into the Data_Analysis class. I want these classes to be structured as a framework for reusability. I wonder what are the pros and cons of the following condensed example, and what are the guiding principles to determine if I should instantiate the Data_Cleaning object outside or inside the Data_analysis class?

# Approach #1 class Data_Cleaning():     def __init__(self):         self.numba = 2      def numba_plus_one(self) -> int:         return (self.numba+1)  class Data_Analysis():     def __init__(self, input_numba):         self.input_numba = input_numba      def numba_times_four(self) -> int:         return (self.input_numba*4)  x = Data_Cleaning() my_numba = x.numba_plus_one() print(my_numba)  y = Data_Analysis(my_numba) my_new_numba = y.numba_times_four() print(my_new_numba)  # Approach #2 class Data_Cleaning():     def __init__(self):         self.numba = 2      def numba_plus_one(self) -> int:         return (self.numba+1)  class Data_Analysis():     def __init__(self):         z = Data_Cleaning()         self.input_numba = z.numba_plus_one()      def numba_times_four(self) -> int:         return (self.input_numba*4)  o = Data_Analysis() print(o.numba_times_four()) 

Programmatically Importing Nodes from one page to another another

I want to import node that are on one page to another programmatically.

Have tried to do by two method

$ my_view_name = ‘view name’; $ my_display_name = ‘display name’;

$ my_view = views_get_view($ my_view_name); if ( is_object($ my_view) ) { $ my_view->set_display($ my_display_name); $ my_view->$ nid; return $ my_view

views_embed_view(‘Machine name’, ‘Page name’, $ nid);

I want to grab all the nodes from one page and with the same node want to do some operations on another page.

Systemd – How do I automatically reload a unit, when another oneshot service is fired by timer?

I have two units, nginx.service and certbot.service, provided by their respective Debian packages:


[Unit] Description=A high performance web server and a reverse proxy server Documentation=man:nginx(8)  [Service] Type=forking PIDFile=/run/ ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;' ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;' ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/ TimeoutStopSec=5 KillMode=mixed  [Install] 


[Unit] Description=Certbot Documentation=file:///usr/share/doc/python-certbot-doc/html/index.html Documentation= [Service] Type=oneshot ExecStart=/usr/bin/certbot -q renew PrivateTmp=true 

And a timer, certbot.timer (also provided by the certbot deb package):

[Unit] Description=Run certbot twice daily  [Timer] OnCalendar=*-*-* 00,12:00:00 RandomizedDelaySec=43200 Persistent=true  [Install] 

These all work fine.

The problem, is that I need to reload nginx when the timer fires for nginx to see the new certificates (systemctl reload nginx).

I know I can do systemctl edit certbot.service, and add:

[Service] ExecStartPost=/bin/systemctl reload nginx 

In fact, this is what I’ve done, but it’s a kludge. Is there any way to achieve this with native systemd dependencies? The tricky thing is triggering reload only and not a full blown restart.