r/stackoverflow • • Feb 02 '25

Question How to setup frontend for confidential clients using keycloak

1 Upvotes

I am using keycloak. My frontend is in nextjs and i have a backend in java spring boot. There is already a confidential client which has been successfully setup in the backend. My manager said that my front end works without client-secret. and that i should use client-secret.

{ "url": "", "realm": "", "clientId": "" }

This is how I setup in my keycloak.json. I have read somewhere that the client should be public and not confidential for the frontend. Is that correct? or is there anyway to add secret to frontend?


r/stackoverflow • • Jan 28 '25

Question Batch File To Execute Between Specific Times

1 Upvotes

Im running 2 x AI models for CCTV analysis.

I can run each as a separate service which works fine, but I manually switch between them i.e. stop the day model and start the night model.

Can I do this with Task Manager or a BAT file for example so that...

ON PC startup it knows which to service to start based on the time of day?
and closes the service that should be stopped when the other is running?

thanks for any help!


r/stackoverflow • • Jan 20 '25

Question Different software options for installing g++ for xcode or other software on Mac OS Catalina.

1 Upvotes

I am new to programming CPP, I am a broke college student that uses college resources when applicable. Library isn't always open so I have to work from home. Right now I cant afford to upgrade my Macbook Pro Retina Early 2015. I am attempting to download homebrew with Xcode to complete my assignments for class, however I can't seem to find any previous versions of homebrew on stack for my Mac OS. Does anybody know of any other opensource options I can use other than Homebrew or something other than Xcode?

*Before you ask, I know that Monterrey is compatible with my Macbook and homebrew but I can't download it since it wreaks havoc on my GPU*


r/stackoverflow • • Jan 16 '25

Question Stack Exchange vs Creative Commons: your brain on private equity

Thumbnail
substack.evancarroll.com
1 Upvotes

r/stackoverflow • • Jan 12 '25

Javascript Rendering the PDF Content in Modal card using React js

1 Upvotes

Hi, I am currently facing an issue while rendering uploaded PDFs and images in a model card using React.js. The requirement is to allow users to upload documents like PNG, JPEG, or PDF, and after uploading, show the uploaded document when the "View" button is clicked.

To achieve this, I convert the uploaded file into a PDF, create a Blob URL, and display it in an iframe. However, on mobile and tablet devices, the iframe displays a button labeled "Open" with random text. Clicking this button downloads the document instead of rendering it within the application.

My goal is to render the document within the application itself. On iOS devices, the PDF opens but only displays the first page, while the rest of the pages are not shown.

Could you suggest a solution to resolve this issue?


r/stackoverflow • • Dec 23 '24

Question Interested in participating in an interview study?

1 Upvotes

Dear StackOverflow users,

It is our pleasure to invite you to join a study at the University of Minnesota! The objective of the study is to understand how large language models (LLMs) impact the collaborative knowledge production process, by investigating knowledge contributors’ interactions with LLMs in practice.

If you have used LLMs (e.g., GPT, Llama, Claude...) when you contribute to StackOverflow (eg. asking questions, answering questions), we’d love to join the study! You will be engaging in a 45-60 min interview, talking and reflecting about your experience with StackOverflow and your perception/usage of LLMs in StackOverflow. Your valuable input will not only help us understand practical ways to incorporate LLMs into the knowledge production process, but also help us generate guardrails about these practices. All participation would be anonymous.

To learn more and sign up, please feel free to start a chat with me!

All the best, LLMs and knowledge production Research Team


r/stackoverflow • • Dec 20 '24

Javascript Storing env files in surge deployments?

1 Upvotes

I have 3 projects I want to share but I built them when I was more noobish in web development. For the first, it’s frontend purely, but my api key is exposed in code, the link to my backend (Render) for my personal MEN stack (HTML/CSS/JS, no React) is exposed in #2.

The third is on heroku so I’m pretty sure it isn’t exposed, thus safe to share, but I’m not so sure otherwise.

I can in theory make an env file in the root directory for project 1 to get a singular, dedicated link. For #2 I have a bunch of backend logic in the repo and therefore I need to go into the client folder to deploy/update the webpage in surge, and I’m not sure how dotenv would react to that. On top of that, I’d like conditional logic depending on if I’m getting calls from my own local host for testing, or Render.


r/stackoverflow • • Dec 20 '24

Question How come i can edit others posts and answers earlier than i can comment on them

1 Upvotes

Where is the logic here? I want to ask for a clarification on someone else's answer and i can't do it, but i can just go and edit that post and practically ruin it even without 50 reputation


r/stackoverflow • • Dec 11 '24

Javascript Need help with a failing fetch request

Thumbnail reddit.com
1 Upvotes

r/stackoverflow • • Nov 27 '24

Question Using Socket.io with Flutter stream and BLoC pattern

1 Upvotes

I'm trying to learn BLoC pattern using flutter_bloc package in flutter. I'm aslo using socket_io_client package to connect to a local Node.js server.

I have 3 problems:

  • The first, when the state changes from connected (initial state) to disconnected, the "Disconnected" text doesn't persists on the screen, and it immediately goes to "Nothing".

  • Secondly, If the connection is severed between the app and Node.js, socket.io tries to reconnect. And when it succeeds, it never goes back to "Connected" again. Although I made another event to reconnect.

  • Thirdly, when the app (the client) emits a socket event to the server, to receive certain data (I see it in the terminal), the data is not displayed on the screen. Although the event is triggered.

The code is in the following stackoverflow link:
https://stackoverflow.com/questions/79230656/using-socket-io-with-flutter-stream-and-bloc-pattern


r/stackoverflow • • Nov 27 '24

C++ Hash tables in CUDA C++ program, bug!

Thumbnail reddit.com
1 Upvotes

r/stackoverflow • • Nov 24 '24

Android Android Deep Linking: How to programmatically trigger LINE app user search of a specific ID?

1 Upvotes

Hi, I'm developing an Android app to creates deep link into the LINE messaging app to search a specific user

Current implementation:

val searchIntent = Intent(Intent.ACTION_VIEW).apply {
    data = Uri.parse("https://line.me/R/nv/addFriends")
    `package` = "jp.naver.line.android"
    addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
}
startActivity(searchIntent)

This successfully opens LINE's Add Friends screen, but I need to automatically trigger the search with a specific ID.

What I've tried:

  1. Direct profile URL:

Uri.parse("https://line.me/R/ti/p/%40${encodedId}")

2. Search endpoint with parameters:

Uri.parse("https://line.me/R/nv/searchId")
putExtra("id", searchId)

3. Recommended format from LINE docs:

Uri.parse("https://line.me/R/ti/p/%40userid%C2%A0and%C2%A0https://line.me/R/nv/recommendOA/%40userid")

All attempts either:

  • Show "check whether link is correct" error

  • Open LINE but don't trigger search

  • Open wrong screen

Environment:

  • Android 14

  • LINE app latest version

  • Testing on physical device

Is there a correct URL scheme or intent extra to programmatically trigger LINE's user search?


r/stackoverflow • • Nov 16 '24

Javascript Morphing SVG with FLubber and Framer Motion

1 Upvotes

I tried to morph 2 SVGs with Flubber on click with Framer motion, it worked, but not as expected.

The first click on the 'Hi" div triggered a change in the open state from 0 to 1, but it didn't animate the SVG. Another click event on the div did. But now the 'open' and 'progress' are not in sync.

Here's the codesandbox link to demonstrate my working code:
https://codesandbox.io/p/sandbox/framer-motion-morphsvg-example-forked-mhxl33?file=%2Fsrc%2FApp.tsx%3A12%2C24

How can I solve this?

Thanks in advance...


r/stackoverflow • • Nov 13 '24

Javascript Invoke function on mouse over with framer motion

1 Upvotes

I'm trying to recreate the following codepen with framer motion:

https://codepen.io/Hyperplexed/pen/rNrJgrd?editors=0010

It doesn't animate, and I think the ref is not used by the function or framer motion.

The code is on the following stackoverflow link:

https://stackoverflow.com/questions/79184014/invoke-function-on-mouse-over-with-framer-motion


r/stackoverflow • • Nov 04 '24

Question Heroku alternatives

1 Upvotes

I have question about selling API's. Does somebody of you know alternatives for Heroku? I try to upload my API on the rapidAPI, but i need to host it somewhere, and the only site that i know is Heroku, but they are requiring a credit card, which i don't have. I would be happy if somebody can help me with alternatives:) Have a great day!


r/stackoverflow • • Nov 03 '24

Question Deadlock due to low reputation?

1 Upvotes

I have a problem with my Stack Overflow account, where I feel I'm in a deadlock and it's about to solve this longstanding problem. My reputation is at 5, so I cannot do anything. I can't answer, can't comment and even can't vote. Is it a true deadend or am I overseeing something?

I already consulted the help pages and ChatGPT, however they suggest things like voting and commenting, which I simply am not allowed to do.


r/stackoverflow • • Oct 29 '24

Question I need a technique that makes two programs perform a specific function if they are connected

1 Upvotes

This is a project. We are supposed to make a program with two interfaces:

Admin interface

User interface, and there are many of them.

The user is supposed to be allowed to have a function in his account, but he will not be able to do it, only works if it is geographically close to the admin (a meeting room, for example).

I need a technique or feature that is: the admin account works as a radar and when users enter its range, the specific function is opened automatically.

Are there any techniques that can do this?


r/stackoverflow • • Oct 23 '24

Question If you think that one of the moderator is on the main site is a problem, what do you do?

1 Upvotes

I know about meta. The general response over there, if you complain, is a lot of downvotes and yelling. It feels very inclusionary.

But I've run into a problem with a moderator twice now and it's very frustrating.

Edit: ugh typo in the headline. Oh well I think you get the idea


r/stackoverflow • • Oct 23 '24

Question (NOOB) looking for a script (?) that automatically fills AND submits data sequentially from a libreoffice calc compatible file type

1 Upvotes

Title pretty much explains it all! I'm a biologist and have NO clue how internet stuff works lol. I would like to block VERY long lists of blogs on tumblr. There is a place on the website you can paste a blog title to block. How to I automate this so I can block thousands of blogs without having to manually do it?

Thank you!


r/stackoverflow • • Oct 18 '24

Java curso de java gratis donde lo puedo encontrar que sea bueno porfavor

1 Upvotes

?


r/stackoverflow • • Oct 18 '24

Question Please suggest a python course for a beginner

1 Upvotes

r/stackoverflow • • Oct 17 '24

Javascript How to collect an embedded Youtube Video link for my API

1 Upvotes

I'm new to web development (Javascript, HTML, CSS) and I am making a personal use API, and a website to show it off

One idea I have is a list of media followed by a description below said media, most are images but some are videos.

How do I implement the links to said video URL into my API's object so that it will simply be pulled in and assorted like the image URLs are when I set the src to the link?

Should I use a direct link? (https://www.youtube.com/watch?v=Ly36Bkmamt8)

Or is the embedded link enough? (https://www.youtube.com/embed/Ly36Bkmamt8?si=4omTI2QhfzVJDNuM)

Do I have to delve into youtube's API to do this?


r/stackoverflow • • Oct 17 '24

Question socket.io help -- understanding how socket connections work between tabs

1 Upvotes

TLDR I'm trying to understand how sockets behave between tabs and how to not have two connections at the same time on two different tabs for the same application.

I have a React application. When I successfully log into my application, I hit a useEffect which establishes a socket connection. This is in my routes component.

useEffect() => {
    if (auth) {
      socketService.connect();
      socketService.onMessage(...callback function)
    }
  }, [auth]);

I then need to navigate to another component within this application, but I can only do so via url (there is no internal navigation on purpose).

When I do this, I need to be hooked up to the onMessage callback above as well as join a room / listen for messages in this new component.

Component via URL navigation:

useEffect(() => {
**ISSUE: this room is never joined, because no socketService connection is established in this new tab. Why?**
    socketService.joinRoom(windowQueueRoom);
    socketService.onMessage(...callback function);
  }, []);

If I socketService.connect() in this (^) useEffect, a second connection is established in addition to the connection established in my routes file.

Original stack overflow post


r/stackoverflow • • Oct 10 '24

Other code Help with bash scripting

1 Upvotes

I am new with bash scripting, i have a behaviour that I dont understand.

I have a variable INCR=3 Then in a function that i use, i have a for loop for ((i = 0; i < max; i = i + $INCR)) {do stuff}

I dont know why but it seems like that the loop increments the INCR variable. So i defined It as readonly so It doesnt change, but still i wonder why It does that (infact now i am getting the warning INCR: readonly variable)


r/stackoverflow • • Oct 06 '24

Python Create a plot with a different colour for each year using Pandas

1 Upvotes
import pandas as pd
import matplotlib.pyplot as plt


columns = [
        "LOCAL_DATE",
        "MEAN_TEMPERATURE",
    ]


df = pd.read_csv("climate-daily-clean.csv", usecols=columns, index_col = 0, parse_dates=['LOCAL_DATE'])
monthly_average = pd.DataFrame((df.groupby(pd.Grouper(freq='ME'))['MEAN_TEMPERATURE']
           .mean()
           .rename_axis(index=['year-month'],)
           .reset_index()))
print(monthly_average)

I have a CSV file with local climate data from 1883 to present and I want to be able to graph each year separately. One complication I have is there's no data for Feb 1889 to Dec 1897 and a couple days there and there over the years. This is my code so far and my data looks like this

year-month MEAN_TEMPERATURE

0 1883-12-31 -17.387097

1 1884-01-31 -21.093548

2 1884-02-29 -24.020690

3 1884-03-31 -12.774194

4 1884-04-30 0.506667

... ... ...

1685 2024-05-31 10.690323

1686 2024-06-30 13.740000

1687 2024-07-31 20.477419

1688 2024-08-31 19.117742

1689 2024-09-30 16.451064