Switch case statements in Golang

  • 20 April 2020
  • ADM

The switch statement is an easier way to have a sequence of if-else statements. In Golang you don't need to have break at the end of each case, it breaks implicitly. Also the golang switch statement work on values of any type.


Interfaces in Golang

  • 10 April 2020
  • ADM

Interfaces are collections of method signatures. A interface type can hold any value that implements those methods. The empty interface is an interface type that specifies zero methods. A type assertion provides access to an interface underlying concrete value. Two interfaces are equal if they have equal concrete values and identical dynamic types, or if both are nil.


Abstract keyword in Java

  • 10 March 2020
  • ADM

The abstract keyword is used in Java for abstraction. The abstraction is the process of selecting data and displaying only the relevant details to the object. If helps to reduce the programing complexity and the efort.


All keywords in Java

  • 09 March 2020
  • ADM

Keywords are special words in the programing language which have reserved use in the language. Keywords may not be used as identifiers in Java; for example you cannot declare a field whose name is a keyword.


How to disable submit button with jQuery

  • 06 January 2020
  • ADM

For a long submit operation or to avoid users clicking twice a submit button, a common solution is to disable the submit button after user clicked on it.

To disable a button using jQuery you need to add the disabled attribute to the button as true.


How to generate a random int in Golang

  • 27 September 2019
  • ADM

In Golang there a are two libraries for generating random integers, one is a pseudo-random number generator (package math/rand) and the second one is cryptographically secure random number generator (package crypto/rand)