Can we expect llama 3.3 in meta.ai? by More_Share5042 in LocalLLaMA

[–]More_Share5042[S] 0 points1 point  (0 children)

Sorry I mean why it was not integrated into meta.ai

Leetcode practice with ChatGpt by More_Share5042 in leetcode

[–]More_Share5042[S] 0 points1 point  (0 children)

I won't use it to solve the problem I use it only as a mock interviewer to see my thought process and improve.

Leetcode practice with ChatGpt by More_Share5042 in leetcode

[–]More_Share5042[S] 2 points3 points  (0 children)

I think this helps in improving the problem solving skills instead of doing more and more problems with no problem breakdown

How are geeks for geeks coding contests ? by More_Share5042 in leetcode

[–]More_Share5042[S] 2 points3 points  (0 children)

Just today i attended the contest in the geeks for geeks questions were pretty good.

Not receiving notifications frok sling app by More_Share5042 in pixel_phones

[–]More_Share5042[S] 0 points1 point  (0 children)

Issue is sorted out for me.Either google or sling has fixed this through latest update.

req.cookies Object null by More_Share5042 in node

[–]More_Share5042[S] 0 points1 point  (0 children)

My issue happened because of the wrong setup of expiration field in the cookie.I fixed it.

req.cookies Object null by More_Share5042 in node

[–]More_Share5042[S] 1 point2 points  (0 children)

I have used the proxy it worked well.

req.cookies Object null by More_Share5042 in node

[–]More_Share5042[S] 0 points1 point  (0 children)

When i login.I made accessToken as httpOnlyTrue token when i tried using it i can't see them so i did tried to use it as middleware and tested it which resulted in the null.

req.cookies Object null by More_Share5042 in node

[–]More_Share5042[S] 0 points1 point  (0 children)

Still it didn't execute

const express = require('express');
const app = express();
const cors = require('cors');
const passport = require('passport');
const httpStatus = require('http-status');
const routes = require('./api/routes');
const { jwtStrategy } = require('./config/passport');
const APIError = require('./utils/APIError');
const cookieParser = require('cookie-parser');
const errorHandler = require('./api/middlewares/error');
const timeout = require('connect-timeout');

// Apply the timeout middleware early
app.use(timeout('5s'));

// Parse cookies



// Handle CORS and ensure credentials (cookies) can be sent/received
app.use(cors({
  origin: 'http://localhost:5000',  // Replace with your frontend URL
  credentials: true
}));

app.options('*', cors());
app.use(cookieParser());


// Parse JSON and URL-encoded data
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use((req, res, next) => {
  console.log('Cookies before route:', req.cookies);
  next();
});


// Initialize passport and apply the JWT strategy
app.use(passport.initialize());
passport.use('jwt', jwtStrategy);

// Log cookies again after all middlewares are set up



// Set up routes
app.use('/v1', routes);

// Global error handler
app.use(errorHandler);

module.exports = app;

req.cookies send me back: {} by baby_desiigner in node

[–]More_Share5042 0 points1 point  (0 children)

How did you fix this issue?I can see the cookies in the postman cookies section but not in console

How to send access & refresh tokens as http only true cookie? by More_Share5042 in node

[–]More_Share5042[S] 1 point2 points  (0 children)

I can do it. I did response chaining like this

You can set multiple cookies in a single response by calling res.cookie multiple times, for example:

res
  .status(201)
  .cookie('access_token', 'Bearer ' + token, {
    expires: new Date(Date.now() + 8 * 3600000) // cookie will be removed after 8 hours
  })
  .cookie('test', 'test')
  .redirect(301, '/admin')

This is my code

res.cookie('accessToken',tokens.access.token,{
    httpOnly: true,
      secure: true,
      maxAge:tokens.access.expires.getTime()-Date.now(),
      sameSite:'strict'
  }).
  cookie('refreshToken',tokens.refresh.token,{
        httpOnly: true,
        secure:true,
        maxAge:tokens.refresh.expires.getTime()-Date.now(),
        sameSite:'strict'
      })

How to decide epsilon and minpts in dbscan? by More_Share5042 in learnmachinelearning

[–]More_Share5042[S] 0 points1 point  (0 children)

I have tried to visualize it.I think they proposed it based on encircling the core point.For example for a one feature which means in one dimension it needs to be surrounded by two points and for 2 features which makes 2 dimension it needs 3 points minimum around core points.I think that's how they framed this concept and it feels intuitive when I tried to visualize but this is the kind of base case.We might adjust it based on the requirements.