[21] Results

Golang : Fix type interface{} has no field or no methods and type assertions example

golang type-assertions interface map-string-interface

For new comers to Golang exploring interface{} for the first time or if you ever use interface{} to handle some….... read more

Python : Find out the variable type and determine the type with simple test

python variable-type type-function

Couple of ways to determine or find out the type of a variable or object in Python. Listing down the….... read more

Which content-type(MIME type) to use for JSON data

javascript jquery header content-type mime-type

Problem :

Your program sitting in your web server is pumping out JSON data. You need to set the correct….... read more

Golang : How to check variable or object type during runtime?

golang object-variable-type kind type-of reflect

Problem :

You need to determine the type of data your program is getting from the user input or the….... read more

Golang : Convert(cast) string to uint8 type and back to string

golang string uint8 type-cast

Problem :

You have a variable of type string and you want to convert/type cast it to uint8 type.

Solution….... read more

Golang : How do I convert int to uint8?

golang int uint8 type-cast

Problem :

You have a variable of type int and you want to convert it to type uint8.

Solution :

.... read more

Golang : cannot assign type int to value (type uint8) in range error

golang cannot-assign-type error

Sometimes, we tend to overlook a small part of for--loop just because we use it frequently and expect the compiler….... read more

Golang : Convert uint value to string type

golang convert string type-cast uint64

Problem :

You have an uint value and you want to convert(cast) the value into string.

Solution :

Use….... read more