What is the proper way to install RLS and rust-analysis [16.04 LTS]?

I wanted to use an IDE such as Visual Studio Code with Rust on Ubuntu 16.04.3 LTS but have not been successful in getting RLS (the Rust Language Server) installed.

The RLS installation starts automatically but fails with a permission error, as shown in below image.

rust-analysis install failure inside Visual Studio Code

This failure happens likely because I am logged in under my non-root user account.

I end up with the same error if I execute the command rustup component add rls rust-analysis rust-src in a terminal window. My problem is that if I attempt to to execute this command using sudo (as in sudo rustup component add rls rust-analysis rust-src) I get an error stating that rustup cannot be found.

What is the proper way to install RLS and rust-analysis in this kind of situation?

What’s the proper name for code that tests another code?

That seems like a stupid question, but I can’t find a proper name for “code that tests another code”. The most of literature names that kind of code just “tests” but it’s way to general in my understanding (obviously I am not an English native speaker so I might be wrong) – code might be tested by people, some external machine that is not “code” at all. The same applies to “code tests”.

I was thinking about “testing code” but this seems to be a bit confusing as it looks more like a verb than noun.

What’s the proper way to create Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface without objectmanager?

I can’t find the factory for this data object. I don’t see it in the generated folder, nor do i see any references online. What’s the best way to create this in my module? aside from using objectManager.


A module $N$ is semisimple $\Longleftrightarrow$ $N$ has no proper essential submodules

Problem: A module $ N$ is semisimple $ \Longleftrightarrow$ $ N$ has no proper essential submodules.

My attempt: If $ N$ is semisimple, then every submodule is a direct summand of $ N$ and so not essential unless equal to $ N$ . Conversely, any $ K \subsetneq N$ has a complement $ L \subsetneq N$ . Then $ K \bigoplus L \subseteq N$ , so if $ N$ has no proper essential submodules, $ K$ is a direct summand of $ N$ .

Please check my proof. Thank all!

Is there a flat proper morphism that is not finitely representable?

Существует ли пример плоского собственного морфизма схем $ X\rightarrow S$ , чьи слои геометрические связные, приведенные и имеют размерность 1, но который не является конечно представимым? Что если мы дополнительно потребуем чтобы база была связной, а слои были стабильными кривыми постоянного (арифметического) рода?

On the Beilinson’s conjecture regarding the proper flat integral models

I had a question which seems to be straightforward but I wasn’t able to figure it out. In page 13 of this paper a conjecture of beilison is mentioned that if $ \mathcal{X}_{\mathbb{Z}}$ is a proper flat model of $ X_{\mathbb{Q}}$ then the image of $ K_*'(\mathcal{X})\otimes \mathbb{Q} \rightarrow K_*(X)\otimes \mathbb{Q}$ does not depend on the choice of $ \mathcal{X}$ . Then it is proved for the case that $ \mathcal{X}$ is regular in the following lines. I do not understand where the regularity condition is being used. It is probably related to the commutativity of the right part of the diagram i.e. $ \pi_*’$ and the pull-backs to $ K_i(X)$ . So why does it fail to be commutative if we do not assume that the integral models are regular? Can’t we just replace all $ K$ by $ K’$ with the same argument?

Proper way to *define* new menu status code for a custom module

What would be the proper way to define a new menu status code inside a custom module?

I’m developing a module where a user can add family members which can register for events. In the same spirit as


I would like to define something like:


Is there a proper way to define this constant in my module? Now I’m using the folllwing hack (?) when the error occurs. But having the option above would simplify matters, such that I could return the error everywhere I want.

drupal_set_title(t('No family members')); drupal_deliver_html_page("No family members have been added.");   

What’s the proper greedy algorithm approaching “Job shop scheduling” problem?

having N jobs of different size with specific dependencies (of other Jobs) defined, what’s a good greedy approach to assign these Jobs to M Machines with various processing power?

first, I came up with the idea of defining different levels such that works with no dependency come as the first level and level of the other job’s nodes in the graph being the longest path from the level one nodes to those nodes.
then assigning the heaviest job in each level to the most powerful machine and following the order, but then I thought maybe how many jobs depend on current jobs is a more important factor.

A proper analytic surface into which every smooth proper analytic curve embeds

Let $ k$ be a finite extension of $ \mathbb{Q}_p$ . Does there exist a proper $ k$ -analytic surface such that there is a closed immersion into it from any connected smooth proper $ k$ -analytic curve? The definitions are as stated in this file.

A similar question in the Archimedean setting has been asked on MO.

What’s the proper way to identify string values in hydra http post form

I’ve seen plenty of posts regarding the syntax for setting http post form’s when using hydra and all of them just show username and password as being the only two keys when making a login post request. For these, ^USER^ and ^PASS^ are used and I’m assuming the carrot tops represent a variable is between them. My question is what if I have a string as a value to a key on the post form that is static and won’t change. What is the proper syntax for this?

Is this correct?

hydra -l administrator -P password_file.txt -s 3199 my-site.com http-post-form "/secret.php:login=Submit+Query&username=^USER^&password=^PASS^:F=Login failed!" 

or does there need to be any sort of single quotes around the string, which in this case is the value for login?

I’ve tried both methods with some passwords that I believe to be correct and a username that I know to be correct and I still haven’t got any successful attempts.