magento2 – Magento 2 Redirect and display error in all admin page after click on “sign in”

I am trying to login in admin but it display “There has been an error processing your request”.

It generate error in like “Undefined offset: 2 in C:xampphtdocsm24libinternalMagentoFrameworkEncryptionEncryptor.php on line 591”

Also try to create new user and login but that solution is not working in my case. Note that I am using magento 2.4. Thanks in advance.

api – jQuery on click not working on mobile

I try to change click to click tap but the problem still occur
This code working on desktop , laptop but on mobile doesnt alert

jQuery('#register-me').on('click tap',function(){

var action = 'register_action';
     
var username = jQuery("#st-username").val();
var mail_id = jQuery("#st-email").val();
 var firname = jQuery("#st-fname").val();
 var lasname = jQuery("#st-lname").val();
 var passwrd = jQuery("#st-psw").val();  
    if (!username) {
    alert("Please Enter Username");
        return
    }    

     if (!mail_id) {
        alert("Please Enter Email");
         return
    }
     if (!isValidEmailAddress(mail_id)){
         alert("Please Enter Valid Email");
         return
     }
     if (!firname) {
        alert("Please Enter IC");
         return
     }
     if (firname.length<12||firname.length>12)  {
        alert("Please Enter Valid IC");
         return
     
     }
     if (!lasname) {
        alert("Please Enter Phone");
         return
    }
    
     if (!isANumber(lasname)){ 
    alert("Please Enter Valid No Phone");
         return
    }
         if (!passwrd) {
        alert("Please Enter Password");
             return
    }
     
     
     
 var url = "https://secure.astrataipan.com/apibsmmkl_uat/api/regnewtmpbsmm";
     console.log(username)
        console.log(mail_id)
        console.log(lasname)
        console.log(firname)
        console.log(passwrd)
 
var ajaxdata = {

action: 'register_action',
 name: username,
 email: mail_id,
 icno: firname,
 phoneno: lasname,
 password: passwrd,

};

jQuery.post( ajaxurl, ajaxdata, function(res){ // ajaxurl must be defined previously
console.log(res)
jQuery("#error-message").html(res);
 });
jQuery.post( url, ajaxdata, function(res){ // ajaxurl must be defined previously
console.log(res)
    if (res.Code=="888"){
        alert(res.Status);
    }
    else if (res.Code=="887"){
        alert(res.Status);
    }
    else if (res.Code=="200"){
        alert("Terima kasih kerana berminat di dalam program BSMMKL. Kami telah menerima permohonan anda dan kakitangan kami akan menghubungi anda dalam masa terdekat. !");
    }
    else {
        alert('Registration Error');
    }
jQuery("#error-message").html(res);
 });
     
     function isValidEmailAddress(emailAddress) {
    var pattern = new RegExp(
        /^((((a-z)|d|(!#$%&'*+-/=?^_`{|}~)|(u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF))+(.((a-z)|d|(!#$%&'*+-/=?^_`{|}~)|(u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF))+)*)|((x22)((((x20|x09)*(x0dx0a))?(x20|x09)+)?(((x01-x08x0bx0cx0e-x1fx7f)|x21|(x23-x5b)|(x5d-x7e)|(u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF))|(\((x01-x09x0bx0cx0d-x7f)|(u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF)))))*(((x20|x09)*(x0dx0a))?(x20|x09)+)?(x22)))@((((a-z)|d|(u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF))|(((a-z)|d|(u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF))((a-z)|d|-|.|_|~|(u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF))*((a-z)|d|(u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF)))).)+(((a-z)|(u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF))|(((a-z)|(u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF))((a-z)|d|-|.|_|~|(u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF))*((a-z)|(u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF)))).?$/i
    );

    return pattern.test(emailAddress);
}
     function isANumber(str){
  return !/D/.test(str);
}
 });

magento2 – Need to call a function on button click

I need to print log info when a button is clicked. I am using the below code, please let me know what are the mistakes in my code. I am trying to call a function like below.

‘on_click’ => ‘execute();’,

Button.php

_logger = $logger;
}

public function render(AbstractElement $element)
{
$element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
return parent::render($element);
}
protected function _getElementHtml(AbstractElement $element)
{
return $this->_toHtml();
}
public function getCustomUrl()
{
return $this->getUrl(‘hello’);
}
public function hello()
{
$test = ‘hello’;
echo $test;
}
public function execute()
{
$this->_logger->info(‘Hello This is our Custom log file example’);
}
public function getButtonHtml()
{
$button = $this->getLayout()->createBlock(‘MagentoBackendBlockWidgetButton’)->setData((‘id’ => ‘btn_id’, ‘label’ => __(‘Create’),’on_click’ => ‘execute();’,));
return $button->toHtml();

}
}

**button.phtml**

getCustomUrl();
echo $block->hello();
echo $block->getButtonHtml();
?>

collision detection – How can I make player object collide and keep moving until it is as close as possible to click location?

I am making a basic point and click adventure game. I can make the player object move towards the location of a mouse click and collide with walls, but movement stops the instant a collision occurs. I would like the player object to keep moving (slide along the wall) and get as close as it can to the mouse click location, without passing through a wall of course. I have Create, Step, Collision & Global Mouse click events. Please see below for code and diagrams.

Any help will be much appreciated.

The player object (green square) should move towards the mouse click location, collide on the X axis, then slide down the Y axis before stopping in the corner of the walls

This is my player object. It is set to solid and uses a collide event to collide with the walls

Create Event code:

//stop player moving on create
enum mouse {
    none    
}
xx = mouse.none;
yy = mouse.none;
player_move_speed = 2;

//init
collision_speed = player_move_speed + 1;

Step Event code:

//general keys
if keyboard_check_pressed(vk_escape) {game_end()}


//point and click movement
if (xx != mouse.none and yy != mouse.none) {
    move_towards_point(xx,yy,player_move_speed);
} else {
    speed = 0;  
}

if (distance_to_point(xx,yy) < collision_speed) {
    xx = mouse.none;
    yy = mouse.none;
}

Global Left Pressed code:

xx = mouse_x;
yy = mouse_y;

python – Como inserir registros num banco de dados mysql com path do click?

Tenho vários arquivos num diretório:

CHIKV1-X-gb_AB455493.fasta
CHIKV1-X-gb_AB455494.fasta
CHIKV1-X-gb_AB455494.fasta
...

Conteúdo dos arquivo:

>lcl|NC_004162.2_cds_NP_690588.1_1 (locus_tag=CHIKVgp1) (db_xref=GeneID:956309) (protein=nonstructural polyprotein) (protein_id=NP_690588.1) (location=77..7501) (gbkey=CDS)
------------------------------------------------------------
----------------atggatcctgtgtacgtggacatagacgctgacagcgccttttt
gaaggccctgcaacgtgcgtaccccatgtttgaggtggaacctaggcaggtcacaccgaa
tgaccatgctaatgctagagcgttctcgcatctagctataaaactaatagagcaggaaat
tgatcccgactcaaccatcctggatattggtagtgcgccagcaaggaggatgatgtcgga
------------------------------------------------------------
------------------------------------------------------------
---------
>gb:AB455493|Organism:Chikungunya virus|Strain Name:SL11131|Segment:null|Host:Human
atggctgcgtgagacacacgtagcctaccagtttcttactgctctactctgcaaagcaag
agattaataacccatcatggatcctgtgtacgtggacatagacgctgacagcgccttctt
gaaggccctgcaacgtgcgtaccccatgtttgaggtggaaccaaggcaggtcacaccgaa
tgaccatgctaatgctagagcgttctcgcatctagctataaaactaatagagcaggaaat
tgaccccgactcaaccatcctggatatcggcagtgcgccagcaaggaggatgatgtcgga

Tenho esse código:

 import pymysql as MySQLdb
    from Bio import SeqIO
    import click
    import re
    from collections import defaultdict
    from Bio import AlignIO
    import os


def conexao():
    try:
        conn = MySQLdb.connect(
            host="localhost", user="root", passwd="", db=""
        )
        print("conectado")
        return conn
    except MySQLdb.Error as e:
        print(f"Erro ao conectar no Servidor MySQL: {e}")


def desconectar(conn):
    if conn:
        conn.close()


@click.command()
@click.option(
    "--path", default=".", type=click.Path(exists=True), help="Path para ser listado."
)
def ls2(path):
    with os.scandir(path) as d:
        for e in d:
            if not e.name.startswith(".") and e.is_file():
                lista_line = e.name
                for i in lista_line:
                    seqaln = AlignIO.read(lista_line, "fasta")
                    for record in seqaln:
                        id_alnRef = seqaln(0).id
                        print(id_alnRef)
                        id_alnG = seqaln(1).id
                        id_alnGE = re.search(r".*|", id_alnG)
                        id_alnGE = re.sub("|", " ", id_alnGE(0))
                        seq1 = seqaln(0).seq
                        seq2 = seqaln(1).seq
                        alinhamento = (
                            ">"
                            + id_alnRef
                            + "n"
                            + seq1
                            + "n"
                            + ">"
                            + id_alnGE
                            + "n"
                            + seq2
                            + "n"
                        )
                    conn = conexao()

    try:
        cursor = conn.cursor()
        cursor.execute(
            f"INSERT INTO tblAlinhamentos(FK_genomaID,FK_RefCdsID, seqAln)"
            f"VALUES( '{id_alnGE}', '{id_alnRef}','{alinhamento}');"
        )

        conn.commit()
        print(
            f"INSERT INTO tblAlinhamentos(FK_genomaID, FK_RefCdsID, seqAln)"
            f"VALUES('{id_alnGE}', '{id_alnRef}', '{alinhamento}');"
        )
    except MySQLdb.Error as e:
        print(f"Erro ao conectar no Servidor MySQL: {e}")


ls2()
desconectar(conn)

E a saída que espero é essa:

PK_a  FK_genomaID FK_RefCdsID seqAln
1     gb:H3455      lc|xxxx    atgtatgat
2     gb:H3456      lc|xxxx    atgtatgat
3     gb:H3456      lc|xxxx    atgtatgat

No entanto não estou conseguindo inserindo todos os arquivos desejados no diretório…O que estou fazendo de errado ?

Facebook videos have no sound until I click to unmute

When I play a video in Facebook desktop web, it starts muted and I have to click to enable audio:

video controls with sound muted

This doesn’t seem to be related to any of the Video settings I can find – I’ve tried all combinations available and it doesn’t change this behaviour:

facebook video settings

It’s particularly irritating while in a Watch Party, where each new video reverts to muted and I have to click again, missing the start of the sound.

I’ve made sure Facebook has permission to play audio in Chrome, and tried on Windows and Mac, and on Chrome and Safari. In any case, the video control strip is an overlay added by Facebook, so I’m pretty certain it’s being controller by Facebook and not the browser/OS.

The problem doesn’t happen on the mobile web version for me.

Is there a setting that will allow me to watch a Watch Party without having to manually unmute every video in the playlist?

input – Button with hexagon shape not recognizing mouse click

I made a hexagonal button, with a png image, the problem is that if i click outside of the image of the hexagon(but still inside of the squared area that defines the whole button), the click is registered , if i click inside of the button nothing happens, now i just read in the docs about the property Click Mask, so i made the same image of the hexagon shape into a bitmap, but this error text comes up:

The selected resource (StreamTexture) does not match any type expected for this property (BitMap).

I used this linkt as a guide to create the bitmap, http://www.herongyang.com/Windows/GIMP-JPEG-Save-Image-in-BMP-Format.html, still i don’t know what i’m missing.
Also used MS Paint to save it as bitmap, but that din’t work either.

Why i can’t load the image as Click Mask in Godot?

I attached the image for testing.

enter image description here

Como fazer um script Python executar um Click no Windows 10?

Estou tentando um script simples com python, ele clicar em uma coordenada da tela.

Já tentei com Pyautogui, pynput, pydirectinput, pywinauto… Mas em nenhuma delas o click é realmente efetuado, a única coisa que funciona é mover o mouse até a coordenada.

os scripts são simples, mas mesmo assim não funciona, por dedução acho que seja um problema relacionado ao win10.

Alguém sabe como posso resolver isso?
Preciso instalar algo a mais, talvez um driver?
Tá faltando dar algum tipo de permissão?

Estou perdido 🙁

Algumas de minhas tentativas abaixo

OBS: Em todas tentativas o mouse se move, mas não clica.

Pyautogui:

import pyautogui
pyautogui.moveTo(35, 240)
pyautogui.click() 

Pydirectinput:

import pyautogui
import pydirectinput
pydirectinput.moveTo(35, 240)
pydirectinput.click()

pywinauto:

import pywinauto
from pywinauto import Desktop, Application, mouse, findwindows

pywinauto.mouse.move(coords=(160, 400))
pywinauto.mouse.double_click(button='left', coords=(160, 400))

Autoclicker usando pynput:

import time
import threading
from pynput.mouse import Button, Controller
from pynput.keyboard import Listener, KeyCode


delay = 0.001
button = Button.left
start_stop_key = KeyCode(char='s')
exit_key = KeyCode(char='e')


class ClickMouse(threading.Thread):
    def __init__(self, delay, button):
        super(ClickMouse, self).__init__()
        self.delay = delay
        self.button = button
        self.running = False
        self.program_running = True

    def start_clicking(self):
        self.running = True

    def stop_clicking(self):
        self.running = False

    def exit(self):
        self.stop_clicking()
        self.program_running = False

    def run(self):
        while self.program_running:
            while self.running:
                mouse.click(self.button)
                time.sleep(self.delay)
            time.sleep(0.1)


mouse = Controller()
click_thread = ClickMouse(delay, button)
click_thread.start()


def on_press(key):
    if key == start_stop_key:
        if click_thread.running:
            click_thread.stop_clicking()
        else:
            click_thread.start_clicking()
    elif key == exit_key:
        click_thread.exit()
        listener.stop()


with Listener(on_press=on_press) as listener:
    listener.join()

gui – How do I make buttons function on the cursors click in roblox studio?

According the the Roblox developer website, you can create a button by right clicking in the Explorer window and clicking the button you want. There are two types of buttons as described on the website.

Text Button: A TextButton is very similar to a TextLabel, except that a player can activate it with a click. Internally, it also shares
many of the same visual properties as a text label — font, background
color, stroke color, etc.

Image Button: Similarly, an ImageButton is like an interactive version of the ImageLabel object and it uses a custom image that you
upload to Roblox. It also shares most of the same properties as its
non-button counterpart.

In order to add a function that occurs when a button is pressed, simply create a local script inside the button and add this code:

function leftClick()
    print("You can replace this line with any function you want on a left click.")
end
 
script.Parent.MouseButton1Click:Connect(leftClick)

For more information on GUI buttons in Roblox, go to their official website here.

virus – How to remove click ads from fresh WordPress site?

WordPress doesn’t include ads of any kind, so there’s no standard process for removing them.

Possible reasons you could be seeing ads are:

  • Your host is adding them, possibly as a condition of a cheap/free hosting plan.
  • You installed a pirated theme or plugin that contains malicious code.
  • Your website has been hacked in some other way. This seems unlikely if you saw them right after installing.
  • You have been hacked, and you have malware on your computer that’s displaying ads on web pages.
  • Your ISP is injecting them.

This site is not an appropriate place for resolving any of those issues, so my suggestion would be to start by speaking to your host.