StackOverflow.com

VN:F [1.9.22_1171]
Rating: 8.5/10 (13 votes cast)

Random snippets of all sorts of code, mixed with a selection of help and advice.

Could you please let me know which database programming language gives most efficieny with less data consumption?

17 June 2026 @ 6:39 pm

This is my question regarding several databases used for storing large amount of data. As I have used many of the databases programming languages but I need your opinions and experience of using different databases for getting more efficient storage, fast, secure and less data consumption. Along with that the data storage capacity with more rate limiting, and better sharing in it. Also, I want to know about the best database for building schema for large amount of data and with database architecture for large storage.

Online Banking Login Embed code for website

17 June 2026 @ 6:33 pm

I am looking to get the online banking login embed code so that a customer can embed it on the website we are building. How do we go about getting that code? We were directed to jackhenry.dev but that seems more like API integration rather than form embed or html.

Vectorizing jax inner loop to enable reverse automatic differentiation while eliding unnecessary computations

17 June 2026 @ 6:28 pm

I have nested loops in jax, and two different implementations for the inner loop. The first implementation uses a fori_loop to perform the inner loop. The second implementation uses parallelized broadcasting to perform the inner loop. The inner fori_loop has the advantage that it performs the minimum number of operations required to obtain the result. However, it has the disadvantages that 1) it does not parallelize and that 2) nested loops do not support reverse automatic differentiation in general as stated in the docs. The inner broadcasting approach is parallelized and supports reversed automatic differentiation, but it performs a bunch of redundant operations for indices that are larger than the inner loop counter.

What do I need to change in gradle.build in order to implement Snackbar

17 June 2026 @ 6:26 pm

I am trying to implement Snackbar messages. (This is for an app which I have for personal use which has always worked satisfactorily with Toast messages on old phones, but I now need to implement Snackbar because Toast cannot show multiline messages on a new phone.) Following online advice I have included the following lines in my build.gradle (Module :app) file. implementation 'com.google.android.material:material:1.0.0' implementation 'com.google.android.material:snackbar:1.0.0' With these lines included, and after a "Sync", Android Studio is not reporting any errors in the Java code. However, when I try to install the app Gradle fails with the following error: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspath' It looks as if Gradle does not know where to find the new dependencies

How to correctly compare two encoded jwt refresh tokens

17 June 2026 @ 6:19 pm

I using jwt in fastpai app, and when I create access and refresh tokens on user login I also create user session for specific user id in database, so as I understood I need to encrypt refresh token before storing it in the database @router.post("/login", response_model=schemas.AccessToken) async def post_login( request: Request, db_session: db_session_dependency, _ = Depends(allow_only_unauthorized_user), logged_in_user: User = Depends(validate_user_login), user_agent: str = Header(None, alias='User-Agent'), ): # create session uuid session_id = auth_utils.create_user_session_uuid() # get utc not now = datetime.now(UTC) # create jwt tokens to login user access_expire_timedelta = timedelta( minutes=settings.auth.access_token_expire_minutes ) access_token = auth_utils.create_token( auth_utils.ACCESS_TOKEN_TYPE, now, now + access_expire_timedelta,

Python Libraries Issue

17 June 2026 @ 6:14 pm

I remember back in the days of only being able to pull in libs in a certain order, otherwise the code would not link. This was due to brainless Linkers. Today, libs for Python (under Win11) reminds me of those days. It is now mostly due to brainless Installers. Why can't an Installer look at your Path and paste the lib accordingly? Too much work I imagine. Then there is also the versioning problem. Update one thing and you might be broken. Also a ridiculous problem. I've been trying to get numby to work. After updating python, pip, and numby it still did not work. I ended up moving numby from one folder to another and voila! A silly waste of time it seems to me...do Installers need to get smarter?

Why do I get IndexError when updating a tracking matrix inside a recursive DFS function?

17 June 2026 @ 6:12 pm

I am trying to implement a Depth-First Search (DFS) algorithm to find paths in a grid graph and update a tracking matrix. However, I keep encountering an IndexError: list assignment index out of range during the recursive calls. Here is a minimal, reproducible example of my code: def dfs(matrix, row, col, visited): # Border check if row < 0 or row >= len(matrix) or col < 0 or col >= len(matrix[0]): return # Check if already visited if visited[row][col]: return # Mark as visited visited[row][col] = True print(f"Visited: {row}, {col}") # Move to the right neighbor dfs(matrix, row, col + 1, visited) # A 3x3 sample matrix sample_matrix = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ] # Initialize a 3x3 visited matrix visited_matrix = [[False] * 3] * 3 # Start DFS from the top-left corner dfs(sample_matrix, 0, 0, visited_matrix) The Error:

How to edit database on systemctl enable/disable?

17 June 2026 @ 6:08 pm

I am converting a set of legacy startup scripts to systemd to allow for compatibility with future versions of Debian. Historically, these scripts started or didn't start on boot based on a value defined in a PostgreSQL database. Ideally, I would like the systemd enabled/disabled status to be consistent with the value in the database, to be more consistent for our users. Is there any way to run additional scripts on systemd enable {service} or systemd disable {service}?

Is there a way to perform calculations in log10 scale, and show the results on a linear scale with a seaborn boxplot?

17 June 2026 @ 5:20 pm

My data represents the number of items/km2, and is split between different regions. My dataframe looks like this : n_items region 28741 region_1 192 region_1 3856 region_2 12345 region_2 0 region_3 297 region_3 My goal is to display a boxplot containing different boxes for each region, showing each region's distribution and statistical properties. Since my data follows a log-normal distribution, what I would like to do is : Take the log10 of the "n_items" column. Make a seaborn boxplot that uses the log10(n_items) to find the median, mean, quartiles, etc. Display the boxplots with the original scale, which would be the equivale

If product code does not exist in first part of query pull a declared value from another table for that product code

17 June 2026 @ 5:18 pm

So the first table I have stores fixed prices on product codes SellPriceRule and below is the query i have to get the list I want. The problem is for certain customers "using 1 as an example 7000192" it is missing entries for certain products in this case 27MIETE10B and 23RGWBBCA are missing. There is another table that stores the fallback/default prices if they don't have a set price in the first table. this table is called "ProductSellPriceBand" and has a bandnumber (1 through 8) which is what is used to grab the price. The customer example I used has a bandnumber of 8 for region AB (description column). I need to know how to add the code so that if the price is missing in the first query it grabs the price for the productcode on the "ProductSellPriceBand" table at that band level 8 for ab region. select spr.Price, Per.PerCode ,p.ProductCode,p.Description from SellPriceRule spr left join product p on p.ProductID=spr.ProductID le