## comp runs like its stuck in a windows update

New at this and not sure how to ask this accurately/succinctly. Occasionally my machine runs like an old windows box stuck in an update. The mouse hangs, doesn’t respond to movement or clicks, or the pointer disappears. Is there a way I can monitor activity to see what’s hogging resources? Is that even the right approach? running Ubuntu 18.04.3 LTS machine is a Dell SFF from about 2013. i5 2400 quad core 4gb ram 250gb hdd

## systemctl Service that runs an executable that never returns

I’m having some trouble figuring out how the services work on CentOS. Right now I have the following service file:

[Unit] Description=SelfTester After=network.target  [Service] Type=simple ExecStart=/usr/bin/selftester  [Install] WantedBy=multi-user.target 

This will launch a script that calls an executable that will never return:

#!/bin/bash export LD_LIBRARY_PATH=SOMEPATH && cd SOMEOTHERPATH && ./EXECUTABLE 

The executable never returns. When I launch the service, it runs for a while but then exits due to timeout:

Job for selftester.service failed because a timeout was exceeded. See "systemctl status selftester.service" and "journalctl -xe" for details. 

## Why say that breadth-first search runs in time $O(|V|+|E|)$?

It’s often stated (e.g., in Wikipedia) that the running time of breadth-first search (BFS) on a graph $$G=(V,E)$$ is $$O(|V|+|E|)$$. However, any connected graph has $$|V|\leq |E|+1$$ and, even in a non-connected graph, BFS will never look at a vertex outside the component that contains the start vertex. That component contains at most $$|E|$$ edges, so it contains at most $$|E|+1$$ vertices, and those are the only ones that the algorithm will visit.

This means that $$|V|+|E|\leq 2|E|+1$$, so why don’t we say that the running time is just $$O(|E|)$$?

This came up in comments on a question about the running time of Disjkstra’s algorithm.

## New laptop runs hot and has low battery life

my laptop runs super hot on ubuntu 18.4, all iam doing is some simple coding and web browsing (not even watching movies). My laptop always gets hot as if iam gaming on it on windows (duel boot).however the fans do kick in, but it drains my battery life like crazy.

i read through some posts on the internet and on google, that it might be related to the drivers installed, i have installed some programs to monitor the laptops thermals and lower them, but it hasnt helped much.

## When moving a directory to another file system, and it runs out of space, are files removed?

Given /mnt/source/ and /mnt/dest/ which are two different places / filesystems.

• mv /mnt/source/foo /mnt/dest/bar/
• then it runs out of space

Are files removed from /mnt/source/foo ?

Can I safely delete /mnt/dest/bar ?

## Simple python scheduled tasks script that runs once daily

I want to execute a python script daily and thereby want to schedules task as follows.

The idea is that the script will run once daily, and the script will then decide what tasks to be done today.

The reason is that I can’t use cron or windows scheduled task on my environment.

from datetime import datetime import os  from sheduled_tasks import daily_task1, daily_task2, weekly_task, monthly_tasks  tasks = {} # or open from saved pickel file  schedule = {     1: [daily_task1, daily_task2],     7: [weekly_task],     30: [monthly_tasks], }  for delta, tasks in schedule['week']:     for task in tasks:         name = task.__name__         if ((task not in tasks) or             (datetime.now() - tasks[name]) >= delta):             task()             tasks[task.name] = datetime.now().replace(hour=6)  # pickle tasks 

## Node program runs in Terminal, but not as a service or on command “do shell script” from AppleScript

I have a call (mercury-parser via Yarn) that converts Web pages to lines of structured text. It runs in node on 3.5 GHz, 6-Core Mac Pro (MacPro6,1) with 16GB RAM and D700 GPUs, running macOS 10.14.5 very well, but I’m struggling to run it as a service / on demand without opening terminal app and typing.

I would much prefer it to run within an AppleScript. Here is the line of code:

/Users/me/.yarn/bin/mercury-parser https://postlight.com/trackchanges/mercury-goes-open-source 

If I run it in Terminal (using either /bin/bash or /bin/sh), I get the proper result: fourteen lines of structured text from the Web page.

If I run it in a shell script, starting with either “#!/bin/sh” or “#!/bin/bash”, I get: env: node: No such file or directory If I run it in Script Editor as: do shell script “/Users/me/.yarn/bin/mercury-parser https://postlight.com/trackchanges/mercury-goes-open-source” I get: env: node: No such file or directory

Here are both my .profile and my .bash_profile texts:

## How do I import database data to a new host that runs a newer version of MySQL without ssh access?

My current host for an old website has only MySQL 5.0 (serverVersion=10.2.12-MariaDB-log).

I want to move this website to a host that has either 5.5 or 5.6 or 5.7 MySQL (depending which server I move to).

But the only instructions I can find for updating database data from 5.0 to 5.6/5.7 are run from the command line, requiring ssh access that I do not have.
For example these are the best, clearest instructions I have found, but I cannot use them because, as AFAIK, I do not have ssh, nor do no fully understand the references ([he?] makes. (e.g. he says --no faults “for simplicity” but even if I had ssh, I don’t know if I should also use that flag or others.)

I usually use MySQL Workbench to connect to remote databases, but when I connect to that old host via MySQL Workbench, a message pops up saying [Workbench] is not compatible with 5.0.
So for that host, I have either used MySQL Workbench anyway to make a backup (which probably probably means the backup is no good), or I use the host’s web-based tool (not my preference, but obviously better). I have also recently installed HeidiSQL because it seems to be compatible with 5.0 (I does not give a warning/error message anyway). So I have started making backups and minor data changes on that host using HeidiSQL.

The only reason I have continued to use the host running MySQL 5.0 is because I haven’t yet found instructions on how to migrate data for websites on that server, whether it’s via a hosting provider’s online database tool, MySQL Workbench, or HeidiSQL !
Everything I see is for for doing step-wise data upgrades using the command line, and/or for upgrading the database server itself.

I need a way to upgrade the data from 5.0 to 5.6 or 5.0 to 5.7, probably in 1 step, using a gui database connection tool, or some other independent method. I will not have access to any mySQL servers other than the server I’m migrating away from (5.0), and the server I am migrating to (5.5 or 5.6 or 5.7).

Does anyone know how to do this?

EDIT:

• I usually choose “Export” from the gui to export and choose all tables, when I do a database backup. I assume this is the same as a “database dump” that I see referenced everywhere.
Is this correct? If not, how do I generate a proper dump file?
• What export “settings” should I use when the goal is to upgrade and migrate?
• I also see some references to users table. Do I need to perform any other exports in order to fully transfer and upgrade my database to a new server with a more recent version?

## How do I import database data to a new host that runs a newer version of MySQL without ssh access?

My current host for an old website has only MySQL 5.0 (serverVersion=10.2.12-MariaDB-log).

I want to move this website to a host that has either 5.5 or 5.6 or 5.7 MySQL (depending which server I move to).

But the only instructions I can find for updating database data from 5.0 to 5.6/5.7 are run from the command line, requiring ssh access that I do not have.
For example these are the best, clearest instructions I have found, but I cannot use them because, as AFAIK, I do not have ssh, nor do no fully understand the references ([he?] makes. (e.g. he says --no faults “for simplicity” but even if I had ssh, I don’t know if I should also use that flag or others.)

I usually use MySQL Workbench to connect to remote databases, but when I connect to that old host via MySQL Workbench, a message pops up saying [Workbench] is not compatible with 5.0.
So for that host, I have either used MySQL Workbench anyway to make a backup (which probably probably means the backup is no good), or I use the host’s web-based tool (not my preference, but obviously better). I have also recently installed HeidiSQL because it seems to be compatible with 5.0 (I does not give a warning/error message anyway). So I have started making backups and minor data changes on that host using HeidiSQL.

The only reason I have continued to use the host running MySQL 5.0 is because I haven’t yet found instructions on how to migrate data for websites on that server, whether it’s via a hosting provider’s online database tool, MySQL Workbench, or HeidiSQL !
Everything I see is for for doing step-wise data upgrades using the command line, and/or for upgrading the database server itself.

I need a way to upgrade the data from 5.0 to 5.6 or 5.0 to 5.7, probably in 1 step, using a gui database connection tool, or some other independent method. I will not have access to any mySQL servers other than the server I’m migrating away from (5.0), and the server I am migrating to (5.5 or 5.6 or 5.7).

Does anyone know how to do this?

EDIT:

• I usually choose “Export” from the gui to export and choose all tables, when I do a database backup. I assume this is the same as a “database dump” that I see referenced everywhere.
Is this correct? If not, how do I generate a proper dump file?
• What export “settings” should I use when the goal is to upgrade and migrate?
• I also see some references to users table. Do I need to perform any other exports in order to fully transfer and upgrade my database to a new server with a more recent version?