c++ – SFML – My jump never stops getting higher

Im making a short jump test in sfml. However I have a problem, whenever the jump button is pressed the character will jump but will not fall down. However, in the beginning of the test, I made the sprite above the ground to see if the gravity function worked, but this still happens. Here is a video

Here is my code:

#include <SFML/Graphics.hpp>
using namespace sf;

float VelocityX = 0, VelocityY = 0;
float x = 0, y = 0;
int gravity = 2;
float dt;

void movement() {
    if (y < 444) {
        VelocityY += gravity * dt;
    else if (y > 444) {
        y = 444;
    x += VelocityX;
    y += VelocityY;

int main() {
    RenderWindow window(VideoMode(800, 600), "jump test");
    RectangleShape rect(Vector2f(20, 20));
    const int moveSpeed = 500, jumpForce = 10;
    Clock deltaTime;
    while (window.isOpen())
        dt = deltaTime.restart().asSeconds();
        Event event;

        while (window.pollEvent(event)) {
            if (event.type == Event::Closed) {

        if (Keyboard::isKeyPressed(Keyboard::Right)) {
            VelocityX = moveSpeed * dt;
        else if (Keyboard::isKeyPressed(Keyboard::Left)) {
            VelocityX = -moveSpeed * dt;
        else {
            VelocityX = 0;

        if (Keyboard::isKeyPressed(Keyboard::Space)) {
            VelocityY -= jumpForce;

        rect.setPosition(x, y);


    return 0;

windows – Oracle 19c listener stops on connection TNS-12541 error

I have just installed Oracle 19c Standard Edition 2 on Windows 10 and created a local database.

I can connect to it with sqlplus / sysdba, but if I try to connect with sqlplus user/password@host:port, the listener automatically stops and results in ORA-12537 error. Then lsnrctl status shows TNS 12541 error. I can restart the listener with lsnrctl startmanually, but it stops again if I try to connect.

I have tried

  1. Changing HOST to, localhost or name of PC
  2. Deleting and recreating the listener with Net Configuration Assistant
  3. Re-installing oracle
  4. Deleting log file, disable DIAG_ADR ins ora files
  5. Re-starting the services
  6. Editing HOSTS file, add oracle path to Windows system variables

But same error still appears.

The error log (It wasn’t fully in English, so I used machine translation)

PS C:Windowssystem32> sqlplus / as sysdba

SQL*Plus: Release - Production on Wed Jun 9 09:30:45 2021

Copyright (c) 1982, 2019, Oracle. all rights reserved.

Connect to:
Oracle Database 19c Standard Edition 2 Release - Production

SQL> exit
From Oracle Database 19c Standard Edition 2 Release - Production
Version Disconnect
PS C:Windowssystem32> lsnrctl status

LSNRCTL for 64-bit Windows: Version - Production on 09-Jun-2021 09:33:04

Copyright (c) 1991, 2019, Oracle. all rights reserved.

Version TNSLSNR for 64-bit Windows: Version - Production
Start date 09-Jun-2021 09:14:58
Uptime 0 days 0 hours 18 minutes 9 seconds
Tracking level off
Security ON: Local OS Authentication
Listener parameter file D:ProgramOraclenetworkadminlistener.ora
Listener log file D:ProgramOraclenetworkloglistener.log
Listening endpoint summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=LAPTOP)(PORT=5500))(SECURITY=(my_wallet_directory=D:PROGRAMadminorclxdb_ wallet))(Presentation=HTTP)(Session=RAW))
Service Summary...
The service "CLRExtProc" contains 1 instance.
  Instance "CLRExtProc", status UNKNOWN, contains 1 handler for this service...
Service "orcl" contains 1 instance.
  Instance "orcl", status READY, contains 1 handler for this service...
Service "orclXDB" contains 1 instance.
  Instance "orcl", status READY, contains 1 handler for this service...
Command executed successfully
PS C:Windowssystem32> sqlplus sys/123456@localhost:1521/orcl

SQL*Plus: Release - Production on Wed Jun 9 09:33:45 2021

Copyright (c) 1982, 2019, Oracle.

ORA-12537: TNS: Connection closed

Please enter the username: sys as sysdba
Enter the password:

Connect to:
Oracle Database 19c Standard Edition 2 Release - Production

SQL> exit
From Oracle Database 19c Standard Edition 2 Release - Production
Version Disconnect
PS C:Windowssystem32> lsnrctl status

LSNRCTL for 64-bit Windows: Version - Production on 09-Jun-2021 09:36:15

Copyright (c) 1991, 2019, Oracle. all rights reserved.

TNS-12541: TNS: No listener
 TNS-12560: TNS: Protocol adapter error
  TNS-00511: No listener
   64-bit Windows Error: 61: Unknown error
TNS-12541: TNS: No listener
 TNS-12560: TNS: Protocol adapter error
  TNS-00511: No listener
   64-bit Windows Error: 2: No such file or directory


# listener.ora Network Configuration File: D:ProgramOracleNETWORKADMINlistener.ora
# Generated by Oracle configuration tools.

    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = D:ProgramOracle)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:D:ProgramOraclebinoraclr19.dll")




# tnsnames.ora Network Configuration File: D:ProgramOracleNETWORKADMINtnsnames.ora
# Generated by Oracle configuration tools.


      (SID = CLRExtProc)

      (SERVICE_NAME = orcl)


# sqlnet.ora Network Configuration File: D:ProgramOracleNETWORKADMINsqlnet.ora
# Generated by Oracle configuration tools.

# This file is actually generated by netca. But if customers choose to 
# install "Software Only", this file wont exist and without the native 
# authentication, they will not be able to connect to the database on NT.





# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a "https://dba.stackexchange.com/#" symbol.
# For example:
#     rhino.acme.com          # source server
#     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#       localhost
#   ::1             localhost   localhost   LAPTOP
::1             localhost

oauth2 – What stops an attacker from simply using your client_id in their own auth code flow with PKCE

Ok so I get the benefit that PKCE provides. Without it, the attacker knows your client_secret and by registering the same URL scheme as your application on mobile, can intercept the redirect with the auth code, and then use it along with your client_id and client_secret to receive an access token to the user’s resources.

However with PKCE, the only thing that the attacker now needs is your client_id. They can generate their own PKCE. On intercepting the redirect, they can now use the auth code received along with the client_id and code_verifier (since they generated the PKCE themselves) to get the access token.

So my question is:
Is the only thing that prevents an attacker from doing this, is that they still need to direct the user to the identity provider to authenticate, and in doing so, the user would see that the identity provider is requesting them to supply permission to your app, which is different to the (malicious) app they came from? Or is there another blocker?

HP laptop touchpad randomly stops working

My HP laptop’s touchpad randomly becomes unresponsive, but when it is, it still moves the cursor with an external mouse. Because of this, I had to force shutdown my laptop because I couldn’t do a graceful shutdown (no USB mouse). How do I fix this?

Canon T6i Auto focus works on Live view but stops auto focusing on view finder

I’m sure I got a setting wrong or something. So I have AI servo active. When I open the live view the camera automatically auto focuses as I move it around from object to object. But when I close the live view screen and look through the view finder nothing happens. I can press the back button focus button or half press the shutter button to reach focus but it does not try to focus on other objects after that initial focus.

3d secure – The order of the digital contents stops at payment_review due to Redis issue

We have started selling the digital contents by the EC website that is created by Magento 2.4 on AWS (Multi-AZ) since a month ago.

However, it often stops the orders for the credit card in payment_review. The other payments such as Apple Pay are fine.

The symptom is as follows;

  1. The problem occurs when Credit Card payment with 3D secure.
  2. Rebooting Redis resolves the issue but it occurs after a day or a few days again. There is an extra free space in Redis.
  3. “Did not write session for ID XXX: another process took the lock. /XXX/payment-information” sometimes occurs at the same time. (Where string XXX is a dummy string. Please ignore them.) The parameters are max_concurrency=6, break_after_frontend=5.

I would appreciate it if you inform me of any hints or suggestions.

SQL Server stops every 24 hrs

I have this weird issue with my SQL Server it always stop every night at 2 or 3 am Singapore time and I wonder why it’s happening. Then in order for me to start it back again I have to restart the whole VPS for it to start back again. I have tried to find answer over the google but I don’t have it.. the services I put automatic start. Is there possibility that SQL Server has its own timer to shutdown by itself?

enter image description here

apache2 – PHP 5.6 on MacOS 10.13 High Sierra – suddenly stops working – libcrypto issue

I had configured my Mac Pro running 10.13.6 (High Sierra) with the Server.app to use php5.6 (installed with Homebrew) and it was running fine some years now and then, suddenly, (probably after a power failure and reboot) the webserver stoped working and I get the following error:

httpd: Syntax error on line 182 of /Library/Server/Web/Config/apache2/httpd_server_app.conf: Cannot load /usr/local/Cellar/php@5.6/5.6.37/lib/httpd/modules/libphp5.so into server: dlopen(/usr/local/Cellar/php@5.6/5.6.37/lib/httpd/modules/libphp5.so, 10): Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylibn Referenced from: /usr/local/Cellar/php@5.6/5.6.37/lib/httpd/modules/libphp5.son Reason: image not found

Line 182 of my httpd_server_app.conf says:

LoadModule php5_module /usr/local/Cellar/php@5.6/5.6.37/lib/httpd/modules/libphp5.so

In /usr/local/opt/openssl/lib there is no libcrypto.1.0.0.dylib but there is a libcrypto.1.1.dylib file (and others)

(I don’t know how and when this changed)

How do I change the libphp5.so (not a text file) to ask for libcrypto.1.1.dylib and not libcrypto.1.0.0.dylib (I guess that this would solve my problem)

dnd 5e – Does the effect of Luring Song of a Harpy end RAW when the affected character stops hearing the song?

“Until the song ends” is a bit unclear

The wording here gives us less than what we’d really to have for a clear ruling. The Luring Song plainly states that as long as you can hear it, you are susceptible and that it continues until the song stops.

Adding silence into the scenario presents us with a difficult set of options. On one hand, it makes perfect logical sense that if the area is under silence, then no song is heard. But what happens? The Luring Song isn’t clear about that situation, so that leaves the DM with some options.

I hear nothing!

A DM could very reasonably rule that an unheard song is a stopped song. Whether or not it means it’s temporary or if they can be lured again would be up to the DM as well.

The power is in sustaining the song

The language also isn’t clear in how the song’s power is really used. A DM could also very easily rule that once under the sway, the only ways to end it are the actual singing stopping or the harpy being incapacitated. We can have all sorts of fluff as to why that still works, but it’s magic is always a solid option, but if you want more you can look at this as as parallel to concentration mechanics where as long as the harpy is singing, the song’s effects continue.

Go with what goes well at the table

Ultimately, these decisions come down to what works narratively and thematically at the table. What tells a more interesting story for you and your players? That’s the question you’ll need to ask yourself here.

design – Pros and cons of representing routes as legs or stops?

What are some pros and cons of representing routes as legs or as stops?

A leg is a departure and arrival location, a departure time and a duration (or an arrival time and a duration).

A stop is an arrival time, a location, and a departure time.

The domain I’m modelling is a marketplace where people describe the route they’re planning, then, suppliers can bid on routes they’re interested in. We have an existing system that is using stops. We don’t have any major problems with stops, but I’m wondering if using legs would be better, hence I’m wondering if there are pros or cons I’m not aware of.

I searched for “software design trip modelling”, “software design route modelling”, “software trip leg stop”, and all I found is documentation on a tool by Oracle and model railroad software.

I do understand that legs and stops are duals of each other, but in the database, there should be a single representation. https://dba.stackexchange.com/ is silent on the matter.

Thanks in advance!