Thursday, 10 September 2015

Advanced Go: Maps

A map maps keys to values.
Maps must be created with make (not new) before use; the nil map is empty and cannot be assigned to.


Map literals

Map literals are like struct literals, but the keys are required.


If the top-level type is just a type name, you can omit it from the elements of the literal.



Do like it, if you found it usefull.

Wednesday, 9 September 2015

How to fix: Open or access your modem/router

It is very simple.

Step1: connect with your modem/router through Lan/Wifi(if available)

Step2: open modem url 192.168.1.1 in some rare modem 192.168.0.1

Step3: username = admin, password = admin or check your modem for username and password.

And you are done. So simple Right!! If you reading this and found helpful, Go crazy!!

Do like it, if you found it useful.

Monday, 7 September 2015

How to fix: Slow internet surfing but having great gaming experince

Since past week, I was suffering from slow or almost no internet because i set up NAT setting for ps4 call of duty advanced warefare. (If you are looking for NAT settings go to portforward site).

"Anything worse then no internet is slow internet!!" -- Anon

If above is your case, you just need to disable the NAT settings after gaming and vice verse before starting gaming. Yaa it is bad and painful. But still worth it because we could be a better player with NAT settings. My Multiplayer gameplay 100% improved after NAT setting.

See pic for more clarification..... Just Click the disable button for all and you are done...

Sunday, 6 September 2015

Advanced Go: Range

Range

The range form of the for loop iterates over a slice or map.


Range continued

You can skip the index or value by assigning to _.
If you only want the index, drop the ", value" entirely.



Do like it, if you found it usefull.

Saturday, 5 September 2015

Advanced Go: Slices continued

Adding elements to a slice

It is common to append new elements to a slice, and so Go provides a built-in appendfunction.
func append(s []T, vs ...T) []T
The first parameter s of append is a slice of type T, and the rest are T values to append to the slice.
The resulting value of append is a slice containing all the elements of the original slice plus the provided values.
If the backing array of s is too small to fit all the given values a bigger array will be allocated. The returned slice will point to the newly allocated array.
Do like it, if you found it usefull.