码迷,mamicode.com
首页 >  
搜索关键字:say    ( 1472个结果
JavaScript里的静态方法和实例方法
var Person=function(){}; 定义一个function实际上是定义了一个类(class)。 静态方法 Person.say=function(){ console.log('I am a Person,I can say.') }; Person.say(); //正常运行 va ...
分类:编程语言   时间:2020-05-21 16:31:38    阅读次数:63
Linux使用Shell在线语音播报功能
在文件夹中创建一个sh文件,内容如下: #!/bin/bash say() { #mplayer -really-quiet "http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=5&text=$*"; #mpg321 -q "http://tts ...
分类:系统相关   时间:2020-05-21 16:09:49    阅读次数:151
工厂函数批量创建对象
function Person(name,age,desc) { var obj = { name: name, age: age, desc: desc, say: function () { console.log('大家吼,我系' + this.name) } } return obj; } ...
分类:其他好文   时间:2020-05-16 12:44:42    阅读次数:65
阿里云服务器从购买完成到部署前端静态资源
前言: 买了个阿里云最低配的服务器,身为一名啥都不懂的前端工程师,打算对全世界say:'hello world!',咋整? 一、购买完成之后: 1、重置密码:在阿里云的管理后台中找到实例列表,完了重置一下密码,说实话,光这一步我找了好久,截图的话还得打码,手懒不截了,你们自己慢慢找。 2、配置实例安 ...
分类:其他好文   时间:2020-05-16 09:15:15    阅读次数:121
卡比兽Python类和对象
No picture say a P! ''' 以卡比兽为例来熟悉一下Python里的类和对象 卡比兽的英文名叫Snorlax ''' # 创建一个卡比兽类 class Snorlax: pass # 占位符 count = 0 # 类变量:卡比兽的数量 ''' 类比Java中的构造方法 ''' d ...
分类:编程语言   时间:2020-05-09 21:07:22    阅读次数:75
[USACO08FEB]Meteor Shower S
题目:Meteor Shower S 网址:https://www.luogu.com.cn/problem/P2895 Bessie hears that an extraordinary meteor shower is coming; reports say that these meteor ...
分类:其他好文   时间:2020-05-01 20:59:36    阅读次数:71
System.Reflection.Emit 动态实现接口
class Program { static void Main(string[] args) { var obj = EmitHelper.ImplInterface<IPerson>(); obj.say(); obj.sayHi(); } } public interface IPerson ...
分类:其他好文   时间:2020-04-29 18:10:20    阅读次数:110
python 中关于 类变量, 实例变量, 静态方法,类方法,全局变量,局部变量的理解
一个程序帮助你理解类中的一些基本的概念! a = 1 #(全局变量) def say(): print('调用了全局方法') class People(): global a a = 100 #类中定义一个全局变量, 因此不再是类的数据属性 b = 123 # 类中的数据属性,也是一种变量 def ...
分类:编程语言   时间:2020-04-28 18:39:08    阅读次数:125
反射和内置方法
反射 指的是在程序运行过程中可以"动态(不见棺材不掉泪)"获取对象的信息 class People: def __init__(self,name,age): self.name=name self.age=age def say(self): print(f'{self.name}{self.ag ...
分类:其他好文   时间:2020-04-15 21:28:40    阅读次数:62
1140 Look-and-say Sequence
Look-and-say sequence is a sequence of integers as the following: D, D1, D111, D113, D11231, D112213111, ... where D is in [0, 9] except 1. The (n+1)s ...
分类:其他好文   时间:2020-04-15 00:24:16    阅读次数:63
1472条   上一页 1 ... 3 4 5 6 7 ... 148 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!