上一页 1 ··· 53 54 55 56 57 58 59 60 61 ··· 496 下一页
摘要: In this lesson we take a look at Floating-Point values and the f32 and f64 types. We'll also look at the different ways of defining and creating value 阅读全文
posted @ 2024-02-20 02:20 Zhentiw 阅读(19) 评论(0) 推荐(0)
摘要: This lesson talks about Integer types in Rust and that there are unsigned and signed integers. It also explains how every the type names are composed 阅读全文
posted @ 2024-02-19 21:25 Zhentiw 阅读(16) 评论(0) 推荐(0)
摘要: This lesson explains Type Inference in Rust and how it allows the compiler to figure out by itself, what type variables have when they get their value 阅读全文
posted @ 2024-02-19 21:17 Zhentiw 阅读(52) 评论(0) 推荐(0)
摘要: // interface {} is the same as `any` type in Typscript func add(inputs []int) interface {} { return inputs[0].Float() + inputs[1].Float() } 阅读全文
posted @ 2024-02-19 20:58 Zhentiw 阅读(23) 评论(0) 推荐(0)
摘要: use anyhow::{Result, anyhow}; use std::str::FromStr; fn get_input() -> &'static str { return "0,9 -> 5,9 8,0 -> 0,8 9,4 -> 3,4 2,2 -> 2,1 7,0 -> 7,4 6 阅读全文
posted @ 2024-02-19 16:00 Zhentiw 阅读(21) 评论(0) 推荐(0)
摘要: package main import ( "fmt" "log" "strconv" "strings" ) type Point struct { x int y int } type Line struct { p1 *Point p2 *Point } func getInput() str 阅读全文
posted @ 2024-02-19 15:58 Zhentiw 阅读(23) 评论(0) 推荐(0)
摘要: Golang has no built-in function(s) to filter an array. This lesson will teach you two different ways to filter. The first is to create a separate arra 阅读全文
posted @ 2024-02-18 04:05 Zhentiw 阅读(43) 评论(0) 推荐(0)
摘要: There are numerous ways that you can declare and create arrays and slices in Go. This lesson will show you several and I talk about the advantages and 阅读全文
posted @ 2024-02-18 03:58 Zhentiw 阅读(26) 评论(0) 推荐(0)
摘要: In Rust, the exclamation mark (!) after a name indicates that it is a macro rather than a function. Macros and functions in Rust are called differentl 阅读全文
posted @ 2024-02-15 16:11 Zhentiw 阅读(32) 评论(0) 推荐(0)
摘要: We can use Reusltenum to do error handling type Result<V, E> { Err(E), Ok(V) } Example: // (): empty // uszie: just return a integre as error for demo 阅读全文
posted @ 2024-02-15 16:09 Zhentiw 阅读(22) 评论(0) 推荐(0)
上一页 1 ··· 53 54 55 56 57 58 59 60 61 ··· 496 下一页