google pixel 2: call me / alert when you receive an SMS from a VIP

I am Australian and I have registered to receive SMS alerts at different times (not scheduled) during the day of the United States, which is the night of Australia.

I want to make sure I receive an alert when I receive an SMS from them.

Is there a way to change the sound when I receive an SMS from that VIP?

Ideally, I would like an alarm that would not stop until I attended it.

Help appreciated.

Python VBA call program

Hi, I have been working for some time developing in VBA. but I am beginning to learn Python and the following question arose … is it possible to join these languages ​​of yours? because I didn't find anything on google to help me. My idea is to develop actions in python and make the buttons in vba call this programming. I even saw a story that Microsoft was studying the migration of the Excel language from VBA to Python, or that it had compatibility with both, but I think this change has not yet occurred!

javascript – Call function in (evade access security to cross-origin objects)

Is there any way to avoid the cross-origin security error that appears when an iframe (domain A) on a page (domain yes) try to access properties of

I want to call a function, that is. someFunc, which belongs to domain B, through an event in the iframe of domain A, in the context of domain B.


    This is a fake text.


This example generates the following error in Firefox:
SecurityError: Permission denied to access property "someFunc" on cross-origin object

Error not detected: undefined method call Magento Eav Model Entity Attribute Backend DefaultBackend Interceptor :: getResource (

Magento 2.2.2

I created a Magento 2 store and now I put the domain live in that store. Right after that, I still receive the error mentioned (full error

The route on the server did not change, I simply deleted the development domain and used the live domain pointing it to the route where the development domain pointed before. I also put the correct domain in core_config_data, deleted the cache, recompiled, redeployed, deleted the generated folder.

Nothing helped, the error keeps appearing every time I try to add a product to the cart and sometimes randomly.

Any ideas?

magento2.3.2 – Is it possible to call multiple endpoints in a controller test

I am implementing a driver test, where I add some product to the cart and want to verify its price:

Looks like I can call the office only once?



$this->assertRegExp('#.*999.00#', $this->getResponse()->getBody());

I already tried calling setUp to clear the status, but it still seems that the first action is called in the second dispatch call.

beginner – Class call function in the hotel reservation system (python)

I don't know how to use and call the def function in class. I am not sure how to use the input data for the class. Two text files on the rooms will be used: room identification and room price.

Here are some parts of the program:

class Availability :
    def __init__(self, room_type, days, id) :
        self.room_type = room_type
        self.days = days
        self.days = days = id

    def checkavailablity(self) :
        if rooms.get(self.room_type) > 0 :
            rooms(self.room_type) -= 1
            print("nn YOU MAY RESERVE THIS ROOM nn")
        else :
            print("SORRY! ROOMS ARE NOT AVAILABLE")

    def specificavailibility(self):
        if in rooms:
            print('Room No.',,'is available')
            if not in rooms:
                print('Room No.',,'is reserved')

       else :
            if choice == 3 :
                print('Check available rooms of a specific room type')
                print(' 1-Standard n 2-Superior n 3-Apartment ')
                selection = int(input('Enter number to check for available rooms:'))
                if selection == 1 :
                    room_type = 'Standard'
                else :
                    if selection == 2 :
                        room_type = 'Superior'
                    else :
                        if selection == 3 :
                            room_type = 'Apartment'

Mathematical optimization: how to make replace everything happen before the function call

I have a problem that I try to solve with NMinimize.

I have a scoring function, which will give me a final score. The problem has many variables, so instead of having them as parameters, they are assembled by variable name. Here is a simple example:

scoreResults = Function[
Module[{temp, i},
 temp = 0;
 Print["Checkpoint 0: " <> ToString[temp]];
 For[i = 0, i < 2, i++,
  temp = temp + ToExpression["aaa" <> ToString[i]];
  If[ToExpression["aaa" <> ToString[i]] > 300,
   temp = temp + 100000;
  Print["Checkpoint 1: " <> ToString[Evaluate[temp]]];
 Return[temp, Module];

Observe the If condition. Now, when I evaluate with a Replace all, I get the following:

scoreResults[] /. {aaa0 -> 123, aaa1 -> 456}
Checkpoint 0: 0
Checkpoint 1: aaa0
Checkpoint 1: aaa0 + aaa1

That is not right! I think what is happening is that the function is being evaluated before replacing everything. Is it possible to avoid this without having input parameters? My problem has many variables, and the scoring function will have many nested loops, so it is key to assemble variable names on the fly within the scoring function. Even if I use input parameters for the function, I find that my ToExpression ["aaa" <> ToString [i]] is not effective.

Ultimately, I would like to use this scoring function with NMinimize as such:

NMinimize[{scoreResults[], {aaa0 > 222, aaa1 > 333}}, {aaa0, aaa1}]

Currently the answer you give me is incorrect:

{555., {aaa0 -> 222., aaa1 -> 333.}}

Thanks in advance for your help, I have been trying to solve this for a while. I understand that when I get to the NMinimize part, I will probably have to use NumericQ, but for now, I just need to overcome the initial problem I have when getting the function to produce the correct value, including the If statement.

object-oriented: modeling a call center in Java (multi-threaded approach)

I wanted to give a chance to Call center modeling from Break the coding interview. The problem statement is as follows:

It has a call center with three levels of employees: respondent, manager, director. An incoming phone call should be assigned to a respondent who is free. If the respondent cannot handle the call, he must escalate it to a manager. If the manager is not free or cannot handle it, the call should be escalated to a director.

Here is my implementation in Java, which accepts calls from the command line in the form of: level,duration. For example, by entering: 0,25 It represents a call that can be handled by an responder (level 0) and will take 25 seconds to complete.

The code should be easy to copy / paste into an IDE or simply compile with javac in case you want to play with him in your local environment. Just save it in In global package and ready.

import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

import static java.lang.Integer.parseInt;

public class CallCenter {

    static BlockingQueue respondantQueue = new ArrayBlockingQueue<>(20);
    static BlockingQueue directorQueue = new ArrayBlockingQueue<>(20);

    static List managers = Arrays.asList(new Manager("Manager - 1"), new Manager("Manager - 2"));

    public static void main(String() args) throws Exception {
        new CallCenter().operate();

    void operate() throws InterruptedException {
        Arrays.asList(new Respondant("Respondant - 1"), new Respondant("Respondant - 2"));
        Arrays.asList(new Director("The Director"));

        System.out.println("Enter values representing call in the format: 0,25.");
        System.out.println("First value is level required, second value is call duration.");
        Scanner scanner = new Scanner(;
        while (true) {
            String s = scanner.nextLine();
            if ("q".equals(s)) {
            String() split = s.split(",");
            Call call = new Call(parseInt(split(0)), parseInt(split(1)));

    private void dispatchCall(Call call) throws InterruptedException {

class Call {

    static int idCounter = 0;

    int id;
    int durationInSeconds;
    int level;

    public Call(int level, int durationInSeconds) {
        this.level = level;
        this.durationInSeconds = durationInSeconds; = idCounter++;

    public String toString() {
        return "Call{" + "id=" + id + ", duration(sec)=" + durationInSeconds + ", level=" + level + '}';

class Respondant {
    String name;

    public Respondant(String name) { = name;
        new Thread(() -> {
            while (true) {
                try {
                    Call call = CallCenter.respondantQueue.take();
                    if (call.level == 0) {
                        System.out.println(name + " handling call: " + call);
                        Thread.sleep(call.durationInSeconds * 1000);
                    } else {
                        boolean managerHandled = false;
                        for (Manager manager : CallCenter.managers) {
                            if (!manager.isBusy) {
                                managerHandled = true;
                        if (!managerHandled) {
                } catch (InterruptedException ignored) {}

class Manager {
    String name;
    volatile boolean isBusy = false;

    public Manager(String name) { = name;

    void acceptCall(Call call) {
        new Thread(() -> {
            try {
                isBusy = true;
                if (call.level == 1) {
                    System.out.println(name + " handling call: " + call);
                    Thread.sleep(call.durationInSeconds * 1000);
                } else {
                isBusy = false;
            } catch (InterruptedException ignored) {}

class Director {
    String name;

    public Director(String name) { = name;
        new Thread(() -> {
            while (true) {
                try {
                    Call call = CallCenter.directorQueue.take();
                    System.out.println(name + " handling call: " + call);
                    Thread.sleep(call.durationInSeconds * 1000 / 4); // Director handles calls 4 times faster!
                } catch (InterruptedException ignored) {}

An execution sample for me is as follows:

Enter values representing call in the format: 0,25.
First value is level required, second value is call duration.
Respondant - 1 handling call: Call{id=0, duration(sec)=5, level=0}
Respondant - 2 handling call: Call{id=1, duration(sec)=5, level=0}
Manager - 1 handling call: Call{id=2, duration(sec)=5, level=1}
Manager - 2 handling call: Call{id=3, duration(sec)=5, level=1}
The Director handling call: Call{id=4, duration(sec)=5, level=1}

Any comment is welcomed.

The Api call that MySQL uses stops responding

It seems that our MySQL stops working abruptly at night.
We are using Loopback2.
I am reviewing the general MySQL logs.
but it only shows the queries that were sent to MySQL.
How can I know what was the last query that was executed correctly?
Or how do I find the root cause in this scenario?

apache2 – fatal error: call to undefined mysqli_connect function in phpdesktop-linux-72.1 in linux

and I want to make an .exe file on Linux and this error is displayed while we are running the code, so kindly someone help me solve this problem.

fatal error: undefined function call mysqli_connect () in /home/ahsan/desktop/phpdesktop-linux-72.1/www/index.php(29): include () # 1 {main} thrown / home / ahsan / desktop / phpdesktop-linux-72.1 / www / connection.php on line # 6