Throwing Exceptions
Is this a totally valid / proper way of handling exceptions? For whatever reason I feel like this is improper
```java
private String appendParametersToUrl(String url, String parameter, String string) throws IllegalArgumentException {
if (StringUtils.isBlank(parameter) || StringUtils.isBlank(string)) {...
Architecture Question (not code specific)
I have this locations feature I'm working on implementing and I think I'm getting close to figuring it out but wondering on some architecture decisions.
The way everything is set up now looks like this:
```...
error when use router handler in next js
β¨― TypeError: l.json is not a function
at g (/var/task/.next/server/app/api/route.js:1:2707)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /var/task/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:42484
at async eI.execute (/var/task/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:32486)...
Can I change the jquery to plain js and how do I send the errors back to the form
Hello,
I have this challenge
Task:...
The post method is not supported for this route. Supported methods: GET, HEAD. for login page
I have the following login.blade.php
```php
<form method="POST" action="{{ route('login') }}">
@csrf
<input type="email" name="email" placeholder="Email" required>...
<input type="email" name="email" placeholder="Email" required>...
How to secure (https) without domain name is it possible?
If anyone have idea about secure ip address
Of a server hosted in aws ec2 nginx without a domain name please share ......
Sanitize user input to avoid XSS attacks Question
I have username and password for login and want to avoid the cross site scripting. I read that using
htmlspecialchars()
is the way to go but not sure what to do after that. Any ideas?Cookie Confusion
I'm using
iron-session
to store the information necessary for ConnectKit's Sign-In With Ethereum (SIWE) to work on a GitHub pages hosted site backed by Supabase edge functions. (ConnectKit expects to have access to a /session
endpoint that returns the authenticated user's Ethereum address.)
iron-session
stores session information as an encrypted string sent back and forth as a cookie. The problem I'm having is if SameSite
is set to Lax
or Strict
, I get an error:
This attempt to set a cookie via a set-cookie header was blocked because it had a
SameSite="Lax"attribute but came from a cross-site response which was not a response to a top-level navigation.
...
store and display files
hello guys i was searching for a code that stores files in database and display them in the page I'm using nodejs rn but i did not find good resources if anyone can help me and thanks
runtime of loops
Why that variation occurs between for, for...of and forEach?
I'm posting here because I was running it in a "nodejs env"...
Trying to update a single movie property with PATCH
Hello, I'm building a REST API and I'm implementing a patchOneMovieById method, that takes an id and a an object of properties to update, I've split my code in the following files: movie.router.ts, movie.controller.ts, movie.service.ts and movie.repository.ts
Here's the code for the service and repository:
```typescript...
PHP todo app database setup question
I have a some far a table in mind for username and passwords but not sure how to link their "tasks" to my database in order to save them for when they logout and later re login. Any tips?
upload files
i am having a big project where a teacher needs to upload files on a website and when he does,the files display in the page, it's like in classroom i am using nodejs but I did not know how to do that
JSON.parse unexpected error
I am making a MERN stack app where I have made a DB using Mongo Atlas and using node.js and express to fetch the data in my react app. I am calling the data using an
useEffect()
and awaiting the data as well. When I am trying to convert the data into json, it is giving me the error of
Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
I am stuck here and cant solve this. I tried many different posts on net but none worked for me.
The backend server is running on localhost:4000
and react app is on localhost:5173
. I tried CORS
and even adding a proxy in package.json
but that also didnt work.
...How do you fetch instagram?
I see some websites that can fetch an instagram profile and get all their posts, reels and videos by simply typing the username and I don't understand how they do it because it's so fast.
I've tried scraping instagram's profile by doing this:
```js
const fs = require("fs")...
What does the backend server listens to??
when u make backend, does your server listen to your pages URL?? that is when u say host your webpage, it is hosted on a url. does the the back listen to THAT url? or the localhost of the machine that hosts the site?
The little so knowledge i have about backend thus far, FR and BE communicate with eachother via API. But the question i asked above, this occurred to me when I was thinking about how when u click a link, it redirects user to a certain route.. Now there 2 possible ways that can be done as far as I can think of
We just simply use anchor tags or js with location.href to simply add that route to the Link and redirect. As user lands on that page, static elements r rendered and dynamics infos r fetched using API from the backend and later rendered. In this case i suppose the server can just listen to the machines localhost??...
need help with grid
```body{
background: linear-gradient(rgb(0, 0, 0), rgb(255, 255, 255));
height: 300vw;
// position: sticky;
}...
building a mobile app
Hello. I'm learning VS Code to create a mobile app in Flutter w/ a pedometer & notifications. Any advice? Thanks.
Data fetching issues?
Hi guys, doing a small e-commerce app, wanted to output the total number of products, the expected result is 12, but on output I got 2, which confused me. I checked on the test page via console.log and the total number of products is 12, I still can't figure out what is wrong
First pic is length 2 for some reason (12 is expected)
Second pic shows the code I ran to test
The third pic is the output...
Newbie in back end
I have a project that im doing for school, but im getting this error everytime and also im having some issues using xampp
I want to make a register form and a login form and also the website will have a session so when i go to other html files its still getting that im in the same email
what i wanted to do is...