blueprints – Blocks / tiles aren’t responding to clicks

I’ve recently finished a tutorial, UE4 Slide Puzzle by Nicholas Thompson. Halfway through the second tutorial, I found out that the blocks / tiles wouldn’t respond to my clicks. For example, when I clicked on a tile, it wouldn’t print out a Hello message.

I have watched the tutorial so many times already, I’ve searched it up, looked at my code thoroughly, and I can’t find any problems. Here are my blueprints:

  1. Event Graph
  2. Get Move To (Function)

After some debugging, I found out that the problem occured at the start of the function, Mesh Clickedm in the Event Graph.

Please help, it would be greatly appreciated. Thank you!

indexing – SOLR Admin Console is not responding normally

I recently upgraded SOLR from version 8.4.1 to 8.6.3. But, after creating the core, and indexing the same (through Hybris Backoffice), I noticed a peculiar behavior in SOLR Admin Console. When I select the particular Core and try to go to “Query” section, it is automatically redirect to Dashboard. So, I am unable to use SOLR Admin console to check the data or query over the indexed data. It is happening to all other sections that come after selecting the core. In my earlier version, I never faced such issues.

I actually need to upgrade to this particular version of SOLR since hybris does only support this version after SOLR 7.7.x.

Is there anyone who faced this issue? Please help if anyone knew the solution.

7 – How prevent authorized users from responding to comments?

How do I ensure that only administrators can reply to comments in sites such as content type? That is, if an authorized user views a node of the “content” type, he can leave a comment on it, but cannot reply to other comments, and a user with the administrator role can reply to all comments. How do I do this in Drupal?

python – Pygame is not responding

I was trying to make pygame to play an mp3 file, and it doesn’t work.
Is there anything wrong with my code?

My code is:

import pygame
pygame.init()

size=(200,100)
screen=pygame.display.set_mode(size)
pygame.display.set_caption("My Game")
pygame.mixer.music.load("Portal.mp3")
pygame.mixer.music.set_volume(0.30)
pygame.mixer.music.play()

screen.fill((255,255,255))
pygame.display.flip()

done=False
while not done:
    for event in pygame.event.get():
        if event.type==pygame.QUIT:
            done=True

pygame.quit()

I’ve used this code, too.

import pygame
pygame.init()
pygame.mixer.init()

size=(200,100)
pygame.display.set_mode(size)

pygame.mixer.music.load("Portal.mp3")
pygame.mixer.music.set_volume(0.30)
pygame.mixer.music.play()

done=False
while not done:
    for event in pygame.event.get():
        if event.type==pygame.QUIT:
            done=True

pygame.quit()

*I’m using python 2.7 version and there weren’t any error messages.
*I have downloaded the mp3 file in Python27 folder, too.

linux – CUPS – Network printer – Connection error: Permission denied, The printer is not responding

I’m trying to troubleshoot a printing issue, but first I need to describe my environment (it’s a bit non-standard).

I have a HP 1102 USB printer, connected to a Ubuntu 20.04 system which runs CUPS and shares the printer to other systems in the LAN. Printing from other systems (Ubuntu 18.04, Ubuntu 20.04, Windows 10) works fine via IPP.

I have a client which runs Android 10, and on top of it it runs Linux Deploy with Linux 18.04 in a chroot in the same LAN. The linux system has XFCE and CUPS, and I’ve configured the printer the same way as for other systems.

When I try to print (with local cups set to debug), this is what I get for my job:

D (25/Nov/2020:10:12:01 +0200) (Job 8) Connecting to 192.168.1.13:631
D (25/Nov/2020:10:12:01 +0200) (Job 8) Connecting to printer.
D (25/Nov/2020:10:12:01 +0200) (Job 8) Connection error: Permission denied
E (25/Nov/2020:10:12:01 +0200) (Job 8) The printer is not responding.
D (25/Nov/2020:10:12:31 +0200) (Job 8) Connecting to 192.168.1.13:631
D (25/Nov/2020:10:12:31 +0200) (Job 8) Connecting to printer.
D (25/Nov/2020:10:12:31 +0200) (Job 8) Connection error: Permission denied
E (25/Nov/2020:10:12:31 +0200) (Job 8) The printer is not responding.

I’m doing a packet capture on the cups server side and there are no packets when it says it’s trying to connect to the printer. Connecting manually (telnet 192.168.1.13 631 opens a socket and TCP communication works).

Something must be wrong inside the CUPS running on the Android linux chroot, but I can’t figure out what. The local print job looks fine, file permissions for the /var/spool/cups directory look fine, cups is running as root.

I’m not sure where to look further for troubleshooting…

I’m watching android logcat trying to see if there is a problem at the same time, and it’s this:

11-25 10:28:29.179  2980  3091 W Netd    : No subsystem found in netlink event
11-25 10:28:31.012 20789 20789 I printers.cgi: type=1400 audit(0.0:785): avc: denied { ioctl } for path="socket:(151451)" dev="sockfs" ino=151451 ioctlcmd=0x8933 scontext=u:r:magisk:s0 tcontext=u:r:magisk:s0 tclass=unix_dgram_socket permissive=1

So – I’m thinking cups is trying to create a socket and android is denying it? Any ideas if it’s a file-based socket, what it’s name would be and where it would be located in the filesystem?

Any suggestions?

python – Pygame is not responding even though event handler and quit settings are present?

I am a beginner at programming with less than 4 months of experience so, please pardon me if I haven’t asked the question correctly according to the standards

FEW DAYS AGO, I have created a project but whenever I tried to run it on Spyder(IDE) and Jupyter notebook, the Pygame window opens up but it is not responding (not working or showing anything on the screen) I have tried everything I can like updating Pygame to version 2.0,updating Spyder, putting one event handler:

while True:
     for event in pygame.event.get():
        if event.type==pygame.QUIT:
            terminate()
            sys.exit()

the Spyder console on the other hand shows:

Restarting kernel...

and

(SpyderKernelApp) WARNING | No such comm: 7657c0fb289911eb9a4124b6fd3c7b5a
(SpyderKernelApp) WARNING | No such comm: e7112fb1289b11eb90d224b6fd3c7b5a
(SpyderKernelApp) WARNING | No such comm: b71d4cc1289d11eb906324b6fd3c7b5a
(SpyderKernelApp) WARNING | No such comm: 8c66b5c828a011eb964024b6fd3c7b5a
(SpyderKernelApp) WARNING | No such comm: 56eda5f928a411eba08524b6fd3c7b5a
(SpyderKernelApp) WARNING | No such comm: d7db00b428a411ebac6824b6fd3c7b5a
(SpyderKernelApp) WARNING | No such comm: 3de6c19428a611eb91d124b6fd3c7b5a

and after I try to close the window it shows:

Kernel died, restarting

and always restarts.
I don’t know whether there is any bug or not in my code because I am a beginner and it is not showing on my (IDE) so please also recommend me how to debug any code and please give a detailed answer for my problem. Some of the starting code that I think may be wrong:

def main():
    global BASICFONT
    BASICFONT=pygame.font.Font(None,50)
    window.fill(bgcolor)
    def startscreen():
        font=BASICFONT.render("Snake Game X",True,dgreen)
        fontRect=font.get_rect.center=(250,250)
        fontRect.fill(black)
        window.blit(font,fontRect)
        
        def keymsg():
           font=BASICFONT.render("Please Press A Key To Start",True, red)
           fontRect=font.get_rect.midbottom=(0,10)
           fontRect.fill(black)
           window.blit(font,fontRect)
        
        def keypressed():
           keypressed=pygame.key.get_pressed()
           if keypressed==0 or keypressed==keypressed(pygame.K_ESCAPE):
               terminate()
           elif keypressed:
                return
           else:
                 pygame.time.wait(500)
                 terminate()
        startscreen.keymsg()
        startscreen.keypressed()
    while run:
        startscreen()
        run()
if __name__=="Snake Game X":
    main()
def run(score,run):
   while run:
     for event in pygame.event.get():
        if event.type==pygame.QUIT:
            terminate()
            sys.exit()
        def randomlocation():
             ({"x":random.randint(20,win_w-20),
               "y":random.randint(20,win_h-20)})
        apple=randomlocation()
        assert win_w % cell_s==0
        assert win_h % cell_s==0

        startX=random.randint(20,win_w-20)
        startY=random.randint(20,win_h-20)
        appleX=apple('x')*cell_s
        appleY=apple('y')*cell_s
        
        def drawgame():
            def drawapple():
                appleRect=window.rect(appleX,appleY,cell_s,cell_s)
                appleRect.fill(red)
            def drawgrid():
                for x in range(0,win_w,20):
                    pygame.draw.line(window,dgray,0,win_h,5)
                for y in range(0,win_h,20):
                    pygame.draw.line(window,dgray,0,win_w,5)
            def drawsnake(snakeCoords):
                snakeX=snakeCoords('x')
                snakeY=snakeCoords('y')
                snakeRect=window.get_rect(snakeX,snakeY,cell_s,cell_s)
                snakeRect.fill(green)
                window.blit(snakeRect)
            def drawscore(score):
                scorefont=BASICFONT.render(('SCORE: ',score),True,white)
                scoreRect=scorefont.get_rect.topleft=(20,20)
                window.blit(scorefont,scoreRect)
        def gameover():
             gameFont=BASICFONT.render("Game",True,red)
             overFont=BASICFONT.render("Over",True,red)
             gameRect=gameFont.get_rect.center=(100,100)
             overRect=overFont.get_rect.center(100,100+30)
             window.blit(gameFont,gameRect)
             window.blit(overFont,overRect)
    
        snakeCoords=({"x":startX,"y":startY},
                     {"x":startX-1,"y":startY},
                     {"x":startX-2,"y":startY})
        direction=RIGHT
        if snakeCoords(head)('x')==win_w-20 or snakeCoords(head)('y')==win_h-20:
            gameover()
            pygame.time.wait(500)
            terminate()
            sys.exit()
        #apple eating snake
        if appleX==snakeCoords(head)('x') or appleY==snakeCoords(head)('y'):
            apple=randomlocation()
            drawgame.drawApple()
            score+=1
            if appleX==snakeCoords(head)('x') and direction==RIGHT:
                newhead=({'x':startX-3,'y':startY})
                snakeCoords+=newhead
            if appleX==snakeCoords(head)('x') and direction==LEFT:
                newhead=({'x':startX+3,'y':startY})
                snakeCoords+=newhead
            if appleY==snakeCoords(head)('y') and direction==UP:
                newhead=({'x':startX,'y':startY+3})
                snakeCoords+=newhead
            if appleY==snakeCoords(head)('y') and direction==DOWN:
                newhead=({'x':startX,'y':startY-3})
                snakeCoords+=newhead
        #keys pressed
       
        if event.type==pygame.event.get(pygame.KEYDOWN):
             if keypressed==keypressed(pygame.K_RIGHT)  and direction!=LEFT:
                direction=RIGHT
             elif keypressed==keypressed(pygame.K_LEFT)  and direction!=RIGHT:
                direction=LEFT
             elif keypressed==keypressed(pygame.K_UP) and direction!=DOWN:
                direction=UP
             elif keypressed==keypressed(pygame.K_DOWN)  and direction!=UP:
                direction=DOWN
             elif keypressed==keypressed(pygame.K_ESCAPE) :
                 terminate()
                 sys.exit()
             else:
                 print("Invalid Key Pressed")
       
        drawgame()
        pygame.display.update()
        if score==10:
            gameover()
            pygame.time.wait(500)
        
   terminate()

and my Python version is 3.8.3 .

Mouse and keyboard stop responding randomly on Cinnamonremix

I am running Ubuntu 20.10 Cinnamonremix and I noticed quite annoying behavior. From time to time entire GUI seems to stop responding on mouse clicks and keyboard buttons. Mouse pointer continues to move but besides that (almost) everything stops reacting.

I noticed that pressing Windows button on the keyboard helps. Not only does it open Menu but also unlocks both mouse and keyboard but it’s a bit frustrating.

Sometimes it happens couple times per hour, sometimes it does not happen for a few hours… I did not count exact statistics but for sure it happens at least once or twice per working day.

What should I do? How to even start debugging this?