Ubuntu 18.04.2 LTS problems after automatic suspend, vast file of errors on screen no functions

Hi to all I am new here and a novice Ubuntu user having escaped the clutches of Microsoft at last! I am getting a fairly regular issue with my system if left for a few hours after going into automatic suspend. I either have no functions available via keyboard or mouse or otherwise get a screen full of process information which I am unable to copy. Any help or suggestions gratefully received! N.B. I am really pleased with the setup other than this glitch, only way I can think of sharing the screen is to take picture and try to post it but it is not ideal as there are pages of info. Many thanks in advance.

Proof verification for simplex method problems

I’ve asked the same question on MSE, and will delete one of these two once I get an answer, either here or on MSE. I’m posting it here thinking just that it might not have got the attention of people over there.

I was studying simplex method in LPP from “Introduction to Linear Optimization by Bertsimas and Tsitsiklis”, and came across this problem:

Consider the simplex method applied to a standard form problem and assume that the rows of the matrix $ A$ are linearly independent . For each of the statements that follow, give either a proof or a counterexample. Take $ n\geq m$ , where $ A$ is $ m*n$ and $ b$ is $ m*1$ matrix.

(a) An iteration of the simplex method may move the feasible solution by a positive distance while leaving the cost unchanged.

(b) A variable that has just left the basis cannot reenter in the very next iteration.

(c) A variable that has just entered the basis cannot leave in the very next iteration.

(d) If there is a nondegenerate optimal basis , then there exists a unique optimal basis.

(e) If $ x$ is an optimal solution, no more than $ m$ of its components can be positive, where $ m$ is the number of equality constraints.

I tried this question, and was able to solve some of them. But, I’m not sure if my solutions are correct. It’d be really helpful if someone could tell if I solved these correctly and tell the solutions/hints for the unsolved ones.

My try:

I considered a tableau while solving all of these problems.

a) False. Let $ c$ and $ \bar{c}$ be the initial and final costs. When we update the tableau, we’ll apply row transformation to go from $ c$ to $ \bar{c}$ . But since $ c=\bar{c}$ , for the cost to remain the same after an iteration, the basic variable that is exiting the basis has to be zero. Let $ k$ be the index of the variable entering the basis and $ B(l)$ be that of leaving the basis. When we move from $ x_{B(l)}$ to $ x_k$ , whatever we multiply by, $ x_{B(l)} (=x_k)$ will remain the same ($ 0$ ). So, we are still at the same point.

b) I know this is true and I can write the proof. If I’m wrong, please tell, otherwise feel free to skip this.

c) I’m not sure, but it should be true. When a variable $ x_j$ just enters the basis, $ B^{-1}A_j=e_j$ ($ e_j$ denotes the the unit vector with $ j$ -th component equal to $ 1$ ) and the reduced cost is zero for a basic variable. Since in each iteration, we select only those variables for which the reduced cost is less than zero, $ x_j$ cannot leave in the very next iteration.

d) I was unable to understand it clearly. What does “basis” mean? The basis matrix $ B$ or the vector of basic variables $ x_B$ ? I’ve no idea on how to proceed in any of those two way either.

e) This is true since $ x$ being an optimal solution is a bfs.

Please note that I don’t even need full solutions, even hints will do. Thanks!

Body, files, and paths problems

I was suggested so many times to migrate my old project from D6, so I finally decided to jump into this. And as it always happens with Drupal, things never work as expected at first attempt.

The old Drupal 6 site has 180 modules (I’ve switched off a vast majority of them), 100K users, about 3K nodes (within 4 content types), 170 taxonomy terms, more than 5K different node relationships, 34K comments, 7K path aliases, 6K user pictures, 5K files (most of them attached to nodes through file fields) and some other stuff.

The new Drupal 8 site was installed with composer create-project drupal-composer/drupal-project:8.x-dev <FOLDER> --stability dev --no-interaction. I also installed all the suggested migration modules and ran the migration process through Drush. The Drush launcher version is 0.6.0 and Drush is version 9.6.0.

drush migrate-import --all command didn’t go well, because it found some missing modules, which are not ported to D8 yet, so my only choice was to use something like drush migrate-import upgrade_d6_taxonomy_term --feedback="100 items" for each migration.

Data was ported, but with some problems.

Files

Some files are not attached to nodes, as they should, especially node images.

Moreover, on /admin/content/files page many of them appear with strange strings, instead of names and are linked to empty files: https://new.site.com/sites/default/files/sliwrunepeswothobrucohaphigeluwruj. All these files are actually empty.

As I understood, all of them are node attached images, used as cover image, supposed to represent an article on taxonomy or views pages.

Body field

It is also ported but with two issues:

1) All HTML tags are converted to <p> tags. E.g. if there was H2 heading, it is <p> tag now. The same thing for <li>, images, youtube embedded videos… all inline tags are deleted completely with their contents or replaced by paragraphs. Class names were wiped as well.

Full HTML is enabled for body fileds on both sites.

2) Body is not showing up, when I view a node. If I go to edit – it is in right place, I can even cahnge it. But on node view <div>, which should be containing body, is empty.

I’ve googeled it, and some say that they changed site default language or edited body teaser, because it cannot be null… but all these things are fine in my case – site language is the same, as it was in D6 version and node teasers are not empty.

Paths

All 7243 path redirect entries are migrated without errors. I can see all of them on /admin/config/search/path page of new site. However, all node urls are default (node/1234) and if I click on url alias it redirects me back to node/whatever-number.

Also on migrated node, path field is empty.

Creation of a new node doesn’t have any of described problems, everything works fine.

Boeing Max problems could have been averted? [migrated]

The question risks being a bit off topic for this site. However, I have a feeling people here (or anyone that travels in the modern world) might be deeply interested in this topic since their lives might depend on it.

There is a bit of a buildup to the question, so please bear with me.

This is the picture I have based on reading the news lately. On October 28th 2018, a Lion air flight (Boeing 737 Max) had an extra pilot on board, a tag-along. The flight experienced issues with its nose dipping down. The extra pilot helped turn off the MCAS system (which was probably the cause of the dip), the pilots took manual control of the plane and the flight landed successfully.

The next day, the very same plane took off and had the exact same issue a few minutes into the flight. This time, the pilot (who had 6000 hours of air experience and a clean record) didn’t know how to turn off the automated system. He struggled with it, requested to return to the destination airport, eventually lost the battle and the plane plunged into the sea, killing 189 people.

Then, on March 10th 2019, another Boeing 737 Max operated by Ethiopian airlines crashed. All signs point to the very same issue, killing 157 people.

Apparently, the very first pilot who saved the Oct 28th flight didn’t warn the guy flying the same plane the next day. And even more mind-blowing is the fact Ethiopian airlines pilot might not have known how to counter this MCAS system five months later.

Now the question – is there a system where pilots – once they complete a flight – can report difficulties and challenges experienced right after? And are pilots before flying required to review whatever the previous pilot wrote? Especially if it’s, you know, the same plane on the previous day? If not, should such a system exist?

References https://www.cnn.com/2019/03/20/asia/lion-air-third-pilot-intl/index.html

Razer Phone 1 no such partition problems

I was currently having problems with my phone boot looping and tried to go into recovery or use twrp to stop it but they both failed. I read by using the flash_all dat that it will flash the factory image back, however, when I did that it rebooting my phone and now it will it only boot into download mode.

I tried flashing the boot.img and they both send and wrote on both a and b fine. But when I would try to flash the system.img or a system image of a custom rom it would get no such partition. I am able to get a number using fastboot devices but not an number using adb devices. What shows up when using fastboot devices is RCL_NullNullNu00000 which doesn’t look like a good thing.

I can not use an SD card as there seems to be a door(?) blocking the tray from going in. I don’t know, I got this used.

Edit: I was able to fix it by using the flash_all.sh one by one which I’ve done before and that’s how I knew I couldn’t flash anything to system… So I don’t know why it worked this time. I did skip the erase commands they had in there so maybe that could have been my problem.

Edit 2: I sadly don’t remember if the model should say something else bc, after fixing it, it now just says “Phone”. The Android version is 8.1.0

Problems generating procedural mesh

I have this code below that I found on catlikecoding that generates a procedural grid that I want to apply noise to, however once I go over a certain value it does expand vertically. Can anyone see why it wouldn’t?

For example, 100×100: 100x100 procedural grid

However, 500×500 is clearly wrong: enter image description here

Code used:

using UnityEngine;  [RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))] public class Island : MonoBehaviour {  public int xSize, ySize;      private Mesh mesh;     private Vector3[] vertices;      private void Awake () {         Generate();     }      private void Generate () {         GetComponent<MeshFilter>().mesh = mesh = new Mesh();         mesh.name = "Procedural Island";          vertices = new Vector3[(xSize + 1) * (ySize + 1)];         Vector2[] uv = new Vector2[vertices.Length];          for (int i = 0, y = 0; y <= ySize; y++) {             for (int x = 0; x <= xSize; x++, i++) {                 vertices[i] = new Vector3(x, y);                 uv[i] = new Vector2((float)x / xSize, (float)y / ySize);             }         }          mesh.vertices = vertices;         mesh.uv = uv;          int[] triangles = new int[xSize * ySize * 6];         for (int ti = 0, vi = 0, y = 0; y < ySize; y++, vi++) {             for (int x = 0; x < xSize; x++, ti += 6, vi++) {                 triangles[ti] = vi;                 triangles[ti + 3] = triangles[ti + 2] = vi + 1;                 triangles[ti + 4] = triangles[ti + 1] = vi + xSize + 1;                 triangles[ti + 5] = vi + xSize + 2;             }         }           mesh.triangles = triangles;         mesh.RecalculateNormals();     } } 

Problems redirecting the page after saving using Source

I want to, when and edited iten is saved, to redirect to another page… i’m using the above code to change de source of the page. This causes the page to reload. No problem there…

if(stringURL.indexOf("AllItems")>-1){     stringURL = stringURL.replace(stringURL.substring(stringURL.indexOf("Source="),stringURL.length),"Source="+_spPageContextInfo.webAbsoluteUrl+"/example.aspx?Code1="+code1.text()+"&code2="+code2);     location.href = stringURL; 

The problem is, when I hit the “save” button, evething after the & character just desapears…. it gives me a ulr like this:

http://example/example/Lists/myList/aprovar.aspx?ID=76&Source=http://example/example/SitePages/myPage.aspx?code1=123&code2=321 

If I just copy the url and paste, it works fine… but when I hit the save button, it sends me to

http://example/example/SitePages/myPage.aspx?code1=123 

If I put an & before code1, it gets removed too.

I have nothing else handling the url after this. Don’t know why this is happening

What is the difference between Consensus and Leader Election problems?

According to this paper written by Lamport, `selecting a unique leader is equivalent to solving the consensus problem’.

Based on the above quote, my question is: What is the difference between consensus and leader election problems?

My answer: I think that there is no theoretical difference between them. They are two terms with the same meaning, but they are used in different context. When the context is related to data stores, replication, or related subjects, ‘consensus’ is used, otherwise, ‘leader election’ is used.


Note: In the above paragraph, ‘theoretical‘ means the way of defining a true consensus and leader election algorithm. A true consensus and leader election algorithm should satisfy three properties– termination, agreement, and integrity.

Decision problems with complex input validation

In an answer to a question regarding input validation in decision problems, @Apass Jack wrote

It is easy to check whether a problem instance is a valid instance or not for almost all decision problems people have been interested in. It is so easy and so common that people have become so sloppy or efficient that this verification step is usually skipped or even forgotten in the specification of an algorithm. That might be the source of your confusion.

Are there (non-pathological) decision problems for which input validation is as complex or more complex than computing the actual decision for an already validated input?