Don't say much nonsense, please see:
/** * String to hexadecimal String * @param string str ASCII string to be converted * @return string separated by a space between each byte, such as: [6C 6B] */public static string Str2hexstr (String str)
go development on Linux
1.Go Installation Use
1.1 Download Go source package
$ Curl -o './go1.6.3.linux-amd64.tar.gz ' https://storage.googleapis.com/golang/go1.6.3.linux-amd64.tar.gz '
1.2 Unzip the folder to the/usr/local directory
Su Root,
In the program Ape World, the language dispute is an eternal topic, here, I want to say: Let the argument come more violent.
Here, I want to achieve a quick sort in the same way. First, let's briefly review what a quick sort is.
Quick sort:
The
Recently installed a mobile hard disk Ubuntu, and then configure the Java environment, inadvertently put the environment variable /etc/profile in the wrong, but also confidently source/etc/profile There was nothing in the terminal Java, so I was
Package main
Import "FMT"
//about receiver function
type Student struct {
Human
School String
}
Type employer struct {
Human company
string
}
type Human struct {
name string
Age int
phone string
}
//implement Human
1. Install the Windows version of Go,golang China has various versions of the domestic image, download quickly, this site is not bad, can be used as a learning go resources.
Download Go1.7.windows-amd64.msi and then click Next
When the
1.this. $router. Push ()
Description: Jump to a different URL, but this method adds a record back to the history stack, and clicking back returns to the previous page.
Usage:
2.this. $router. Replace ()
Description: Also jumps to the specified
Template Pattern
The template method design pattern allows the different parts of the object to be abstracted, executing the same logic in the same piece of code, and increasing extensibility. In the go language, implementations are implemented by
Strategy Pattern
The policy mode dynamically assembles the algorithm behavior into the object at run time.
We can define algorithms, encapsulate them, and dynamically switch them. Implement
Type Operator interface{
Apply (int,int) int
}
type
ArrayAn array is a value type: The array length must be specified []int is a slice [5]int is an arrayNote: The size of the array is part of the type. therefore [5]int and [25]int are different types. Therefore, the array cannot be resized. slicing
This section focuses on
1) Go install path for goroot How to set Gopath add Gopath/bin directory in Path
2) Gopath directory (here for/home/admin/go) has three folders bin pkg src but generally src is my own creation, the rest is not
If you do not
Recently many friends asked me, I am self-learning crawler, learn to what extent can go to find a job?
This article will talk about my own experience, about reptiles, about the work, for reference only.
What level of learning?
For the moment, target
Why to penetrate the intranet
In general, the external network to access the server, then the server must be bound to a public IP, now can buy the cloud server is the case. For example, a person to set up a server at home, and the external network
Before the use of IS CENTOS7, behind found a lot of small pits, decisive change with Ubuntu continue to learn.
Environment: ubuntu16.04
Install Git
Subsequent installations require GIT-dependent
sudo add-apt-repository Ppa:git-core/ppa
sudo
# # This kit is a project development skeleton that integrates most of the common components, as well as self-made components for rapid development. If you feel helpful, welcome to star## GitHub Address: https://github.com/qeelyn/ Golang-starter-kit
Install Go
Slightly
Install Git
Slightly
VS Code Configuration
1. Install the Go extensionSearch for "Go" in the Vscode extension and select Microsoft Official Ms-vscode.go
2. Install the relevant toolkit
Installation via VscodeThe
Why use the command line
In large projects, there is no data upgrade, if the use of Web services, a lack of security, and a large amount of data will also be out of time. This is the appropriate way to use the command line.
MVC in the command
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