Categories
Mastering Development

django how to create instance of user

I am creating a simple application, successfully created for a single user, but I want to develop for multiple users, but unable to do so… i.e. user A can create his task and save in the database. similar B user can create tasks and store in the database. and each can see their own tasks […]

Categories
Linux Mastering Development

“systemctl start fstrim.timer” for ssd optimization not working on Debian 10

i just installed a 1TB kingston SSD, i cloned my HDD (with Debian 10) so nothing changed besides the performance, i want to set up TRIM for this SSD. So i’ve done this: $ sudo hdparm -I /dev/sda | grep -i TRIM * Data Set Management TRIM supported (limit 8 blocks) $ sudo systemctl cat […]

Categories
Mastering Development

Why QGraphicsProxyWidget does not resize properly after dropping into QGraphicsView?

I have a QListWidget and a QGraphicsView both subclassed to overwrite some of their members. I prepared a minimal verifiable example showing the problem I have. From the QListWidget I can drag and drop specific field represented by a QTableWidget and drop them into a QGraphicsView and in order to do that I am using […]

Categories
Database Development

Unable to add data to table

I am working on a script to get latest backups for AlwaysOn Availability Groups. I used the command Get-DbaAgBackupHistory from dbatools module, passed it a couple of listener names, and wrote the output to a table. I want to add the listener name in the output but have not been able to do this. My […]

Categories
Mastering Development System & Network

NGINX Ingress giving 503 Service Temporarily Unavailable. nginx/1.19.1 error in frontend

I am trying to install the Cyclos Mobile app on GCP Everything setup perfectly but when I am trying to access the setup on browser it always showing either default backend – 404 or 503 Service Temporarily Unavailable. nginx/1.19.1. I have tried everything as per stack overflow several previous questions but still same error. kind: […]

Categories
Mastering Development

Odd Response from AWS SSM Request

I am calling SSM to retrieve a particular value (this is in an awsUtils.js file): javascript const AWS = require("aws-sdk"); const ssm = new AWS.SSM({region: process.env.AWS_REGION}); module.exports.getSSMValue = (ssmParamter) => new Promise((resolve, reject) => { const ssmResponse = ssm.getParameter({Name: ssmParamter, WithDecryption: true}); console.debug("ssmResponse", ssmResponse); if (ssmResponse) { resolve(ssmResponse.data); } else { resolve(); } }); and […]

Categories
Mastering Development

Generation of Base64 string from JPG/PNG/… image returns plain white image after canvas resize operation

Context I’m trying to generate a Base64 string of a JPG/PNG/… image after resizing it. For some reason, the resulting Base64 string is that of a plain white image. Assumption My assumption of what is causing this, is the following: <canvas width="X" height="Y"></canvas> does not seem to contain innerHTML, where I would expect it to […]

Categories
Mastering Development

ConnectionRefusedError: [Errno 10061] Connect call failed (‘127.0.0.1’, 6379) WebSocket DISCONNECT /ws/chat/lobby/ [127.0.0.1:56602]

Here, I need to connect another channel using web sockets in django channels. I can’t connect to the another channel, it showing error like this. consumers.py import json from asgiref.sync import async_to_sync from channels.generic.websocket import WebsocketConsumer class ChatConsumer(WebsocketConsumer): def connect(self): self.room_name = self.scope[‘url_route’][‘kwargs’][‘room_name’] self.room_group_name = ‘chat_%s’ % self.room_name # Join room group async_to_sync(self.channel_layer.group_add)( self.room_group_name, self.channel_name […]

Categories
Mastering Development System & Network

What is this Nginx Log?? Can you explain this?

I am studying about web log. While studying, I found strange data. That is the FastCGI error log. Many error logs were found in a short period of time. The server is running WordPress with nginx. First example: 2020-10-01 13:00:34,sent,stderr:,stderror:,"""PHP",sent,,fastcgi://myip:9000,mydomain 2020-10-01 13:00:34,sent,stderr:,stderror:,"""PHP",sent,,fastcgi://myip:9000,mydomain 2020-10-01 13:00:34,sent,stderr:,stderror:,"""PHP",sent,,fastcgi://myip:9000,mydomain 2020-10-01 13:00:34,sent,stderr:,stderror:,"""PHP",sent,,fastcgi://myip:9000,mydomain 2020-10-01 13:00:34,sent,stderr:,stderror:,"""PHP",sent,,fastcgi://myip:9000,mydomain 2020-10-01 13:00:34,sent,stderr:,stderror:,"""PHP",sent,,fastcgi://myip:9000,mydomain 2020-10-01 13:00:35,sent,stderr:,stderror:,"""PHP",sent,,fastcgi://myip:9000,mydomain … 2020-10-01 13:15:58,sent,stderr:,stderror:,"""PHP",sent,,fastcgi://myip:9000,mydomain […]

Categories
Mastering Development

Angular loadChildren using data for tab/navigation creation

I am trying to build a multi level navigation SPA. The idea is to use the data block from the router.module.ts to build tabs and dynamcily load the child routes using loadChildren(). Each item on the navbar should then loop over the local routing.module for the sidebar menu. At the top level (working) app-routing.module.ts const […]