mac: the audio interface does not appear in the system preferences output input

Running Catalina OS. Unfortunately, connecting my Focusrite Saffire 6 interface is not recognized in System Preferences> Sound> Output Input. Very frustrating. I am using the correct high-speed USB cable and the interface is shown in my USB tree (About this mac> System Report> Hardware> USB) but it only shows & # 39; Internal speakers & # 39; in Exit and input of system preferences. I can't find anything online about how to make the Mac recognize the interface. Just an article about deleting temporary files that I did without success. I also downloaded drivers for the USB 1.1 driver, although I'm pretty sure I'm running 2.0.

poo – Doesn't the input of the following code load me?

I have the class employed:

    #Creación de Clase
class empleado: #se crea la clase empleado
    def _init_(self):
        self._nombretrab=""
        self._horastrab=0
        self._cuotahora=0
        self._sueldo=0
    def establecernombreemp(self,nombreT):
            self._nombretrab=nombreT
    def establecerhorastrab(self,horaT):
            self._horastrab=horaT
    def establecercuotahora(self, cuotaH):
            self._cuotahora=cuotaH
    def calcularsueldo(self):
            sueldo=self._cuotahora*self._horastrab
            if self._horastrab<40: #estas líneas se agregaron después en clases y condicionesnes
                return sueldo
            else:
                    sueldo=sueldo*1.05
                    return sueldo         
    def obtenernombreemp(self):
            return self._nombretrab

Done with an if it allows me to increase 5% of the salary of an employee if their hours worked are 40 hours or more so far so good. since I can create employees through this class and I calculate the salary without problems.

The real problem is that when creating an algorithm that processes several employees, it does not allow me to save in the "want" variable when I do it in the python idle with another class called executed executable:

Which should elaborate an algorithm that allows to process several employees, based on the class employed by each employee, read the data name of the employee, share of hours and hours worked.

class ejecutarempleado:
    def _init_(self):
            self._nomemp=""
            self._hrstra=0
            self._cuohr=0
            self._desea='' #almacena el valor de la pregunta variable booleana
            desea= input('¿Desea procesar empleado (S/N) ? ')
            while desea== 'S':
                _nomemp= input('Digite el nombre del empleado ')
                _hrstra= input('Digite el numero de horas de trabajo')
                _cuohr= input('Digite cuota de hora ')
                objempleado= empleado()
                objempleado.establecernombreemp(_nomemp)
                objempleado.establecerhorastrab(_hrstra)
                objempleado.esttablecercuotahora(_cuohr)
                print(objempleado.calcularsueldo())
                print(objempleado.obtenernombreemp())
                desea= input('¿Desea procesar empleado (S/N) ? ')

The problem is that it does not show me any error, but it also does not show me the necessary input to start filling the data, I do not know if I am doing something wrong, since when loading the code literally nothing happens and I can not continue filling employees because neither even the initial question appears, the answer of which should be stored in the variable "want" and only when "you want == 'S'" can I fill in the data according to the while shown.

python 3.x: take the json input and create a dynamic json output based on the input values: find a better way to achieve this

I have this specific scenario where I am going to get a JSON that could have multiple objects. From the Multiple Objects, I will create a new Json that can have nested arrays that grow in n quantity depending on some json object values.

I hope there is a better way to do this. Perhaps my example below is the best way? I took a look at https://realpython.com/python-data-classes/ but I don't think that helps, since it seems complicated to convert the data class object to another json.

Sample entry: Note that 3 and 4 are pause start and end times. That is why you will see the start and end times in the interrupt matrix.

({
    "name": "Jay",
    "clock_type": 1,
    "start": "4am"
}, {
    "name": "Jay",
    "clock_type": 4,
    "start": "5am"
},
{
    "name": "Jay",
    "clock_type": 3,
    "end": "6am"
},
{
    "name": "Jay",
    "clock_type": 4,
    "start": "7am"
},
{
    "name": "Jay",
    "clock_type": 3,
    "end": "8am"
}

)

Sample output:

{
"name": "Jay",
"start": "4am",
"break": ({
    "start": "5am",
    "end": "6am"
}, {
    "start": "7am",
    "end": "8am"
})

}

What I am doing now is going through the matrix and building the punch dynamically based on the "type of clock".

import json

def write_new_json(data):

    request = {}
    break_count = 0

    for i in data:
        # 1 = New Object. First Clock In
        if i('clock_type') in (1):
            request.update({"name": i("name"),
                            "start": i("start")})
        # 3 = Break End
        if i('clock_type') in (3):
            request("break")(break_count).update({"end": i("end")})
            break_count += 1

        # 4 = Break start. If there is already a breaks object, then we do not create a breaks array, 
              # we just append to the existing one.
        if i('clock_type') in (4):
            if break_count == 0:
                request.update({"break": ()})

            request("break").append({"start": i("start")})

       # 2 = Not in the example, but a punch of 2 would reset break_count to 0.


    return request


with open('example.json') as f:
    api_request = write_new_json(json.load(f))

print(json.dumps(api_request))

wireless – Miracast receiver with touch input return

TLDR: Is there software developed yet to act as a Miracast receiver that will return tactile responses?

I have a fleet of touch screens that use HDMI and USB cables on staff laptops for lessons that allow tactile feedback (highlight and circle circles on the fly, etc.). I have analyzed the patented hardware for this and it has been considered too expensive, so I am considering the idea of ​​using a Raspberry PI and some form of Linux configuration to act as a wireless miracasting receiver that can send the touch inputs to the members of the laptop staff.

Windows 10 can do it out of the box, but I would like to install something small and wireless on the wall on the screen.

python: I have the problem in my script, it gives the syntax error in the part of nmap = input ("[Nmap]≈>

if  NASA == '01' or NASA == '1':
       nmap = input("(Nmap)≈> ")
       os.system("figlet Nmap")
       print("01.Simple Scan")
       print("02.Advanced Scan"
   if nmap == '01' or nmap == '1':
         nmapip1 = input("IP: ")
         os.system("nmap %s" % (nmapip1))
         sys.exit()
   elif nmap == '02' or nmap == '2':
           nmapip2 = input("IP: ")
           os.system("nmap -sV %s" % (nmapip2))
           sys.exit()

UPS input and output voltage and frequency recovery

What WINAPI functions could you use to recover the input / output voltage / frequency of the UPS?

magento2: resets the amount in the input field when adding products from the grouped products page

I have my Magento 2.3.2 site set up so that adding products to the cart keeps the customer on the page (does not redirect to the cart). When a customer adds any product to the cart from a grouped products page, the page automatically scrolls to the top and the & # 39; Link to my cart & # 39; expands to show cart contents. At this point, the customer has the option to add more products from that page to the cart. Unfortunately, the values ​​entered in the quantity fields for the individual products are not reset to zero. Consider the following scenario …

The customer adds 3 of a product, 2 of another and 5 of another to the cart. Now they want to add 1 more product. You probably don't realize that the quantities you entered earlier are still there and when you add the 1 product to the cart, you are actually adding 9 products (the original 8 quantities plus the additional 1).

Is there an easy way to reset all quantity input values ​​to zero when something is successfully added to the cart?

OTP Primefaces input

I need to make an input field to enter an OTP on the main faces. I saw that in angular there are already input components specially made of otp. Is this also on the main faces or is there a solution?

input – How to use the steam controller as a game controller outside steam

I am playing a game that is only available in the EpicGames store and I would very much like to play it with a gamepad. But the only gamepad I own is a Steam controller and it always emulates keyboard and mouse inputs when it is out of Steam (in & # 39; desktop mode & # 39;), which does not allow more than one axis input (The mouse).

How do I use the steam controller as an out of steam controller input? Any solution that allows me to use the stick axis inputs, trackpads and shoulder triggers (which means that just emulating the mouse axis is not enough) would solve my problem without emulating a complete one, p. Xbox controller.

Multiplayer vs Tick game server input

I am building a game server for a turn-based role-playing game, where players control their characters through a web interface (think like a Jackbox Party Pack game, where there is a screen that shows shared information and players' devices allow them to send their tickets).

I have most of the bases set up: customers can connect, create a game, additional players can join the game using a code, the game server is doing basic game things.

I am starting to work on the actual handling of tickets and ticks. Because this is in Go, there is a routine that handles the input that is separate from the routine that handles the game by updating each tic. Basically I have a for loop with multiple selections (so that a new client does not prevent a server brand from being processed), something like this:

func (g *Game )listen(){
    ticker := time.NewTicker(time.Millisecond * 200)

    for {
        select {
        case nc := <-g.newClients:
            g.acceptNewClient(nc)

        case lc := <-g.closingClients:
            g.unregisterClient(lc)

        default:
        }

        select {
        case u := <-g.output:
            if len(g.players) > 0 {
                for c := range g.players {
                    c.out <- u
                }
            }

        case in := <-g.input:
            g.handleInput(in)

        default:
        }

        select {
        case t := <-ticker.C:
            g.tick(t)

        default:
        }
    }
}

What I am trying to discover right now is the best way to handle that player's entrance and how to update the game's status.

For example, the first state in which the game begins is the selection of characters. All players can select one of four character classes, but they cannot duplicate (that is, they cannot have two fighters, first to arrive, first to serve). The VIP also has the option to start the game, which will randomly assign classes to players who have not selected, and will create players with AI if there are less than 4 players.

If the input controller can directly modify the state of the game, that is, when he receives a message from player 1 that says he wants to select a fighter, he modifies the state of the game to do the right thing, or should he send messages a row? For example, saying "hey, vip says start the game" or "player 2 fighter selected" and then the tick controller does the appropriate thing.

And as an additional question: if some type of queue is the correct answer, should there be a single queue for all entries, or different queues depending on the action? and messages from "Player 1 attacks monster 2 with a basic attack"?