magento2 – Create fabric product which has meter as unit with default length

Want to create a fabric type of product which has Meter/Centi meter as selling unit in Magento 2.

I’m following this Question Can you sell product (fabric) by the metre in Magento?, we can use decimal unit in quantity with simple product which will work / please share other approach also.

I want this product to have 2 meters by default and than customer can add more as per his requirement. How can we achieve this.

2 + User Input => This I can think we can achieve by custom option (other suggestion are also appreciated ) , but how can we have the default 2 meter quantity/ length for the product ?

If Short Name is enabled on iOS and two contacts share the same first name, how will their last name be displayed with the default setting?

When navigating to Settings/Contacts on an iOS device, an option called “Short Name” is listed; briefly, this allows a user to specify how they’d like names to be shown within apps that support this feature. If enabling this setting and keeping it at the default of “First Name Only”, assuming that a user has two people with a first name of “John” in their contacts – both having different last names, how would iOS display this? Would it simply ignore the last name entirely (as dictated by the “Short Name” setting), or are exceptions made in this case – so that, for example, the first name and first letter of a contact’s last name will be shown?

evaluation – Mathematica 12.1 is treating all my cells as raw texts by default

I was once using Mathematica 11 it all works fine – when I create new Notebook (.nb) input like 1+1 and press shift+enter, it shows output(1):= 2 directly

But now for 12.1 when I create new notebook and do the same thing, it is treating my input 1+1 as plain text by default, when i press shift+enter there is just a linebreak.. no evaluation at all.

I find when I go to the menu -> cell -> cell properties and tick Evaluatable then the input can work well as Mathematica 11. BUT when i input Plot(x,{x,1,2}), it gives output -Graphics-!! Without showing what the graphic is! I then have to manually convert the output cell to StandardForm to show the graph! I have to do such things everytime, why is 12.1 getting me so much ados ..and how can i remove such tedious things making it funcation just like what mathematica 11 does?

Pardon me I’m a complete nooooooob and really searched goooogle tons of times not getting the answer….

theming – How to style Search API search block to look like the default?

I’m using Drupal 9.0.8 with W3CSS THEME FOR DRUPAL (8 & 9) ⚡️ and Search API & Search API Pages modules.
Having removed the core Search module I am now using the search block provided by the Search API Pages module. I would like to style this search block to look more like the one removed with the core module, with the inline search button and FontAwesome icons but I don’t know where to begin. I can’t even find the CSS that styled the original search block to crib it. Please can anyone point me in the right direction?

block editor – WordPress giving size-large class to post images automatically as default (even if large size is unavailable)

I discovered weird wordpress behavior – wordpress automatically adds size-large class to newly added post images.
Even if image is too small and big size wasn’t generated by wordpress it gives that size-large class.

For example right now I have image which is too small even for “thumbnail” and “medium” size to be generated (only “Full size” is available in image size dropdown in gutenberg post editor, which is actually smaller than “thumbnail”) and wordpress gives it size-large class anyway.

Seems like this weird behaviour occurs when image is too small for certain sizes to be generated.
How can I solve this problem? “Full size” should be the option that always works anyway.

Right now I have “thumbnail” size set to be 850px wide, uploaded picture 800px wide so thumbnail and any other default wordpress sizes weren’t generated. The image has only full-size option available, but class is set to size-large anyway… I’m sure it’s not plugin related problem.

What the… ?

templates – Will the latest Bootstrap work properly with the default WordPress jQuery?

WordPress still uses jQuery 1.x for fear of wrong compatibility with plugins and themes. They are trying to update it, but you can see that it will take a while yet (sources: one, two, three)

Now I am building a WP template where I have to use latest Bootstrap CSS framework. The problem is that Bootstrap uses the latest jQuery 3.5.1 !

So, will the latest Bootstrap work properly with the default WordPress jQuery?

Note: I understand that I can register the latest jQuery and unregister the old ones, but this is not recommended as other plugins may use the default WP jQuery

linux – Allow outgoing ping with iptables but with default DROP policy

In an assignment we’re asked to use the DROP policy everywhere in iptables, and then to allow pinging from inside the VM to the outside world. So “ping” should work at that point.

What I did was(in a script):

iptables -t filter -P INPUT DROP
iptables  -t filter -P OUTPUT DROP
iptables  -t filter -P FORWARD DROP

iptables  -A OUTPUT -p icmp --icmp-type echo-request -j ACCEPT
iptables  -A INPUT -p icmp --icmp-type echo-reply -j ACCEPT

But this doesn’t work. If I try to ping, it can’t find the site. I get this error:

ping: Name or service not known

I’ve tried all kinds of combinations and parameters, but I can’t go around the default DROP policy. How do I solve this?

8 – Registration email showing default mail message as well new custom message

How to stop default mail , i want to override default mail with my custom body message?

Here is my code :

function mag_api_mail_alter(&$message) {
  // only alter register forms
  if (!empty($message('id')) && $message('id') == 'user_register_no_approval_required') {

  // make it a bit neater to access fields
    $nids = Drupal::entityQuery('node')->condition('type','email_template')->execute();
    $nodes =  DrupalnodeEntityNode::loadMultiple($nids);
    $data_fields = array();
    foreach ($nodes as $new_data){
        $data_fields() = $new_data->get('body')->getValue();
    $contact_message = $message('params')('account');
    $first_name = $contact_message->field_first_name->value;
    $username_email = $contact_message->get('name')->value;
    $pass = 'test';
    $app_url = '';
    /*custom field added through configuration*/
    $to_replace_keys = array("(user_name)","(user_email)","(user_password)","(app_url)");
    $replace_keys =array($first_name,$username_email,$pass,$app_url);
    $success_email_msg = str_replace($to_replace_keys, $replace_keys,$data_fields(0)(0)('value'));
    // Assigning new message to mail body.
    $message('body')() = $success_email_msg;

Its is working but i am not able to find out why is this showing default mail message as well new body message.

I just want to show my custom body message.