• Arts打卡第6周


    • Algorithm。主要是为了编程训练和学习。 每周至少做一个 leetcode 的算法题(先从Easy开始,然后再Medium,最后才Hard)。 进行编程训练,如果不训练你看再多的算法书,你依然不会做算法题,看完书后,你需要训练。 关于做Leetcode的的优势,你可以看一下我在coolshell上的文章 Leetcode 编程训练 - 酷 壳 - CoolShell。

    • Review:主要是为了学习英文,如果你的英文不行,你基本上无缘技术高手。 所以,需要你阅读并点评至少一篇英文技术文章, 我最喜欢去的地方是http://Medium.com(需要梯子) 以及各个公司的技术blog,如Netflix的。

    • Tip:主要是为了总结和归纳你在是常工作中所遇到的知识点。 学习至少一个技术技巧。你在工作中遇到的问题,踩过的坑,学习的点滴知识。

    • Share:主要是为了建立你的影响力,能够输出价值观。 分享一篇有观点和思考的技术文章。

    Algorithm:

     移动零
     

    Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.

    Example:

    Input: [0,1,0,3,12]
    Output: [1,3,12,0,0]

    Note:

    1. You must do this in-place without making a copy of the array.
    2. Minimize the total number of operations

    答案:

    class Solution {
        public void moveZeroes(int[] nums) {
            int count;
    
            int n;
    
            n = 0;
            count = 0;
            for (int i = 0; i < nums.length; i++){
                if (nums[i] == 0){
                    count++;
                }else{
                    nums[n] = nums[i];
                    n++;
                }
            }
            for (int j = 0; j < count; j++){
                nums[n] = 0;
                n++;
            }
            for(int k = 0; k < nums.length; k++){
                System.out.print(nums[k]);
            }
        }
    }

    Review:https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html#webflux-dispatcher-handler

    讲了spring的DispatcherHandler  它的作用有,接受前段的请求,进行路由分发,找到对应的处理器。处理结果返回前端,以及处理异常。

    Tip:

    mysql if语句的使用:

    SELECT if(false,sum(c.tax_data),SUM(c.fiscal_ret))FROM corp_tax c WHERE c.corp_year = 2018 and c.corp_month =6  AND park_id = 1

     

    If 后面的括号如果是false会选择第二个值,如果是true,会选择第一个值。

    Share:https://mp.weixin.qq.com/s/7D19F0oGYMBTJ3vlm2x_1A 这一篇是uml建模图的介绍。

     

  • 相关阅读:
    选择最佳服务台方案的7个考量
    使用OpManager轻松进行Windows网络监控
    统一终端管理(UEM)有哪些关键的安全功能
    javascript的声明变量var,let,const的区别
    Vue 在过滤器filter中调用methods中的方法
    第十六章:过滤器的奥秘
    1970年1月1日(00:00:00 GMT)Unix 时间戳(Unix Timestamp)
    让网页中的JavaScript代码自动执行的三种方法
    限制input type=“file“ 文件上传类型
    对v-html的文字做超出显示省略号
  • 原文地址:https://www.cnblogs.com/prader6/p/10854227.html
Copyright © 2020-2023  润新知