Getopts Let’s say you want to allow a user to pass a -v flag to turn on verbose logging in a script. Manually parsing out options passed to a script i ...
分类:
其他好文 时间:
2021-02-16 12:03:18
阅读次数:
0
组件:传递变量 知识点 为组件传递变量数据 组件的数据 制作可接受变量参数的组件。 综合例 <div id="myApp"> <div>请输入您的名字:<input v-model="myname"></div> <hr/> <say-hello :pname="myname" /> </div> ...
分类:
其他好文 时间:
2021-01-19 12:09:32
阅读次数:
0
外观数列 题目地址:https://leetcode-cn.com/problems/count-and-say/ 给定一个正整数 n ,输出外观数列的第 n 项。 「外观数列」是一个整数序列,从数字 1 开始,序列中的每一项都是对前一项的描述。 你可以将其视作是由递归公式定义的数字字符串序列: c ...
分类:
编程语言 时间:
2020-12-21 12:14:11
阅读次数:
0
package main import "fmt" //类 结构体 type person struct { name string age int hobby string } //方法是作用于特定类型的函数 func (p person) say() { fmt.Println("sssssss ...
分类:
其他好文 时间:
2020-12-15 12:44:09
阅读次数:
3
接口的默认实现 实现类中可以不实现接口中有默认实现的方法,以下代码不报错 public interface IPerson { void Say() { Console.WriteLine("hello"); } } public class Teacher:IPerson { } 但是不可以通过实 ...
1、如何在外部访问类里面的私有方法 通过 实例化对象._+类名__+私有方法名 举例: class people: def init(self, name): self.name = name def getName(self): # 实例方法 return self.name def __say( ...
分类:
编程语言 时间:
2020-12-02 12:19:22
阅读次数:
7
父类: public class Parent { //看这里的this指的是什么 public Parent() { this.say(); } protected void say() { System.out.println("father"); } } 子类: public class Su ...
分类:
其他好文 时间:
2020-11-21 12:40:44
阅读次数:
24
1.Object构造函数创建 // 1.Object构造函数创建 var Obj = new Object(); Obj.name='saoge'; Obj.say=function(){ console.log(`我的名字是${this.name}`) } Obj.say(); 2.使用对象字面量 ...
分类:
编程语言 时间:
2020-09-24 00:03:48
阅读次数:
38
1.今天学习了java中的动态绑定,动态绑定具体表现在向上转型上,因为只有在运行时才知道具体运行的是哪个实例。 示例: public class Father{ public void say(){ System.out.println("father say()"); } public stati ...
分类:
其他好文 时间:
2020-08-08 20:09:01
阅读次数:
81
round_up.cpp内容如下: #include <iostream> using namespace std; const int kAlign = 8; // kAlign show be powers of 2, say 2, 4 ,8, 16, 32, ... const int kAl ...
分类:
其他好文 时间:
2020-07-28 13:51:52
阅读次数:
100