[59] Results

Golang : How to check if slice or array is empty?

golang sql check-empty-slice-array err-no-rows sql

Problem :

One of your code is throwing out panic error and apparently it is trying to do a for….... read more

Golang : How to check for empty array string or string?

golang string check-empty-string string-array

Sometimes that most obvious thing can be the hardest to remember. Putting this down as a note for myself and….... read more

Javascript : Empty an array example

javascript empty-array pop-array

Problem :

You have an array in JavaScript and you need to empty it. How to do that?

For instance….... read more

Golang : How to count duplicate items in slice/array?

golang count-duplicate slice array

Problem :

You need to count the number of duplicate items in a slice or array.

Solution :

Pseudo-code :….... read more

Golang : Convert slice to array

golang slice array convert copy

For new comer to Golang, slice and array can be confusing sometimes. In a nutshell, a slice length(size) is flexible….... read more

Golang : Shuffle array of list

golang shuffle array slice list map

Continue from previous tutorial on how to shuffle an array of strings, to shuffle array of list is….... read more

Golang : Check if item is in slice/array

golang duplicate item-in-slice array

Problem :

You need to see if an item is inside a slice or array.

Solution :

Golang does not….... read more

Golang : Delete duplicate items from a slice/array

golang duplicate slice array

Problem :

Fairly common question or task that a programmer will face from time to time. How to remove duplicate….... read more