Categories
Development

Cannot get collections by date with mongoose

I can not query the collection filtering by a date The following code is that I have so far //The following code shows how my schema is: date: {type: Date, required: true} //This is a date from a collection in MongoDB: date: 2019-09-06T16:48:14.000+00:00 //This is how I saved the date in the MongoDB: “2019/09/09 08:55:15” […]

Categories
Development

Can i apoint the src img attribute to a blob file or a base64 encoded image?

I was wonder if somehow i could get the image content of a url and transform it into a base64 or a blob file and append it to the src attribute ? And if this is possible how can i do this in the angular way ? I tried to do something like this and […]

Categories
Development

C# calling a webservice result in 401

I’m trying to call a simple web service to get long and lat of an address, which works when I try it manually : https://services.gisgraphy.com/geocoding/?address=paris But with the code, I get 401 unauthorize.. What am I doing wrong ? WebRequest request = WebRequest.Create(“https://services.gisgraphy.com/geocoding/?address=paris”); request.Credentials = CredentialCache.DefaultCredentials; request.Method = “GET”; WebResponse response = request.GetResponse(); // It […]

Categories
Development

Why getting the state of one function works and from other not?

I was testing the states of different functions one for true and the other for false and one pass and the other fail. And I have no idea why it happens. //default this.state = { passwordChangeOpen: false } openPasswordChange () { this.setState({ passwordChangeOpen: true }) } onClosePasswordChange () { this.setState({ passwordChangeOpen: false }) } testing […]

Categories
Development

How OpenCL memory transfer functions work?

I have a couple of questions, related to OpenCL memory transfer functions. I faced many questions, related to this, but to none of them extended answers were given. Probably we can collect here the overall answer. This is my current view on three current ways of moving data: 1) enqueueReadBuffer/enqueueWriteBuffer – these two functions always […]

Categories
Development

apply function to all instances of an attribute in an object tree

Let’s say I have an object of unknown structure and depth, where I want to modify an attribute. For example, let’s imagine that the attribute I want to change is id and the structure might be something like this: “{ “a”: “foo”, “b”: “bar”, “c”: { “id”: { “a”: “foo” }, “b”: “whatever” }, “id”: […]

Categories
Development

R lagging through dates with conditions

I have a dataset with what are essentially episodes of time related to an individual which can overlap (i.e. an episode could start later but finish earlier than the previous). Because of this overlap issue I’m struggling to get the latest end_date in the sequence once they’re in order by start_date. The code I’ve been […]

Categories
Development

How to fix function with for loop not iterating. Recommendation system

I’m working on a recommendation system with the python library Surprise. I’m trying to make a function that iterates over the full list of movies and predicts their ranking value against a user id which is defined in when I call the function. This is for Python3 with the library surprise and the SVD algorithm. […]

Categories
Development

Flutter. A way for TextField to detect tap outside

Is there any way to detect a tap outside of TextTield? I wanna make a self sufficient search field component which should expend when focused and shrink when a focus is lost. The TextField is using FocusNode to unfocus itself when the focus is not needed but the problem is that I can’t get the […]

Categories
Development

WPF Datagrid combobox disappearing content + autocomplete

I’ve been trying to solve this problem since yesterday but wihtout succeed (googling). I have combobox in DataGridTemplateColumn and when I select sth and then click another cell the content of combobox disappear but when clicked again in stays. When scrolling down datagrid situation is simmilar. I’ve tried almost everything what I’ve found on the […]