上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 494 下一页
摘要: Learn how to create references in Rust using the borrow-operator & and when they are useful. For a more thorough explanation of references and their c 阅读全文
posted @ 2024-02-20 22:29 Zhentiw 阅读(26) 评论(0) 推荐(0)
摘要: Everything in Rust has a type. Even functions that don't seem to return anything. In such and similar cases, we're dealing with a Unit Type. Learn abo 阅读全文
posted @ 2024-02-20 22:15 Zhentiw 阅读(17) 评论(0) 推荐(0)
摘要: fn get_input() -> &'static str { return "..##....... #...#...#.. .#....#..#. ..#.#...#.# .#...##..#. ..#.##..... .#.#.#....# .#........# #.##...#... # 阅读全文
posted @ 2024-02-20 15:42 Zhentiw 阅读(26) 评论(0) 推荐(0)
摘要: Learn how to represent multiple values of different type using a single type by leveraging the power of tuples in Rust. #[allow(warnings)] fn main() { 阅读全文
posted @ 2024-02-20 02:32 Zhentiw 阅读(17) 评论(0) 推荐(0)
摘要: 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 阅读(15) 评论(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 阅读(12) 评论(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 阅读(47) 评论(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 阅读(19) 评论(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 阅读(17) 评论(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 阅读(19) 评论(0) 推荐(0)
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 494 下一页