scripting – Destroy a list of two items to use as arguments to a binary function

I experiment with that Through Function. I suspect that there is a way to use this function to find both the mean and the difference between two values. This does not work:

 Through[{Mean, Subtract}[1175., 247.]]

It reports the error:

Mean :: argx: Mean called with 2 arguments; 1 argument is expected.

The implication raises a similar error:

 Through[{Mean, Subtract}[{1175., 247.}]]

Subtract :: argr: Subtract called with 1 argument; 2 arguments are expected.

I think the problem is with the Mean Function that uses only one argument as a list of values ​​while Subtract takes its arguments as two separate values. It reminds me of the destructuring in other languages, hence the title. Feel free to edit this for something more meaningful.

Is there a way to do what I am trying to do? As I learn the Wolfram language, I would rather prefer a solution for the general case rather than a solution for the functions averaging and subtracting.

Unity – Scripting Help! – Game development stack exchange

I create a castle defense game in which the enemy appears regularly (maximum 24). After the enemy reaches 24, I want to stop making clones. So far I have been successful, but I want to make sure that when the enemy reaches 23, he instantiates up to 24. How?

    public GameObject() spawnPosition;
    public GameObject enemy;
    private float startTime;
    private float timeForSpawn;
    public float speed;
    public float enemyLimit;
    public List enemyList;
    public bool stopInstantiating;
    void Start () {
        stopInstantiating = false;
        enemyList = new List ();
        enemyLimit = 24f;
        timeForSpawn = startTime;

    void Update () {

        Spawn ();

    void Spawn () {

        timeForSpawn -= Time.deltaTime;
        if (timeForSpawn <= 0 && stopInstantiating == false) {
            timeForSpawn = startTime;
                for (int i = 0; i <= 2; i++) {
                Instantiate (enemy, spawnPosition (i).transform.position, Quaternion.identity);
                if (enemy != null&& stopInstantiating == false) {
                    enemyList.Add (enemy);
                    if (enemyList.Count >= enemyLimit) {
                        stopInstantiating = true;


I see that the list is not updated when I delete the gameObjects in the game. So make sure the list is updated and working on it.

Create a custom formula in Google Sheets without scripting, but based on a different sheet

I've created a custom calculator on a Google Sheet, the calculator accepts 5 entries (arguments) on line 1, on lines 2-50 the calculation is done and the result is output on line 51.

This calculator is very easy for the end user to use because it only enters data in row 1 and gets the answer on line 51. But I would like to be able to use the calculator as a user-defined function elsewhere in the table. 5 Inputs would become the 5 arguments to the formula. Something like


I know that this is possible with Google Spreadsheet Scripting, but can scripting be dropped?

scripting – Installing WolframScript (12) on OSX (Catalina)

I did a clean install of Catalina (OSX 10.15) and the Mathematica 12.0 installation was bug free. However, I can not install WolframScript, which I really need.

During the installation I get the following error after entering my password:

This package is not compatible with this version of macOS.
The package tries to install content on the system volume. Contact the software manufacturer for assistance.

And I just have a "Quit" button to click.

I can not mention this problem on Google or here. Actually, Google shows: No results found for "This package is not compatible with this version of macOS" found mathematica.

Thanks in advance for any help or an indication of where / what to look for!

Canon – Scripting series of camera shots with different aperture and focal length

Is there a software, an app or a way to make a series of photos with a Canon camera with different aperture and focal length?

Something like

Things that I tried
DSLR Controller app
This does not seem to have a scripting system

EOS Utility and DigiCamControll
I can not change the focal length by script

scripting – How do I fix the error of a function?

I am writing this function, and when I run it, it means that the function has no opening. If I remove the right square bracket, the error "needs more input" will be displayed.

PlaneTrussElement(e_, A_, {{x1_, y1_}, {x2_, y2_}}) := Module({ls, ms, L}, L = Sqrt((x2 - x1)^2 + (y2 - y1)^2);

ls = (x2 - x1)/L;

ms = (y2 - y1)/L;

e*A/L {{ls^2, ls*ms, -ls^2, -ls*ms}, {ls*ms, ms^2, -ls*ms, -ms^2}, {-ls^2, -ls*ms, ls^2, ls*ms}, {-ls*ms, -ms^2, ls*ms, ms^2}})

PlaneTrussElement(29000000, 1.73, {{-60, 420}, {-180, 480}})

If I execute the above line, no matrix will be returned for me.

How do I solve this?

How do I use lu scripting in haproxy to dynamically change values ​​in haproxy.cfg?


frontend http-in
    mode    http


    acl path-page-designer              path_beg -i $PATH
    use_backend page-designer-backend   if path-page-designer

backend page-designer-backend
    mode    http

    option  httplog
    option  forwardfor

    server  appserver1$PORT

How can I dynamically change the values ​​of $ PATH and $ PORT using the lu script? Can anyone give me an example of a lu script for this haproxy.cfg? I'll call this script using a command-line script with all application-specific values ​​as parameters from my Azure pipeline configuration. For that, I need to know what a sample script will look like. I mean, I need a basic idea to get started. Plz help

Cross-Frame Scripting – Is It OK To Only Provide Clickjacking Protection On The Log In Page?

The answer is simple and straightforward:

If you only have clickjacking protection on the login page, only the login page will be protected. The rest of your website is still vulnerable

It sounds like you have a little misunderstanding and hope that someone can not use clickjacking to attack your website because the login page is protected by clickjacking. Unfortunately, this is not the case. Clickjacking is (usually) based on using the credentials of an already logged in user. As a result, the login page does not need to be click-clicked. Rather, they aim at every other page with a confidential action.

In fact, the login page is probably at the bottom of the list of pages that require clickjacking protection. The reason for this is that you can not use clickjacking to enter a password, and an attacker would not know the user's password to log in, even if that were possible. You may be able to log on to a user with clickjacking on a login page if the browser saves the password and automatically suggests it. Then, perform a clickjacking attack on another action on the site to exploit several clickjacking actions. In general, however, using clickjacking for a login page is probably not an interesting end in itself.

As a result, you have pretty much everything backward: If you had everything but If you've protected your login page from clickjacking, this is probably fine. If you just If your login page is protected from clickjacking, your clickjacking protection is useless.