How to manipulate multiple solutions to equations while keeping variable names?

relatively new to Mathematica, but couldn’t find an answer online for how to do this more cleanly.

I am solving these equations in six variables that give me a number of solutions, which are given as a list of rules, e.g.,

solution = {{x1 -> 0, x2 -> 0, x3 -> 0, x4 -> 2, x5 -> 1, x6 -> 0}, 
 {x1 -> 0, x2 -> 0, x3 -> 1, x4 -> 1, x5 -> 0, x6 -> 1}, 
 {x1 -> 0, x2 -> 1, x3 -> 0, x4 -> 1, x5 -> 1, x6 -> 1}, 
 {x1 -> 0, x2 -> 1, x3 -> 1, x4 -> 0, x5 -> 0, x6 -> 2}}

My next step is I need to calculate $y_1,y_2,y_3,y_4,y_5,y_6$ for each of these solutions, which are some (unchanging) linear combination of these values. I am currently doing this by defining (above everything), e.g.,

y1=x1-x3+x5
y2=x3+x4+x5

etc, and then running

xypairs = Table({{x1, y1}, {x2, y2}, {x3, y3}, {x4, y4}, {x5, y5}, {x6, y6}} /. 
 solution((j)), {j, 1, Length(solution)})

which gives me a list of lists, where each sublist contains each of the xy pairs for that solution. However, I need to do a bunch of manipulation on these values afterwards, and as I try to write it as is, I get really messy stuff involving dozens of lines like:

 xypairs((t))((2))((2)) + xypairs((t))((4))((2)) - xypairs((t))((3))((2))

I feel there has to be a better way to do this. I want to first calculate the $y_i$ for each solution, and then somehow iterate through each of the solutions so that when I am iterating, I can access the $x_i$ and $y_i$ by some means that is simpler than using a triple index. Please let me know what the best way to approach this is.

Thank you in advance!

linux – Consistent Dell raid device names

We have a Dell PowerEdge R740 server running CentOS7 with raid disks configured via PERC H730P Mini controller.
On each reboot the device names (sda, sdb …) for the vdisks are assigned out of the order the vdisks were created (see below) and each time differently. This is kind of expected as the naming order depends on the readiness of the devices during the boot, which may vary.
But anyway is there a way to make the order, in which the vdisk devices appear in the system, consistent e.g. via some controller option? (Provided the physical devices are not changed)

# omreport storage vdisk controller=0  -fmt ssv | awk -F';' '{print $1, $3, $11}'
List of Virtual Disks on Controller PERC H730P Mini (Embedded)  
  
Controller PERC H730P Mini (Embedded)  
  
ID Name Device Name
0 OS_DISK /dev/sda
1 Virtual Disk1 /dev/sdc
2 Virtual Disk2 /dev/sdb
3 Virtual Disk3 /dev/sdg
4 Virtual Disk4 /dev/sde
5 Virtual Disk5 /dev/sdd
6 Virtual Disk6 /dev/sdh
7 Virtual Disk7 /dev/sdf
8 Virtual Disk8 /dev/sdi
9 Virtual Disk9 /dev/sdj
10 Virtual Disk10 /dev/sdk
11 Virtual Disk11 /dev/sdl
12 Virtual Disk12 /dev/sdm
13 Virtual Disk13 /dev/sdn
14 Virtual Disk14 /dev/sdp
15 Virtual Disk15 /dev/sdo
16 Virtual Disk16 /dev/sdq
17 Virtual Disk17 /dev/sdr
18 Virtual Disk18 /dev/sds
19 Virtual Disk19 /dev/sdt
20 Virtual Disk20 /dev/sdu
21 Virtual Disk21 /dev/sdy
22 Virtual Disk22 /dev/sdv
23 Virtual Disk23 /dev/sdw
24 Virtual Disk24 /dev/sdx

How to prevent Docker from looking up host names via external DNS?

Say you have the following docker-compose file:

version: '3.5'

services:
  web:
    image: nginx
    expose:
      - 80

  # Imaginary service that requests http://web/
  curl:
    image: curlimages/curl
    command: curl -i http://web/
    

If web is down, accessing http://web/ will trigger an external DNS lookup. In my case, this caused several hundred thousand requests per hour to our DNS server.

How can I prevent Docker from externally looking up host names when a container is down?

8 – Changing column names for CSV export in Webform results download page

This should be very basic. Unfortunately I couldn’t find any page that provides specific instructions on how to do this. If anyone can point me in the right direction, much obliged.

Basically I just need to automatically rearrange and change the names of a few columns when I go to the submissions results download page in Webforms. That way, when I export in CSV, I get the column names I want instead of the ones I created in the actual webform.

I’m aware you can do this via a view, but I would like more specific instructions… Anyone know of any guide that can point me in a right direction?

Thanks.

sharepoint server – How to retrieve all the group names of a particular folder in the Advanced permission tab

I have a folder in document library and each folder in it has unique permissions.
[![enter image description here][1]][1]

Now I need to retrieve the permission group names attached to it using javascript only.
On click of advanced as given below
[![enter image description here][2]][2]

We get the groups and users who have permission to the folder.
[![enter image description here][3]][3]

I need only the SharePoint group names as the output using Javascript.

Can you please help me with this.

Thanks in advance
[1]: https://i.stack.imgur.com/nd5Sw.png
[2]: https://i.stack.imgur.com/3D7I3.png
[3]: https://i.stack.imgur.com/AuflW.png

How to define a function reminding of names of the independent variables?

I am using a function with a lot of variables. There are 9 and sometimes more of them. In this case, it is difficult to memorize, which one stays on the, say, fourth position, and which one – on the seventh. I would like to be able to include the variable name into the square brackets of the function as a reminder: what must stay here.
For example, let us define a simple function: f(x)=x^2+y^3. Here is its definition:

f(x_,y_):=x^2+y^3;

One can, however, call it with x=5 and y=7 as follows:

f((*x=*)5,(*y=*)7)

This way reminds me of what should stay in the first and in the second position inside the square brackets.
This works, but I do not like that it looks cumbersome. For perception, it would be much better, if the (* and *) signs are invisible.

Any idea?

keychain – What is the macOS equivalent of Windows certificate store names?

On Windows, when retrieving information about certificates, they come from named certificate stores, such as “Trusted Root Certification Authorities” or “Trusted Publishers” – what is the equivalent on macOS?

My best guess is types of keychains, e.g. “login” or “System”, but those are sufficiently different that I’m not sure. The names also don’t seem to come with the certificates (when using SecItemCopyMatching in Swift, for example).

Will my Rails model and controller names collide with Rails’ reserved words?

I’m about to create a new Rails 6 application with the model / table names Requests and Routes and the controller names RequestsController and RoutesController.

Will these work in a Rails 6 application?

When I run rails generate model Request everything looks normal. Rails doesn’t complain.

But according to this list Request is a reserved word in Rails.

So will this work or will this get me into trouble? I would like to know before because renaming models in Rails can be cumbersome.

Thanks for any pointers.

7 – List all node titles to better iterate on a list of names

If you just need to create the nodes that don’t have a specific title (which I guess it’s just a country name), you don’t need to use node_title_list(), whose purpose is rendering a list of node titles as links. Just load the nodes and check which titles aren’t already used.

$country_list = ('Mexico', 'Tanzania', 'Brazil', 'Camaron');

$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node')
  ->entityCondition('bundle', 'country_profile')
  // Remove the following line if you don't need to get only published nodes.
  ->propertyCondition('status', NODE_PUBLISHED)
  // Keep the following line, so Drupal won't check if the currently logged-in user has access to the nodes and the fields.
  ->addTag('DANGEROUS_ACCESS_CHECK_OPT_OUT');
$result = $query->execute();
if (isset($result('node'))) {
  $nodes = entity_load('node', array_keys($result('node')));
  foreach ($nodes as $node) {
    unset($country_list($node->title));
  }
}

If (!empty($country_list)) {
  // There are nodes that need to be created; their titles are in $country_list.
}

Even better, load those nodes whose title is equal to one of the country names you already have.

$country_list = ('Mexico', 'Tanzania', 'Brazil', 'Camaron');

$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node')
  ->entityCondition('bundle', 'country_profile')
  // Remove the following line if you don't need to get only published nodes.
  ->propertyCondition('status', NODE_PUBLISHED)
  ->propertyCondition('title', $country_list)
  // Keep the following line, so Drupal won't check if the currently logged-in user has access to the nodes and the fields.
  ->addTag('DANGEROUS_ACCESS_CHECK_OPT_OUT');
$result = $query->execute();
if (isset($result('node'))) {
  $nodes = entity_load('node', array_keys($result('node')));
  foreach ($nodes as $node) {
    unset($country_list($node->title));
  }
}

If (!empty($country_list)) {
  // There are nodes that need to be created; their titles are in $country_list.
}

7 – List all Titles of a Content Type to better iterate with a list of names

I have a content type called Country and I have to verify what countries already exists in db and save the missing ones, comparing to a variable with all countries ($country_list). I am having trouble accessing countries names of my nodes, that are specified as the content type title.

  $country_list = ('Mexico', 'Tanzania', 'Brazil', 'Camaron');
  $nodes = node_load_multiple(array(), array('type' => 'country_profile'));
  $nodes_name = node_title_list($nodes);

  foreach ($country_list as $country_name) {
    if (!in_array($nodes_name, $nodes)) {
      // should create new node
    } else {
      // shouldn't do anything
    }
  }

The problem is, when i get the node_title_list() it doesn’t return the ‘raw title’ (see output below)

Output:

    Array
(
    (#theme) => item_list__node
    (#items) => Array
        (
            (0) => <a href="http://drupal.stackexchange.com/discover/country_profiles/tanzania">Tanzania</a>
            (1) => <a href="http://drupal.stackexchange.com/discover/country_profiles/mexico">Mexico</a>
        )

    (#title) => 1
)

How can i do that, so that the output of this list is

Array
        (
            (0) => "Tanzania"
            (1) => "Mexico"
        )