Categories
Mastering Development

Issue while calling hash method

Im trying to create simple login app with MERN stack and i have an issue while using bcrypt to hash my password. server.js const mongoose = require("mongoose"); const express = require("express"); const cors = require("cors"); const passport = require("passport"); const passportLocal = require("passport-local").Strategy; const cookieParser = require("cookie-parser"); const bcrypt = require("bcrypt"); const session = require("express-session"); […]

Categories
Mastering Development

i`m getting the 400 response error in react.js i know the backendd is ok but the client side i am not sure i am not fimiliar with react

I can’t create a class and I don’t know why. I am not familiar with react so much. I am learning from this project I set for my self so please help I am working on it for 2 days and i don’t know why this is happening. this is my view i know this […]

Categories
Apple User Help

How do you turn on crontab logging on Big Sur?

I am running macOS Big Sur 11.2.1 and have several crontab jobs set up and they work fine, but I want to turn on the logging of all of my crontab jobs. I have read that with the recently releases such as Big Sur, macOS still supports crontab but not cron. However I see I […]

Categories
Mastering Development

How to store multiple values from dropdown in php variable

I am trying to get a table to generate based on the sql query in this page, and I have it working with one item in the dropdown menu. However if I select two, nothing happens, probably because I am either storing the variable incorrectly in $forum or I am accessing it incorrectly in the […]

Categories
CMS Mastering Development Wordpress

signup_user_meta – changing meta information

Im tryng to modify (encrypt) the meta data that gets inserted into wp_signups. I checked how bbPress was adding information and tried the code below in functions.php to see if I could change a simple string, but it does not do anything, not even adding new meta to the array. function test_add_meta( $meta, $user, $user_email, […]

Categories
Mastering Development

Update Full calendar Vue events with data from API after an input outside the calendar

I’m using the FullCalendar package as a Vue component (docs). I have a form with a select input and the calendar component. Only when this select input has a value or gets changed I want to set events on the calendar by making an API request that is returning me the events that are linked […]

Categories
Mastering Development

Is there a better RXJs Operator to use in this scenario?

I have a service method which does the following: Finds the user from the Database by their ID Checks if a user has been found Uses bcrypt to compare the password stored in the DB against a password provided as a parameter Throws an UnauthorizedException if the password was incorrect, returns the user if correct. […]

Categories
Mastering Development

How can i use Sequelize CRUD?

I want to create new seed data(user, content table) in my DB , but it doesn’t work, Can you give me some advice? Here is err message, when i use npx db:seed:all Cannot add or update a child row: a foreign key constraint fails (`database_development`.`contents`, CONSTRAINT `contents_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE […]

Categories
Mastering Development System & Network

What are the mechanics behind a CIFS “readonly” mount?

I wrote a Linux (RHEL7) service that regularly polls a bunch of industrial machines for log files. To accomplish that, I’ve mounted the hard drives of the Win7 control computers of the machines on the Linux system like this (in fstab): //192.168.x.x/share /tools/x/y cifs auto,nofail,ro,user,username=x,password=y,vers=2.1 Note the "ro" (readonly) option. Now on one of those […]

Categories
Mastering Development System & Network

WordPress-MySQL connection issue with Docker

I’m having trouble getting WordPress to talk to a MySQL database once I moved it behind a linuxserver/swag container to enable https. I’m using Docker version 20.10.2, build 2291f61 and docker-compose version 1.27.4, build 40524192; these are running on a VPS running Debian 10. Here is the docker-compose.yml file I created. In short, I have […]