Skip to content
Sandny Blog
  • Home
  • Java
  • JavaScript
  • AWS
  • Embedded
  • About
Typescript JavaScript

How to use Typescript with arrays

  • June 28, 2021July 11, 2021
  • by Coder Kai

Array is used to store a sequence of elements as references. When declaring typescript array, the type of the elements should be defined in its syntax.

Read more “How to use Typescript with arrays” →
how to optimize react-native map view JavaScript

How to optimize react-native map views

  • June 26, 2021June 27, 2021
  • by Coder Kai

React native always has been quite painful when it comes to performance compared to a native application. Today we will focus on increasing the performance and how to optimize react-native map view which has many pegs or markers.

Read more “How to optimize react-native map views” →
debounce with react hooks JavaScript

Avoid multiple clicks using debounce with react hooks

  • February 16, 2021June 20, 2021
  • by Coder Kai

Why debounce with react hooks? We all come across that one button users keep on pressing until the data is loaded. Without guarding your code with every sort of if conditions, you can guard this by debouncing. For multiple tap scenarios, you can either propagate the event at the first tap/click or the last one.

Read more “Avoid multiple clicks using debounce with react hooks” →
How to avoid NullPointerException in Java Java

How to avoid NullPointerException in Java

  • July 7, 2020July 13, 2021
  • by Coder Kai

Most of the developer’s idea is null checks makes the code less understandable and less reliable. Tony Hoare, who invented null references, calls them “a billion-dollar mistake”.

Read more “How to avoid NullPointerException in Java” →
react-native heap limit allocation android

Android/iOS React-native heap limit allocation failed error

  • December 30, 2019January 8, 2020
  • by Coder Kai

When you are building your react native Android app, you may encounter the error: heap limit Allocation failed.

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Read more “Android/iOS React-native heap limit allocation failed error” →
The new features in Java 14 Java

JDK 14 – The new features in Java 14

  • December 27, 2019December 27, 2019
  • by Coder Kai

Recently, Java changed its release cycle more rapidly. JDK 13 released on September 2019 and JDK 14 is scheduled for a production release on 17 March 2020. The features targeted to JDK 14 as follows,

1. Pattern Matching for instanceof

Java instanceof operator is used to test whether the object is an instance of the specified type. With Java 14 instanceof operator enhance to the pattern matching as bellow,

Read more “JDK 14 – The new features in Java 14” →
androidx fileprovider android

AndroidX ClassNotFound Exception: “android.support. v4.content .FileProvider”

  • December 19, 2019December 23, 2019
  • by Coder Kai

This was an issue that was occurring after the migrating with new Androidx migration. The root cause was the android.support.v4.content.FileProvider was not provided in the latest android support library.

To debug this error you will have to see the adb log with the command

adb logcat
Read more “AndroidX ClassNotFound Exception: “android.support. v4.content .FileProvider”” →
Numbers inJavascript JavaScript

02. Javascript Guide – Numbers

  • December 15, 2019July 3, 2021
  • by Coder Kai

Numbers in Javascript

The numbers in Javascript has many subtle things to understand it fully. In this section, we are going to discuss the following points.

  1. What are the numbers in Javascript and memory representation.
  2. Number wrapper.
  3. Arithmetics.
  4. Points to remember when coding.
Read more “02. Javascript Guide – Numbers” →
Introduction to Javascript JavaScript

01. Javascript Guide – Introduction to Javascript

  • December 11, 2019December 15, 2019
  • by Coder Kai

Introduction to Javascript and the language

In this introduction to Javascript, we are going to discuss the following points.

  1. Javascript, the language
  2. Early Javascript
  3. Characteristics
  4. Tools
Read more “01. Javascript Guide – Introduction to Javascript” →
How to host GoDaddy domain with AWS EC2 AWS

How to host GoDaddy domain with AWS EC2

  • November 23, 2019November 23, 2019
  • by Coder Kai

Many newbies find AWS and domain providers such as GoDaddy confusing to connect. But it is not a difficult task and you can host GoDaddy domain with AWS EC2 instantly.

To connect AWS with the domain we will have to use a service called Route53 (53 refers thee TCP/UDP port 53 for DNS serving). And also there won’t be any direct way to do without this service. You can use any AWS public gateway provider such as EC2, ELB, S3 to serve your website or server to the public domain you have on GoDaddy. The AWS usually charges about .51 USD per month to maintain this zone entry as well.

Read more “How to host GoDaddy domain with AWS EC2” →
Java 13 features Java

Java 13 (JDK 13) -The New Features

  • November 18, 2019December 19, 2019
  • by Coder Kai

Java Development Kit (JDK) 13, the latest version of standard Java, is now available and release with some new features of,

1. Switch Expressions

This is one of the preveiew language feature defined in java 13.

Java 13 extends the previous Java 12 Switch Expressions by adding a new yield keyword to return a value from switch expression.So breaks syntax is no longer compiled in Java 13, it uses yield instead.

Read more “Java 13 (JDK 13) -The New Features” →

Java

Java 13 Switch Expressions

  • November 17, 2019November 20, 2019
  • by Coder Kai

This is another preview language feature defined in java 13. Java 13 extends the previous Java 12 Switch expressions by adding a new yield keyword to return a value from switch expression. So break syntax is no longer compiled in Java 13, it uses yield.

As traditional switch statement, there are many break statements make it unnecessarily verbose and hard to debug errors.

Read more “Java 13 Switch Expressions” →
Docker

Nginx Load Balancer with docker for nodejs services

  • November 3, 2019December 11, 2019
  • by Coder Kai

Nginx Load Balancer with docker has become a fine recipe for managing services in closed systems. Although services like Kubernetes provide container orchestration, sometimes architecturally it could be an overkill. In this example, I will be showing how to use docker services using Nginx load balancer.

Nginx Load Balancer with docker

Read more “Nginx Load Balancer with docker for nodejs services” →

JavaScript

Create React App Using npx

  • November 3, 2019November 11, 2019
  • by Coder Kai

Here we are discussing creating react app using npx create-react-app. npx comes with npm 5.2 and higher.

Prerequisite: You need to install Node >= 8.10 on your machine.

Creating an app using npx command

npx create-react-app my-app

create-react-app set up the main structure of the application.

Important: If you previously installed create-react-app using npm, uninstall before using npx. Because npx always refer the latest version of libraries.

Read more “Create React App Using npx” →

JavaScript

Difference Between npx and npm

  • November 2, 2019November 3, 2019
  • by Coder Kai
  • npm – Javascript package manager
  • npx – Execute npm package binaries ( a tool for executing node packages )

npx comes bundled with npm version 5.2+.

npm

If you want to run a package using npm, you must specify that package in your package.json file and install a package locally on a project:

npm install package-name

npx

npx is a npm package runner.

Read more “Difference Between npx and npm” →

JavaScript

Simple Tab View Using react-tabs

  • October 28, 2019November 3, 2019
  • by Coder Kai

This article will guide you on how to create a simple tab component using the react-tabs library.

Install react-tabs using

yarn add react-tabs    why yarn ?

Basic Example 1

Read more “Simple Tab View Using react-tabs” →

Use Dynamic Segments Routing in Ember 2.0 JavaScript

The Common Errors that beginner React Developers Make

  • October 24, 2019July 4, 2021
  • by Coder Kai

1. React Must Be in Scope

Let’s assume we are creating “helloWorld.jsx” like below, you can see there is a compilation error display as “’React’ must be in scope when using JSX react/react-in-jsx-scope.”

const element = <h1>Hello World!</h1>
export default element;


This happens due to “React” import necessary in JSX file.The React library must also always be in scope from JSX code. To overcome this error “import React from “react”;” must be added into the file as follows.

Read more “The Common Errors that beginner React Developers Make” →

How to enable preview feature in Java 13 with maven. Java

Enable the Preview Feature in Java 13 with Maven

  • October 8, 2019November 28, 2019
  • by Coder Kai

Preview Feature

A preview feature or VM feature is a new feature of the Java SE Platform.

This article shows you how to use –enable-preview to enable the preview features in Java 13 with maven.

To use preview features in your programs, you must explicitly enable them in the compiler and the runtime system. Because this feature disabled by default.If not, you’ll receive an error message that states that your code is using a preview feature.

Read more “Enable the Preview Feature in Java 13 with Maven” →

AWS Ingress ALB with EKS AWS

How to use AWS Ingress ALB with EKS

  • August 15, 2019December 11, 2019
  • by Coder Kai

Overview

Kubernetes has multiple services to facilitate the pod orchestration within the cluster. What we are discussing here is on how to use the AWS Ingress ALB with EKS without using the traditional Load Balancer Service

Kubernetes services and ingress

Read more “How to use AWS Ingress ALB with EKS” →

FCM Push Notification with React Native FCM

How to setup FCM Push Notification with React Native…

  • March 11, 2019March 11, 2019
  • by Coder Kai

If you are new to firebase and FCM this article will be useful to setup FCM Push Notification with React Native application. We will be using react-native-firebase(doc: https://rnfirebase.io/docs/v5.x.x/getting-started) module to retrieve token for the push notifications.

Prerequisites

First, create the Firebase account and download the google-services.json file from the console.

  1. Access your firebase account and go to the project settings from the top gear icon.
    Read more “How to setup FCM Push Notification with React Native App” →

Posts navigation

1 2 3 4

Categories

  • android 3
  • Apollo Client 1
  • AWS 8
    • AppSync 5
    • EC2 1
    • EKS 1
    • Route53 1
    • S3 1
  • AWS Amplify 1
  • Chakra UI 1
  • Docker 1
  • Embedded 1
  • EmberJS 1
  • FCM 1
  • Godaddy 1
  • GraphQL 3
  • ios 1
  • Jasper 1
  • Java 10
    • Java 11 1
    • Java 14 1
  • JavaEE 2
  • JavaScript 39
    • Express.js 4
    • Javascript Guide 7
    • Node.js 3
    • react-native 4
    • React.js 17
    • Typescript 1
  • Kubernetes 1
  • machine learning 1
  • Maven 2
  • OCaml 3
  • PostgreSQL 1
  • Python 2
  • react-native 4
  • ReactJS 3
  • sass 1
  • Server 6
  • spark 1
  • Terraform 2
  • Ubuntu 4
  • Uncategorized 1
  • webpack 2

Recent Comments

  • Binance推荐代码 on How to add styles to stripe elements without using CardElement
  • binance account on 05 Global, null and undefined values in Javascript
  • http://vn-info.net/user/Irinpnk/ on How to host GoDaddy domain with AWS EC2

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Archives

  • October 2022 3
  • September 2022 7
  • May 2022 1
  • December 2021 1
  • August 2021 1
  • July 2021 6
  • June 2021 3
  • February 2021 1
  • July 2020 1
  • December 2019 5
  • November 2019 6
  • October 2019 3
  • August 2019 1
  • March 2019 1
  • February 2019 1
  • January 2019 2
  • December 2018 1
  • September 2018 2
  • August 2018 1
  • June 2018 1
  • February 2018 1
  • November 2017 2
  • October 2017 5
  • September 2017 1
  • June 2017 1
  • May 2017 10
Sandny Blog space
Theme by Colorlib Powered by WordPress