on-internet

How to set cookies in localhost - ReactJS

I know there are already a lot of questions similar to this but I couldn't find a solution yet. I managed to deploy my React app on a server, and cookies work fine. Cookie is set by the server with set-cookie and then automatically included in all subsequent requests However, I cannot make it work when I launch it on localhost: the cookie is not included in the requests after the server has set it. I think I tried all possible solutions that I found online and any possible combinations of them. The command I use is "start": "yarn run start" Things I tried: When the server sets the cookie, I tr

Join the discussion →

spring app Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.proper

errors o.s.b.devtools.restart.ChangeableUrls : The Class-Path manifest attribute in C:\Users\user.m2\repository\net\openhft\chronicle-queue\5.20.123\chronicle-queue-5.20.123.jar referenced one or more files that do not exist: file:/C:/Users/user/.m2/repository/net/openhft/chronicle-queue/5.20.123/chronicle-core-2.20.126.jar,file:/C:/Users/user/.m2/repository/net/openhft/chronicle-queue/5.20.123/chronicle-analytics-2.20.5.jar,file:/C:/Users/user/.m2/repository/net/openhft/chronicle-queue/5.20.123/annotations-19.0.0.jar,file:/C:/Users/user/.m2/repository/net/openhft/chronicle-queue/5.20.123/chro

Join the discussion →

Is the hostname changeable?

the default hostname of nanoFramework is nanodevice_xxxxxx (xxxxxx = Mac-Address), is it posible to set an individual name? Like Networkconfig.Hostname = "xxx" and a save function and after reboot is the new hostname activ. Best regards

Join the discussion →

Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found. Flutter Firebase

I just installed flutter with firebase but when adding to database I get the following error İnstalled Google Play Services Add in AndroidManifest(main) -Add in AndroidManifest(user) Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found. I/DynamiteModule(10303): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0 W/ProviderInstaller(10303): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Loc

Join the discussion →

Spring Security: Failed to authorize filter invocation

My Spring Boot application is returning a 403 status code (forbidden) when I call a GET request in my AdminControllor I am trying to blacklist URLs which have "/admin/**" except for those users who have the authority "ADMIN" in my database. I have disabled csrf which seems to be the most common issue for 403 forbidden. The problem seems to relate (see debug logs) to this: Failed to authorize filter invocation [GET /admin/allusers] with attributes [hasAuthority('ADMIN')] Logs 2022-09-08 13:56:20.018 DEBUG 21328 --- [nio-8080-exec-2] o.s.security.web.FilterChainProxy : Securing GET /admin/alluse

Join the discussion →

How to configure SonarLint in IntelliJ?

I was using SonarLint plugin in IntelliJ IDEA by using the url of our project. However, I want to configura it independently for my custom projects, but I am confused how should I do that. Could you pls clarify me about the following issues? 1. What is the SonarCloud and SonarCube options for configuring the SonarLint plugin in IntelliJ IDEA? 2. If I have not a specific url or server for SonarQube, how should I configure the plugin? Which section should I select (SonarCloud and SonarCube)?

Join the discussion →

I want to clear DNS cache

I have a problem with clearing DNS Cache. When we publish any post on our website it was getting published in the Dailyhunt news portal. But for the past few days, our posts are not getting posted in Dailyhunt. When we ask their technical team they told us to clear the DNS cache on regular basis. Because of cache, our posts are not getting published in Daily Hunt. So how to clear the DNS cache on regular basis?

Join the discussion →

Instruments OSSignpost intervals not recording or displaying

I'm trying to use OSSignposter to capture intervals in our app for use in Instruments. The sample code here works in a new project. I see the intervals, signpost icons, etc. However, this same code (integrated into a much bigger app does not record or display ANY intervals. I can get the config status on both apps' oslog configuration, and there's no difference. sudo log config --status --subsystem **.*******.*******.signposttest Mode for '**.*******.*******.signposttest' INFO PERSIST_DEFAULT I've checked both workspaces and schemes. There is no difference between these projects. The only thin

Join the discussion →

What is the recommended way to instantiate and pass around a redis client with FastAPI

I'm using FastAPI with Redis. My app looks something like this from fastapi import FastAPI import redis # Instantiate redis client r = redis.Redis(host='localhost', port=6379, db=0, decode_responses=True) # Instantiate fastapi app app = FastAPI() @app.get("/foo/") async def foo(): x = r.get("foo") return {"message": x} @app.get("/bar/") async def bar(): x = r.get("bar") return {"message": x} Is it bad practice to create r as a module-scoped variable like this? If so what are the drawbacks? In Tiangolo's tutorial on setting up a SQL database connection he uses a dependency, which I guess in my

Join the discussion →

CSS grid is not reponsive after some point

I am working on very project where I need to use sidebar layout(using grid) and then in content area i have to make vertical form/inputs(using flex-flow: column wrap; height: some fix height in Pixels). I used css grid to make basic sidebar layout for desktop and tablet(it's working fine), but the problem starts when I try to shrink my width below 768px, my inputs are not adjusting even if I already set width of 100%. and I want all my columns(for this case 4 columns) to be fluid(responsive) as much as it can be. like may be till 300px or 400px. you can see code here: https://codepen.io/blackb

Join the discussion →

Unknown field "ClusterIP" in io.k8s.api.core.v1.ServiceSpec

I am working with spring boot with microservices. I dockerize my all microservices and now I am trying to create resource in kubernetes cluster. I get error while create resource in cluster through running kubectl apply. Here down is my configuration file for kubernetes: eureka-server.yml kind: ConfigMap apiVersion: v1 metadata: name: eureka-cm data: eureka_service_address: http://eureka-0.eureka:8761/eureka --- apiVersion: v1 kind: Service metadata: name: eureka labels: app: eureka spec: ClusterIP: None ports: - port: 8761 name: eureka selector: app: eureka --- apiVersion: apps/v1 kind: State

Join the discussion →

Kubernetes: Unknown field "ClusterIP" in io.k8s.api.core.v1.ServiceSpec

I am working with spring boot with microservices. I dockerize my all microservices and now I am trying to create resource in kubernetes cluster. I get error while create resource in cluster through running kubectl apply. Here down is my configuration file for kubernetes: eureka-server.yml kind: ConfigMap apiVersion: v1 metadata: name: eureka-cm data: eureka_service_address: http://eureka-0.eureka:8761/eureka --- apiVersion: v1 kind: Service metadata: name: eureka labels: app: eureka spec: ClusterIP: None ports: - port: 8761 name: eureka selector: app: eureka --- apiVersion: apps/v1 kind: State

Join the discussion →

Kubernates: Unknown field "ClusterIP" in io.k8s.api.core.v1.ServiceSpec

I am working with spring boot with microservices. I dockerize my all microservices and now I am trying to create resource in kubernates cluster. I get error while create resource in cluster through running kubectl apply. Here down is my configuration file for kubernates: eureka-server.yml kind: ConfigMap apiVersion: v1 metadata: name: eureka-cm data: eureka_service_address: http://eureka-0.eureka:8761/eureka --- apiVersion: v1 kind: Service metadata: name: eureka labels: app: eureka spec: ClusterIP: None ports: - port: 8761 name: eureka selector: app: eureka --- apiVersion: apps/v1 kind: State

Join the discussion →

clangd does not find `compile_commands.json` automatically

Setup I'm using clangd through neovim with nvim-lspconfig. require('lspconfig').clangd.setup { -- on_attach = keybinds.on_attach, cmd = { "clangd", "--background-index", "--suggest-missing-includes", -- "--compile-commands-dir=/home/localuser/test/build", }, filetypes = { "c", "cpp", "objc", "objcpp" }, } Problem clangd is not finding project specific includes. What it should be doing According to the documentation: (https://clangd.llvm.org/installation.html) clangd will look in the parent directories of the files you edit looking for it, and also in subdirectories named build/. For example, i

Join the discussion →

Where can I find the JSON Schema for OpenAPI 3.1?

I want to automatically check the REST API specification for compliance with the OpenAPI Specification v3.1. But I cannot find JSON Schema for OpenAPI Specification v3.1, only verbal description (https://spec.openapis.org/oas/v3.1.0). Where can I find the JSON Schema for OpenAPI 3.1?

Join the discussion →

Lateral aliasing in databases

Is Redshift the only database that supports a lateral alias? https://aws.amazon.com/about-aws/whats-new/2018/08/amazon-redshift-announces-support-for-lateral-column-alias-reference/. For example, this allows for something like: SELECT ... AS something something * 2 FROM tbl I believe teradata (or maybe one of the other DWs) support it but I can't find a reference.

Join the discussion →

pip ERROR: pip's dependency resolver does not currently take into account all the packages that are installed

I just installed a package using pip3 install maigret i installed another thing using pip3 install but same error ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. crackmapexec 5.2.2 requires bs4<0.0.2,>=0.0.1, which is not installed. crackmapexec 5.2.2 requires impacket<0.10.0,>=0.9.23, but you have impacket 0.10.0 which is incompatible. crackmapexec 5.2.2 requires neo4j<5.0.0,>=4.1.1, but you have neo4j 1.7.0.dev0 which is incompatible. crackmapexec 5.2.2 requires pyln

Join the discussion →

GitHub Actions - .git folder gone when job is running as container

When I run a workflow job in GitHub actions as a container, the .git folder is missing. There is a checkout action, of course. This prevents me from running git commands as part of the job. Why is that? Everything else is being mounted to the container, so why not the .git folder too? When running the job on the runner itself, the .git folder is there as expected

Join the discussion →

vec.append not working, it tells me the list is still empty

My first post here, im working on a proyect and i need to append the data from CARGAR(n, vec) into the vec, i tried append but it doesnt work! I need help. Did i miss something? I randomly select the times and i make an average called suma_t, then i make a variable called carrera with a str version of all the data. import random def mostrar_menu(): print("-------------------------------------------------------------------------") print(" MENU ") print("1. Cargar ") print("2. Listar ") print("-------------------------------------------------------------------------") def validar_positivo(): n =

Join the discussion →

Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method compileSdk()

Hello Guys i have this Problem Here with android studio , here is my sdk Installed : my sdk installed except those 2 I got a problem like that : Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method compileSdk() for arguments [30] on extension 'android' of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension. Gradle sync failed: Could not find method compileSdk() for arguments [30] on extension 'android' of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension. Caused by: java.lang.IllegalStateExcepti

Join the discussion →

npm ERR! husky - .git can't be found WINDOWS

I'm trying to install mattlewis92's angular 14.0+ calendar, which suggests the use of the command ng add angular-calendar. However when doing so I got an error: npm ERR! command C:\Windows\system32\cmd.exe /d /s /c husky install npm ERR! 'husky' is not recognized as an internal or external command, npm ERR! operable program or batch file. I realized that I don't have husky as a dependency so I added it according to husky's docs. Unfortunately after installing husky I got a new error: npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c husky install npm ERR! husky - .g

Join the discussion →

Best way to map DTOs and entities in a Clean Architecture node.js server

I am learning Clean Architecture using Typescript/node.js and struggling to find the best way to map DTOs (Data Transfer Objects) and Domain Entities. DTOs are used to transfer data between the presentation layer (web server) and the application layer (use cases). I found many resources online advising various design patterns to achieve this in various languages : Mappers (though it's not a design pattern) Factories Builders ... In his book "Clean Architecture", Robert C. Martin talks about "adapters" but I could not find any explicit example of implementation. What would be the best and most

Join the discussion →

When I ran the command "gh auth login" in gitbash , I get "You appear to be running in MinTTY without pseudo terminal support."

Here is the bug in gitbash,thanks for your reply. $ gh auth login ? What account do you want to log into? [Use arrows to move, type to filter] > GitHub.com GitHub Enterprise Server could not prompt: Incorrect function. You appear to be running in MinTTY without pseudo terminal support. To learn about workarounds for this error, run: gh help mintty

Join the discussion →

ImportError: The `scipy` install you are using seems to be broken, (extension modules cannot be imported), please try reinstalling

I'm coniststently getting this error when trying to use scipy or sklearn packages in Python3.9 via a Jupyter notebook. The error is: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) ~/opt/anaconda3/lib/python3.9/site-packages/scipy/__init__.py in <module> 165 try: --> 166 from scipy._lib._ccallback import LowLevelCallable 167 except ImportError as e: ~/opt/anaconda3/lib/python3.9/site-packages/scipy/_lib/_ccallback.py in <module> ----> 1 from . import _ccallback_c 2 3 import ctypes ImportError: dlopen(/Users/dn/opt/anacon

Join the discussion →

What Android app can I use to contol my BLE esp32?

I'm working on controlling my ESP32 aka (Heltec ESP32 Lora) via my android phone using BLE. I'm following the code used in this youtube video which seems pretty staraight forward. But he uses an IPhone app. I haven't been able to find any android apps that work without connection issues. https://youtu.be/O06UhBXRjws Does anyone have any idea of what Android BLE contol apps that might work?

Join the discussion →

HAproxy loadbalancer error 503 Service Unavailable No server is available to handle this request

i have to make a loadbalancer for two servers hosted on a hostserver. When i surf to my site it gives a 503 error "Service Unavailable No server is available to handle this request." Does someone knows a fix for this? this is my loadbalancer task --- - name: install HAproxy apt: name: haproxy state: latest - name: copy config template: src: haproxy.j2 dest: /etc/haproxy/haproxy.cfg notify: - restart haproxy - name: open the listening port ufw: rule: allow port: '80' proto: tcp notify: - restart ufw This is my haproxy template global log 127.0.0.1 local2 chroot /var/lib/haproxy pidfile /var/run

Join the discussion →

Why cpp std::function can hold capture-lambda, while function pointer cannot?

I've got this code snippet: int x = 3; auto fauto = [=](){ cout<<'x'; }; function<void()> func{fauto}; func(); void (*rawPf)() = fauto; // fail to compile rawPf(); I knew the syntax that only non-capture lambda can be assigned to function pointer. But: Why can std::function hold capture-lambda? as both std::function and function pointers are callable, what's the core difference that makes std::function able to hold capture-lambda, while function pointer cannot? Any detailed explanation on language design for this?

Join the discussion →

Can a "criminal" country exist in the modern world without getting blockaded and invaded?

In my world, there is a remote island country (unofficially named Banditland or Sin Island) started by cartel/mafia kingpins and unethical businessmen from across the world. In this country, very few things are illegal. Gambling is legal. Prostitution is legal. Blasphemy/Heresy and mocking people is legal. Every drug is legal. Counterfeiting foreign currencies is legal. Fencing stolen goods is legal. Human trafficking is legal (you cannot enslave island citizens however). Dueling is legal. There is no copyright enforcement. As a matter of fact, it is easier to state what isn't legal in this co

Join the discussion →

How to generate a Rc from &T in rust?

To learn about Weak ref in Rust, I wrote the following code. The main thing is a Factory and a Car. use a Factory to weak ref to some of the cars it produces, and these Car always ref to the Factory that produced it. Now I want to implement a Factory.make_car() function that creates a car object that implements the above reference relationship. But while writing this function, I ran into a difficulty. Because the parameter of make_car() is a &mut of Factory object, how can I get the Rc<Factory> object? That is, how to modify the following ???? so that the program can compile successfully? stru

Join the discussion →
Older stories