神器的Limit 1 如果明知道只会有一条返回数据,则可避免全表扫描,在第一次找到数据时就返回 like语句的优化 like语句一般业务要求都是 '%关键字%'这种形式,但是依然要思考能否考虑使用右模糊的方式去替代产品的要求 批量插入 INSERT into person(name,age) val ...
分类:
数据库 时间:
2021-01-14 10:58:08
阅读次数:
0
重写 public class B { public static void test(){ System.out.println("B=>test()"); } } public class A extends B { public static void test(){ System.out.p ...
分类:
编程语言 时间:
2021-01-14 10:38:57
阅读次数:
0
继承、重写和 Super class Lady { content = "Hi,帅哥"; sayHello() { return this.content; } } class XiaoJieJie extends Lady { sayHello() { return super.sayHello( ...
分类:
其他好文 时间:
2021-01-12 11:03:38
阅读次数:
0
ngModel ngModel不能用来把表单控件注册到父formGroup指令中。不然会报错 如果你想避免注册这个表单控件,请在ngModelOptions中指出它是独立的: <input [(ngModel)]="person.firstName" [ngModelOptions]="{stand ...
分类:
其他好文 时间:
2021-01-11 10:51:05
阅读次数:
0
vue 给对象添加新属性,当在生命周期created之后,由于Object.defineProperty()局限性,尽管当前对象属性值已更新,监听不了数据变化,无法刷新 数据; 打印this.person 属性info是没有set/get方法 使用$set Vue.set(object, key, ...
分类:
其他好文 时间:
2021-01-11 10:50:50
阅读次数:
0
1. property的作用 property是一个类,可以把一个方法当做属性进行使用,这样做可以简化代码使用。 实际上就是装饰类中属性的getter setter方法,使得属性可以通过 对象.属性 的方式获取或设置 使用property的两种方式 装饰器方式 类属性方式 2. 装饰器方式 @pro ...
分类:
编程语言 时间:
2021-01-11 10:43:38
阅读次数:
0
1.self指的是类实例对象本身(注意:不是类本身)。 class Person: def _init_(self,name): self.name=name def sayhello(self): print 'My name is:',self.name p=Person('Bill') pri ...
分类:
编程语言 时间:
2021-01-08 10:33:43
阅读次数:
0
175. 组合两个表 地址:https://leetcode-cn.com/problems/combine-two-tables/ //表1: Person // + + + //| 列名 | 类型 | //+ + + //| PersonId | int | //| FirstName | va ...
分类:
其他好文 时间:
2021-01-06 12:09:24
阅读次数:
0
JS function 是函数也是对象, 浅谈原型链 JS 唯一支持的继承方式是通过原型链继承, 理解好原型链非常重要, 我记录下我的理解 1. 前言 new 出来的实例有 _proto_ 属性, 并且指向其构造函数的 prototype 对象 function Person(){} const p ...
分类:
Web程序 时间:
2021-01-05 11:43:54
阅读次数:
0
TypeError: 'module' object is not callable Person.py """ 类的定义 """ class Person: # 构造方法 def __init__(self, n, a, u): # global name, age self.name = n s ...
分类:
其他好文 时间:
2021-01-04 10:56:48
阅读次数:
0