返回首页

ARTS #005

ARTS #005

ARTS is an activity initiated by 由左耳朵耗子--陈皓: Do at least one leetcode algorithm question every week, read and comment on at least one English technical article, learn at least one technical skill, and share an article with opinions and thoughts. (That is, Algorithm, Review, Tip, and Share are referred to as ARTS) and persist for at least one year.

ARTS 005

This is the fifth article. It is relatively poorly written. I hope it will get better and better in the future.

Algorihm algorithm question

leetcode algorithm question 481 Magical String (magic string) Difficulty: Moderate

A magical string S consists of only '1' and '2' and obeys the following rules:
The string S is magical because concatenating the number of contiguous occurrences of characters '1' and '2' generates the string S itself.
The first few elements of string S is the following: S = "1221121221221121122……"
If we group the consecutive '1's and '2's in S, it will be:
1 22 11 2 1 22 1 22 11 2 11 22 ......
and the occurrences of '1's or '2's in each group are:
1 2	2 1 1 2 1 2 2 1 2 2 ......
You can see that the occurrence sequence above is the S itself.
Given an integer N as input, return the number of '1's in the first N number in the magical string S.
Note: N will not exceed 100,000.
Example 1:
Input: 6
Output: 3
Explanation: The first 6 elements of magical string S is "12211" and it contains three 1's, so return 3.

神奇的字符串 S 只包含 '1' 和 '2',并遵守以下规则:
字符串 S 是神奇的,因为串联字符 '1' 和 '2' 的连续出现次数会生成字符串 S 本身。
字符串 S 的前几个元素如下:S = “1221121221221121122 ......”
如果我们将 S 中连续的 1 和 2 进行分组,它将变成:
1 22 11 2 1 22 1 22 11 2 11 22 ......
并且每个组中 '1' 或 '2' 的出现次数分别是:
1 2 2 1 1 2 1 2 2 1 2 2 ......
你可以看到上面的出现次数就是 S 本身。
给定一个整数 N 作为输入,返回神奇字符串 S 中前 N 个数字中的 '1' 的数目。
注意:N 不会超过 100,000。
示例:
输入:6
输出:3
解释:神奇字符串 S 的前 6 个元素是 “12211”,它包含三个 1,因此返回 3

Problem-solving ideas:

The difficulty of this question is actually how to generate Magical String. To put it simply, it is to find the rule. This rule is what is mentioned in the question. The number of occurrences of 1 or 2 is known, so we can directly generate a string of specified length.

int magicalString(int n) {
     int* result = (int*)malloc(sizeof(int) * (n+ 3));
    result[0] = 1;
    result[1] = 2;
    result[2] = 2;

    int pre =2;//当前已经生成的下标下一个
    int nextIndex = 2;//当前数组最后一位的下标
    int one_count = 1;
    
    for(;;pre++){
        int count = result[pre];
          int num = 3 - result[nextIndex];
          if(num == 1)
              one_count +=count;
        if(count ==1){
            result[++nextIndex] = num;
        }else {
            result[++nextIndex] = num;
            result[++nextIndex] = num;
        }
        if (nextIndex>=n) {
            int count =  nextIndex - n;
            for (; count >=0; count--) {
                int num11 = result[n+count];
                if (num11==1) {
                    one_count--;
                }
            }
            break;
        }
    }
    return one_count;
}

This can also be written like this

int magicalString(int n) {
    if(n==0)
    return 0;
    if(n<4)
    return 1;
    int* result = (int*)malloc(sizeof(int) * (n+ 3));
    result[0] = 1;
    result[1] = 2;
    result[2] = 2;
    
    int pre =2;//当前已经生成的下标下一个
    int nextIndex = 2;//当前数组最后一位的下标
    int one_count = 1;
    
    for(;nextIndex<n;pre++){
        int count = result[pre];
        int num = 3 - result[nextIndex];
        
        if(count ==1){
            result[++nextIndex] = num;
        }else {
            result[++nextIndex] = num;
            result[++nextIndex] = num;
        }
        
    }
    
    for (int i = 2;  i < n; i++) {
        if (result[i] == 1) {
            one_count++;
        }
    }
    return one_count;
}

The running time in LeetCode is 4.5ms. The following code is the code submitted in LeetCode with a running time of 0ms:


int magicalString(int n) {
    if (n < 2) return n;
    int r = 0;
    char* s = malloc(n);
    s[0] = 1, s[1] = 2;
    char* c = s;
    int v = 1;
    for (int i = 0; i < n; ) {
        int m = *c++;
        for (; i < n && m; --m) {
            s[i++] = v;
            r += v == 1;
        }
        v ^= 3;
    }
    free(s);
    return r;
}

Review

This article comes from: https://medium.com/s/story/how-do-we-stop-technology-addiction-c0c081b8c970

How Do We Stop Technology Addiction? (How do we stop technology addiction)

(A guide to getting back the time our devices take from us, A guide to getting back the time our devices take from us)

You’re addicted to your smartphone. I’m addicted to my smartphone. The products and services we use on a daily basis have been designed to steal our attention and are continuously modified to become more addictive. You are addicted to your smartphone. I’m addicted to my smartphone. The products and services we use every day are designed to capture our attention and are constantly modified to make them more addictive.

In many ways, attention is the lifeblood of modern business. For massive tech companies like Google, Facebook, Amazon, Netflix, and many others, there is a direct correlation between attention and growth/revenue/success. In many ways, attention is the lifeblood of modern business. For many big tech companies like Google, Facebook, Amazon, Netflix, etc., there is a direct correlation between attention and growth/revenue/success.

The recent evolution of technology raises many ethical and psychological questions. Are we being manipulated? Should we have more control? Do we truly understand the negative impacts of technology addiction? Recent technological developments have raised many ethical and psychological questions. Are we being manipulated? Should we have more control? Do we really understand the negative effects of technology addiction?

A Recipe for Addiction

Adam Alter, author of Irresistible: The Rise of Addictive Technology and the Business of Keeping Us Hooked, emphasizes the fact that human beings have been susceptible to behavioral addiction throughout history (long before smartphones). However, the technologies that have emerged over the past decade have drastically amplified these tendencies. Adam Alter, author of “Irresistible Temptation: Addictive Technology and the Rise of the Commerce that Keeps Us Addicted,” highlights the fact that humans have been susceptible to behavioral addictions throughout history (long before smartphones). However, technologies that have emerged over the past decade have greatly amplified these trends.

Our addictions cause us to miss out on so many moments that we will never have the opportunity to relive. Our addiction causes us to miss out on many moments that we will never have the opportunity to relive.

After reading this book, it’s evident that our addiction to modern technology boils down to some key elements that feed off one another: After reading this book, it is clear that our dependence on modern technology comes down to a few key interrelated factors:1. Variable Rewards Each time you visit Facebook, you may have five notifications, you may have none. Your recent photo may have 12 Likes, it may have 270. This variable reward system is captivating for obvious reasons and always keeps users coming back for more. It’s a slot machine. Every reward is unique. The feedback you receive from any given post updates in real-time and changes every minute. This gambling mentality is difficult to resist and makes us feel the need to return frequently. Every time you visit Facebook, you might have five notifications, you might not. Your most recent photo might have 12 likes, it might have 270. This variable reward system is fascinating for obvious reasons and always keeps users coming back for more. This is a slot machine. Every reward is unique. The feedback you receive from any given post updates in real time and changes every minute. This gambling mentality is overwhelming and leaves us feeling the need to keep coming back.

  1. Distraction Entertainment Boredom is our worst enemy, so we will do anything to avoid it — even if it’s something that make us less happy. In Alter’s book, he references a fascinating experiment from 2014 in which people actually preferred to shock (shake, shake) themselves than sit alone with their thoughts for 20 minutes. Many of us would prefer chaos over predictability in our daily lives, and social media reinforces this notion because it’s a feedback loop that becomes more arresting the more we use it. Boredom is our worst enemy, so we’ll do anything to avoid it - even if it’s something that makes us less happy. In Alter’s book, he cites a fascinating 2014 experiment in which people actually preferred shaking themselves to thinking alone for 20 minutes. Many of us prefer chaos to predictability in our daily lives, and social media reinforces this concept because it’s a feedback loop that becomes more noticeable the more we use it.

  2. Stopping Cues In 2012, Netflix officially launched the binge-watching revolution with the rollout of auto-play across its entire platform. Soon enough, Facebook and YouTube adopted the same feature. This, of course, has led to a skyrocketing increase in video usage since then. On top of that, infinite(limitless or endless in space, extent, or size) scrolling has also become a mainstream design element in social media. The content never stops, which is how five minutes turns into 30 minutes — without the user even realizing it. In 2012, Netflix launched the autoplay function across its entire platform, officially launching a “drama-watching revolution.” Soon, Facebook and YouTube adopted the same feature. Of course, this led to a dramatic increase in video usage from that point on. On top of that, infinite scroll has also become a mainstream design element in social media. The content never stops, which is why 5 minutes turns into 30 minutes - without the user even realizing it (without the user even realizing it).

  3. Vanity Metrics Vanity Metrics In our culture, people are consumed by the constant pursuit of arbitrary numerical goals as a result of real-time feedback. You just ran ten miles. Walked 10,000 steps. Your post got 100 shares. You received your 1,000th follower. You surpassed all of your friends for the longest Snapstreak (the worst of all). These “micro-victories” don’t mean anything, but they provide us with a dopamine hit each time, and their increasing frequency drives us to spend more time and strive to hit new trivial goals on a regular basis. In our culture, people are consumed by the constant pursuit of arbitrary numerical goals because of real-time feedback. You ran ten miles. Walked 10,000 steps. Your post has been shared 100 times. You received your 1000th follower. You surpassed all your friends and got the longest Snapstreak (the worst one ever). These “micro-wins” don’t mean much, but they provide us with dopamine every time, and their increasing frequency motivates us to spend more time and strive to reach new trivial goals on a regular basis.

The recipe for addiction is potent, and the scariest part is that these various factors cause people to avoid face-to-face interactions, spend less time with family and friends, and even risk their lives. Our addictions cause us to miss out on so many moments that we will never have the opportunity to live. The methods of addiction are effective, and the scariest part is that these factors cause people to avoid face-to-face interactions, spend less time with family and friends, and even risk their lives. Our addiction causes us to miss out on many moments that we will never have the opportunity to relive.

Alter’s 2017 TED Talk “Why Our Screens Make Us Less Happy” is an excellent synopsis of these issues and well worth your time. Alter’s 2017 TED Talk “Why Our Screens Make Us Less Happy” is an excellent overview of these issues and well worth your time (go check it out)#### Self-AwarenessSelf-awareness Most people simply don’t understand how much time they spend on their devices, and Irresistible explores many of the alarming ways that technology has invaded our lives over the past decade. Our lack of self-awareness is one of the most troubling; trouble) signs of this epidemic (epidemic; rapid spread). Most people have no idea how much time they spend on their devices, and Irresistible explores the many worrying ways technology has invaded our lives over the past decade. Our lack of self-awareness is one of the most disturbing signs of this pandemic.

I realize that I’m dependent on these companies to make a living, but one of the main reasons for my concern (care; concern) is because their advertising platforms work. I realize I depend on these companies for my livelihood, but one of the main reasons I’m concerned is that their advertising platforms work

A few years ago, designer/developer Kevin Holesh created an eye-opening app called Moment that allows people to track their day-to-day screen time and smartphone habits. Across the board, the results are consistent: people severely underestimate their time spent on mobile devices. A few years ago, designer/developer Kevin Holesh created an eye-opening app called Moment that allowed people to track their daily screen time and smartphone habits. Overall, the results are consistent: People significantly underestimate how much time they spend on their mobile devices.

On average, we check our phones every six minutes, 150 times a day. Even when your smartphone is turned off, its presence alone has been proven to reduce your cognitive capacity. And in less than two decades, our face-to-face time with friends and family has decreased by nearly 30 percent. On average, we check our phones every six minutes, 150 times a day. Even if your smartphone is turned off, its presence can slow down your cognitive abilities. In less than 20 years, our face-to-face time with friends and family has decreased by nearly 30%.

Source: USC Annenberg Center for the Digital Future

There’s no denying that we’re enamored by technology for obvious reasons, but the concern is that we don’t understand the consequences of our behavior. In fact, many smartphone users are in denial about the level of distraction caused by our devices. There’s no denying that we’re obsessed with technology for obvious reasons, but what we worry about is that we don’t understand the consequences of our actions. In fact, many smartphone users deny the distractions our devices cause.

James Williams, a former Google employee and advocate for ethical design, believes social networks inhibit our ability to think clearly and ultimately affect us like a drug. The attention economy revolves around designed for addiction, so he believes that it “privileges our impulses over our intentions.” James Williams, a former Google employee and ethical design advocate, believes social networks inhibit our ability to think clearly and ultimately affect us like drugs. The attention economy is designed around addiction, so he believes it “prioritizes our impulses over our intentions.”

To be honest, I personally feel as though(feel as though feel, as if ) I’m not helping the problem. For nearly a decade, I’ve been managing large-scale Facebook advertising and Google AdWords campaigns across a wide variety of industries. And the recent shift to (shift to) mobile (i.e. addiction) has been massive on both channels.

To be honest, I personally feel as though I’m not helping the problem. I’ve been managing large-scale advertising on Facebook and Google AdWords ads for nearly a decade, across a variety of industries. The recent shift toward mobile (i.e., addiction) is evident in both channels.

The irony is not lost on me. I realize that I’m dependent on these companies to make a living, but one of the main reasons for my concern is because their advertising platforms work. Really well. Some might say scary well. The irony is not lost on me. I realize I depend on these companies for my livelihood, but one of the main reasons I’m concerned is because their advertising platforms work. Really good. Some might say scary.

This is the reason why they own the digital advertising industry. Savvy advertisers all around the world drive billions of billions of dollars in revenue targeting users on social and search, and the data that Facebook and Google have at their disposal will only become more powerful over time. That’s why they own the digital advertising industry. Savvy advertisers around the world are generating billions of dollars in revenue from users across social and search, and the data Facebook and Google have will only become more powerful over time.#### The Facebook Problem(s) On the surface, Facebook is the most obvious offender of catering to people’s addictive and primitive tendencies. Even the company’s former president Sean Parker recently stated that Facebook’s initial objective was to “consume as much of your time and conscious attention as possible.” On the surface, Facebook is the most obvious offender in catering to people’s addictive and primal tendencies. Even the company’s former president, Sean Parker, recently said that Facebook’s original goal was to “consume as much of your time and conscious attention as possible.”

People don’t trust Facebook. And there has been a lot of momentum behind the fact that social media can negatively affect your emotional well-being. In response, Facebook vowed to make changes to the product after finally admitting that content on its platform can make people “feel worse” after leaving the site. The latest News Feed update, however, is only the beginning. People don’t trust Facebook. Social media can have a negative impact on your emotional health, so there’s a lot of motivation behind it. In response, Facebook vowed to make product changes after finally admitting that content on its platform can make people “feel worse” after leaving the site. However, the latest News Feed update is just the beginning.

Roger McNamee, a successful venture capitalist and former mentor to Mark Zuckerberg, believes that major changes to the business have to occur before users notice a difference. His opinion is that nothing will improve with Facebook or Google “unless they abandon their current advertising models.” Roger McNamee, a successful venture capitalist and former mentor to Mark Zuckerberg, believes that significant changes must be made to the business before users will notice a difference. His point is that neither Facebook or Google can improve unless they abandon their current advertising model.

McNamee and many others agree that Facebook in particular has a responsibility to fix the problem. And let’s be honest… they’ve got a few of them. But it’s clear that fake news is bane of their existence right now. McNamee and many others agree that Facebook has a particular responsibility to address the issue. To be honest…they have some. But it’s clear that fake news is the bane of their existence right now.

In 2016, Zuckerberg famously denied the idea that fake news could become prevalent on the platform. Former President Barack Obama even warned them about this matter before Donald Trump’s election, but they didn’t listen and the rest is history. Now we’re facing a situation where users will only become more susceptible to manipulation and falsehoods as they spend more time on the world’s largest social network. In 2016, Zuckerberg dismissed the idea that fake news could become popular on the platform. Former President Barack Obama even warned them about it before Donald Trump was elected, but they didn’t listen and the rest is history. Now we are faced with a situation where users are simply spending more time on the world’s largest social network and are therefore more susceptible to manipulation and disinformation.

John Battelle, CEO of NewCo, has some interesting ideas about how Facebook could proceed, but argues that federal regulation for Silicon Valley is a must. And some lawmakers are outraged at the lack of regulation to date. Facebook has no issue changing its platform on a regular basis (for users and advertisers alike), but it might be time to start considering a serious shift in the way it extracts revenue from attention. As it stands now, any form of engaging content equals profit whether it’s positive, negative, or simply false. NewCo CEO John Battelle has some interesting thoughts on how Facebook could proceed, but thinks federal regulation of Silicon Valley is a must. And some lawmakers are angry about the lack of regulation so far. Facebook doesn’t have a problem with regularly changing its platform (for users and advertisers alike), but it might be time to start thinking about serious shifts in the way it extracts revenue from its attention. As it stands, engaging content of any kind equals profit, whether positive, negative, or fake.

Devices and Children

We can critique social media, apps and games all day, but it’s important to note that the root of the problem began with the release of the iPhone in 2007. Since then, nothing has been the same. We can criticize social media, apps, and games all day long, but it’s important to note that the roots of the problem began with the release of the iPhone in 2007. Since then, nothing has been the same.

By all accounts, Apple’s marquee product is a phenomenal invention that has changed lives and revolutionized industries, but the addictive nature of the device (and smartphones in general) is clear as day. And unfortunately we still don’t understand the long-term impact on children who have grown up with them, and whose parents don’t know any better. By all accounts, Apple’s signature product was an amazing invention that changed lives and revolutionized industries, but the addictive nature of the device (and smartphones in general) has become increasingly apparent. Unfortunately, we still don’t understand the impact that growing up has on children whose parents don’t understand it.

I’m also fearful that the manipulative tactics and addictive behavior are only increasing in magnitude with each generation. I also worry that manipulative tactics and addictive behaviors will only increase with each generation.Recently, two major Apple investors voiced their concerns about smartphone addiction in an open letter to the Cupertino-based company. This is a major step is the right direction because young children are spending more time with devices every day. The numbers are alarming: Recently, two major Apple investors expressed their concerns about smartphone addiction in an open letter to the Cupertino company. This is an important step in the right direction as young children spend more time on devices every day. The numbers are staggering:

  1. A whopping (up to) 40 percent of children ages 0–8 have their own iPad.
  2. The average time spent on mobile devices each day for ages 0–8 increased by 860 percent (from five to 48 minutes) between 2011 and 2017.
  3. On average, children under the age of 18 pull out their devices nearly twice as often as adults. On average, children under the age of 18 pull out their devices nearly twice as often as adults.

Smartphone addiction is also contributing to relationship troubles and unhappiness across younger generations. Smartphone addiction is also contributing to relationship troubles and unhappiness among the younger generation.

At the end of 2017, Facebook added insult to injury by releasing an app for young children ages six to 12 called Messenger Kids, which has already stirred up a great deal of controversy. As a parent, there are many reasons to be concerned. So what do we do now? In late 2017, Facebook insulted people by releasing an app for toddlers aged 6 to 12 called Messenger Kids, which sparked a lot of controversy. As a parent, there are many reasons to be concerned. So what do we do now? In late 2017, Facebook made matters worse when it launched an app called Messenger Kids for children aged 6 to 12 years old. The app has sparked plenty of controversy. As a parent, there are many reasons to be concerned. So what should we do now?

Time Well Spent Happy Hour is a good use of time

Tristan Harris, another former Google employee and expert on technology addiction, has been at the forefront of this conversation for the past few years. His plea is for Silicon Valley companies to take a more thoughtful approach to design and alter the way they develop their products and business models. Tristan Harris is another former Googler and technology addiction expert who has been at the forefront of this conversation over the past few years. His plea was for Silicon Valley companies to take a more thoughtful approach to designing and changing the way they develop products and business models.

In a practice that Harris calls a “race to the bottom of the brain stem,” tech firms continue to borrow tactics from one another aimed at making us more addicted: auto-play videos (Netflix, YouTube, Facebook), photo-tagging (Facebook, Google, Instagram), the ‘Like’ button (Facebook, then everyone else), push notifications (everyone). The list goes on. In what Harris calls the “race for the bottom of the brain,” tech companies continue to piggyback on each other’s tactics aimed at making us more addicted: autoplaying videos (Netflix, YouTube, Facebook), photo tagging (Facebook, Google, Instagram), “like” buttons (Facebook, then everyone else), push notifications (everyone). The list goes on.

In another fantastic TED Talk, he explains how this prioritization of attention is simply another way of manipulating users for financial gain. In another fantastic TED talk, he explains how this prioritization of attention is another way to manipulate users for financial gain.

Harris, along with a handful of other ex-Silicon Valley employees, recently launched an inspiring project called the Center for Humane Technology. The idea is to build a dedicated community of former tech insiders who are working to fix the “digital attention crisis” and create a new model. Harris and a handful of other former Silicon Valley employees recently launched an inspiring project called the Center for Humanities Technology. The idea is to build a dedicated community of former tech insiders who are working to solve the “digital attention crisis” and create new models.

What began as a small movement known as “Time Well Spent” has exploded into a national conversation, with Harris leading the charge. The challenge that lies ahead is not a small one. But given the current pace of technology, I would argue that we don’t have any other choice. What started as a small movement called “Time Well Spent” has exploded into a national conversation, with Harris leading the charge. The challenges ahead are no small problem. But given the current pace of technology, I don’t think we have any other options.

Taking Control

It’s easy to be overly negative, but I certainly don’t want to downplay the importance of technology and the opportunities it presents us. My entire career has revolved around advancements in tech and I’m grateful for that. However, I’m also fearful that the manipulative tactics and addictive behavior are only increasing in magnitude with each generation. It’s easy to be too negative, but I certainly don’t want to downplay the importance of technology and the opportunities it brings us. My entire career has revolved around advancements in technology, and I’m grateful for that. However, I also worry that manipulative tactics and addictive behaviors will only increase with each generation.As parents of a two-year-old and two-month-old, my wife and I have been intentional about discussing technology usage and ensuring that any screen time feels like a social — not isolated — activity. But we are not perfect. Occasionally I am guilty of using my phone instead of simply being with my children in the moment, which makes me feel terrible because every minute is so precious. I know I can do better. As parents of a two-year-old and 2-month-old, my wife and I have always been intentional about discussing technology use and making sure any screen time feels like a social activity—not an isolating one. But we are not perfect. I am occasionally guilty of using my phone instead of just being with my kids, which makes me feel terrible because every minute is so precious. I know I can do better.

Being mindful and present goes a long way, but these tech companies aren’t making it any easier on us. Putting a child in front of a screen is one of the easiest, quickest ways to make him or her seem “happier” in the short term. Unfortunately, that’s not the case. There is ample evidence to support the fact that extensive screen time is damaging young children. And while removing screens entirely is practically impossible, we have to remain aware of the fact that isolating children with screens is harmful to their development. The starting point is to acknowledge addiction and recognize that children are more vulnerable than anyone. Attention and presence last long, but these tech companies aren’t making it easier for us. Putting your child in front of a screen is one of the easiest and quickest ways to make him or her appear “happier” in the short term. Unfortunately, this is not the case. There is good evidence to support the fact that a lot of screen time can harm young children. While completely eliminating screens is nearly impossible, we must realize that isolating children with screens is harmful to their development. The starting point is acknowledging addiction and recognizing that children are more vulnerable than anyone else.

Silicon Valley, meanwhile, needs to harness its power to limit addiction through conscious, ethical product development. Digital media shouldn’t be viewed as a vending machine where attention turns into money without consequences. The negative effects are abundant and will only become more glaring as the race for our attention heats up. At the same time, Silicon Valley needs to use its power to limit addiction through conscious, ethical product development. Digital media should not be viewed as a vending machine, where attention is converted into money without consequences. As competition for our attention intensifies, the negative impacts are abundant and will only become more apparent.

In the meantime, track your smartphone habits. Use apps that make you feel better about yourself. Turn off unnecessary notifications. Hold yourself accountable. Set boundaries with your children. As adults, we must accept and understand own our addiction before we can encourage or expect more mindful behavior from our children. Easier said than done, but more important now than ever before. In the meantime, keep track of your smartphone habits. Use apps that make you feel better about yourself. Turn off unnecessary notifications. Keep yourself accountable. Set boundaries with your children. As adults, we must accept and understand our own addictions before we can encourage or expect more cautious behavior from our children. Easier said than done, but now more than ever it’s important.

Tip

Sometimes we have a need to set a gradient color for the view, as shown in the figure above. In this case, we can use the CAGradientLayer class. The specific usage is as follows:


CAGradientLayer *gradientLayer = [CAGradientLayer layer];
gradientLayer.locations = @[@0.0, @1.0];
gradientLayer.startPoint = CGPointMake(0, 0);
gradientLayer.endPoint = CGPointMake(1.0, 0);
gradientLayer.frame = closeButton.bounds;
gradientLayer.colors = @[(__bridge id)TCUIColorFromRGB(0xFF8F00).CGColor, (__bridge id)TCUIColorFromRGB(0xFF5500).CGColor];
 [view.layer addSublayer:gradientLayer];
     

Share

Can living near the company really save time for studying?

We always think that living near the company can save time, so that we can have time to learn and improve ourselves. Is this really the case? Living near the company does save a lot of time compared to living more than 20 kilometers away from the company, but is the time saved really used for studying? Most of them are not, but they are sleeping and working overtime. On the contrary, when you are far away from the company, you can still watch something on the road. When I lived more than 20 kilometers away from the company, I had to get up at 7 o’clock every day, take the subway for 60 minutes to the company, and drive home for an hour at night. I could still read something during these two hours on the road. When I am close to the company, I get up late in the morning and arrive at the company at the same time, so the time saved in the morning is basically used to sleep. In the evening, because I am close to home, I work more overtime. Although I can go home a little earlier, I can’t read when I get home. I have no environment and no mood. See, when you live far away, you can still have two hours on the road to think and study. Living closer to each other makes life and work less separated. So everything has two sides. Sometimes things look one thing on the surface and are another thing in practice.

FAQ

读完之后,下一步看什么

如果还想继续了解,可以从下面几个方向接着读。

Related

继续阅读

这里整理了同分类、同标签或同类问题的文章。