magento2.2 – Magento2 command less modified

Maybe this query is basic
I'm using "Pedona Magento theme" for my website, now I need very little modifications in style.less


should I execute a command or will it automatically compose for style.css?

Magento2 +

networking – modified subnets; the routing table is incorrect

When I start my Ubuntu 18.04 machine (this is an old machine that has undergone several upgrades) after moving apartments and changed the local subnet from to, my networking is interrupted.

$ sudo route -n
IP routing table of the kernel
Destination Gateway Genmask Flags Metric Ref. Use Iface UG 202 0 0 eth0 U 0 0 0 eth0 U 202 0 0 eth0

However, I can not for a lifetime understand what adds the wrong configuration. I can just apply the netplan that I have and everything is correct.

$ sudo netplan is applied
$ sudo route -n
IP routing table of the kernel
Destination Gateway Genmask Flags Metric Ref. Use Iface UG 0 0 0 eth0 U 0 0 0 eth0

In fact, I have disabled DHCPD, NetworkManager and there is no interface file in / etc / network. So, what is trying to (re?) Configure eth0? How can I clean this so I do not have to manually repair the network during a reboot?

Modified Bitcoin address

my bitcoin address has changed
what should I do
I'm using the old address in many websites.

python – Use another function on a modified dictionary?

This is based on an exercise in Chapter 5 of the Automation of Boring Tasks with Python section. This code contains the addToInventory functions that modify a given inventory of elements to add new elements, update existing elements, and displayInventory that displays the elements and their values. The main operation is to add the contents of a dragonloot list to Inventory Inv. I've tried to do it in two ways, one by calling addToInventory, and then displayingInventory. This method leads to errors. I've also tried to print the new inventory values ​​in addtoInventory. That works well. Why does the first method not work? I've put both methods as comments in my code, indicated by "" "" "". I know C ++ pretty well, but I do not know Python yet. Could someone help me?

def addToInventory (inventory, added items):
draft = {}
for i in addedItems:
if (I am not in the project):
Rough draft[i]= 1
Rough draft [i]= rough [i] +1
for i in project:
if I am not in the inventory:
inventory[i]= rough[i]
inventory[i] = inventory[i]+ draft[i]
"" "for i in the inventory:
print (str (inventory)[i]) + "" + str (i)) "" "

def displayInventory (inventory):
print ("Inventory:")
total = 0
for i in inventory.items ():
total + = 1
print (str (inventory)[i]) + "" + str (i))
print ("The total number of items is" + str (total))

inv = {gold coin} 42, & quot; String & quot ;: 1
dragonLoot = ['gold coin', 'dagger', 'gold coin', 'gold coin', 'ruby']
inv = addToInventory (inv, dragonLoot)
"" "displayInventory (inv) when I use this line instead of the comment above, I get errors" ""

magento2 – Can I access the modified parameters in an after / arond plugin?

I want to access a parameter of a method in a after connect. The value of the parameter has been modified in the original method and I want to access the modified value. Example:

class vendorClass
function paintBlue ($ room, $ options)
// ...
$ options['color'] = & # 39; light green & # 39;

Now my plugin looks like this:

myPerfectMagentoPlugin class
public service __construct ()

public service afterPaintBlue ($ subject, $ result, $ room, $ options)
// This $ options array does not contain the color value:
var_dump ($ options);

How can I access the modified content of the $ options variable in a after connect?

8 – Webform 5.x – send an email on the modified field

Is it possible to conditionally send an email when a field is updated? I have a simple workflow in which one of the steps is to send an email depending on the value of a check box, when updating a submission: I would like this email to be sent only the first time the box is checked, and not in the following steps when the submission is updated again. I know I can try Maestro, but this is the only problem that prevents me from doing my simple workflow with Webform alone.

nomenclature – Which tag is best for a blog post – Last updated or last modified

Generally, in content-based websites (articles / news), you will see the term "update& # 39 ;. In the field of content / news, this involves adding to the understanding on the basis of new information.

enter the description of the image here

Amended often refers to an entity or a record and is more associated with technology, the act of manipulating objects. This does not necessarily always imply new useful information, but a modification of the properties or values ​​of an object.

Above all, think about how your users would talk.

A thought at the hour

Whatever term you choose, you can use relative time so that users do not have to do so many mental calculations.

Depending on the frequency / importance of new information added to the article, you choose the easiest granularity to understand.

  • 30 minutes ago
  • 6 hours ago
  • yesterday

You can also drop the "last" and simply say:

Updated: yesterday or Updated 6 hours ago

7 – How to modify the configured data so that they can be modified with drupal_alter ()?

How to modify the configured data so that they can be modified with drupal_alter ()?

the User import the project has an array named $ supported. It provides the following hook to modify this table:

// hook to add functions to this array.
// will call all modules implementing hook_field_user_import_supported_alter
drupal_alter (& # 39; field_user_import_supported & # 39 ;, $ supported);

Implement this hook in a different module, eg.

function mymodule_field_user_import_supported_alter (& $ supported) {
$ supported['mymodule'] = table (
& # 39; save & # 39; => & # 39; mymodule_user_import_callback & # 39;

works as one expects.

the User import This project allows users to add support for new fields by implementing the required code in * .inc-file in a named subdirectory supported.

I created this file I want to edit $ supported painting but do not by implementing this hook (the hook works, but as a result the field is added twice). I have an idea that I should can do it in call function drupal_alter () with an appropriate set of parameters, but until now, no luck.

Until now, I've tried:

drupal_alter (& mymodule_field_user_import_supported & $ 39; $ supported);

This has no effect.

Question 1: Is it possible or am I on the wrong track?
Question 2: If it is possible, how does one do it?

tls – Modified NMAP script: the variable "host" is not declared

At the bottom, you will see return output_tab (cert), output_str (cert) This is the main code that calls the local functions. You want to edit the output of the function output_str so change the call to output_str (cert, host, port) and local function output_str (cert, host, port) that it will work.

For a complete example, you can check the following code. Replace the 230-end source code with the following and it will work (it worked under nmap V7.7).

local function output_str (cert, host, port)
local lines = {}

lines[#lines + 1] = "Subject:" .. stringify_name (cert.subject)
if cert.extensions then
for _, e in ipairs (cert.extensions) do
if == "Alternate Subject Name X509v3" then
lines[#lines + 1] = "Other name of the subject:" .. e.value

if nmap.verbosity ()> 0 then
lines[#lines + 1] = "Issuer:" .. stringify_name (cert.issuer)

if nmap.verbosity ()> 0 then
lines[#lines + 1] = "Public key type:" .. cert.pubkey.type .. "" .. host.ip .. "" .. port number
lines[#lines + 1] = "Public key bits:" .. cert.pubkey.bits
lines[#lines + 1] = "Signature algorithm:" .. cert.sig_algorithm

lines[#lines + 1] = "Not valid before:" ..
date_to_string (cert.validity.notBefore)
lines[#lines + 1] = "Not valid after:" ..
date_to_string (cert.validity.notAfter)

if nmap.verbosity ()> 0 then
lines[#lines + 1] = "MD5:" .. stdnse.tohex (cert: digest ("md5"), {separator = "", group = 4})
lines[#lines + 1] = "SHA-1:" .. stdnse.tohex (cert: digest ("sha1"), {separator = "", group = 4})

if nmap.verbosity ()> 1 then
lines[#lines + 1] = cert.pem
returns stdnse.strjoin (" n", lines)

action = function (host, port)
host.targetname = tls.servername (host)
local status, cert = sslcert.getCertificate (host, port)
if (not (status)) then
stdnse.debug1 ("getCertificate error:% s", cert or "unknown")

return output_tab (cert), output_str (cert, host, port)

descriptive statistics – Change in mean, median, variance, and mode of a modified sample

Consider a set of N observations consisting of $ k distinct values, each frequency $ f_ {1}, f_ {2}, …, f_ {k} $. What precedes $ k observations once each is added to obtain a modified sample of $ N + k $ observations with frequency$ f_ {i} + $ 1.

What would be the change in mean, median, mode and variance?

I understand that the mode will remain the same. For the average, I visualized that the frequency curve of the modified sample would be shifted one point vertically. Can I say that the new average will be lower than or equal to the original average? and this median will be greater than or equal to the initial median. I've also taken some observations, 1,2,2,4,4 (originally) to check my claim. Am I right?

What is the best way to make such problems?