module – Need to show the value of the product in the value attribute of input element but it is not giving any value. Where is this get product function?

<?php $_product = $block->getProduct(); ?>
<?php $buttonTitle = __('Add to Cart'); ?>
<?php $buttonTitl = __('Get Quote'); ?>

<?php if ($_product->isSaleable()) :?>
<div class="box-tocart">
    <div class="fieldset">
        <?php if ($block->shouldRenderQuantity()) :?>
        <div class="field qty">
            <label class="label" for="qty"><span><?= $block->escapeHtml(__('Qty')) ?></span></label>
            <div class="control">
                <input type="number"
                       name="qty"
                       id="qty"
                       min="0"
                       value="<?= $block->getProductDefaultQty() * 1 ?>"
                       title="<?= $block->escapeHtmlAttr(__('Qty')) ?>"
                       class="input-text qty"
                       data-validate="<?= $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"
                       />
            </div>
        </div>
        <?php endif; ?>
        <div class="actions">
            <button type="submit"
                    title="<?= $block->escapeHtmlAttr($buttonTitle) ?>"
                    class="action primary tocart"
                    id="product-addtocart-button" disabled>
                <span><?= $block->escapeHtml($buttonTitle) ?></span>
            </button>
            <?= $block->getChildHtml('', true) ?>
            <button type="submit"
                    title="<?= $block->escapeHtmlAttr($buttonTitl) ?>"
                    class="action primary" 
                     disabled>
                <span><?= $block->escapeHtml($buttonTitl) ?></span>
            </button>
        </div>
    </div>
</div>
<a href="#" id="click-me">Get Quote</a>
<div id="popup-modal" style="display:none;">
    <form class="form" id="custom-form" method="post" autocomplete="off">
        <fieldset class="fieldset">
          <legend class="legend"><span><?php echo __('Personal Information') ?></span></legend><br>
           <div class="field required">
               <label for="email_address" class="label"><span><?php echo __('Email') ?></span></label>
                <div class="control">
                    <input type="email" name="email" id="email_address" value="" title="<?php echo __('Email') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}">
                </div>
            </div>
           <div class="field required">
               <label for="product_name" class="label"><span><?php echo __('Product Name') ?></span></label>
                <div class="control">
                    <input type="text" name="product_name" 
                    id="product_name" value="" title="<?php echo __('Product Name') ?>" class="input-text" disabled>
                </div>
            </div>

        </fieldset>
        <div class="actions-toolbar">
            <div class="primary">
                <button type="submit" class="action submit primary" title="<?php  echo __('Submit') ?>"><span><?php echo __('Submit') ?></span></button>
            </div>
        </div>
    </form>
</div>

<script>
    require(
    (
        'jquery',
        'Magento_Ui/js/modal/modal'
    ),
    function(
        $,
        modal
    ) {
        var options = {
            type: 'popup',
            responsive: true,
            innerScroll: true,
            title: 'Get Quote',
            buttons: ({
                text: $.mage.__('Continue'),
                class: '',
                click: function () {
                    this.closeModal();
                }
            })
        };

        var popup = modal(options, $('#popup-modal'));
        $("#click-me").on('click',function(){ 
            $("#popup-modal").modal("openModal");
        });

    }
    );
</script>

<?php endif; ?>
<script type="text/x-magento-init">
    {
        "#product_addtocart_form": {
            "Magento_Catalog/js/validate-product": {}
        }
    }
</script>

blockchain.info – Why was giving someone else my 12 word backup a bad idea?

someone on blockchain support ask me to tell him my back up fund 12 word in order to reverse my bitcoin which was unconfirmed in my transaction

Sorry to say, you were definitely scammed.

You cannot reverse a bitcoin transaction in that way, the scammer only told you that so that you would give them the 12 word phrase. With that phrase, the scammer could recreate your wallet on another device and steal your coins.

Do not ever give someone your private keys, seed phrase, PIN code, password, etc. Any legit customer service will not ask you for this.

Unity is giving error in importing any of .mpg video file

I know you feel this question like it Unity Error importing any video clip
and yeah it’s kinda same as that but cause there isn’t any working answer there, I am asking it again.

In my unity 2019.4.16f1(LTS) whenever I import a .mpg file it’s giving me this error

Error message in unity when importing

when I saw the log

WindowsVideoMedia error 0xc00d36b4 while reading P:/All the stuff related to games/UnityProjects/Quitter Game/Assets/Videos/Quitter Game cutscene 1.mpg

Context: Setting media type for first video stream
Error details: The data specified for the media type is invalid, inconsistent, or not supported by this object.
Track types:
   Video Track (1280 x 720), type: &%80m%E0
   Audio Track, type: P
 
(Filename: C:buildslaveunitybuildModules/Video/Public/Media/WindowsMedia/WindowsVideoMedia.cpp Line: 3648)

Error while reading movie: P:/All the stuff related to games/UnityProjects/Quitter Game/Assets/Videos/Quitter Game cutscene 1.mpg 
(Filename: C:buildslaveunitybuildEditor/Src/Video/VideoClipTranscode.cpp Line: 331)

VideoClip import error for Assets/Videos/Quitter Game cutscene 1.mpg 
(Filename: C:buildslaveunitybuildModules/AssetPipelineEditor/Public/VideoClipImporter.cpp Line: 390)

Done importing asset: 'Assets/Videos/Quitter Game cutscene 1.mpg' (target hash: '44adb92c84d9edcc4a9470073e2776db') in 6.219447 seconds

I tried searching in forum and in stackoverflow too. As much as I read docs .mpg is supported by unity. Actually I edited some things in my video using VSDC video editor and that exports in .mpg format. When I tried .mp4 format it was working but not .mpg.

Fokker Planck Equation in Mathematica giving weird solution

I have the following equation $$frac{partial,P(theta,t)}{partial t} = alphacostheta,P(theta,t) + beta frac{partial^2,P(theta,t)}{partial theta^2} $$
subject to following conditions$$P(theta, 0)=delta(theta-pi/4), P(theta,t)=P(theta+2pi,t)~.$$

I tried solving this numerically in Mathematica:

alpha = 0.02
beta = 0.02
fokkerPlanck = {D(p(x, t), t)==alpha*Cos(x)*p(x,t) + beta*D(p(x,t),{x,2}), p(x,0) == DiracDelta(Pi/4), p(2Pi, t) == p(0, t)};
sol = Flatten@NDSolve(fokkerPlanck, p, {x, 0, 2Pi},{t, 0, 100})

If I run this, I get null solution, so something is weird. Could anyone let me know what is potentially wrong here?

amazon web services – AWS instance giving me less NVMe space than advertised

I recently provisioned 10 m5d.large instances (with Terrafor. The advertised space is “1 x 75 NVMe SSD”, however when I ssh on to the instance I see.

(root@web0 ~)# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        3.8G     0  3.8G   0% /dev
tmpfs           3.8G     0  3.8G   0% /dev/shm
tmpfs           3.8G  376K  3.8G   1% /run
tmpfs           3.8G     0  3.8G   0% /sys/fs/cgroup
/dev/nvme0n1p1   30G  2.5G   27G   9% /
tmpfs           777M     0  777M   0% /run/user/1000
tmpfs           777M     0  777M   0% /run/user/0

I also see in the AWS console 10 Elastic Block volumes of 30 GB.

Why am I not getting the 75 GB advertised https://aws.amazon.com/ec2/instance-types/m5/?

plotting – trying to contourplot deviation but it is not giving output or error

I am trying to have contourplots of deviation dc for variables a and b.

In(27):= (Alpha)1(l_, b_, a_, (Theta)_, M_, 
r_) := -(a^2*(1 + l)*(2*M + 2*r + b) + 
  r*(2*r^2 + 3*b*r + b^2 - 2*M*(3*r + b)))/((a*
   Sqrt(1 + l)*(2*M - 2*r - b))*Sin((Theta)))
In(28):= (Beta)1(l_, b_, a_, (Theta)_, M_, r_) := 
 Sqrt((r^2*(8*a^2*(1 + l)*
         M*(2*r + b) - (2*r^2 + 3*b*r + b^2 - 2*M*(3*r + b))^2)/((1 + 
          l)*a^2*(2*M - 2*r - b)^2)) + 
   a^2*Cos((Theta))^2*(1 + l) - (Alpha)1(l, b, a, (Theta), M, r)^2*
    Cos((Theta))^2)
In(29):= re1(l_, b_, a_, (Theta)_, M_) := 
 RankedMax(
  r /. NSolve({(Beta)1(l, b, a, (Theta), M, r) == 0, r > 0}, r, 
    Reals), 1)
In(30):= pr1(l_, b_, a_, (Theta)_, M_) := 
 RankedMax(
  r /. NSolve({(Beta)1(l, b, a, (Theta), M, r) == 0, r > 0}, r, 
    Reals), 2)
In(31):= xc1(l_, b_, a_, (Theta)_, M_) := 
 NIntegrate((Alpha)1(l, b, a, (Theta), M, r)*(Beta)1(l, b, 
     a, (Theta), M, r)*D((Alpha)1(l, b, a, (Theta), M, r), r), {r, 
    pr1(l, b, a, (Theta), M), re1(l, b, a, (Theta), M)})/
  NIntegrate((Beta)1(l, b, a, (Theta), M, r)*
    D((Alpha)1(l, b, a, (Theta), M, r), r), {r, 
    pr1(l, b, a, (Theta), M), re1(l, b, a, (Theta), M)})
In(32):= R(l_, b_, a_, (Theta)_, M_, 
  r_) := ((Alpha)1(l, b, a, (Theta), M, r) - 
     xc1(l, b, a, (Theta), M))*
   D((Beta)1(l, b, a, (Theta), M, r), r) - (Beta)1(l, b, 
    a, (Theta), M, r)*D((Alpha)1(l, b, a, (Theta), M, r), r)
In(33):= raverage(l_, b_, a_, (Theta)_, M_) := 
 Sqrt((1/(Pi))*
   NIntegrate(
    R(l, b, a, (Theta), M, r), {r, re1(l, b, a, (Theta), M), 
     pr1(l, b, a, (Theta), M)}))
In(34):= R1(l_, b_, a_, (Theta)_, M_, 
  r_) := ((Sqrt(((Alpha)1(l, b, a, (Theta), M, r) - 
           xc1(l, b, a, (Theta), M))^2 + (Beta)1(l, b, a, (Theta), 
          M, r)^2) - 
      raverage(l, b, a, (Theta), 
       M))^2)*((((Alpha)1(l, b, a, (Theta), M, r) - 
         xc1(l, b, a, (Theta), M))*
       D((Beta)1(l, b, a, (Theta), M, r), r) - (Beta)1(l, b, 
        a, (Theta), M, r)*
       D((Alpha)1(l, b, a, (Theta), M, r), 
        r))/(((Alpha)1(l, b, a, (Theta), M, r) - 
         xc1(l, b, a, (Theta), M))^2 + (Beta)1(l, b, a, (Theta), M,
         r)^2))
In(41):= dc1(l_, b_, a_, (Theta)_, 
   M_) := (1/raverage(l, b, a, (Theta), M))*
   Sqrt((1/(Pi))*
     NIntegrate(
      R1(l, b, a, (Theta), M, r), {r, re1(l, b, a, (Theta), M), 
       pr1(l, b, a, (Theta), M)}));
In(43):= ContourPlot(
 ConditionalExpression(dc1(0, b, a, 17*(Pi)/180, 1), 
  Im(dc1(0, b, a, 17*(Pi)/180, 1)) == 0), {b, 0, .42^2}, {a, .001, 1})
Out(43)= $Aborted

The code calculates the average radius of a parametric curve and then find the deviation of the curve from circularity in terms of rms value. the last line is not giving any output neither giving any error.

c++ – I m getting a error for this code. Two test cases are giving a TLE. Why?

This code is working well for majority of test cases, but there’s one case where the input vector is only containing zeroes, for which it is not working out, I dry runned the code and it seemed to work. I couldn’t figure out why it is not working?

(Problem)https://leetcode.com/problems/3sum/

class Solution {
public:
    vector<vector<int>> threeSum(vector<int>& nums) {
         vector<vector<int> > v;
        int n=nums.size();
        if(n<3)
            return {};
        
        sort(nums.begin(),nums.end());

for (int i = 0; i < n; ++i)
    {
        int target = - nums(i);
        int left = i + 1;
        int right = n - 1;
        while (left <right)
        {
            int  sum = nums(left) + nums(right);
            if (sum == target)
            {
                vector<int> v1;
                v1.push_back(nums(i));
                v1.push_back(nums(left));
                v1.push_back(nums(right));
                vector<vector<int> >:: iterator it;
                it = find(v.begin(), v.end(), v1);
                if (it == v.end())
                {
                    v.push_back(v1);
                }
                left++;
                right--;
            }
            else
            {
                if (sum < target)
                {
                    left++;
                }
                else
                {
                    right--;
                }
            }
        }
    }     
    return v; 
    }
};
        
   

europe – Is it common to travel by giving private lessons at host family?

So, a while back I had this idea, to make travelling a bit less expensive, by giving private lessons and tutoring in target country.

In summary, I travel to a target country, stay with some family, they provide food and place to sleep and in exchange I give private lessons, probably to the kids, probably in some school subject.

My question is this.
Is such a thing even heard of, and if yes, how to begin?

Did You hear of someone who did something like this, how did it turn out?

Maybe there is some website that will help or people use Couchsurfing website to do it?

Note: I’m asking mostly about Central Europe, but feel free to say anything You know.

magento2 – Advanced reporting keeps giving 404 page magento 2.4-develop

We are using Magento 2.4-develop version

We try and apply almost all tips and recommendations for our version to make it work but advanced reporting keeps showing 404 page

Recently we try troubleshooter
https://support.magento.com/hc/en-us/articles/360041456192-Magento-Advanced-Reporting-troubleshooter

We stop on 6sth step.
Re-enable the advanced report and reauthorize but no luck
Still no record in flag table.

Very weird case

Please advice!

Cheers