ssh – supermicro IPMI web interface through shared LAN is blocking the operating system

I recently hosted a supermicro 4029 server in an IDC facility. The IDC provides a static IP, subnet mask and DNS. After setting up the internet in CentOS without problem, I then proceed with setting up the IPMI which helps me with remote maintenance. The IPMI is configured with the same IP, subnet mask and DNS. It is configured to use the shared LAN1 and set up the MAC address to LAN1. Upon setting up, I am able to connect to the IPMI web interface with the static IP, but lost connect with the SSH connection to the OS. I then had to logon the KVM through IPMI web interface, use the IPMICFG tool to set the MAC address to anything other than LAN1’s MAC. After that, I gained access to the server via SSH, but lost connection to the IPMI web interface.

It seems that as long as the IPMI mac address is set to LAN1, it blocks the OS and the SSH becomes accessible, but the mac address must be set to LAN1 if I want to access IPMI web interface. I have three ports on the motherboard, the dedicated IPMI port, LAN1 and LAN2. Setting the MAC address to anything other than LAN1 is useless.

Has anyone seen this before? Help appreciated and thanks in advance.

macos – Macbook Air system fails and fsck does not work

My macbook air 13 (mid 2013) cannot boot correctly. It stops at the Apple logo loading screen.
After getting into the single user mode, here is the error I got by runningfsck -fy (didn’t find any information about the error code):
enter image description here

After running the command mount -uw /, I got this and the process just hangs there:enter image description here

I think because of some failed system files or potentially damaged hard drive, the system cannot boot or mount the main drive (macintosh HD). I also tried to re-install the OS in the recover mode and it was just stuck during the initial process (seems related to the mounting problem). I also used the diskutil repairVolume command, but the process went on for 10 hours without any results (guess it’s also stuck).
Any ideas about how to solve this problem? Is there a way to force formating the main drive without mounting it?

domain name system – How do I know when an AAAA record is required?

I’m trying to wrap my head around DNS. My biggest issue right now is understanding when an AAAA record is required.

Recently, I was asked by a colleague to point a subdomain from Server A to Server B.
So, I created the subdomain on Server B and edited the DNS records (via TinyDNS which is a text file based DNS system) on Server A, which has the main domain on it, to point the subdomain at Server B.

This worked fine, I and a few other colleagues could see and access the subdomain.
However, the colleague that asked me to point the subdomain could not.

It turned out that I also needed to add AAAA records to the DNS in order to “fully” point the subdomain at Server B’s IPv6 address.


So what I don’t get is, how could you tell when you might need to add AAAA records to the DNS? Is it a good rule of thumb to always add them?
And, most importantly, what could be the reason behind my colleague not being able to see the subdomain when I and a few others could?

c# – I have a serious problem with the new Input System

I’m making a 2D platformer game with Unity. I’m new to the new Input System and I’m using PlayerInput component and Invoke Unity Events behavior. I downloaded a player controller code from GitHub to use it as a guide and I copied and pasted the code into my actual player controller. but I found that there is a problem and that is the code is using the old input system and I have to change it. But I don’t know how to do this. I’ve read many documents about this and I know there is no official eqivalent for “Input.GetAxisRaw(“Horizontal”)” but I believe there should be a way to get the same output as the old Input System. I would appreciate if you guide me and tell me what to do.
Thanks in advance.

This is my Player Controller code.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;

public class PlayerController : MonoBehaviour
{
private PlayerInputActions controls;

private Rigidbody2D rb;
private Animator anim;
private bool facingRight = true;
private float moveInput;
public Transform feetPos;
public float jumpInput;
public float speed;

(SerializeField) float JumpVelocity = 5;
float JumpPressedRemember = 0;
(SerializeField) float JumpPressedRememberTime = 0.2f;

float GroundedRemember = 0;

(SerializeField) float GroundedRememberTime = 0.25f;
(SerializeField) float HorizontalAcceleration = 1;
(SerializeField) (Range(0, 1)) float HorizontalDampingBasic = 0.5f;
(SerializeField) (Range(0, 1)) float HorizontalDampingWhenStopping = 0.5f;
(SerializeField) (Range(0, 1)) float HorizontalDampingWhenTurning = 0.5f;
(SerializeField) (Range(0, 1)) float JumpHeight = 0.5f;

private void Awake()
{
    controls = new PlayerInputActions();
}

void Start()
{
    rb = GetComponent<Rigidbody2D>();
    anim = GetComponent<Animator>();
}

public void OnMove(InputAction.CallbackContext context)
{
    moveInput = context.ReadValue<float>();
}

public void OnJump(InputAction.CallbackContext context)
{
    JumpVelocity = context.ReadValue<float>();
}

void FixedUpdate()
{
    rb.velocity = new Vector2(moveInput * speed, rb.velocity.y);
  
    if (facingRight == false && moveInput > 0)
    {
        Flip();
    }
    else if (facingRight == true && moveInput < 0)
    {

        Flip();
    }
}

void Flip()
{
    facingRight = !facingRight;
    Vector3 Scaler = transform.localScale;
    Scaler.x *= -1;
    transform.localScale = Scaler;
}

void Update()
{
    Vector2 GroundedBoxCheckPosition = (Vector2)transform.position + new Vector2(0, -0.01f);
    Vector2 GroundedBoxCheckScale = (Vector2)transform.localScale + new Vector2(-0.02f, 0);
    bool Grounded = Physics2D.OverlapBox(GroundedBoxCheckPosition, transform.localScale, 0);

    GroundedRemember -= Time.deltaTime;

    if (Grounded)
    {
        GroundedRemember = GroundedRememberTime;
    }

    JumpPressedRemember -= Time.deltaTime;

    if (controls.Player.Jump.triggered)
    {
        JumpPressedRemember = JumpPressedRememberTime;
    }

    if (controls.Player.Jump.triggered)
    {
        if (rb.velocity.y > 0)
        {
            rb.velocity = new Vector2(rb.velocity.x, rb.velocity.y * JumpHeight);
        }
    }

    if ((JumpPressedRemember > 0) && (GroundedRemember > 0))
    {
        JumpPressedRemember = 0;
        GroundedRemember = 0;
        rb.velocity = new Vector2(rb.velocity.x, JumpVelocity);
    }

    float HorizontalVelocity = rb.velocity.x;
    HorizontalVelocity += Input.GetAxisRaw("Horizontal");

    if (Mathf.Abs(Input.GetAxisRaw("Horizontal")) < 0.01f)
        HorizontalVelocity *= Mathf.Pow(1f - HorizontalDampingWhenStopping, Time.deltaTime * 10f);
    else if (Mathf.Sign(Input.GetAxisRaw("Horizontal")) != Mathf.Sign(HorizontalVelocity))
        HorizontalVelocity *= Mathf.Pow(1f - HorizontalDampingWhenTurning, Time.deltaTime * 10f);
    else
        HorizontalVelocity *= Mathf.Pow(1f - HorizontalDampingBasic, Time.deltaTime * 10f);

    rb.velocity = new Vector2(HorizontalVelocity, rb.velocity.y);
}
}

And this is the code that I downloaded from GitHub.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
(SerializeField)
LayerMask lmWalls;

(SerializeField)
float fJumpVelocity = 5;

Rigidbody2D rigid;

float fJumpPressedRemember = 0;
(SerializeField)
float fJumpPressedRememberTime = 0.2f;

float fGroundedRemember = 0;
(SerializeField)
float fGroundedRememberTime = 0.25f;

(SerializeField)
float fHorizontalAcceleration = 1;
(SerializeField)
(Range(0, 1))
float fHorizontalDampingBasic = 0.5f;
(SerializeField)
(Range(0, 1))
float fHorizontalDampingWhenStopping = 0.5f;
(SerializeField)
(Range(0, 1))
float fHorizontalDampingWhenTurning = 0.5f;

(SerializeField)
(Range(0, 1))
float fCutJumpHeight = 0.5f;

void Start ()
{
    rigid = GetComponent<Rigidbody2D>();
}

void Update ()
{
    Vector2 v2GroundedBoxCheckPosition = (Vector2)transform.position + new Vector2(0, -0.01f);
    Vector2 v2GroundedBoxCheckScale = (Vector2)transform.localScale + new Vector2(-0.02f, 0);
    bool bGrounded = Physics2D.OverlapBox(v2GroundedBoxCheckPosition, v2GroundedBoxCheckScale, 0, lmWalls);

    fGroundedRemember -= Time.deltaTime;
    if (bGrounded)
    {
        fGroundedRemember = fGroundedRememberTime;
    }

    fJumpPressedRemember -= Time.deltaTime;
    if (Input.GetButtonDown("Jump"))
    {
        fJumpPressedRemember = fJumpPressedRememberTime;
    }

    if (Input.GetButtonUp("Jump"))
    {
        if (rigid.velocity.y > 0)
        {
            rigid.velocity = new Vector2(rigid.velocity.x, rigid.velocity.y * fCutJumpHeight);
        }
    }

    if ((fJumpPressedRemember > 0) && (fGroundedRemember > 0))
    {
        fJumpPressedRemember = 0;
        fGroundedRemember = 0;
        rigid.velocity = new Vector2(rigid.velocity.x, fJumpVelocity);
    }

    float fHorizontalVelocity = rigid.velocity.x;
    fHorizontalVelocity += Input.GetAxisRaw("Horizontal");

    if (Mathf.Abs(Input.GetAxisRaw("Horizontal")) < 0.01f)
        fHorizontalVelocity *= Mathf.Pow(1f - fHorizontalDampingWhenStopping, Time.deltaTime * 10f);
    else if (Mathf.Sign(Input.GetAxisRaw("Horizontal")) != Mathf.Sign(fHorizontalVelocity))
        fHorizontalVelocity *= Mathf.Pow(1f - fHorizontalDampingWhenTurning, Time.deltaTime * 10f);
    else
        fHorizontalVelocity *= Mathf.Pow(1f - fHorizontalDampingBasic, Time.deltaTime * 10f);

    rigid.velocity = new Vector2(fHorizontalVelocity, rigid.velocity.y);
}

}

differential equations – Bug in DSolve when solving a system of two second order PDEs?

I’m solving a simple system of PDEs in Mathematica 11.1:

DSolve[{D[f[x, y], x, y] == 0, D[g[x, y], x, y] == 0}, {f[x, y], g[x, y]}, {x, y}]

This gives:

{{f[x, y] -> C[1][x] + C[2][y], g[x, y] -> C[1][x] + C[2][y]}}

I expect the general solution to be:

{{f[x, y] -> C[1][x] + C[2][y], g[x, y] -> C[3][x] + C[4][y]}}

What do you think?

Thanks!

system agnostic – How can I avoid my-guy-syndrome after devastating battle

We are a group of three players. Me (a priest of the goddess of healing and agriculture), Alice (priest of the god of light/time/law) and fighter-archetype Bob.

Our last evening went as follows. The previous evening I and Bob coerced an NPC (“John”) to gather information for us and to meet with us the following day in the ghetto before a city. I went there alone, as Alice and Bob attended some other business and I didn’t want to miss our informant. When I arrived, another NPC told me

You have to hurry. John was already here. He told me it was urgent and to tell you he’ll meet you in the forest. And he was bleeding, it looked bad!

Concerned as a healer about the wounded man, I immediately followed. After following the trail for quite some long time, I had a critical miss-roll and got lost in the forest, until I rejoined with my comrades, which ultimately followed. We finally arrived at an obvious ambush, where John was lying on the ground, with a gaping wound on the back (shoulder blades were visible), on the brink of death, but still breathing. As I was unarmed, I ignored the imminent danger and immediately went to him to try to save his life, assuming the enemy wouldn’t attack an unarmed priest. A battle ensued nontheless. Due to severely unlucky dice rolls, our 2nd priest got one-shotted (down to low health, bleeding and unconscious). Our fighter-archetype had gone around the group and attacked from behind. I was also attacked, but defended by my dogs. After the first dog was killed, I retreated hastily, without completing the healing ritual that would have saved both John and Alice.

Although Alice was rescued by the rogue boss (healing potion…go figure), my character presumes her dead, as this happened after she fled. Furthermore, she believes the important people of the city are behind this attack, to save the secret John had discovered. Thus it now seems logical to me, to leave this place behind, as going back to the city seems like certain death (you can only enter through the gates, so going in unseen is not an option).

I don’t want this to be a my-guy-syndrome situation, but how can I plausibly not abandon the group and the city? I already told the GM that I need some time to think about my next move, because of the situation above.

unity – What is the equivalent for “(Input.GetAxisRaw(Horizontal))” in the new Input System?

I’m making a 2D platformer game with Unity and I have some problems with the new Input System. Also, I’m using PlayerInput component with invoke unity events behavior. In fact, I downloaded a player controller code from GitHub to use it as a guide so I used it in my actual player controller. But there is a problem and that is the code is using the old Input and I don’t know how to change “Input.GetAxis” and what is the equivalent in the new system. I’ve read many documents about it and I know that there is no official equivalent but there should be a way to get the same output. And other than this you may find some mistakes in the code and I would appreciate If you guide me. Thanks in advance.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;

public class PlayerController : MonoBehaviour
{
    private PlayerInputActions controls;

    private Rigidbody2D rb;
    private Animator anim;
    private bool facingRight = true;
    private float moveInput;
    public Transform feetPos;
    public float jumpInput;
    public float speed;

    (SerializeField) float JumpVelocity = 5;
    float JumpPressedRemember = 0;
    (SerializeField) float JumpPressedRememberTime = 0.2f;

    float GroundedRemember = 0;

    (SerializeField) float GroundedRememberTime = 0.25f;
    (SerializeField) float HorizontalAcceleration = 1;
    (SerializeField) (Range(0, 1)) float HorizontalDampingBasic = 0.5f;
    (SerializeField) (Range(0, 1)) float HorizontalDampingWhenStopping = 0.5f;
    (SerializeField) (Range(0, 1)) float HorizontalDampingWhenTurning = 0.5f;
    (SerializeField) (Range(0, 1)) float JumpHeight = 0.5f;

    private void Awake()
    {
        controls = new PlayerInputActions();
    }

    void Start()
    {
        rb = GetComponent<Rigidbody2D>();
        anim = GetComponent<Animator>();
    }

    public void OnMove(InputAction.CallbackContext context)
    {
        moveInput = context.ReadValue<float>();
    }

    public void OnJump(InputAction.CallbackContext context)
    {
        JumpVelocity = context.ReadValue<float>();
    }

    void FixedUpdate()
    {
        rb.velocity = new Vector2(moveInput * speed, rb.velocity.y);
      
        if (facingRight == false && moveInput > 0)
        {
            Flip();
        }
        else if (facingRight == true && moveInput < 0)
        {

            Flip();
        }
    }

    void Flip()
    {
        facingRight = !facingRight;
        Vector3 Scaler = transform.localScale;
        Scaler.x *= -1;
        transform.localScale = Scaler;
    }

    void Update()
    {
        Vector2 GroundedBoxCheckPosition = (Vector2)transform.position + new Vector2(0, -0.01f);
        Vector2 GroundedBoxCheckScale = (Vector2)transform.localScale + new Vector2(-0.02f, 0);
        bool Grounded = Physics2D.OverlapBox(GroundedBoxCheckPosition, transform.localScale, 0);

        GroundedRemember -= Time.deltaTime;

        if (Grounded)
        {
            GroundedRemember = GroundedRememberTime;
        }

        JumpPressedRemember -= Time.deltaTime;

        if (controls.Player.Jump.triggered)
        {
            JumpPressedRemember = JumpPressedRememberTime;
        }

        if (controls.Player.Jump.triggered)
        {
            if (rb.velocity.y > 0)
            {
                rb.velocity = new Vector2(rb.velocity.x, rb.velocity.y * JumpHeight);
            }
        }

        if ((JumpPressedRemember > 0) && (GroundedRemember > 0))
        {
            JumpPressedRemember = 0;
            GroundedRemember = 0;
            rb.velocity = new Vector2(rb.velocity.x, JumpVelocity);
        }

        float HorizontalVelocity = rb.velocity.x;
        HorizontalVelocity += Input.GetAxisRaw("Horizontal");

        if (Mathf.Abs(Input.GetAxisRaw("Horizontal")) < 0.01f)
            HorizontalVelocity *= Mathf.Pow(1f - HorizontalDampingWhenStopping, Time.deltaTime * 10f);
        else if (Mathf.Sign(Input.GetAxisRaw("Horizontal")) != Mathf.Sign(HorizontalVelocity))
            HorizontalVelocity *= Mathf.Pow(1f - HorizontalDampingWhenTurning, Time.deltaTime * 10f);
        else
            HorizontalVelocity *= Mathf.Pow(1f - HorizontalDampingBasic, Time.deltaTime * 10f);

        rb.velocity = new Vector2(HorizontalVelocity, rb.velocity.y);
    }
}

pulseaudio – System loses sound configuration in Ubuntu 20.04

Sometimes, while watching an embedded Facebook or YouTube video the sound stops. That happens in a matter of seconds or minutes after the video has started and varies from browser to browser (some browsers can hold sound longer than others) but eventually all of them stop playing the sound track. In such occasions, I open Sound Control, change the settings and sound resumes. But then sooner or later after that the sound stops again.

In Sound Control, in tab Configuration I have:

Caicos HDMI Audio (Radeon HD 6450/7450/8450/8490 OEM / R5 230/235/235X OEM)

With the following profiles:

Digital Stereo (HDMI) Output (unplugged)(unavailable)
Digital Surround 7.1 (HDMI) Output (unplugged)(unavailable)
Digital Surround 5.1 (HDMI) Output (unplugged)(unavailable)
Off

Under Built-in Audio there are:

Analogue Stereo Duplex (unavailable)
Analogue Stereo Output (unplugged)(unavailable)
Analogue Stereo Input
Off

I observed that any Caicos HDMI Audio profile (except “Off”, of course) works fine with (and only with) Analogue Stereo Output (unplugged)(unavailable). And here’s the problem: the system changes this latter profile automagically to Analogue Stereo Input without any action from my part, and that option does not work with neither Digital Stereo (HDMI), Digital Surround 7.1 or Digital Surround 5.1.

Does that make any sense? Besides, how can a (unplugged)(unavailable) profile work since it is unplugged and unavailable? What do I have to do to have the correct profile combination to “hold” permanently?

My system specs are:

$ sudo inxi -SMA
System:
  Host: carlos Kernel: 5.4.0-48-generic x86_64 bits: 64 
  Desktop: Xfce 4.14.2 Distro: Ubuntu 20.04.1 LTS (Focal Fossa) 
Machine:
  Type: Desktop Mobo: BIOSTAR model: H310MHP serial: N/A 
  UEFI: American Megatrends v: 5.12 date: 12/30/2019 
Audio:
  Device-1: Intel 200 Series PCH HD Audio driver: snd_hda_intel 
  Sound Server: ALSA v: k5.4.0-48-generic 
$ lspci | grep 'Audio'
00:1f.3 Audio device: Intel Corporation 200 Series PCH HD Audio
01:00.1 Audio device: Advanced Micro Devices, Inc. (AMD/ATI) Caicos HDMI Audio (Radeon HD 6450 / 7450/8450/8490 OEM / R5 230/235/235X OEM)
$ cat /proc/asound/card*/codec* | grep Codec
Codec: Realtek ALC891
Codec: ATI R6xx HDMI

Thanks!

css – Bootstrap container layout system bug

As is known, the .container- class in Bootstrap 4.x.x and 5-alpha has an bug in intermediate classes.

To give a little more detail,

The container class of Bootstrap 5

.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto; }

@media (min-width: 576px) {
  .container, .container-sm {
    max-width: 540px; } }
@media (min-width: 768px) {
  .container, .container-sm, .container-md {
    max-width: 720px; } }
@media (min-width: 992px) {
  .container, .container-sm, .container-md, .container-lg {
    max-width: 960px; } }
@media (min-width: 1200px) {
  .container, .container-sm, .container-md, .container-lg, .container-xl {
    max-width: 1140px; } }
@media (min-width: 1600px) {
  .container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl {
    max-width: 1440px; } }

So for example if I choose the following class

<div class="container-md"></div>, the behavior of the width will be as follows.

screen             | container
--------------------------------------------------------
768 or up          | 720px
720 < and < 768    | More than 720px and === screen size
720 or down        | Less than 720px and === screen size

The expected behavior here is to keep the max-width: 720px value while the screen size decreases from 768 to 720 pixels. However, the current situation causes a jump in width value.

Below is the scss coding of bootstrap 5.

  // Responsive containers that are 100% wide until a breakpoint
  @each $breakpoint, $container-max-width in $container-max-widths {
    .container-#{$breakpoint} {
      @extend .container-fluid;
    }

    @include media-breakpoint-up($breakpoint, $grid-breakpoints) {
      %responsive-container-#{$breakpoint} {
        max-width: $container-max-width;
      }

      // Extend each breakpoint which is smaller or equal to the current breakpoint
      $extend-breakpoint: true;

      @each $name, $width in $grid-breakpoints {
        @if ($extend-breakpoint) {
          .container#{breakpoint-infix($name, $grid-breakpoints)} {
            @extend %responsive-container-#{$breakpoint};
          }

          // Once the current breakpoint is reached, stop extending
          @if ($breakpoint == $name) {
            $extend-breakpoint: false;
          }
        }
      }
    }
  }

The part I added to this code is below.

@each $name, $width in $container-max-widths 
  {
    @include media-breakpoint-down($name, $grid-breakpoints)
    {
        %responsive-container-down-#{$name} {
            max-width: $width;
        } 
        .container#{breakpoint-infix($name, $grid-breakpoints)} {
            @extend %responsive-container-down-#{$name};
        }
    }
  }

The resulting css file is like this.

.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto; }

@media (min-width: 576px) {
  .container, .container-sm {
    max-width: 540px; } }
@media (min-width: 768px) {
  .container, .container-sm, .container-md {
    max-width: 720px; } }
@media (min-width: 992px) {
  .container, .container-sm, .container-md, .container-lg {
    max-width: 960px; } }
@media (min-width: 1200px) {
  .container, .container-sm, .container-md, .container-lg, .container-xl {
    max-width: 1140px; } }
@media (min-width: 1600px) {
  .container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl {
    max-width: 1440px; } }
@media (max-width: 575.98px) {
  .container-sm {
    max-width: 540px; } }
@media (max-width: 767.98px) {
  .container-md {
    max-width: 720px; } }
@media (max-width: 991.98px) {
  .container-lg {
    max-width: 960px; } }
@media (max-width: 1199.98px) {
  .container-xl {
    max-width: 1140px; } }
@media (max-width: 1599.98px) {
  .container-xxl {
    max-width: 1440px; } }

Thus, it is aimed to prevent the bug in between. Can you rate the code?