function construction – ReplaceAll with pattern matching not working with list of lists

When you did

ReplaceAll({vec1,vec2}, {x_List, c_} :> c x )
(* {{-3, 6}, {8, -20}} *)

Then it took x=vec1 and c=vec2 which is not what you want. So it did vec1 vec2 which is

vec1*vec2
(* {{-3,6},{8,-20}} *)

You can instead thread over the input

(ReplaceAll(#, {x_List, c_} :> c x) &) /@ {vec1, vec2}
(*  {{4, -8}, {-3, {2, -5}}}  *)

One way to find this out, is to actually insert Print statements, on the right side, like this

ReplaceAll({vec1, vec2}, {x_List, c_} :> (Print("x=", x, " c=", c); c x))

The print does not affect the replacement, but useful to see what is being replaced. Then you would see the following

enter image description here

In addition, if you do Attributes(ReplaceAll) you would see that Listable is not given as attribute of ReplaceAll

Catalina 10.15.5 Bluetooth (Keyboard) Connection Not Working

  • MacBook Air (13-inch, Early 2015)
  • Catalina 10.15.5 update (last night when I went to bed)
  • Bluetooth: 7.0.5f6
  • Firmware Version: v150 c9318 (from About Thus Mac; System
    Report;Hardware; Bluetooth).

This morning, 2009 Wireless Keyboard not connecting, not even seen.

Also posted with another user at Apple Communities here.

magento2 – 2 columns left layout not working anymore on CMS pages?

Magento 2.3.3

I had the 2 columns left layout working until I changed it to 1 column and then back to 2 columns left. Now the view changes after switching, but it is not 2 columns left. So I tried setting it to 2 columns right and it looks exactly the same as left.

I checked the code and this is whats it looks for 2 columns left or right: https://i.imgur.com/tFYNeeG.png. I cleared the cache, recompiled redeployed, nothing made it work again. I also tried adding a new CMS page, same problem. Maybe the template files for the layouts are missing? Where would I find those on the server?

Any ideas?

unity – I wrote a 2D player controller, but that is not working perfectly

I wrote a C# script to control a 2D player, but the script is not fully working. When I press the right arrow/d key to move the player is not moving in the right direction, but I have done the same exact thing for left key which works fine.The script shows no errors too.Kindly help me to solve the issue.The code is:

using UnityEngine;

public class PlayerController : MonoBehaviour
{
    (SerializeField) private Rigidbody2D _rb2d;
    (SerializeField) private float _speed;
    (SerializeField) private float _jump;
    private static float _tempspeed;
    private static float _tempjump;
    private bool _isRight;
    private bool _isLeft;
    private bool _isSpace;

    private void Start()
    {
        _isLeft = false;
        _isRight = false;
        _isSpace = false;
        _speed = 5f;
        _jump = 7f;
        _tempjump = _jump;
        _tempspeed = _speed;
    }

    private void Update()
    {
        ReadInput();
    }

    private void FixedUpdate()
    {
        Move();
    }

    private void ReadInput()
    {
        if (UnityEngine.Input.GetKey("d") || UnityEngine.Input.GetKey("right"))
        {
            _isRight = true;
        }else {
            _isRight = false;
        }
        if (UnityEngine.Input.GetKey("a") || UnityEngine.Input.GetKey("left"))
        {
            _isLeft = true;
        }else {
            _isLeft = false;
        }
        if (UnityEngine.Input.GetKey("w") || UnityEngine.Input.GetKey("up"))
        {
            _isSpace = true;
        }else {
            _isSpace = false;
        }
    }

    private void Move()
    {
        Vector2 speedVectorRight=new Vector2(_tempspeed,_rb2d.velocity.y);
        Vector2 speedVectorLeft=new Vector2(-_tempspeed,_rb2d.velocity.y);
        Vector2 jumpVector=new Vector2(_rb2d.velocity.x,_tempjump);

        if (_isRight)
        {
            _rb2d.velocity = speedVectorRight;
        }else {
            speedVectorRight.x=0f;
            _rb2d.velocity = speedVectorRight;
        }
        if (_isLeft)
        {
            _rb2d.velocity = speedVectorLeft;
        }else {
            speedVectorLeft.x=0f;
            _rb2d.velocity = speedVectorLeft;
        }
        if (_isSpace)
        {
            _rb2d.velocity=jumpVector;
        }
    }

When I tried to print debug statements in different parts of if statements, they work fine. The problem in my observation is in :

if (_isRight)
        {
            _rb2d.velocity = speedVectorRight;
        }else {
            speedVectorRight.x=0f;
            _rb2d.velocity = speedVectorRight;
        }

The _rb2.velocity is not accepting speedVectorRight I guess.Thanks in advance!

python – SciPy ODE RK45 not working as expected

I am developing a code to integrate numerically step by step target and I may need to change some parameters on each step. The expected result from the optimizer is an array with two elements. In one step, it return 3 elements without a clear reason (idx == 1). What am I missing?

Code:

import numpy as np
import scipy.integrate as ode
import matplotlib.pyplot as plt


def _dydt(t, y, a):
    dydt = a*t
    return dydt


nr_points = 10
res_x = np.zeros(nr_points)
res_y = np.zeros(nr_points)


t0 = 0.0
dt = 0.1
t1 = 0.1 + dt
y0 = (0.0)

solution = ode.solve_ivp(_dydt, 
                         (t0, t1),
                         y0, 
                         method = "RK45", 
                         max_step = dt,
                         t_eval = np.arange(t0, t1, dt),
                         args=(2,))

print('t0', t0)
print('t1', t1)
print('y0', y0)
print('success', solution.success)
print('sol.t', solution.t(-1))
print('sol.y', solution.y(0)(-1))
print('sol.y', solution.y,'n')
res_x(0) = solution.t(-1)
res_y(0) = solution.y(0)(-1)


for idx in range(1,nr_points):
    t0 = t0 + dt
    t1 = t1 + dt
    y0 = (solution.y(0)(-1))

    solution = ode.solve_ivp(_dydt, 
                              (t0, t1),
                              y0, 
                              method = "RK45", 
                              max_step = dt,
                              t_eval = np.arange(t0, t1, dt),
                              args=(2,))
    print('idx ===>', idx)
    print('t0', t0)
    print('t1', t1)
    print('y0', y0)
    print('success', solution.success)
    print('sol.t', solution.t(-1))
    print('sol.y', solution.y(0)(-1))
    print('sol.y', solution.t)
    print('sol.y', solution.y,'n')
    res_x(idx) = solution.t(-1)
    res_y(idx) = solution.y(0)(-1)



plt.plot(res_x, res_y)
plt.grid()
plt.show()

Results:

t0 0.0
t1 0.2
y0 (0.0)
success True
sol.t 0.1
sol.y 0.01
sol.y ((0.   0.01)) 

idx ===> 1
t0 0.1
t1 0.30000000000000004
y0 (0.01)
success True
sol.t 0.30000000000000004
sol.y 0.09000000000000002
sol.y (0.1 0.2 0.3)             ------------------> ???
sol.y ((0.01 0.04 0.09))        ------------------> ???

idx ===> 2
t0 0.2
t1 0.4
y0 (0.09000000000000002)
success True
sol.t 0.30000000000000004
sol.y 0.14000000000000004
sol.y (0.2 0.3)
sol.y ((0.09 0.14)) 

Results conitinues but idx == 1 is where the problem is.

ip – Hamachi not working when on OpenRCT2

when I run Hamachi with firewall access, and my friend connects to my game of RCT2 (openRCT2), the chat bar on the host computer shows this:

Player has joined the game.
Player has disconnected (connection closed).

This is especially annoying when trying to play, could someone please help me to get this working (openRCT2 has firewall access, and my IP is definitely correct).
SOMEONE PLEASE HELP!!

[FREE] AddMeFast Bot 100% working!! 10000 points daily! | NewProxyLists


  1. Heaventrix

    Heaventrix
    Administrator
    Staff Member

    • Administrator

    • Global Moderator

    • Moderator

    • Staff

    • VIP

    Joined:
    Mar 29, 2014
    Messages:
    4,769
    Likes Received:
    3,161
    Trophy Points:
    113
    Gender:
    Male

    [FREE] AddMeFast Bot 100% working!! 10000 points daily!

    [​IMG]

    Download:

    Hidden Content:

    You must reply before you can see the hidden data contained here.

     

  2. akhilswatantra
    New Member


    Joined:
    Feb 25, 2015
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1

    this is really good software but in after few minute that software hang and stop working

     

  3. trueday09
    New Member


    Joined:
    Mar 17, 2015
    Messages:
    0
    Likes Received:
    0
    Trophy Points:
    0

    DVTVS5SQKXXP8A3Q72YBN7GRTPFJG5

     

  4. poocha
    New Member


    Joined:
    Mar 22, 2015
    Messages:
    2
    Likes Received:
    1
    Trophy Points:
    0

  5. moadmidou2
    New Member


    Joined:
    Mar 28, 2015
    Messages:
    0
    Likes Received:
    0
    Trophy Points:
    0

    Yeah it’s working 100%

     

  6. blackboshit
    New Member


    Joined:
    May 9, 2015
    Messages:
    0
    Likes Received:
    0
    Trophy Points:
    0

    greaat post.. i will to try this software

     

  7. iampanda
    New Member


    Joined:
    May 7, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0

  8. cuso
    VIP


    Joined:
    May 15, 2015
    Messages:
    630
    Likes Received:
    1
    Trophy Points:
    18

    Add me fast in an amazing tool…

     

  9. trafficguy
    VIP


    Joined:
    Dec 26, 2014
    Messages:
    204
    Likes Received:
    7
    Trophy Points:
    18

    let me check this out….

     

  10. qqqzz
    New Member


    Joined:
    May 28, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0

    to see if it is working.

     

  11. pama
    New Member


    Joined:
    Feb 11, 2015
    Messages:
    1
    Likes Received:
    1
    Trophy Points:
    0

    Thanks for sharing this man

     

  12. player0807
    VIP


    Joined:
    Apr 20, 2015
    Messages:
    656
    Likes Received:
    4
    Trophy Points:
    18

  13. naveedjalbani
    New Member


    Joined:
    Dec 8, 2015
    Messages:
    0
    Likes Received:
    0
    Trophy Points:
    0

  14. aoirinku00x
    New Member


    Joined:
    Dec 19, 2015
    Messages:
    1
    Likes Received:
    1
    Trophy Points:
    0

    need the software so badly

     

  15. seomyass
    VIP


    Joined:
    Jan 10, 2016
    Messages:
    589
    Likes Received:
    3
    Trophy Points:
    0
    Gender:
    Male

  16. zerkamaz
    New Member


    Joined:
    Apr 2, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0

    Thanks buddy for sharing

     

  17. deanand28
    Banned


    Joined:
    Apr 4, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0

  18. Is this safe to use on main accounts?

     

javascript – Chrome Extension: document.querySelector(‘button’).click() is not working on button created on React

I want from extension to click the button but button click event is not working as if i use JS DOM Methods:

getElementsByClassName('button')(0).click(); // Not working
//or
document.querySelector('button').click(); // Not working  

The problem is that button is created either on “React.js“, so i think that causes not to happen the button click event.

Please suggest me any solution for this problem.

Thanks.

addtocart – Add to cart functionality is not working for any product

my add to cart not working, its showing nothing in cart for 2 stores and for 1 store adding a default product everytime, doesn’t matter which product we added,
its showing this exception….

We can’t add above item to cart.Please contact administratorThe product wasn’t found. Verify the product and try again.

i have checked my code is fine, its working on local setup and dev server, just issue is on production,

i have tried with cookie lifetime increase and permission settings on directories but none worked..
do it need some more cookie or session changes which can be done ?

can any body share any idea or solution with some details ??

thunderbolt – External iSight Camera microphone not working

I’m using a 2003-era external iSight Camera with an Apple Cinema Display and USB-C MacBook Pro running macOS 10.15.

It’s connected via a long succession of dongles:

iSight > FireWire 400 > Apple Cinema Display > FireWire 800 > Thunderbolt 2 > Thunderbolt 3

It still works great for video, if a bit low resolution, and you can’t beat the design:

external iSight camera

However, the iSight Camera’s microphone does not appear to be working. People cannot hear me when my laptop is in clamshell mode, despite being on video via the external iSight.

In System Preferences > Sound I only see “MacBook Pro Microphone”:

Sound Input

System Information shows a FireWire iSight device, as well as an “Unknown Device”. When I unplug the FireWire cable/dongle, both devices disappear.

System Information

Why isn’t the iSight microphone working? How can I use an external iSight as an audio/video webcam in modern versions of macOS?


Related threads that seem to be experiencing the same issue: