下载 MySQL yum包
1 2 |
wget http://repo.mysql.com/mysql80-community-release-sles12-3.noarch.rpm |
安装MySQL源
调用无参方法
1 2 3 4 5 6 |
Class class = NSClassFromString(@"classA"); SEL selector = NSSelectorFromString(@"方法名"); IMP imp = [class methodForSelector:selector]; void (*func)(id, SEL) = (void *)imp; func(class, selector); |
有参有返回值方法 [crayo
调试和性能分析 用 pdb 进行代码调试
1 2 3 4 5 6 7 8 |
import pdb a = 1 b = 2 pdb.set_trace() c = 3 print(a + b + c) |
p
抽象基类
1 2 3 4 5 6 7 8 9 10 11 12 |
import abc class Person(metaclass=abc.ABCMeta): # 只能被继承,不能实例化,实例化会报错 @abc.abstractmethod # 被修饰的方法必须重写 def eat(self): pass @abc.abstractmethod def drink(self): pass |
TIP:为了解决Python2&a
1 2 3 |
const accountInfo = wx.getAccountInfoSync() console.log(accountInfo.miniProgram.appId) |
参考 微信开发者文档