Categories
Mastering Development

Navigation bar in tableView give mi back space when tapped to scroll on top

When I tap to bring the tableView (This happened with Large Titles) on top, it gives me back a space, which then turn back at the second tap (see image). I try to set tableView.scrollsOnTop = false and add a button to do it… The space go away but the Large titles too, when I […]

Categories
Mastering Development

Improve visual update speed of child component in Angular 8

At the moment I am trying to find a way to improve the update speed of a nested child component. The nested child component and the parent all get the data from a service. When I get a response from the API I update the service.items value. The items are a Map so they do […]

Categories
Development

After adding calendar event through content resolver it takes log time for it to sync with google calendar

Through my app I am creating calendar events using ContentResolver. Events are being successfuly created and you can see them in system calendar app. The problems appear when the user is using Google Calendar app. Sometimes it takes few minutes for event to appear there. Also when the event at last appear in Google Calendar […]

Categories
Development

Postman GET Request hangs and never returns any results

I am attempting to Build A REST API With Node.js, Express, & MongoDB. Everything seem to work so far. The server starts and connects to the DB. The DB (named API) has two collections (Articles and Sources). I am trying to send GET request to the Articles collection. However, when I send the request, Postman […]

Categories
Development

Typescript: How to monkey patch `history.pushState` without using ts-ignore?

I am trying to implement history API patching the way the wouter routing library does it, but in Typescript instead of Javascript. The wouter library uses code like this: [“pushState”, “replaceState”].map(type => { const original = history[type]; history[type] = function() { const result = original.apply(this, arguments); const event = new Event(type); event.arguments = arguments; dispatchEvent(event); […]

Categories
Development

Angular 8 – Behavior Subject not emitting next value in Service

Hi I have an angular application where I’m passing data from one component to a service and trying to update the value of a behavior subject in that service by calling it’s next function so it in turn updates a subscribe value in another component. My issue is when passing the data and creating an […]

Categories
Development

return all the docs where id is found mongoose

im trying to return an array of claims from my mongodb , but when im using the function its returns undefined , how can i return the results as array ? i have been looking for many questions about this in stackoverflow but none of them works.. so please do not refer me to another […]

Categories
Development

How to merge two csv files without duplication one column?

I have 2 csv files ,one contain( UserId,MovieId,Rating ) second contain(MovieId,title,genres).I want to merge them in one file without duplicate MovieId.I used union function but get me only one file. import sqlContext.implicits._ import sqlContext._ case class DataClass(UserId: Int, MovieId:Int, ratings: Double) val Data = sc.textFile(“file:///usr/local/spark/dataset/rating.csv”).map(_.split(“,”)).map(p => DataClass(p(0).trim.toInt, p(1).trim.toInt, p(2).trim.toDouble)).toDF() case class DataClass2( MovieId:Int, title: String,genres:String) […]

Categories
Development

Spring + Android(Retrofit2) GET request returning null

I saw a lot of similar problems, but after many tries, still I don’t know why my retrofit Get request returning null. I tried code this with many tutorials, spent one day on solution. URL from code should return all of cd’s in database. Below is client code in onCreate method in HomeFragment.class Call<CD> call […]

Categories
Development

Construct StructType with StructField of a complex type

There is a type case class RSSEntry( source: RSSFeed, uri: String, title: String, links: List[RSSLink], content: List[RSSContent], description: RSSContent, enclosures: List[RSSEnclosure], publishedDate: Long, updatedDate: Long, authors: List[RSSPerson], contributors: List[RSSPerson] ) I use field links, field title and field publishedDate. Here is the RSSLink type case class RSSLink(href: String, title: String) Now please see actual code […]