Logo Ismael's Blog
Logo Inverted Logo
  • Posts
  • ChatGPT
  • Golang
    • Slice
Hero Image
ChatGPT

ChatGPT is a chatbot built using the GPT-3 language model from OpenAI. It is designed to be able to chat with users in a natural and conversational way, allowing them to have an engaging and interactive experience. Some key points about chatGPT are : chatGPT uses the latest in natural language processing technology to understand and respond to user input in a way that feels natural and conversational. chatGPT is trained on a vast amount of data, including books, articles, and conversations, which allows it to have a wide range of knowledge and be able to discuss many different topics.

December 15, 2022 Read
Hero Image
Slice

Difference between slices and arrays Arrays, after declared of some size, cannot be resized, but slices can be resized. Slices are reference-types while arrays are value-type. An example : func testArray(x [2]int) { fmt.Printf("func Array : %p, %v\n", &x, x) } func main() { arrayA := [2]int{100, 200} var arrayB [2]int arrayB = arrayA fmt.Printf("ArrayA : %p, %v\n", &arrayA, arrayA) fmt.Printf("ArrayB : %p, %v\n", &arrayB, arrayB) testArray(arrayA) } ArrayA : 0xc0000200c0, [100 200] ArrayB : 0xc0000200d0, [100 200] func Array : 0xc000020110, [100 200] The three memory addresses (0xc0000200c0,0xc0000200d0,0xc000020110) are all different, which verifies that array assignment and function parameter transfer in Go are all copied by value.

June 8, 2020 Read
Navigation
  • About
  • Skills
  • Experiences
  • Projects
  • Achievements
Contact me:
  • 3500305858@qq.com
  • +8618546598861

Toha Theme Logo Toha
© 2023 Copyright. Cloud Architect
Powered by Hugo Logo