## How to show the available payment method according to the chosen shipping country M2

I want to restrict the visibility of the payment method according to the chosen country and I want to hide and show and not the inactive payment method according to the weight, my problem is that when the weight is less than 30 kg, for some country I will have two payment methods but I just want to show one, how to proceed please?

## st.statistics – Low-range matrix recovery – generalization of the spectral method to the non-linear noise model

Suppose $$X ^ { star}$$ is a $$n times n$$ rank matrix $$r$$, where $$r ll n$$. Our goal is to recover $$X ^ { star}$$ of a noisy observation $$Y$$.

People have thoroughly studied the noise model. $$Y_ {ij} = X_ {ij} + E_ {ij}$$, where $$E_ {ij}$$ they are i.i.d. subgaussian with parameter $$sigma ^ 2$$. In this case, the spectral method, namely, $$hat {X} = P_r (Y)$$, gives a good estimator of $$X ^ { star}$$, where $$P_r (Y) = sum_ {i = 1} ^ r sigma_i u_i v_i ^ T$$ is the top$$r$$ singular value projection of $$Y$$. The statistical error rate is limited by:
$$frac { | hat {X} -X ^ { star} | {F}} { | X ^ { star} | _ {F}} lesssim frac { sigma} {a} sqrt { frac {r} {n}}.$$
here $$a = | X ^ { star} | F / n$$ denotes the average magnitude of $$X ^ star$$. We can see that, provided the noise / signal ratio $$sigma / a = O (1)$$, the recovery is faithfully accurate. This result is demonstrated as follows.
First we limit the operator standard by:
$$| hat {X} -X ^ { star} | _ {op} le | hat {X} -Y | _ {op} + | YX ^ { star} | _ {op} le 2 | YX ^ { star} | op = 2 | E | _ {op} lesssim sigma sqrt {n}.$$
Here we use that $$hat {X}$$ is the best approximator of rank r of $$Y$$, so $$| hat {X} -Y | _ {op} le | X ^ { star} -Y | op$$. And we use a standard statistical limit for the random matrix operator standard $$E$$. Next, we turn to the Frobenius standard:
$$| hat {X} -X ^ { star} | _ {F} le sqrt {2r} | hat {X} -X ^ { star} | _ {op} lesssim sigma sqrt {rn}.$$

My question: I hope to generalize the previous spectral method to a nonlinear noise model, such as $$Y_ {ij} = f (X_ {ij}) + E_ {ij}$$, where $$f$$ It is a growing monotonous function. We can place reasonable assumptions like $$0 that is to say $$f$$ and its inverse is continuous Lipschitz. I hope to find a good estimator $$hat {X}$$, satisfying the same statistical error linked as the previous one.

One option I tried is $$hat {X} = P_r (f ^ 1 (Y))$$, where we first take the inverse inverse element of $$Y$$, and then the projection of the singular value. But unfortunately, this does not seem viable from my numerical experiments.

## c #: the method takes the Color.ToString () output and formats it to display only RGB values

The method I wrote below works correctly; However, I think the code I wrote is not clean or "good."

I know the basics of regular expression, but I don't know more advanced techniques, since I'm still a fan of programming.

``````static string SimpleColorOutput(Color color)
{
//If input = Color(A=255, R=8, G=14, B=21)

string colorText = color.ToString();

Match R = Regex.Match(input, @"R=(d+)(,))");
Match G = Regex.Match(input, @"G=(d+)(,))");
Match B = Regex.Match(input, @"B=(d+)(,))");

return \$"R = {R.Groups(1).Value}, G = {G.Groups(1).Value}, B = {B.Groups(1).Value}";

//The method returns "R = 7, G = 13, B = 20"
}
``````

Also, is it better to pass the Color object?

## Object-oriented: can you rename a method to preserve encapsulation?

I was reading this page, when the collectors / setters are justified, and the OP gave the following code example:

``````class Fridge
{
int cheese;

void set_cheese(int _cheese) { cheese = _cheese; }
int get_cheese() { return cheese; }
}

void go_shopping(Fridge fridge)
{
fridge.set_cheese(fridge.get_cheese() + 5);
}
``````

By the way, in your example, I would teach `Fridge` the
`putCheese()` Y `takeCheese()` methods, instead of `get_cheese()`
Y `set_cheese()`. Then you would still have encapsulation.

How to preserve encapsulation by renaming it from get / set to `putCheese()`/ /`takeCheese()` Obviously you are getting / setting a value, so why not just leave it as get / set?

In the same answer he also says:

Having sensors and setters does not break the encapsulation itself.
What breaks the encapsulation is to automatically add a sensor and a
configurator for each data member (each field, in Java jargon), without

In this case, we only have one variable, `cheese`, and you may want to take and return the cheese to the fridge, so a get / set pair is justified in this case.

## html: call a vue.js method by JavaScript

I have this script that uses the vue.js to obtain data from a database MySQL to be shown on a page HTMLevery time I click on a button that calls the method sync up, that is, it does not happen automatically. script in question:

``````\$('#app').ready(function() {
});
var vm = new Vue({
el: '#app',
data:{
noticias: (),
turismos: (),
videos:(),
programacoes: ()
},
methods:{
sync:function(){
\$.ajax({
dataType: 'json',
url: 'database/noticia.php',
vm.setNoticias();
},

}),
\$.ajax({
dataType: 'json',
url: 'database/turismo.php',
vm.setTurismos();
},

}),
\$.ajax({
dataType: 'json',
url: 'database/video.php',
vm.setVideos();
},
}),
\$.ajax({
dataType: 'json',
url: 'database/programacao.php',
vm.setProgramacoes();
},
error:function(){
alert("ocorreu um erro durante a conexão com o servidor!");
}
});

},
setNoticias:function(){
this.noticias = JSON.parse(localStorage.getItem('noticias'));
console.log(this.noticias);
},
setTurismos:function(){
this.turismos = JSON.parse(localStorage.getItem('turismos'));
console.log(this.turismos);
},
setVideos:function(){
this.videos = JSON.parse(localStorage.getItem('videos'));
console.log(this.videos);
},
setProgramacoes:function(){
this.programacoes = JSON.parse(localStorage.getItem('programacoes'));
console.log(this.programacoes);
},
},
this.setNoticias();
this.setTurismos();
this.setVideos();
this.setProgramacoes();
}
});
}
``````

the button that calls the method sync up:

``````Atualizar
``````

The problem with the script is having to click on the button to update the data or call it for the first time, I wish I could call the method sync up with JavaScript thus being able to perform a function that can be performed every time the page is ready.

On the website of vue.js click here to go to him In example two (2) at the end of the code it says that this is possible. I will leave below the example in question along with the existing comment mentioned above:

``````

var example2 = new Vue({
el: '#example-2',
data: {
name: 'Vue.js'
},
// define métodos dentro do objeto `methods`
methods: {
greet: function (event) {
// `this` dentro de métodos aponta para a instância Vue
alert('Olá ' + this.name + '!')
// `event` é o evento DOM nativo
if (event) {
}
}
}
})

// você pode invocar métodos no JavaScript também
example2.greet() // => 'Olá Vue.js!'
``````

I did the test but I was not successful, and I still have the question of how to call the method through a Java script when automating data synchronization to improve the user experience.

—> Click here to see my request with the script mentioned above

## vba – How to fix this error & # 39; Delete range class method failed & # 39;

I am trying to eliminate a simple range using ActiveCell, but this error still appears and I am not sure why. I feel that it is something really tiny and that I am blind.

``````Dim foundCell As Range
Dim numBuilt As Integer
Dim relatedAsmb As String

'Set foundCell = Worksheets("INVENTORY
SUMMARY").Range("B:B").Find(What:=cmbSA.Value, LookIn:=xlValues,
LookAt:=xlWhole)

'    numBuilt = foundCell.Offset(1, 1).Value
'End If

'numBuilt = numBuilt - 1
'foundCell.Offset(1, 1).Value = numBuilt