How to stay logged in when page refreshes with React?

I have a react app for the frontend and I am using django for the backend and I can login. But after page refresh user will be logged out. So I try it like: authservice: export const loginRequest = async (email, password) => { try { const response = await fetch(`${API_URL}/api/user/token/`, { method: “POST”, headers: … Read more

Background color in WebGL

Can’t change background color in https://codepen.io/ksenia-k/pen/RwqrxBG let renderer = new THREE.WebGLRenderer({ canvas: canvasEl, alpha: true, }); renderer.setClearColor( 0xffffff,1 ); sceneBasic.background = new THREE.Color(0xffffff); sceneShader.background = new THREE.Color(0xffffff); not work( Does this answer your question? Changing three.js background to transparent or other color –  Changing three.js background to transparent or other color – did not help … Read more

File input in bash script from an array of strings

Given an array of strings, I need to input each of these strings as a source file into a build script. Declare the array (the extra space at the end of the filename is deliberate): SOURCES=( \ “../../header1.h ” \ “../../source1.cpp ” \ “../../header2.h ” \ “../../header3.h ” \ … “./main.cpp”) Convert contents of array … Read more

dynamically change color of a live value in html [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed yesterday. This post was edited and submitted for review yesterday. Improve this question I … Read more

Run a TS file every X minutes

I have a code file in TS format which I can launch it from command prompt like this npx ts-node maincodes.ts Lets say I dont have access to change anything inside maincodes.ts file and I want it to be launched every X minutes on my machine (It is windows btw and using vs code). How … Read more

How to update build.gradle dependencies in Capacitor

I basically need to implement the following action: In your project, open your_app | Gradle Scripts | build.gradle (Module: app) and add the following compile statement to the dependencies{} section to compile the latest version of the SDK: implementation ‘com.facebook.android:facebook-android-sdk:latest.release’ The thing is that the app we’re working on is an Angular app on which … Read more

Copy and modify deeply nested list one element at a time

I’m currently working on a project that is supposed to generate a directed graph in which each vertex is a deeply nested list. To kick off the process it requires a deeply nested list, which is then supposed to be copied and modified. For example: Initial vertex: [[1, 1], [1, 1]] Resulting vertices: [[1, 1], … Read more

Issues building ffmpeg on Windows [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a … Read more