Category:Rust

  • Advantages, disadvantages and application scenarios of NoSQL such as mongodb, HBase and redis

    Time:2021-10-22

    Four categories of NoSQL The position of NoSQL database in the whole database field is self-evident. In the era of big data, although RDBMS is excellent, RDBMS is gradually unable to cope with many database processing tasks in the face of the rapidly growing data scale and increasingly complex data model. At this time, NoSQL […]

  • Rust programming video tutorial (Advanced) – 011_ 2. Custom box

    Time:2021-10-22

    Video address Headline address:https://www.ixigua.com/i677586170644791348…Station B address:https://www.bilibili.com/video/av81202308/ Source address GitHub address:https://github.com/anonymousGiga/learn_rus… Explanation content Custom smart pointer mybox: implement deref trait//+++++++Error code+++++++++++++++++ struct MyBox<T>(T); impl<T> MyBox<T> { fn new(x: T) -> MyBox<T> { MyBox(x) } } fn main() { let x = 5; let y = MyBox::new(x); assert_eq!(5, x); assert_eq!(5, *y); } //+++++++++Correct code++++++++++++++++ //Implement deref train […]

  • [original] comparison between Nim and trust

    Time:2021-10-21

    Comparison of characteristics between Nim and trust At present, these two languages are minority languages. I have done some research for some time, written something and gained some experience Similarities: There is a health macro. It is different from the (unsanitary) macro of C + + Define functions outside the class (struct or object) definition […]

  • Brush the first question of leetcode with rust

    Time:2021-10-21

    problem Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = […]

  • Rust programming video tutorial corresponding explanation content – Test

    Time:2021-10-20

    Video address Headline address:https://www.ixigua.com/i676544267458235648…Station B address:https://www.bilibili.com/video/av78062009?…Netease cloud classroom address:https://study.163.com/course/introduction…. Explanation content 1. Write test #[cfg(test)] mod tests { #[test] fn it_works() { assert_eq!(2 + 2, 4); } } 2. Run test cargo test 3. Using the assert macro std::assert! std::assert_eq! std::assert_ne! rust Video tutorial Trust programming language This work adoptsCC agreement, reprint must indicate the […]

  • Features and basic configuration of trust language

    Time:2021-10-20

    Rust is a system level programming language launched by Mozilla. Its two characteristics are zero overhead abstraction and security.When I was in college, I began to notice the dynamics of the trust language.At that time, I was gnawing at a large c + + book “C + + primer”, and felt that trust targeted the […]

  • Rust programming video tutorial (Advanced) – 012_ 1drop trail introduction

    Time:2021-10-19

    Video address Headline address:https://www.ixigua.com/i677586170644791348…Station B address:https://www.bilibili.com/video/av81202308/ Source address GitHub address:https://github.com/anonymousGiga/learn_rus… Explanation content 1. Drop trait is similar to the destructor in other languages. It executes the code of this function when the value leaves the scope.You can provide the implementation of drop trait for any type (but note that the types here need to be […]

  • [rust] CH15 smart pointers

    Time:2021-10-19

    Pointer, usually a variable containing a memory address. This address usually refers to, or points to, other data. In rust, the most common pointer type is reference, which has been introduced in Chapter 4. References are indicated by the & symbol and borrow values from the data they point to. Compared with the data pointed […]

  • Practice of Alipay mobile terminal dynamic program

    Time:2021-10-18

    The little ant said: Previously shared modular and decoupled development in ant mPaaS depth practice discussion (want to know more about content, welcome to the official account: mPaaS)Alipay has already got a preliminary understanding of the design idea of mobile terminal development framework. This article will lead you to further understand mpaas in combination with […]

  • Rust programming video tutorial (Advanced) – 012_ 2 call drop in advance.

    Time:2021-10-18

    Video address Headline address:https://www.ixigua.com/i677586170644791348…Station B address:https://www.bilibili.com/video/av81202308/ Source address GitHub address:https://github.com/anonymousGiga/learn_rus… Explanation content Discard the value early through STD:: MEM:: drop. When cleaning in advance is required, instead of directly calling the drop method, the STD:: MEM:: drop method is called, for example: struct Dog { name: String, } //The following is a drop trait implementation […]

  • How did the Indian Gang rule Silicon Valley?

    Time:2021-10-17

    Brief comment: as early as the 1980s, Indians had opened up new territories in Silicon Valley. It is no secret that Indians love Silicon Valley. Every year, India’s smartest people try to come to Silicon Valley and bring their families. This is an important reason for making more money, but this is the world innovation […]

  • Rust programming video tutorial (Advanced) – 013 using RC reference counting smart pointer

    Time:2021-10-17

    Video address Headline address:https://www.ixigua.com/i677586170644791348…Station B address:https://www.bilibili.com/video/av81202308/ Source address GitHub address:https://github.com/anonymousGiga/learn_rus… Explanation content 1. Consider needsB and C share the ownership of A. how to realize itExample 1: using box implementation enum List { Cons(i32, Box<List>), Nil, } use crate::List::{Cons, Nil}; fn main() { let a = Cons(5, Box::new(Cons(10, Box::new(Nil)))); let b = Cons(3, Box::new(a)); let […]