Let’s Code Better

  • [Resolved] When I faced “#1273 – Unknown collation: ‘utf8mb4_0900_ai_ci’” Error

    Dataflows in many forms. Someday I was about to transfer MySQL data from one of my servers to my local PC having PHPMyAdmin. On my server PC, I was having WorkBench. A WorkBench is a free tool to manage MySQL queries acts like a  relational database management tool. I took a dump of a database…

    Read more: [Resolved] When I faced “#1273 – Unknown collation: ‘utf8mb4_0900_ai_ci’” Error
  • Angular 8|9 Pass Data between Components Example Application

    Continuing from my previous post has an example of filter pipe usage in Angular application. Here we will upgrade that simple filter app to level next. I have upgraded this application to Angular v9, worked basically on two important methods using which we can pass data between Angular components.

    Read more: Angular 8|9 Pass Data between Components Example Application
  • Angular 12 Dynamic Radio List get Selected Value on Change

    Listing of items in data is a simple way to show items. If users have to select only a single Item out of it, we need to use radio input fields. here we will discuss the implementation of radio input list in Angular 6. We will develop a simple Angular application which will have the…

    Read more: Angular 12 Dynamic Radio List get Selected Value on Change
  • Angular 12 @Input Property Binding Example

    Angular’s best feature is component. We can divide different modules into a number of components. Where each component having its own responsibility to perform. But, sometimes these components may need to communicate with each other and share data having each other’s dependencies. In this post, we will discuss a simple example app which will share…

    Read more: Angular 12 @Input Property Binding Example
  • Resolved! Disable Alphabetical Sorting of JSON Attributes in Response from C sharp Service

    JSON response received on the client side is generally in alphabetical order. This happens when we don’t add any sort order on our server-side API layers. In one of my project, there was a situation in which I wanted to add columns in Excel file from JSON response, as JSON attributes( In my case colum…

    Read more: Resolved! Disable Alphabetical Sorting of JSON Attributes in Response from C sharp Service
  • Create and Download XLS Excel From JSON Response Data in Webpage Using Javascript

    Viewing formatted data on HTML webpage is a good idea until the user wants to do some quick changes in tabular data like sorting, filtering. So it is better to take it in your own hands instead of making server calls. Today we will convert JSON response data into the Excel file. Excel file will…

    Read more: Create and Download XLS Excel From JSON Response Data in Webpage Using Javascript
  • Resolved! FirebaseInstanceIdService is deprecated

    So after updating the version of firebase-messaging in the build.gradle file from v17.0.0 to v17.1.0, strange things started happening… there was a line of horror in service I used to use for messaging in my application. After some research, I landed on this page. Let’s quickly go to updates which we need to do to…

    Read more: Resolved! FirebaseInstanceIdService is deprecated
  • Lazy / Partial Load Modules and Controllers in AngularJS Example

    A complex application built using AngularJS takes a lot of time to load due to a large number of view controllers and other modules. As AngularJS acts as a web application we need to load all resources on page load. But we can adopt a new approach to load only required resources like controllers which…

    Read more: Lazy / Partial Load Modules and Controllers in AngularJS Example
  • How to Add Google reCAPTCHA in PHP form

    This is a really quick tutorial to add Google reCAPTCHA in a PHP form. reCAPTCHA is used to prevent spam or autonomous illegal activities on your website, which can result in overuse of the bandwidth of your server fill your databases with junk data. Here we will discuss v2 of Google reCAPTCHA.

    Read more: How to Add Google reCAPTCHA in PHP form
  • Angular 12 Checkbox List with Parent-Child Expand Collapse Sections

    In this post we’ll discuss on How to Create a Checkbox List having parents and children structure, using a single data object. Moreover, each parent is in an expandable accordion tab to be collapsed to hide its child items. The list checkboxes will have a child group and a parent checkbox each. Checking / Unchecking…

    Read more: Angular 12 Checkbox List with Parent-Child Expand Collapse Sections
  • Namecheap Hosting Not Reflecting Latest Javascript Files Code on Upload

    I am in India and using Namecheap hosting from last 5 years. But from past 2 years, I was facing a strange issue with uploading javascript file on the server. JS file was not reflecting on the server and was not same as uploaded. I talked to Namecheap support about 5 times but they said we…

    Read more: Namecheap Hosting Not Reflecting Latest Javascript Files Code on Upload
  • Convert HTML Document into Image JPG PNG from Canvas

    In this tutorial, we’ll learn how to convert HTML DOM content on the web page into a JPEG or PNG image. We;ll use html2canvas library to convert the HTML web page into a canvas then convert that canvas into an Image which can be a JPEG or PNG image. The html2canvas is a powerful library…

    Read more: Convert HTML Document into Image JPG PNG from Canvas
  • Android SQLite Example Application Insert Update Delete Truncate Operations

    Android SQLite provides a mean for an application developer to save data locally in device memory in a structured form, which makes it very easy to read, update or delete information saved in multiple formats. Android SQLite is the best way to save data locally in the device itself. SQLite acts as a local database for…

    Read more: Android SQLite Example Application Insert Update Delete Truncate Operations
  • Android SQLite How to Delete Rows In Database

    UPDATE: See Complete Application Example Here Here we will delete SQLite database rows, which we inserted in previous post . For SQLite integration see this post if you are at the beginning of using the database in your application. So as we already have application using which we can insert rows in the database.

    Read more: Android SQLite How to Delete Rows In Database
  • Android SQLite Insert Rows in Database

    UPDATE: See Complete Application Example Here Previous Part 1: Android SQLite: Integration. Part 2: Insert Rows in SQLite Android App In the previous post we worked on the integration of SQLite then we created Database and Table. Now we will Create a new Activity to insert a new row in Database.

    Read more: Android SQLite Insert Rows in Database
  • Android SQLite Integration

    UPDATE: See Complete Application Example Here Part 1: Android SQLite: Integration. Next Part 2: How to Insert New Row in SQLite Database Android SQLite is the best way to save data locally in the device itself. SQLite acts as a local database for applications saving data in tradition columns rows architecture. It is suited where…

    Read more: Android SQLite Integration
  • How to Add Back Arrow in Android Activity

    Here is a simple method to add a back arrow to other Activity to come back to MainActivity. To enter a new activity we create an Intent then start a new Activity using that intent instance using the startActivity method. After we enter the new activity we add a listener on action bar instance to finish…

    Read more: How to Add Back Arrow in Android Activity
  • jQuery & PHP Convert Date time to Facebook Style TimeAgo

    Whenever a user sees a date or time, he/she start doing comparisons between current time and given time. So it takes some more brain resources to do time difference calculations. Facebook knows about this lazy human behavior, that’s why it always shows date time in the following format less than a minute ago 17 minutes…

    Read more: jQuery & PHP Convert Date time to Facebook Style TimeAgo
  • Change Version Number of App in Android Studio v 3.1

    Following method is to change the version number of application in Android Studio V 3.1 using settings. There are two methods we can follow, let’s have a look at both:

    Read more: Change Version Number of App in Android Studio v 3.1
  • Android Useful Methods and Functions

    A fully featured Android application has a lot of functionality going on to provide a user-friendly interface to the user. For example, we can Indicate if the device is still connected to a network of if connected is it Wifi or mobile network, check GPS status on the device, battery status like a battery percentage…

    Read more: Android Useful Methods and Functions
  • Lenovo – Enable VT-x in BIOS

    Most probably you may have encountered VT-x disabled issue during Android Emulator Installation. VT-x is Virtualization Technology which allows PC platforms to run multiple applications and operating systems simultaneously blah blah… This procedure is for Lenovo for other It may be a similar process. Let’s enable it

    Read more: Lenovo – Enable VT-x in BIOS
  • jQuery UI Datepicker AngularJS Directive using Min Max Options

    In an Angularjs project, if you are trying to add a datepicker having all features like MinDate MaxDate etc, you will hardly find any module which is performance efficient, bug-free and is requirement friendly like jQuery UI datepicker. So, If you are looking to use jQuery Datepicker as a directive in your AngularJS project, then…

    Read more: jQuery UI Datepicker AngularJS Directive using Min Max Options
  • RESOLVED! Shared Preference Context Error

    During android development, especially for a beginner like me the creepiest thing which I felt was Handling Contexts. Shared preferences is really a cool thing if we want to save some handy information by the user on a device even if an app is killed. BUT context exceptions are everywhere. So here we will not…

    Read more: RESOLVED! Shared Preference Context Error
  • Angular 12 Add Simple Image Carousel/ Slider using ng2-carouselamos

    Image Carousels provides a good front-end user experience to show graphics or images in a small space in an interactive way. But in Angular Application we hardly find great carousels/ image sliders to work with. In this tutorial, we will implement a Great Simple and Easy to Use Angular Image Carousel.

    Read more: Angular 12 Add Simple Image Carousel/ Slider using ng2-carouselamos
  • Angular – Not Detecting Change, Updating Variable When Model Passed in Method as Param

    Declaring a model value in the template, then passing it as a reference in method params, does not detect the updated model value; We are going to discuss this issue in detail and also the ways to resolve it with a simple use-case.

    Read more: Angular – Not Detecting Change, Updating Variable When Model Passed in Method as Param