WordPress ajax serial processing of and sending

I want to install/activate plugins via ajax.But i want to add a loading class on plugins list item which is being installing or activating. In jquery If i want to do it i need to write a lot bunch of code there.For example I have 4 plugins to install.So i have to first, send first ajax request to install first plugin then when a response comes I send second request in success block but its too time consuming. I want to know if there is any easy solution. Or in php file can i send a response back then continue installing 2nd one. Is that possible??

Should I generate a lot of random serial keys and pick one for each registration or generate 1 for each user?

I’m talking about Online activation. My current workflow is:

  1. User pays via paypal (without registration)
  2. Paypal performs a request to my API.
  3. My API returns a serial key to the user.
  4. Then the user is able to register using this serial key.

Is a “pay to register then use” and not a “register then pay to use”.

So the question is:

  • Should I generate (let’s say 100) keys and store them in DB then pick the first one available when someone pays via paypal? Isn’t this vulnerable to “guess” attacks?
  • Should I generate 1 random key each time a user pays via paypal? Can’t this approach generate 2 equal keys? I mean I have no info from the user except what paypal tells me so I should somehow use a random function OR loop the entire table comparing the serial keys.

What is an example of a schedule that is strict but not serial?

According to the definition of a strict schedule a value written by a transaction T is not read or overwritten by other transactions until T either aborts or commits.

Also, we say that the set of serial schedules is a proper subset of the set of strict schedules.

So what can be an example of a schedule that is strict but not serial? I am just not able to imagine one.


How to log serial data immediately?

I am currently working on an electronics project with a microcontroller that sends information over USB to a computer, where is is read from a serial port. I can read the data with screen and log it with stty. The problem I’m having is that the serial port (special file?) doesn’t show up in /dev until the device has booted. I manually start screen or stty, and I miss important startup messages.

Is there a way to wait for a serial port to appear, and then to immediately record or record incoming data?

Serial device ttyUSB permissions brokes after replug device

I have a 3D-printer, that connected to my laptop (under fresh installation of Ubuntu 19.04) by USB-cable.

As far as understand, 3D-printer creates virtual COM-port through USB. Right after OS is loaded, I can connect to my printer without any problems. But if I unplug the USB-cable and plug it again, connection could not be established.

That I tried already:

  1. User added to “tty” and “dialout” groups
  2. Add udev-rule (created file /etc/udev/rules.d/50-myusb.rules with content: KERNEL==”ttyUSB[0-9]*”,MODE=”0666″)
  3. modemmanager removed

Right after OS is loaded, I typed command

ls -l /dev/ttyUSB0 

And got expectable output:

crw-rw-rw- 1 root dialout 188, 0 сен  9 18:37 /dev/ttyUSB0 

And after replugging USB-cable same command output is:

crw------- 1 root root 188, 0 сен  9 18:56 /dev/ttyUSB0 

So, my question is: WHY?! And, how to fix it?

How to use USB-RS232 to connect the RS232 serial port of another computer?

I connect two PC by RS232 as Fig1. I use command cat /dev/ttyS0 on a PC and echo "hello"> /dev/ttyUSB0 on another PC,but they can’t communicate.

Confusingly,When I use USB-RS232 to connect them on both computers as Fig2,they can communicate。The commands are cat /dev/ttyUSB0 and echo "hello"> /dev/ttyUSB0.

I check the USB to RS232 drivers,and it’s ok.

So what is the reason?


Fig 1

enter image description here

Puertos USB quemados Raspberry Pi 3b+, cómo cambiar configuración puertos serial

en mi programa hecho en Python tengo una serie de comandos mediante los cuales configuraba el puerto USB para obtener datos del aparato que tengo conectado. Trasteando con la Raspberry, he quemado dos de los cuatro puertos que tiene, en uno de los cuales tenía conectado el aparato de medida. He comprobado y los otros dos siguen funcionando, pero al conectar el aparato a uno de esos dos puertos USB, no compila el programa, pues me da el siguiente error: serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyACM0: [Errno 2]

¿Cómo puedo configurar el puerto para que siga detectando el aparato pero en el nuevo puerto? ¡¡Muchísimas gracias!!

Las líneas que tenía de configuración del puerto:

    sc101=serial.Serial('/dev/ttyACM0',57600)   #Configuración del puerto     sc101.bytesize=serial.EIGHTBITS     sc101.parity=serial.PARITY_NONE     sc101.stopbits=serial.STOPBITS_ONE     sc101.xonxoff=False     time.sleep(0.5)      def identificacion():       #Creación de los comandos del sonómetro             sc101.write(b'I')             sc101.write(b'\r')      def test_play_sc101():             sc101.write(b'3')             sc101.write(b'\r')      def stop_sc101():             sc101.write(b'0')             sc101.write(b'\r')       def pausa_sc101():             sc101.write(b'2')             sc101.write(b'\r')      def play_sc101():             sc101.write(b'1')             sc101.write(b'\r')