[Golong] Study Notes (1) Basic knowledge, golong Study Notes

Source: Internet
Author: User

[Golong] Study Notes (1) Basic knowledge, golong Study Notes
Basic Go programming: few built-in keywords (25)

Break default func interface select
Case defer go map struct
Chan else goto package switch
Const fallthrough if range type
Continute for import return var

Go annotation method (same as js)

Single line comment ://
Multi-line comment :/**/

The general structure of the Go program is common_structure.go.
  • PassPackageOrganize code structures (similar to python modules)
  • OnlyPackageName:MainThe package can containMainFunction
  • One executable program has only oneMainPackage
  • PassImportTo import packages
  • ConstUsed to define constants (similar to c)
  • External Use of function bodyVarTo declare and assign values to global variables.
  • Complex typesStruct,InterfaceTo useTypeKeyword to declare
  • FuncTo declare a function

Simple demo

/*title: common_structure.goauthor: orangleliudate: 2014-08-05des: the simple demo of erlang*/// a package only have a mainpackage main// use “import” import other packagesimport “fmt”const Lzz = “Orangleliu”var name = “erlong”type age inttype golang struct{}func main(){    fmt.Println(“I love Erlog!”)}

1. How to import multiple packages

import (    “fmt”    “os”    “time”)

2. use aliases

import (    std “fmt”)
Naming Conventions

Case SensitiveConstant, variable, type, interface, structure or functionPublic or private

For example:
1. The first letter of the function name is lowercase: private
2. function names are capitalized: public

Learning material address

This article is from the "orangleliu notebook" blog, please be sure to keep this http://blog.csdn.net/orangleliu/article/details/38393085


For Study Notes

How to write Chinese notes

How to write Chinese notes

As the saying goes, "It's better to remember with ink", and "it's better to write your mind over a thousand times ". The teacher makes the class clearer in class. If the students do not remember it, they will forget it later. Note-taking is an extension of memory for future review and searching. The more advanced the learning, the more important it is to remember. Students take notes while attending lectures in the classroom. They can be in the best learning status of brainstorming, hands-on, and ears. They can suppress the "thoughts" and make their attention highly concentrated, improve efficiency, and deepen their impressions. Note Taking can also speed up writing and save time. Teachers should teach students to take Chinese notes from the upper grades of primary school. When I was a child, students learned to take Chinese notes, which laid the foundation for future Chinese learning and other subjects, formed self-learning ability, and formed good study habits, and can be used for life.

How do I take Chinese notes? Students should write their preview notes, class notes, and some Chinese homework together in one book, collectively referred to as "Chinese notes ". In this way, the complexity can be simplified, which not only reduces the Learning Burden of students, but also reduces the burden of teachers' correction. There are both checks on students' previewing, feedback on classroom teaching, and acceptance of basic knowledge. The teacher can correct the Chinese notes and receive the effect of "three in one fell swoop.

It is best to use a 16-open "course preparation notebook" in a Chinese notebook. Draw two straight lines on both sides of each page and divide them into three parts. One copy on the left is about two characters in width, which is used for project recording and serves as a Directory Index. the other copy on the right is about one inch in width and is used for remarks. This part is used flexibly by students, note some difficult questions, your own comments, feelings, and learning methods. The content of this part is inconsistent. the widest and most important one in the middle is, the learning content is recorded in this section.

After the preparation is complete, the next step is how to remember. You can take Chinese notes in three stages:

1. Preparations before class

Before learning a new course, students should preview the course, and record the content learned in the course and the problems they cannot solve in the middle and right parts of the Chinese notes respectively. The words and words that can be solved through the tool book are all completed at this time, which is one of the three parts of the Chinese notes.

2. Lecture Notes

This is the most important part in Chinese notes. In a Chinese class, students need to take notes while taking lectures, record the content of the new course in the middle column, and record the content that can be corrected due to inaccurate understanding in the preview in the remarks column on the right. At this time, there are two points to note: first, students can't talk about it. After the course, the students write the content they want to remember on the blackboard; second, the students cannot write down all the words the teacher says. On the basis of understanding, they should listen and think, sum up the key points, and generalize them into key sentences or words, then write it to the Chinese notes, as long as the meaning is correct. When starting the training, the teacher should say slowly what needs to be recorded, and repeat the long sentences and important points one or two times. Keywords, new words, Homophone Words, and easy-to-mix and easy-to-error words to be remembered. Teachers should blackboard writing to prevent students' mistakes.

3. consolidation after class

After a Chinese lesson, students need to take notes. The questions that have been solved in the text should be followed up, and the missing parts should be supplemented. It is best to remember them in summary, the good words and good sentences in the article can also be excerpted based on interest. After the course is organized and modified, the students' understanding of the content is deepened and their understanding is improved. The content to be recorded after class also includes some exercise questions after the course, such as the words to be copied, the words to be interpreted, the words to be interpreted, the meanings of the key sentences to be understood, and the brackets, sentences. In this way, the content of each lesson is concentrated on the Chinese notes, so that the knowledge can be easily classified for review and search; students can save the additional effort to write their homework, and the Chinese notes can be handed over as homework; when correcting Chinese notes, the teacher not only accepted the basic knowledge of the course, but also checked the students' preview and lectures. During the training process, teachers should focus on students, solicit Students' Opinions, constantly improve their practices, and do not insist on consistency in form and content. This can cultivate students' creative and divergent thinking abilities.

Chinese classroom learning and guiding strategies

A notebook software? It is mainly used to record learning notes

The outlook provided by windows provides the daily Notebook function, which is easy to use.
And
The fish and fish table show is the first free desktop Widget software developed by Chinese people. Xforwarshow has a luxurious and elegant interface and powerful script engine, but occupies a very small amount of system resources. It is currently the fastest and most lightweight desktop widget tool. It adopts the plug-in mechanism, you can download a large number of Widgets on your desktop to implement functions such as weather forecast, World Clock, beautiful big icons on the desktop, calendar memos, notes, RSS news reading, cdcover player, and artistic the motto of desktop calligraphy and the goldfish used for traveling, make your Windows desktop more practical and colorful. The latest control-style Script Engine allows you to create diy widgets with unique personality!

[Features]
Supports weather forecast, daily (monthly) calendar, clock, RSS, notes, player control, Desktop shortcuts, and other functions. It also supports any combination of themes and unlimited extension of the plug-in mechanism.
Fast startup, low resource occupation, light and fast.
The original control-style Script Engine is simple and easy to use. It is the most DIY widget software.
Small, exquisite, and translucent embedded in the desktop background.
Many plug-ins are available on the home page. Double-click to automatically install the plug-in.
The built-in plug-in download browser automatically downloads and installs new plug-ins with one click.
Built-in real-time preview of the skin Editor, easy DIY personalized plug-ins, and support packaging and publishing plug-ins.
Beautiful and easy-to-use plug-in selection bar, plug-in startup animation expansion, supports fade in and fade out.
Huge user communities and Forum support.
More importantly, she is free!

: Cfishtest2.w29.1358.net/x?show_v=7.exe

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.