It is a quite common need to constrain struct generic field to certain types in Rust. We usually have two different ways to implement this. Trait or dispatching each of them by ourselves.
Measuring function time is quite necessary sometimes. It is easy to implement this in other languages but not in Rust. Therefore, this post will demonstrate some tricks to measure the function execution time.
This posts comes from the real project scenario. Later, I surprisedly find there is one problem in Leetcode. Personally I not a fan of solving Leetcode problems. Let's write a post here since they provide detailed descriptions.
This post can explain and show you how to combine io.TeeReader() and io.Pipe together in Golang. You can easily use bytes.Buffer with io.TeeReader() easily according to the official documents in here.
TThis comes from the main exercise of exercism in rust. I asked some friends from a small Rust community and I got these elegant codes. These codes are so beautiful and tricky. So I decide to write it down and hope it may be useful for you as well.
This comes from the side exercise of exercism in rust. Mentor `gaetanww` helped me a lot on code refactoring and logical improvements advice with great patience and careful instruction. He even changed my attitude towards work and researching. I have nothing else to say to express my thanks to my mentor.
This post only shows the correct source code which solving 0/1 knapsack prolem.
This is the template showing how to combine Java and Kotlin into gradle file.
We all know that what discord is and what it does. Okay, if you don’t know what it is, just skip this post.
The theme of blog, which is next-geek, almost has been done. My only one purpose of doing this is to show off.
This is a post description for meta purposes. This is also the excerpt of the article that shows up on the index/home page. Change this in the post YAML.