交互设计到两种: 1./原生调用vue 的方法,给vue 传值 //第一步:把方法注册到window 上,给原生调用,其中scanResult 是约定的方法名 created() { window.scanResult = this.scanResult;}, /*第二步:原生调用Vue方法,返回结 ...
分类:
其他好文 时间:
2020-06-30 20:35:55
阅读次数:
104
简述python中functools.wrapper() 首先对于最简单的函数: def a(): pass if __name__ == '__main__': print(a.__name__) 输出结果: a 然后稍微复杂点: def a(func): def wrapper() return ...
分类:
移动开发 时间:
2020-06-30 20:30:36
阅读次数:
105
// remote06.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "windows.h" BOOL func(DWORD ProcessID,char* Dll ...
package main import ( "fmt" "strings" "bytes" ) func main(){ s := "Hello, World!" //Count计算字符串sep在s中的非重叠个数:2 //func Count(s, sep string) int fmt.Print ...
分类:
其他好文 时间:
2020-06-30 18:54:26
阅读次数:
58
函数的重点知识补充 (1)补充的两个小知识点(global,nonlocal) 1.global的使用 我们在补充这两个知识点之前,我们先看一下下面这个例子: a = 1 def func(): print(a) # 1 func() a = 1 def func(): # 这里不能够对更改全局作用 ...
分类:
编程语言 时间:
2020-06-30 17:43:48
阅读次数:
63
传统Python语言的主要控制结构是for循环。然而,需要注意的是for循环在Pandas中不常用,因此Python中for循环的有效执行并不适用于Pandas模式。一些常见控制结构如下。 for循环 while循环 if/else语句 try/except语句 生成器表达式 列表推导式 模式匹配 ...
分类:
编程语言 时间:
2020-06-30 17:41:19
阅读次数:
65
1. typescript 版本 "@types/node": "^12.12.6", 不能用最新的 2. electron的配置里面 background.ts -->> nodeIntegration: true 3.引入antd of vue less-loader 版本 需要 5.0.0 按 ...
分类:
其他好文 时间:
2020-06-30 14:25:56
阅读次数:
133
函数的参数越少越好 有一个准则是:如果你的函数参数超过两个,就应该改为对象传入。 这样做是合理的,因为当函数参数超过两个时,参数顺序开始变得难以记忆,而且容易出现一种很尴尬的情况:比如我只需要传入第三个参数,因为其自身顺序的原因,不得不补齐前两个根本用不上的参数,以让它顺利排在第三位。 // bad ...
分类:
Web程序 时间:
2020-06-30 12:32:32
阅读次数:
66
休闲迷宫效果图(Ps:copy美团) 休闲迷宫代码 <html lang="en"> <head> <meta charset="utf-8"> <title>休闲迷宫</title> <style type="text/css"> span{ display: inline-block; widt ...
分类:
其他好文 时间:
2020-06-30 10:36:30
阅读次数:
72
#自己调自己,默认递归深度是1000,实际测试997次,998会报错 def func(count): print("我是谁" +str(count)) func(count+1) func(1) #修改递归深度,但不一定可以到设置的值 import sys sys.setrecursionlimi ...
分类:
编程语言 时间:
2020-06-30 00:48:58
阅读次数:
89