In Python, there are 3 ways to check what version of the Interpreter is interpreting my script.
Using sys.version String
A string containing the version number of the Python interpreter plus additional information on the build number and compiler us...
In Golang, there are 3 ways to read a whole file into a string variable.
Using ioutil.ReadFile Function
ReadFile reads the file named by filename and returns the contents. A successful call returns err == nil, not err == EOF. Because ReadFile reads...
In Golang, there are 3 ways to remove packages installed with go get.
Using go mod tidy
go mod tidy ensures that the go.mod file matches the source code in the module. It adds any missing module requirements necessary to build the current module’s p...
In Golang, there are 2 ways to install Go in Linux.Download Packages
Download packages for Windows 64-bit, macOS, Linux, and more.
Go install
Linux
Remove any previous Go installation by deleting the /usr/local/go folder (if it exists), then extr...
In Rust, there are 3 ways to convert string to json.
Using Serde JSON
Serde is a framework for serializing and deserializing Rust data structures efficiently and generically.
Adding dependencies
In Cargo.toml file we’ll add this information.
[de...
In Rust, "Hello World!" is the first basic program.
Build and Run
In our main.rs, add the following code:
// main.rs
fn main() {
println!("Hello,世界,こんにちは,안녕하세요")
}
Hello,世界,こんにちは,안녕하세요
we can run our application by typing:
B...
In Rust, there are two ways to install rust in Linux.Running the following in your terminal
If you’re running macOS, Linux, or another Unix-like OS. To download Rustup and install Rust, run the following in your terminal, then follow the on-screen i...
Hello, World! is the first basic program in any programming language.source code
package main
import "fmt"
func main() {
fmt.Println("Hello,世界,こんにちは,안녕하세요")
}
To run the program
Go is a compiled language. The Go toolchain converts a source pro...
command line tool and library for transferring data with URLs.
cURL (pronounced 'curl') is a computer software project providing a library (libcurl) and command-line tool (curl) for transferring data using various network protocols. The name ...
Go mod provides access to operations on modules.
Initialize new module in current directory. If you plan to publish your module for others to use, the module path must be a location from which Go tools can download your module.
go mod init ...
Remove object files and cached files.
Clean removes object files from package source directories. The go command builds most objects in a temporary directory, so go clean is mainly concerned with object files left by other tools or by manual invocati...
compile packages and dependencies.
Build compiles the packages named by the import paths, along with their dependencies, but it does not install the results.
Build
go build
go build hello.go
ls -lh
1.9M Jun 29 17:38 hello
...
Go is a tool for managing Go source code.
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Go install.
1. Extract the archive you downloaded into /usr/local, creating a Go tree ...
Runs unit tests in a project.
Takes the name of the project, as specified in the projects section of the angular.json workspace configuration file. When a project name is not supplied, it will execute for all projects.
Set up testing
ng...
Builds and serves your app, rebuilding on file changes.
ng serve is a great command to use when developing your application locally. It starts up a local development server, which will serve your application while you are developing it. It is not mea...