Categories
Mastering Development

Partition will not unmount while busy in ubuntu

So I am trying to unmount a partition in ubuntu through Gparted to increase the size since I only limited it to 30gb but my hard drive has around 1tb. I am not able to extend the /dev/sda6 because it does not unmount since it says it is busy. I have tried to unmount it […]

Categories
Mastering Development

ASP.NET Core how to randomly set property value

In ASP.NET Core, I need to set a property to a random string, but the random string will be generated from another property. The properties are public class State { public int Id {get;set;} public string Name {get;set;} public string Capital {get;set;} public string RandomCapital {get;set;} } Basically Capital has values state capitals as its […]

Categories
Mastering Development

How to cancel the previous graphicql request in react.js

I am using the graphicql in the react.js project. When the value of search box change, system call the grapicql api each time. But I receive the previous response after the last response. So I need to ignore the previous requests.

Categories
Mastering Development

Nested Classes with Same Name

I have an xsd schema which I converted to POJO using the xjc tool. The schema has nested complexTypes with same name but different attributes and elements. So, I ended up with a class like public class MyObject { // some variables public static Extension { private String A; private String B; public static Extension […]

Categories
Mastering Development

Storing changes on MySQL Database properly

I’ve currently got three tables to track changes on specific entries but it seems like I am ending up with a ton of entries and I am not sure if that is the best possible way. My first table holds the basic information and the second and third one the extra entries I grab every […]

Categories
Mastering Development

How to create visualization from time series data in a .txt file in python

I have a .txt file with three columns: Time, ticker, price. The time is spaced in 15 second intervals. It looks like this uploaded to jupyter notebook and put into a Pandas DF. time ticker price 0 09:30:35 EV 33.860 1 00:00:00 AMG 60.430 2 09:30:35 AMG 60.750 3 00:00:00 BLK 455.350 4 09:30:35 BLK […]

Categories
Mastering Development

how to stop iterating my like button inside my post

I am working on a post system with likes where the user can toggle the post`s like I have done everything correctly except the last step, the problem inside my v-for loop I fetch likes table from post-like relation(many to many since likes table has user_id and post_id) but it is iterating my button even […]

Categories
Mastering Development

How do I use bson.SetBSON or bson.Raw?

Possibly related: How to use interface type as a model in mgo (Go)? I have a struct like so: type Game struct { ID bson.ObjectId Type string Location string Details interface{} } type FeudDetails struct { … } type TriviaDetails struct { … } type BingoDetails struct { … } I want to use the […]

Categories
Mastering Development

Bastionhost configuration with NaviServer on GCP?

How to add TLS/SSL letsencrypt or GCP provided certificate to VM instance in GCP with an internal ip address and static external address? When I create one via a letsencrpt certificate install script, resultant connections break because the VM doesn’t have an external facing ip number –only an internal number. The traffic passes through a […]

Categories
Mastering Development

Swift 5 & Alamofire 5 : GET method ERROR: Alamofire.AFError.URLRequestValidationFailureReason.bodyDataInGETRequest(22 bytes)

I am trying to get records from Database using Alamofire. I am sending parameters in GET request as below. let headers : HTTPHeaders = [“x-access-token”: “\(t)”,”username”:”\(Base.sharedManager.user)”,”password”:”\(Base.sharedManager.pass)”] let parm : [String: Any] = [“search_str” : self!.searchStr] // let searchUrl = Base.sharedManager.URL+”questions/get/”+self!.searchStr let searchUrl = Base.sharedManager.URL+”questions/get/” AF.request(searchUrl, method: .get, parameters: parm, encoding:JSONEncoding.default , headers: headers, interceptor: nil).response […]