All Go Rust Python PHP JavaScript
Chrome Dev Summit to secure your spot in workshops, office hours and learning lounges!

How to Check the Version of the Interpreter in Python

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...
ada

How to Set Timeout for http.Get Requests in Go

In Golang, there are 2 ways to set timeout for http.Get requests Using http.Client.Timeout Field Timeout specifies a time limit for requests made by this Client. The timeout includes connection time, any redirects, and reading the response body. S...
Tomoki

How to Read a Whole File into a String Variable in Go

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...
aweis

How to Remove Packages Installed with go get in Go

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...
ada

How To Install Go in Linux

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...
Unused

How to convert string to json in Rust

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...
Patcher56

Hello World in Rust

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...
pooriabt

How To Install Rust in Linux

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...
pooriabt

How to calculate CRC32 checksum in Python

Python Examples of zlib.crc32Cyclic redundancy check A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to digital data. Using zlib.crc32 Function Computes a C...
pooriabt

How to fetch data from url in Python

Fetch Internet Resources Using The urllib Package.Fetching URLs The simplest way to use urllib.request is as follows: #!/usr/bin/env python3 # Import datetime module import urllib.request with urllib.request.urlopen('https://google.com') as respon...
pooriabt

How to get content from a url in Go

Reading from a url resource in Go.Fetching a URL Go provides a collection of packages, grouped under net, that make it easy to send and receive information through the Internet. Package http provides HTTP client and server implementations. packag...
Patcher56

Hello World in Go

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...
Tomoki

How to use the telnet command in Linux

user interface to the TELNET protocol. Telnet is an application protocol used on the Internet or local area network to provide a bidirectional interactive text-oriented communication facility using a virtual terminal connection. User data is interspe...

How to use the curl command in Linux

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 ...

How to use the go mod command line

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 ...