摘要: 引用自 github , 概述: k-近邻(kNN, k-NearestNeighbor)算法是一种基本分类与回归方法,我们这里只讨论分类问题中的 k-近邻算法。 原理: 阅读全文
posted @ 2019-04-09 15:10 x_smile 阅读(182) 评论(0) 推荐(0) 编辑
摘要: TradingView 支持自定义指标,不过是把你要定义的指标写成一个 JS 源文件(customIndex.js),放在图表库 static 文件夹下。自定义指标 JS 源代码模板如下: 1 __customIndicators = [ 2 { 3 name: 'ShuBenRSI', 4 met 阅读全文
posted @ 2019-04-02 09:19 x_smile 阅读(8572) 评论(1) 推荐(0) 编辑
摘要: 看别人翻译的开发文档: 开发文档地址:https://zlq4863947.gitbooks.io/tradingview/ getMarks(symbolInfo, startDate, endDate, onDataCallback, resolution) 方法介绍:图表库调用这个函数来获得可 阅读全文
posted @ 2019-03-29 10:30 x_smile 阅读(2496) 评论(0) 推荐(1) 编辑
摘要: 插入排序: 1 def insert_sort(chaosList): #自己写的 2 tempList = [] 3 for i in chaosList: 4 if len(tempList) == 0: 5 tempList.append(i) 6 else: 7 flag = True 8 阅读全文
posted @ 2019-03-27 11:25 x_smile 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 加载页面时初始化方法: mounted 可以在 mounted 方法中调用 methods 的中的方法 使用 data 中的数据时,在每个方法的开始推荐先定义 var that = this 现在还不明白开始时为什么执行两次 resolveSymbol 方法 不要纠结页面的数据怎么获取到某个方法中的 阅读全文
posted @ 2019-03-15 15:59 x_smile 阅读(4350) 评论(0) 推荐(0) 编辑
摘要: 如引用 TradingView 库,需引入库中 3 个文件(所需库为 github 私有库,需申请) 初始化图表: 我也不知道这是加载图表还是什么,反正就出现图表了 数据内容为自己设置的随机生成的一些数据,仅供测试使用 整体代码: 1 <!-- TradingView Widget BEGIN -- 阅读全文
posted @ 2019-03-14 16:40 x_smile 阅读(2720) 评论(1) 推荐(0) 编辑
摘要: 多线程实例 1 import threading 2 import time 3 4 5 def eat(): 6 eatTime = time.time() 7 for i in range(30): 8 print('count = {}'.format(count)) 9 time.sleep 阅读全文
posted @ 2019-02-26 14:50 x_smile 阅读(1464) 评论(0) 推荐(0) 编辑
摘要: ElementUI 组件 Percentage 进度条 Percentage 进度条基础用法 其中 :percentage 的值可以是变量(:percentage="percentageNum"),不然也不能实时显示进度 重难点还是怎么实时获取后天进度、总量。思路就是: 1.后台设置一个全局变量,项 阅读全文
posted @ 2019-02-22 16:43 x_smile 阅读(3531) 评论(0) 推荐(0) 编辑
摘要: mongoDB LIMIT 和 SKIP 方法 db.colName.find().limit(num) # limit 方法接收一个数字参数,该参数指定读取的记录条数 (db.colName.find({},{field : 1, _id : 0}) # 显示查询集合中某一个字段 ) db.col 阅读全文
posted @ 2019-02-20 14:43 x_smile 阅读(158) 评论(0) 推荐(0) 编辑
摘要: mongoDB 作为非关系型数据库,逐渐用户火爆。这里仅收集些 基础内容,供参考 阅读全文
posted @ 2019-02-15 15:19 x_smile 阅读(182) 评论(0) 推荐(0) 编辑