I have order id with combination of string and alpha characters like “30000-T04”, “30000-T10”, “30000-T05”, “30000-T01”, I want to sort this in ascending order. So let’s see how to do that. To sort an array of strings by the last two digits, you can use the sort() method with a custom comparison function that extracts […]Read more..
Your app currently targets API level 29 and must target at least API level 31 to ensure that it is built on the latest APIs optimised for security and performance. Change your app’s target API level to at least 31. Learn more I got the above error in android place store when I tried to upload […]Read more..
In many cases while building a report or dashboard we will be in situation to show the user data comparison like difference between current month and last month or current week with previous week. so here is the example to do that in mongo aggregation query. To get the earning of the last 30 days […]Read more..
If you have fields in mongo which has lots duplicate values, but you want to analysis it by getting unique then you can that as I done as follows. You can use the distinct method to retrieve unique values from a specific field in a collection. The distinct method returns an array of distinct values […]Read more..
To add a number of days to a date field in MongoDB using the aggregation framework, you can use the following code as an example: In this code, $addFields is the stage in the pipeline that adds a new field to the documents being processed. $add is used to perform arithmetic operations, and it takes […]Read more..
When we have situation $divide some number field value can be a zero or null, then aggregate will fail with error, so we may need to default value in some case, so hope this article and example will help PlanExecutor error during aggregation :: caused by :: can’t $divide by zero Here’s an example of […]Read more..
In Dart to remove only the whitespace around a string, you can use the trim method. The trim method removes any leading and trailing whitespaces from the string. Here is an example: I had a situation to remove whitespace and new line array the string inside the array/list, so we have to use a regular […]Read more..
We are going to see one of the most useful use case that will be used in almost in all the mobile app, which is search and get results from api, For best user experience we generally like to see the autocomplete search result instantly when we start typing in the input using the event […]Read more..
Apache Solr recently released stable version 7.1, but I had a situation to configure the old Solr 4.7.2 with Tomcat 8 in Aws EC2 Linux AMI. So I thought to share steps install and configure. Hope someone will benefit Install Tomcat 8 on EC2 LINUX AMI First, let’s install the tomcat 8 in the ec2. Once you logged […]Read more..