[26] Results

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 : Output or print out JSON stream/encoded data

golang json-stream write-to-responsewriter content-type

Problem :

You need to produce JSON stream or JSON encoded data to web browser or client. How to do….... read more

Chrome : ERR_INSECURE_RESPONSE and allow Chrome browser to load insecure content

chrome insecure-content javascript-console

There are times when you try to access some web pages such as pages with SSL/https/secured/encrypted pages but with 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

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 to tell if a file is compressed either gzip or zip ?

golang detect-file-content zip unzip

Sometimes it is good to check if a file is really in compressed form or not by examining the actual….... 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