7-1 Happy Numbers (20分) A happy number is defined by the following process: Starting with any positive integer, replace the number by the sum of the s ...
分类:
移动开发 时间:
2020-06-26 14:26:29
阅读次数:
90
ROW_NUMBER() OVER(PARTITION BY ... ORDER BY ...)RANK() OVER(PARTITION BY ... ORDER BY ...)DENSE_RANK() OVER(PARTITION BY ... ORDER BY ...)COUNT() OVER ...
分类:
其他好文 时间:
2020-06-26 13:07:50
阅读次数:
87
【题目】 给定一个包含从0、1、2,...,n中获取的n个不同数字的数组,找到该数组中缺少的一个。 Example 1: Input: [3,0,1] Output: 2 Example 2: Input: [9,6,4,2,3,5,7,0,1] Output: 8 Example 3: Input ...
分类:
其他好文 时间:
2020-06-26 13:05:13
阅读次数:
54
python 操作数据库 import pymysql # 第一步:连接到数据库 conn = pymysql.connect(host="120.78.128.25", port=3306, user="future", password="123456", charset="utf8", cur ...
分类:
数据库 时间:
2020-06-26 12:53:33
阅读次数:
67
lazy修饰符 默认情况下,v-model默认是在input事件中同步输入框的数据的 lazy修饰符可以让数据在失去焦点或者回车时才会更新 <input type='text' v-model.lazy="message" /> <p>当前内容:{{message}}</p> number修饰符 默 ...
分类:
其他好文 时间:
2020-06-26 12:40:24
阅读次数:
59
概述 设计模式通常用于软件开发过程中,它们提供了软件开发过程中面临的一般问题的最佳解决方案。 设计模式的6大原则 1 单一职责原则 (Single Responsibility Principle,简称SRP) 不要存在多于一个导致类变更的原因,也就是说每个类应该实现单一的职责,否则就应该把类拆分。 ...
分类:
其他好文 时间:
2020-06-26 12:33:39
阅读次数:
48
7 principles to design the Design Pattern ###单一职责(Single Responsibility Principle) 一个类或者一个方法只负责一项职责 ###接口隔离(interface segregation principle) 建立单一接口,扩展 ...
分类:
其他好文 时间:
2020-06-26 12:29:31
阅读次数:
43
select *, rank() over (order by 成绩 desc) as ranking, dense_rank() over (order by 成绩 desc) as dese_rank, row_number() over (order by 成绩 desc) as row_nu ...
分类:
其他好文 时间:
2020-06-26 12:29:01
阅读次数:
94
Given a sorted array A of unique numbers, find the K-th missing number starting from the leftmost number of the array. Example 1: Input: A = [4,7,9,10 ...
分类:
其他好文 时间:
2020-06-26 10:52:26
阅读次数:
72
联合类型(Union Types)可以通过管道(|)将变量设置多种类型,赋值时可以根据设置的类型来赋值。注意:只能赋值指定的类型,如果赋值其它类型就会报错。创建联合类型的语法格式如下:Type1|Type2|Type3 实例声明一个联合类型:var val:string|number val = 1... ...
分类:
其他好文 时间:
2020-06-26 10:38:21
阅读次数:
49