Skip to content

Instantly share code, notes, and snippets.

Avatar
😃
Enjoying work at AIPALETTE & in home. Programming is there as my best friend.

Rishikesh Agrawani hygull

😃
Enjoying work at AIPALETTE & in home. Programming is there as my best friend.
View GitHub Profile
@hygull
hygull / Pointer and memory allocation.go
Created Dec 5, 2016
Pointer and memory allocation created by hygull - https://repl.it/Eg23/0
View Pointer and memory allocation.go
/*
@Date of creation : 05 Dec 2016.
@Aim of program : To allocate storage for data of type int8 using pointer.
@Coded by : Rishikesh Agrawani.
*/
package main
import "fmt"
@hygull
hygull / Golang - 3 different forms of for loop.go
Created Dec 8, 2016
Golang - 3 different forms of for loop created by hygull - https://repl.it/Eifo/9
View Golang - 3 different forms of for loop.go
/*
{ "Date of creation" => "07 Dec 2016 (Started after 06:45 am)" }
{ "Aim of program" => "To use 3 different forms of for loop" }
{ "Coded by" => "Rishikesh Agrawani" }
{ "Go version" => "1.7" }
*/
package main
import "fmt"
@hygull
hygull / main.go
Created Dec 8, 2016
strconv (convert a string to an int) created by hygull - https://repl.it/Eg5v/0
View main.go
/*
@Date of creation : 05 Dec 2016.
@Aim of program : To convert a string of digits to an integer.
@Coded by : Rishikesh Agrawani.
*/
package main
import "fmt"
import "strconv"
@hygull
hygull / main.go
Created Dec 9, 2016
Pointer and memory allocation for an object with new keyword created by hygull - https://repl.it/Eg23/4
View main.go
/*
@Date of creation : 05 Dec 2016.
@Aim of program : To allocate storage for data of type int8 using pointer.
@Coded by : Rishikesh Agrawani.
*/
package main
import "fmt"
func main() {
@hygull
hygull / Marshalling JSON.go
Created Dec 9, 2016
Marshalling JSON created by hygull - https://repl.it/EigQ/3
View Marshalling JSON.go
/*
{ "Date of creation" => "07 Dec 2016 (Started after 09:51 am)" }
{ "Aim of program" => "Marshalling JSON object" }
{ "Coded by" => "Rishikesh Agrawani" }
{ "Go version" => "1.7" }
*/
package main
import "fmt"
@hygull
hygull / Variable number of arguments of any type.go
Created Dec 9, 2016
Variable number of arguments of any type created by hygull - https://repl.it/Eiky/6
View Variable number of arguments of any type.go
package main
import "fmt"
func main() {
showAllParamsOfAnyTypes("Golang",2007,[]string{"Robert Griesemer","Rob Pike",
"Ken ThThompsson"})
showAllParamsOfIntType(12,34,45,67,45) //Passinng 5 parameters
showAllParamsOfIntType(23,45,75) //Passing 3 parameters
@hygull
hygull / Printing system time and its decoration.go
Created Dec 9, 2016
Printing system time and its decoration created by hygull - https://repl.it/Eikz/1
View Printing system time and its decoration.go
/*
* Date of creation : 09/12/2016.
* Aim of program : To print the system time and decorate it.
* Go version : 1.7
* Coded by : Rishikesh Agrawani.
*/
package main
import "fmt"
import "time"
@hygull
hygull / main.go
Created Dec 9, 2016
operator precedence created by hygull - https://repl.it/Eg5w/4
View main.go
/*
@Date of creation : 06 Dec 2016.
@Aim of program : Checking operator precedence.
@Coded by : Rishikesh Agrawani.
*/
package main
import "fmt"
func main(){
@hygull
hygull / To display a table from 1 to 10 in tabular form.go
Created Dec 10, 2016
To display a table from 1 to 10 in tabular form created by hygull - https://repl.it/EmVN/4
View To display a table from 1 to 10 in tabular form.go
/*
Date of creation : 10/12/2016.
Aim of program : To display a table from 1 to 10.
Coded by : Rishikesh Agrawani.
*/
package main
import "fmt"
func main() {
//In Go i++ is a statement not an expression like in C, so we can't use it in any expression or function call argument
@hygull
hygull / Prime numbers, displaying primes(1-100) in tabular form.go
Created Dec 10, 2016
Prime numbers, displaying primes(1-100) in tabular form created by hygull - https://repl.it/EmWQ/10
View Prime numbers, displaying primes(1-100) in tabular form.go
/*
Date of creation : 10/12/2016.
Aim of program : To display primes(between 1-100) in tabular form.
Coded by : Rishikesh Agrawani.
*/
package main
import "fmt"
func main() {
//We know 1 is not prime but here our intention is tabluar form so that is why I am executing for from 1 to onwards.
You can’t perform that action at this time.