ARTS Check in for the first week and try out ARTS for the first time

Preface

Anyone who knows Shopkeeper 3 must know that I have been creating technical blogs for 6 years, and regularly publish no less than 6 blog posts every month. At the same time, as a developer who loves sharing, activities like ARTS are naturally indispensable to me. Since I plan to share them together, I have done local document recording before, so I can just integrate the content, and then I will start my first week check-in.

What is ARTS?

ARTS actually consists of four parts: Algorithm, an algorithm question; Review, read an English article; Technique/Tips, share a small technique; Share, share an opinion.

Ever since I learned that Uncle Mouse explained the meaning of ARTS, I very much agree with his model and am very grateful to him for creating this learning method. I think these four parts are very simple to practice, but there are also difficulties. For example, algorithm questions test your thinking, and English articles require a certain level of English, etc., but I think I want to become a qualified program developer. , you need to learn to grow in difficulties and keep a learning attitude!

Algorithm

The algorithm question shared this week is LeetCode’s classic algorithm question: the problem of buying a hundred chickens for a hundred dollars.

Question description

In the fifth century AD, the ancient Chinese mathematician Zhang Qiujian proposed the "Hundred Chicken Problem" in his book "Suan Jing": one chicken is worth five, one hen is worth three, and three chicks are worth one. If you buy a hundred chickens for a hundred dollars, how much do the chickens, mothers, and chicks cost? 

You are now asked to print out all the ways to buy 100 chickens for 100 yuan.

Enter description:

Enter any integer to run the program.

Output description:

 The output has several lines, each line has three integers, representing the number of chickens, hens, and chicks respectively.

Specific implementation code:

public class Main {
    public static void main(String[] args) {
        //公鸡5块 母鸡3块 小鸡3个1块  100块各买几只
        for (int i = 0; i <= 20; i++) {//公鸡
            for (int j = 0; j <= 33; j++) { //母鸡
                int small = 100 - i - j;
                if ((small % 3 == 0) && i * 5 + j * 3 + small / 3 == 100) {
                    System.out.println(i + " " + j + " " + small);
                }
            }
        }
    }
}

summary:

Essentially, it is to solve the equation and satisfy the constraints 5x+3y+z/3 =100 and x+y+z=100; the implicit condition is that z must be a multiple of 3, so x=4z/3 -100; y= 200-7z/3; You only need to traverse z, add 3 to z each time, and find x and y that meet the condition (00). There is no need to determine whether it is an integer, because z is a multiple of 3, so x and y must also be integers.

Review

I have been studying articles about Web 3 recently. Let me share some articles related to Web 3. The title is: The Architecture of a Web 3.0 application. The specific article link is: The Architecture of a Web 3.0 application.

It took less than a day to translate and understand this article. This article mainly explains the architecture of Web 3 applications, using Medium as an example to explain how to use Web 3 to implement a simple blog website. And through specific implementation steps, combined with terminology and principles, beginners can further understand the development of Web 3 applications. Let’s share an excerpt from the article:

For instance, Hardhat is a developer framework that makes it easier for Ethereum developers to build, deploy, and test their smart contracts. Hardhat offers the “Hardhat Network,” which developers can use to deploy their smart contracts onto a local network — without having to deal with live environments. Better yet, it offers a great plugin ecosystem that makes developers’ lives much easier. Hardhat also provides console.log() functionality, similar to javascript, for debugging purposes.

For example, Hardhat is a developer framework that makes it easier for Ethereum developers to build, deploy, and test their smart contracts. Hardhat provides the “Hardhat Network” that developers can use to deploy smart contracts onto a local network without having to deal with a live environment. Even better, it offers a great plugin ecosystem to make developers' lives easier.

Hardhat also provides console.log() function, similar to javascript, for debugging purposes.

Technique/Tips

Since the author is in the field of front-end development, I will first share a few tips used in front-end development. First, let’s learn about the Gaussian glass effect (commonly known as the frosted glass effect). The Gaussian blur effect is a common effect. In the front-end development process (including WeChat applet development), setting the Gaussian blur effect mainly uses the filter and background attributes directly in CSS. This effect can be achieved.

The Gaussian blur effect is achieved by directly using filter settings in CSS. In fact, filter is a kind of "fake blur" because one layer is required for the background and the filter attribute is used to achieve the blur effect. Another layer (needs to be set above the background layer) A translucent background color, and the two can be used in combination to achieve a blur effect. Specific examples are as follows:

.matter-view {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #000;
    opacity: 0.6;
    filter: alpha(opacity=60); //设置filter属性

}

The following is the implementation effect:

Share

Since artificial intelligence has become quite popular in recent times, let me share my personal views. Take AI painting as an example and see that there is almost no difference between the bloggers created by AI painting and real bloggers. On the contrary, they are better than some excessively photoshopped pictures. The photos are more real and natural, which is shocking. When AIGC first came out, it claimed to be able to "lay off" painters and designers. However, judging from the current situation, painters and designers have not been laid off by AI. Instead of painting, some anchors who are the same are "laid off" first. For example, there are too many similar mass-produced anchors on the short video platform. Almost most of the same type are the same. When viewers watch videos, they encounter this kind of sameness. Basically, a video will not last more than 3 seconds. The anchors launched through AI painting can completely replace this kind of mass-produced real-person anchors, which also puts a lot of pressure on these real-person anchors.

Furthermore, if AI is allowed to not only create a virtual anchor, but also take over the virtual anchor's message reply function, then in the future, judging whether the picture is generated by IA can only rely on the "three-legged" passers-by in the background. We are still in the rising stage of AI development, and there is still a lot of room for improvement. However, the author believes that one day in the future, AI will definitely be able to figure out how to draw people. At that time, the distinction between real people and AI may really depend on fate. .

at last

Having written this, this content sharing is basically coming to an end. Generally speaking, use a week's spare time to study these four things respectively, and then make a summary at the end of the week. This is a very good way, and it can also Help yourself develop correct learning habits, especially to help developers who are new to the workplace establish a correct outlook on learning. After completing the four things one by one, you can gradually improve your programming thinking, and you can also allow yourself to continue to progress and grow subtly! Let’s see you next week!

Guess you like

Origin blog.csdn.net/CC1991_/article/details/132861459