weixin_39853155的博客

私信 关注
weixin_39853155
码龄4年
  • 5,473
    被访问量
  • 98
    原创文章
  • 1,319,147
    作者排名
  • 3
    粉丝数量
  • 于 2017-08-15 加入CSDN
获得成就
  • 获得3次点赞
  • 内容获得0次评论
  • 获得9次收藏
荣誉勋章
  • 最近
  • 文章
  • 资源
  • 问答
  • 课程
  • 帖子
  • 收藏
  • 关注/订阅

python 曲线拟合参数能否为数组_Python中参数曲线的拟合

我有(X,Y)形式的实验数据和(x(t;*params),y(t;*params))形式的理论模型,其中t是一个物理(但不可观察的)变量,*params是我要确定的参数。t是一个连续变量,模型中x和{}之间以及{}和{}之间存在1:1的关系。在在一个完美的世界里,我会知道T(参数的真实值)的值,并且能够做一个非常基本的最小二乘拟合来找到*params的值。(请注意,我并不是试图“连接”绘图中的x和...
原创
0阅读
0评论
0点赞
发布博客于 14 天前

把句子拆分成单词 java_java – 将句子分成单词和标点符号

我需要将类Sentence解析为单词和标点符号(空格被视为标点符号),然后将其全部添加到一般ArrayList< Sentence>中.一个例句:A man, a plan, a canal — Panama!A => wordwhitespase => punctuationman => word, + space => punctuationa => ...
原创
0阅读
0评论
0点赞
发布博客于 14 天前

java 异常类型_Java的异常类型总结

Java的设计目的是让程序员有机会设计一个没有错误的应用程序。当应用程序与资源或用户交互时,程序员可能会知道一些异常,这些异常是可以处理的。不幸的是,也有程序员无法控制或简单忽略的例外情况。简而言之,并不是所有的异常都是相同的,因此程序员需要考虑几种类型。异常是导致程序无法在其预期的执行中运行的事件。异常有三种类型——检查异常、错误和运行时异常。The Checked Exception(检查异常...
原创
0阅读
0评论
0点赞
发布博客于 15 天前

linux+磁盘挂载+uuid_[分享]Linux磁盘分区以及文件系统挂载 | 霸王硬上弓's Blog

这个,实际上很简单。本来是要介绍openwrt文件系统挂载的,不过想想,这个也是属于文件系统挂载的一部分。…这里就简单介绍挂载,我还是给不会的童鞋教一遍吧,如果还是不会,自己摸索吧。首选磁盘格式:ext3/ext4。这里我们先添加一块大小为160G的空硬盘,将其分区并格式化。1.查看硬盘使用ssh登陆openwrt。在这边,我们可以用 fdisk -l 命令来查看系统是否检测到了你的磁盘。root...
原创
1阅读
0评论
0点赞
发布博客于 16 天前

已知xyz yzz 532Java_已知 xyz+yzz=532 ,其中 x 、 y 、 z 为数字,编程求出 x 、 y 、 z 的值。_学小易找答案...

【计算题】已知 int i=10,j=0 ,计算表达式的结果 (1) j=5+++i (2) j =5+i++ (3) j =8+3*9/7-6 (4) j =i+3*9%i-4【多选题】控制理论的基本原理是( )。【论述题】创建一个名称为 Pay 的类,该类包括工作小时、每小时工资、扣缴率、应得工资总额和实付工资等 5 个双精度变量。 创建 3 个重载的 computeNetPay ()方法,...
原创
1阅读
0评论
0点赞
发布博客于 16 天前

java 获取返回值字段_Spring实战之获取方法返回值操作示例

本文实例讲述了Spring实战之获取方法返回值操作。分享给大家供大家参考,具体如下:一 配置文件xmlns="http://www.springframework.org/schema/beans"xmlns:util="http://www.springframework.org/schema/util"xsi:schemaLocation="http://www.springframework...
原创
0阅读
0评论
0点赞
发布博客于 17 天前

java 色情图片识别_秒懂!Java11比Java8快多少,不是测试人员一眼也能看懂!

简单粗暴:10亿次相加,循环10次,每次执行时间记录结果如下:硬件环境:IDE:IntelliJ IDEA 2019.1 x64JDK版本:Windows150.94 MBjdk-11.0.2_windows-x64_bin.exeWindows x64211.58 MBjdk-8u202-windows-x64.exe测试用例:10亿次相加,循环10次,代码如下:public static vo...
原创
0阅读
0评论
0点赞
发布博客于 17 天前

java xml 开源框架_Java-XML解析第一篇主流开源类库解析XML

1、流行的XML解析框架1》底层解析方式:存在编码复杂性、难扩展、难复用....。想了解底层解析方式请参考:浅谈 Java XML 底层解析方式2》Dom4j:基于 JAXP 解析方式,性能优异、功能强大、极易使用的优秀框架。3》Jdom:本质也是基于 JAXP 但包结构被重新组织, API 大量使用了 Collections 类,在性能上被 dm4j 压了好几个档次。4》XStream:基于 x...
原创
1阅读
0评论
0点赞
发布博客于 20 天前

java 时间动态显示_Java动态显示当前日期和时间

Java 动态显示当前系统的日期、时间;如图所示:package com.xin.test;import java.awt.Color;import java.awt.Font;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.text.SimpleDateFormat;import...
原创
5阅读
0评论
0点赞
发布博客于 21 天前

java 外观模式_轻松掌握java外观模式

定义:外观模式(Facade),为子系统中的一组接口提供一个一致的界面,定义一个高层接口,这个接口使得这一子系统更加容易使用特点:(1)实现了子系统与客户端之间的松耦合关系。(2)客户端屏蔽了子系统组件,减少了客户端所需处理的对象数目,并使得子系统使用起来更加容易。企业级开发和常用框架重的应用:很多,比如常见的字符串的分割方法spilt也是具体实例:package com.test.faced;/...
原创
0阅读
0评论
0点赞
发布博客于 21 天前

清理MySQL undo log_清理mysql日志

【Mysql 学习】日志的维护MySQL服务器可以创建各种不同的日志文件,从而可以很容易地看见所进行的操作。但是,对于生产库而言,会产生大量的日志占用大量磁盘空间,你必须定期清理这些文件,确保日志不会占用太多的硬盘空间。当启用日志使用MySQL时,你可能想要不时地备份并删除旧的日志文件,并告诉MySQL开始记入新文件。...文章yangyi_dba2011-01-11542浏览量mysql-bi...
原创
15阅读
0评论
0点赞
发布博客于 21 天前

全球城市数据库 mysql_获取全球国家和城市列表

找了很多都只有英文,并且 Hong Kong, Macao, Taiwan都是单独列出来的。发现QQ注册页的国家和城市数据比较全面。可以把它分离出来。数据来源http://zc.qq.com/chs/index.htmljs:http://4.url.cn/zc/chs/js/10062/location_chs.js不确定这个数据结构什么时候会变,所以我分析一个数据,生成sql语句,保存到数据...
原创
16阅读
0评论
0点赞
发布博客于 22 天前

csv分区写入mysql_[Python] 解析csv文件并写入Mysql数据库

#-*- coding: utf-8 -*-import csvimport osimport pymysqldef sql_inert(sql,y):conn = pymysql.connect(host="10.xxx.xx.xxx",port=3306,user="username",password="***",database="db_name")cur=conn.cursor()cur...
原创
0阅读
0评论
0点赞
发布博客于 27 天前

python程序设计总结报告_把PPT 总结报告上传

【单选题】一种税区别于另一种税的主要标志是( )。 (5.0分)【单选题】能够导致税收全部向前转嫁,落在生产要素的购买者身上的情形是( )。 (5.0分)【判断题】86.激励按性质分类可分为物质激励和精神激励。【判断题】99.仪态是指一个人举止的姿态和风度。【简答题】汉译英: translation from Chinese to english【判断题】90.自我教育也称为自我启发式培...
原创
2阅读
0评论
0点赞
发布博客于 29 天前

mysql建表时主键_mysql建表时设置主键的方法

mysql建表时设置主键的方法发布时间:2020-10-10 15:17:28来源:亿速云阅读:119作者:小新mysql建表时设置主键的方法?这个问题可能是我们日常学习或工作经常见到的。希望通过这个问题能让你收获颇深。下面是小编给大家带来的参考内容,让我们一起来看看吧!设置方法:在“CREATE TABLE”语句中,通过“PRIMARY KEY”关键字来指定主键,语法格式“字段名 数据类型 PR...
原创
30阅读
0评论
0点赞
发布博客于 1 月前

mysql中的rman备份_RMAN备份环境配置

设置RMAN的全局变量在调用RMAN前,通常设置NLS_DATE_FORMAT和NLS_LANG环境变量,这些环境变量决定了RMAN中使用的时间参数的格式。NLS_LANG=americanNLS_DATE_FORMAT='Mon DD YYYY HH24:MI:SS'通常设置为这两个参数。如果要使用RMAN连接到未挂载的数据库,然后在RMAN连接时挂在数据库,那么设置NLS_LANG声明数据库将...
原创
4阅读
0评论
0点赞
发布博客于 1 月前

mysql8.0 删除服务_数据库Linux下彻底删除Mysql 8.0服务的方法

观看本文前最好有一定的Linux命令基础,具体为centos7.3环境中清除使用yum安装的Mysql卸载前请先关闭Mysql服务service mysql stop使用 rpm 命令的方式查看已安装的mysqlrpm -qa|grep mysql开始卸载Mysql服务使用yum安装需要先进行清除服务等yum remove mysql mysql-server mysql-libs mysql-s...
原创
11阅读
0评论
0点赞
发布博客于 1 月前

mysql系统用户名和密码是什么格式_添加mysql的用户名和密码是什么语句?

mysql中添加用户名和密码的语句:1、CREATE USER语句,可以创建普通用户,并设置相应的密码;2、INSERT语句,可以新建普通用户,并设置相应的密码;3、GRANT语句,新建用户,并设置相应的密码和用户权限。MySQL 在安装时,会默认创建一个名为 root 的用户,该用户拥有超级权限,可以控制整个 MySQL 服务器。在对 MySQL 的日常管理和操作中,为了避免有人恶意使用 roo...
原创
26阅读
0评论
0点赞
发布博客于 1 月前

win8配置iis8.0+php+mysql+zend_Window8.1下安装IIS+PHP+Zend Optimizer + MySQL方法

IIS服务器下安装PHP、ZendOptimizer和MySQL 方法一、 介绍:IIS:Windows操作系统自带的一种web服务器。PHP:全称为HypertextPreprocessor。PHP是一种HTML 内嵌式的语言,是一种网站(网页)开发语言(与ASP、JSP、.NET等类同)。ZendOptimizer:用优化代码的方法来提高php应用程序的执行速度。MySQL:是一种数据库(与S...
原创
4阅读
0评论
0点赞
发布博客于 2 月前

mysql5.7主从部署_MySQL5.7数据库主从架构部署,你再也不用去问度娘了

啰嗦的话,不多说,我们直接开始部署,我相信有点linux基础的人都能看得懂。Mysql5.7.22主从部署,既然是主从那肯定是需要至少2台服务器了,2台的安装都是一样的,请看下面!1、 创建mysql用户:useradd -m -d /home/mysql mysql2、 上传mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz安装包到/app目录下。附官方下载链接...
原创
1阅读
0评论
0点赞
发布博客于 2 月前

python一键多值的访问_python字典一键多值实例代码分享

python中字典可以一键多值,也就是意味着一个键可以对应多个值。例:#encoding=utf-8print '中国'#字典的一键多值print'方案一 list作为dict的值 值允许重复'd1={}key=1value=2d1.setdefault(key,[]).append(value)value=2d1.setdefault(key,[]).append(value)print d1#...
原创
8阅读
0评论
0点赞
发布博客于 2 月前

安卓搭建mysql服务器_048 自己动手——快速搭建Android应用服务器

1.服务器搭建方案选择我们用:MySQL + Java Web + Tomcat + Volley 来实现我们的服务器。其中:①MySQL是开源的数据库软件;②Java Web是遵循Java语言风格的服务器应用程序组件(即客户端发来的请求的应答者);③Tomcat是开源的服务器软件(作为Java Web应用程序的容器);④Volley是谷歌官方为Android提供的Http请求库(写在Androi...
原创
27阅读
0评论
0点赞
发布博客于 2 月前

mysql最小单位_MySQL中int(11)列的大小(以字节为单位)是多少?

慕前端131612正如其他人所说,列可以存储的最小/最大值以及它以字节表示的存储量仅由类型定义,而不是由长度定义。很多答案都是说(11)部件只影响显示宽度,这不是完全正确的,但主要是。对…的定义int(2)带着没有指定零威尔:仍然接受以下值100仍然显示价值100当输出(不是)时0或00)这个显示宽度将是从SELECT查询输出的最大值的宽度。唯一(2)会做的是如果还指定了零:价值1将显示01.当显...
原创
2阅读
0评论
0点赞
发布博客于 2 月前

format python value error_ValueError: zero length field name in format python [duplicate]

I have spent hours trying to solve this problem but to no avail. I read this guide. I haven't found any examples how to do what I need.When I run the script I get this error (partly omitted): Traceba...
原创
2阅读
0评论
0点赞
发布博客于 2 月前

大刀l server访问mysql_第三章 数据库访问

JDBC连接和释放连接的工具类:public class JDBCCoonection {private final static String DRIVE = "oracle.jdbc.OracleDriver";private final static String URL ="jdbc:oracle:thin:@10.211.55.3:1521:orcl";private final sta...
原创
3阅读
0评论
0点赞
发布博客于 2 月前

如何安装mysql8.0.21_mysql 8.0.21 安装配置方法图文教程

记录了mysql 8.0.21 的安装配置方法,分享给大家。一、下载1、下载安装包mysql下载路径直接点击链接也可以下载:mysql 8.0.202、解压压缩包解压到安装的目录:3、在此目录下新建my.ini配置文件[mysqld]# 设置 3306 端口port=3306# 设置 mysql 的安装目录basedir=D:\environment\mysql\mysql-8.0.21-winx...
原创
1阅读
0评论
0点赞
发布博客于 2 月前

c oa mysql cs_C#连接Mysql数据库 MysqlHelper.cs文件

mysql.data.dll下载_c#连接mysql必要插件mysql.data.dll是C#操作MYSQL的驱动文件,是c#连接mysql必要插件,使c#语言更简洁的操作mysql数据库。当你的电脑弹出提示“丢失mysql.data.dll”或“无法找到mysql.data.dll”等错误问题,请下载本站为你提供的dll文件,使用它可以帮助用户解决上述问题。下载后引用到项目文件目录。using ...
原创
4阅读
0评论
0点赞
发布博客于 2 月前

mysql where 优化_优化mysql中where or和where in语句的效率

一、使用union来取代where in:使用where or语句操作:select * from city where id = 1 or id = 3 or id = 4输出:1 广州3 深圳4 惠州explain 结果:id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE city...
原创
7阅读
0评论
0点赞
发布博客于 2 月前

mysql服务器 查看_如何查看Mysql服务器上的版本

select version();1,mysql 的守护进程是mysqld[root@localhost ~]# service mysqld start启动 MySQL: [确定]你可以看看你的服务是否已经添加到linux上[root@localhost ~]# chkconfig --list mysqldmysqld 0:关闭 1:关闭 2:关闭 3:关闭 4:关闭 5:启用 6:关闭[ro...
原创
8阅读
0评论
0点赞
发布博客于 2 月前

mysql函数使用_MySQL函数大全及用法示例分享

字符串函数ASCII(str)返回字符串str的第一个字符的ASCII值(str是空串时返回0)mysql> select ASCII('2');-> 50mysql> select ASCII(2);-> 50mysql> select ASCII('dete');-> 100ORD(str)如果字符串str句首是单字节返回与ASCII()函数返回的相同值。如...
原创
3阅读
0评论
0点赞
发布博客于 2 月前

option会触发的click_echarts点击事件多次触发解决

解决方式:myCharts.off('click')最近写vue项目时用到echarts做个小功能,点击饼状图的每一块,生成新的柱状图,同时要给柱状图绑定点击事件,弹出每一条柱状数据详情。做完后发现一个问题,第一次点击柱状图时点击事件只触发一次,点击饼状图第二次生成柱状图后,柱状图的点击事件就会触发两次,以此类推……最后越来越多。代码如下:// 画饼状图drawPie() {let myChart...
原创
8阅读
0评论
0点赞
发布博客于 2 月前

分布式锁遇锁等待_Redisson 实现分布式锁原理分析

写在前面 在了解分布式锁具体实现方案之前,我们应该先思考一下使用分布式锁必须要考虑的一些问题。​互斥性:在任意时刻,只能有一个进程持有锁。防死锁:即使有一个进程在持有锁的期间崩溃而未能主动释放锁,要有其他方式去释放锁从而保证其他进程能获取到锁。加锁和解锁的必须是同一个进程。锁的续期问题。常见的分布式锁实现方案 基于 Redis 实现分布式锁基于 Zookeeper 实现分布式锁本文采用第一种方案,...
原创
26阅读
0评论
0点赞
发布博客于 2 月前

中sort的用法_图解Python | sort和sorted的区别

后台回复1024,解锁无限快乐!在Python中有两个用来排序的BIF,分别是sort()和sorted(),但是你知道他们之间的区别吗?什么时候用sort(),什么时候用sorted()?今天我们就来一起看看!以对列表进行排序为例:n=[1,3,2,0]nn=sorted(n)print(nn)m= ['b','a','d','c']mm=m.sort()print(mm)如上,我们...
原创
7阅读
0评论
0点赞
发布博客于 2 月前

python的条件判断稀硫酸_判断如下陈述是否正确?Python中字典的key值是唯一的,但是value值不唯一,可以重复。...

【多选题】连锁经营的原则()【单选题】在“资源管理器”窗口中,当用鼠标左键将选定的文件从源文件夹拖放到目的文件夹时,下面的叙述中,正确的是_________。【单选题】在Windows 桌面上,可以建立 ________ 。 的快捷方式图标。【单选题】目前,操作系统都是多任务操作系统,为了能够支持多任务处理,操作系统中的处理器调用程序时使用了 的方法将CPU分给多个任务,因此,从宏观上来看可以“同...
原创
0阅读
0评论
0点赞
发布博客于 2 月前

怎么改变z序_T检验&Z检验&AB test一网打尽!

作为一名假统计人,来介绍一下什么是T检验、Z检验,再拓展到工业界里经常提到的AB test吧。回顾T检验和Z检验的原理和方法流程有助于AB test噢!1. 什么是T检验?1) 统计学上的解释:主要用于样本含量较小(例如n<30),总体标准差σ未知的正态分布的检验。2) 那他有什么用呢?i) 比较两组数据的均值是否显著差异ii) 比较在不同时期的同一组数据中的均值是否显著差异iii) 比较该...
原创
0阅读
0评论
0点赞
发布博客于 2 月前

语言语法糖_Java中的6颗语法糖

来源:http://blog.csdn.net/danchu/article/details/54986442语法糖(Syntactic Sugar),也称糖衣语法,指在计算机语言中添加的某种语法,这种语法对语言本身功能来说没有什么影响,只是为了方便程序员的开发,提高开发效率。说白了,语法糖就是对现有语法的一个封装。Java作为一种与平台无关的高级语言,当然也含有语法糖,这些语法糖并不被虚拟机所...
原创
5阅读
0评论
0点赞
发布博客于 2 月前

python namespace不唯一_python的namespace的理解

python中的名称空间是名称(标识符)到对象的映射。具体来说,python为模块、函数、类、对象保存一个字典(__dict__),里面就是重名称到对象的映射。-------------------------------------------------------------------------------------------import urllibimport rex=1 # 变...
原创
11阅读
0评论
0点赞
发布博客于 2 月前

block的名词形式_block是什么意思中文翻译

block既能做名词也能做动词,那么你知道block做名词和动词分别都是什么意思吗?下面学习啦小编为大家带来block的英语意思解释和英语例句,欢迎大家一起学习!block作名词的意思:块;街区;大楼,大厦;障碍物,阻碍block作动词的意思:阻止;阻塞;限制block的英语音标:英 [blɔk] 美 [blɑk]block的时态:现在分词: blocking过去式: blocked过去分词: b...
原创
44阅读
0评论
0点赞
发布博客于 2 月前

迈普路由器访问控制列表配置命令_思科路由器基础配置命令

展开全部基础配32313133353236313431303231363533e59b9ee7ad9431333436316266置命令如下一、1.router(config)#router rip 启动rip进程2.router(conifg-router)#network 172.17.0.0指定rip协议的主网络3.router(config-router)#passive-interfac...
原创
21阅读
0评论
0点赞
发布博客于 2 月前

转网口显示未识别的网络_携号转网细则出炉,这些号码不支持

14日,三大运营商发布携号转网服务细则,并表示已于11月10日起进入试运行阶段。但有一批号码不能携号转网,快来看看!携号转网试运行,这些地区优先体验14日,中国移动称,于11月10日启动携号转网系统上线试运行,将在全国分阶段、分区域逐步开放携号转网服务申请,设置线上线下客户服务专席。中国联通称,11月10日起,中国联通携号转网服务在全国上线试运行。中国电信表示,11月10日,在前期天津、湖北、江西...
原创
0阅读
0评论
0点赞
发布博客于 2 月前

Hello

Im also facing the same issue while running basic example using Google API Recognition. Im getting below console error: A moment of silence, please... Traceback (most recent call last): File "D:\Python\lib\site-packages\speech_recognition__main__.py", line 8, in with m as source: r.adjust_for_ambient_noise(source) File "D:\Python\lib\site-packages\speech_recognition__init__.py", line 532, i n adjust_for_ambient_noise buffer = source.stream.read(source.CHUNK) File "D:\Python\lib\site-packages\speech_recognition__init__.py", line 190, i n read return self.pyaudio_stream.read(size, exception_on_overflow=False) File "D:\Python\lib\site-packages\pyaudio.py", line 608, in read return pa.read_stream(self._stream, num_frames, exception_on_overflow) OSError: [Errno -9988] Stream closed

My System is Win 7 Professional. My Python version is 3.6.3. My SpeechRecognition library version is 3.8.1. My PyAudio library version is 3.8.1. My Audio devices are(I tested with default audio device): Microphone with name "Microsoft Sound Mapper - Input" found for Microphone(devi ce_index=0) Microphone with name "Microphone (High Definition Aud" found for Microphone(dev ice_index=1) Microphone with name "Microsoft Sound Mapper - Output" found for Microphone(dev ice_index=2) Microphone with name "Speakers (High Definition Audio" found for Microphone(dev ice_index=3)

Can you please help me resole this issue?

回答的问题 #Basic Example not working
回答了问题于 2 月前

各位大佬的讨论让我学习到了很多,原来总觉得要一次把副本全拷贝出来,没想到还可以单独拷一个,下次接着拷,在仅仅可能导致单次显示不完全的情况下减少了内存占用,学习了

回答的问题 #list_thread临界区过长
回答了问题于 2 月前

伪命题,产品中谁没事执行list_thread? 甚至我都怀疑有多少人(除了睿赛德)会在产品中启用finsh组件? 另一个,不说100%的人吧,99.9%的人执行list_thread只会发生在debug阶段。 so,问题不大。顶多是defect,而不是bug. 其实这个问题就和#2023类似的。

伪命题,产品中谁没事执行list_thread? 甚至我都怀疑有多少人(除了睿赛德)会在产品中启用finsh组件? 另一个,不说100%的人吧,99.9%的人执行list_thread只会发生在debug阶段。 so,问题不大。顶多是defect,而不是bug. 其实这个问题就和#2023类似的。

其实这个就是在一个实际的控制系统上被发现的,有个远端监控系统调用ps等命令询问控制器状态,结果昨天更新完rtt上演了一出好戏

回答的问题 #list_thread临界区过长
回答了问题于 2 月前

list_thread临界区过长

finsh的list_thread为了保护kernel object的链表内容,使用了关中断的方式,但是,接下来_list_thread会调用rt_printf打印输出大量数据,由于串口打印速度很慢,因此临界区将变得非常非常长【甚至达到2s】,对于工业控制等高实时系统而言,这是致命的。 我觉得有两种解决方案,但是我觉得都不是特别完美: 1.使用enter_critical方式保护临界区,并使用带有TX缓冲输出的串口驱动【但是此时如果TX缓冲有限,此时相当于依然锁死了线程调度(不过中断可以响应了)】 2.在临界区拷贝出一份副本,并退出临界区打印【但是对于线程数目过多情况下会消耗大量内存】

该提问来源于开源项目:RT-Thread/rt-thread

36回答
发布问题于 2 月前

inputmask("phone") perfomance problem

used scripts:

init: $('.inputmask').inputmask('phone'); 2018-01-06_22-36-46

latency ~200-300 ms

init: $('.inputmask').inputmask('+9 (999) 999-99-99'); latency ~40 ms

Is it possible to solve this problem?

该提问来源于开源项目:RobinHerbots/Inputmask

3回答
发布问题于 2 月前

ok, we'll wait.

Thanks for your work!

回答的问题 #inputmask("phone") perfomance problem
回答了问题于 2 月前

Lag On init Windows 10, Chrome 63.0.3239.84

回答的问题 #inputmask("phone") perfomance problem
回答了问题于 2 月前

Special characters not escaped for zsh completion script

Rust Version

rustc 1.38.0 (625451e37 2019-09-23)

Affected Version of clap

clap 2.33.0

Expected Behavior Summary

Generated Zsh completions correctly complete possible_values even in the presence of characters that have a special meaning for the shell

Actual Behavior Summary

For example, when some string in possible_values contains | (a pipe) the generated completion script fails with


(eval):1: parse error near `|'

when pressing tab for that argument. That was the problem I ran into. I then tested some other special characters.

A sample of the characters I found to have problems: - | breaks completion script (eval):1: parse error near `|' - ; splits completion value into two - ? makes whole value not show up in completions - * makes whole value not show up in completions - " breaks completion script (eval):1: unmatched " - ` breaks completion script (eval):1: unmatched ` - $ interpreted as https://www.gnu.org/software/bash/manual/html_node/Special-Parameters.html when followed by some other chars - # makes whole value not show up in completions

There are more special characters, that need to be escaped. The reproduction from the repo tests against all non control ascii characters and some dollar-something strings.

Steps to Reproduce the issue

  • Clone reproduction repo git clone https://github.com/succcubbus/clap-zsh-completions-repro
  • cd clap-zsh-completions-repro
  • cargo run --release > _clap-zsh-completions-repro
  • Copy _clap-zsh-completions-repro somewhere into the $fpath of the zsh (e.g. /usr/local/share/zsh/site-functions)
  • cargo install --path .
  • rehash; compinit (so the zsh picks up the new binary and completions)
  • Type clap-zsh-completions-repro and try to complete the argument

Sample Code or Link to Sample Code

https://github.com/succcubbus/clap-zsh-completions-repro

Debug output

https://pastebin.com/KU4yd6FR

该提问来源于开源项目:clap-rs/clap

7回答
发布问题于 2 月前

+1 very needed feature ;)

回答的问题 #Add the possibility to show the progress circle on the FloatingActionMenu
回答了问题于 2 月前

Seems above process abort problem can be solved by add RegAllocPass

For example , my working config is


{
"redex" : {
  "passes" : [
    "RegAllocPass",
    "ShortenSrcStringsPass"
    ]
}
}

But the official document https://fbredex.com/docs/configuring

A Simple Example


{
"redex" : {
  "passes" : [
    "ReBindRefsPass",
    "BridgePass",
    "SynthPass",
    "FinalInlinePass",
    "DelSuperPass",
    "SingleImplPass",
    "MethodInlinePass",
    "StaticReloPass",
    "RemoveEmptyClassesPass",
    "ShortenSrcStringsPass"
  ]
}
}

This official example is not working at all in my enviroment,and there isn't RegAllocPass

Hope a detailed explanation for this situation..Thanks

回答的问题 #ABORT! Inconsistency found in Dex code for Landroid/support/v4/app/Fragment
回答了问题于 2 月前

trace.txt

Using config /Users/xxx/temp/redex/default.config Using binary (default) Extracting apk... Detected dex mode Api21DexMode Unpacking dex files Detecting Application Modules Unpacking APK finished in 0.20 seconds Running redex-all on 1 dex files Running redex binary at /tmp/redex.ImKeXy/redex-all dup_class_whitelist: { Lcom/facebook/soloader/MergedSoMapping; Ljunit/framework/TestSuite; L$r8$java8methods$utility } Loading classes from dex from /tmp/redex.ImKeXy/tmpiuupw2xg.redex_dexen/dex0/classes.dex Load classes from dexes completed in 0.2 seconds Deobfuscating dex elements completed in 0.0 seconds Process keep for whyareyoukeeping completed in 0.0 seconds Process keep for classes and members completed in 0.0 seconds Process keep for assumenosideeffects completed in 0.0 seconds Processing proguard rules completed in 0.0 seconds No Optimizations Rules completed in 0.1 seconds Initializing reachable classes completed in 0.0 seconds Redex_frontend completed in 0.4 seconds API Level Checker completed in 0.0 seconds Evaluating ShortenSrcStringsPass... ShortenSrcStringsPass (eval) completed in 0.0 seconds Hasher completed in 0.0 seconds Running ShortenSrcStringsPass... src strings shortened 513, 11441 bytes saved Hasher completed in 0.0 seconds ShortenSrcStringsPass (run) completed in 0.0 seconds Running IRTypeChecker...

回答的问题 #ABORT! Inconsistency found in Dex code for Landroid/support/v4/app/Fragment
回答了问题于 2 月前

ABORT! Inconsistency found in Dex code for Landroid/support/v4/app/Fragment

./redex -o out.apk /Users/xxx/github/transfrom/app/build/outputs/apk/debug/app-debug.apk -c ~/temp/redex/default.config

Trace output will go to ./trace.txt Trace settings: TRACEFILE=3 SHOW_TIMESTAMPS= SHOW_TRACEMODULE= TRACE_METHOD_FILTER= WARNING: No inliner config ABORT! Inconsistency found in Dex code for Landroid/support/v4/app/Fragment;.findFragmentByWho:(Ljava/lang/String;)Landroid/support/v4/app/Fragment;. Encountered overwrite of this register by MOVE_RESULT_OBJECT v1 Code: [0x7fc474428ec0] OPCODE: IOPCODE_LOAD_PARAM_OBJECT v1 [0x7fc474428ee0] OPCODE: IOPCODE_LOAD_PARAM_OBJECT v2 [0x7fc474427600] DEBUG: DBG_SET_PROLOGUE_END [0x7fc474427620] POSITION: Fragment.java:2282 [0x7fc474428e60] OPCODE: IGET_OBJECT v1, Landroid/support/v4/app/Fragment;.mWho:Ljava/lang/String; [0x7fc474428220] OPCODE: IOPCODE_MOVE_RESULT_PSEUDO_OBJECT v0 [0x7fc474428e80] OPCODE: INVOKE_VIRTUAL v2, v0, Ljava/lang/String;.equals:(Ljava/lang/Object;)Z [0x7fc474428d40] OPCODE: MOVE_RESULT v0 [0x7fc474428d60] OPCODE: IF_EQZ v0 [0x7fc475a000a0] TARGET: SIMPLE 0x7fc4718ae1c0 [0x7fc475a01680] TARGET: SIMPLE 0x7fc47426cf70 [0x7fc4744275a0] POSITION: Fragment.java:2288 [0x7fc4744275c0] DEBUG: DBG_END_LOCAL v1 [0x7fc474428a40] OPCODE: RETURN_OBJECT v1 [0x7fc475a00c10] TARGET: SIMPLE 0x7fc474428d60 [0x7fc474427540] POSITION: Fragment.java:2285 [0x7fc474427560] DEBUG: DBG_RESTART_LOCAL v1 [0x7fc474428a60] OPCODE: IGET_OBJECT v1, Landroid/support/v4/app/Fragment;.mChildFragmentManager:Landroid/support/v4/app/FragmentManagerImpl; [0x7fc474427ae0] OPCODE: IOPCODE_MOVE_RESULT_PSEUDO_OBJECT v0 [0x7fc4744232b0] OPCODE: IF_EQZ v0 [0x7fc474427480] POSITION: Fragment.java:2286 [0x7fc4744232d0] OPCODE: IGET_OBJECT v1, Landroid/support/v4/app/Fragment;.mChildFragmentManager:Landroid/support/v4/app/FragmentManagerImpl; [0x7fc474427b00] OPCODE: IOPCODE_MOVE_RESULT_PSEUDO_OBJECT v0 [0x7fc474428800] OPCODE: INVOKE_VIRTUAL v0, v2, Landroid/support/v4/app/FragmentManagerImpl;.findFragmentByWho:(Ljava/lang/String;)Landroid/support/v4/app/Fragment; [0x7fc474428820] OPCODE: MOVE_RESULT_OBJECT v1 [0x7fc47426cf70] OPCODE: GOTO [0x7fc47426c350] TARGET: SIMPLE 0x7fc4744232b0 [0x7fc4744274a0] POSITION: Fragment.java:2288 [0x7fc474428700] OPCODE: CONST v1, 0 [0x7fc4718ae1c0] OPCODE: GOTO

Traceback (most recent call last): File "/tmp/redex.ArRiDI/redex.py", line 233, in run_redex_binary subprocess.check_call(args, env=env, pass_fds=(logger.trace_fp.fileno(),)) File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 347, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/tmp/redex.ArRiDI/redex-all', '--apkdir', '/tmp/redex.ArRiDI/tmp2rg5wrze.redex_extracted_apk', '--outdir', '/tmp/redex.ArRiDI/tmpr1n29upq.redex_dexen', '--config', '/Users/lirui/temp/redex/default.config', '/tmp/redex.ArRiDI/tmpr1n29upq.redex_dexen/dex0/classes.dex']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/tmp/redex.ArRiDI/redex.py", line 934, in run_redex(args) File "/tmp/redex.ArRiDI/redex.py", line 912, in run_redex run_redex_binary(state) File "/tmp/redex.ArRiDI/redex.py", line 249, in run_redex_binary % script_filenames RuntimeError: redex-all crashed with exit code 1! You can re-run it under gdb by running /tmp/redex.ArRiDI/redex-gdb-od8gwo43.sh or under lldb by running /tmp/redex.ArRiDI/redex-lldb-jtf5rjcl.sh

default.config


{
"redex" : {
  "passes" : [
    "ShortenSrcStringsPass"
    ]
}
}

该提问来源于开源项目:facebook/redex

2回答
发布问题于 2 月前

deleting the .m2 directory (thx ) fixed this for me.

thanks!!!!

回答的问题 #NoClassDefFoundError: com/android/internal/os/BackgroundThread
回答了问题于 2 月前

Hey Justin,

I'd be happy to verify the issue for you. Just let me know when you have something ready and I'll test it right away.

Thanks!

回答的问题 #Checkboxes seem to require state be manually set
回答了问题于 2 月前

Formtastic 2.0.0.rc3 indeed resolves the issue for me. I was doing some custom wizardry to allow a date-picker field type, which does not work "out of the box" with 2.0.0.rc3, so I'll have to tackle that before upgrading.

Thank you for the quick response and resolution (and for working on such a useful library)!

回答的问题 #Checkboxes seem to require state be manually set
回答了问题于 2 月前

Checkboxes seem to require state be manually set

Apologies if this is my mistake somehow. I have a boolean field in my model called "top."

Merely rendering:

= form.input :top

Correctly generates a checkbox, but its state (checked vs unchecked) does not seem to reflect the object I'm editing / creating. In order to do this, I had to do the following:

= form.input :top, :as => :boolean, :input_html => { :checked => (.top ? 'checked' : nil) }

This behaves as expected (i.e. if .top is true, the box is checked). It seems kludgy to have to specify this. Am I missing something?

Thank you for your time.

I am using Formtastic 1.2.4, Rails 3.0.8 and Ruby 1.9.2.

该提问来源于开源项目:formtastic/formtastic

2回答
发布问题于 2 月前

I also have the problem of VimR not finding init.vim.

:healthcheck shows:

Screen Shot 2019-03-29 at 10 19 17

but the file is definitely there and can be loaded manually with :source.

LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=

Strangely, it works if I run VimR as root. The permissions seem fine however

-rwxrwxrwx  1 james  staff   111B Mar 29 10:24 /Users/james/.config/nvim/init.vim
回答的问题 #vimr no longer reads ~/.config/nvim/init.vim
回答了问题于 2 月前

I'm still seeing this on 0.9.3

回答的问题 #Nested Serialization throwing error for nil attributes
回答了问题于 2 月前

-007 In our case it was because we were referencing a deprecated AWS provided policy. Check if the policyies your are attaching are AWS provided and deprecated. If so attach policy is doing very weird.

回答的问题 #Not possible to upgrade to terraform 0.12 if using resource aws_lb_listener_certificate
回答了问题于 2 月前

We have the same problem with aws_iam_role_policy_attachment. It does attach the policy to the role (verified in aws console) but tf fails.

When applying changes to module.ssm_patch_management.aws_iam_role_policy_attachment.attach_ssm_policy_to_role3, provider "aws" produced an unexpected new value for was present, but now absent.

Note that we actually attach 5 policies. It only complains on one.

回答的问题 #Not possible to upgrade to terraform 0.12 if using resource aws_lb_listener_certificate
回答了问题于 2 月前

怎么登录和注册呀,麻烦作者告诉下

该提问来源于开源项目:motianhuo/wechat

13回答
发布问题于 2 月前

Hi ronag,

I also faced the problem that the decoding performance is not well on some mobile devices (even slower than javascript h264 decoder). Is it possible to share your revised code?

Thanks!

回答的问题 #Optimization - Use 32 bit instead of 8 bit in bit reader.
回答了问题于 2 月前

Unfortunately graph=None to the FileWriter didn't solve the issue, running quite quickly out even with just a few models.

回答的问题 #Large memory consumption 0.4
回答了问题于 2 月前

Yes this can be closed. I think the documentation created in #1241 is excellent and sufficient. I followed it exactly as shown and it worked. Thanks.

回答的问题 #jsonapi for POROs
回答了问题于 2 月前

I solved my problem using the information in #1241. This new way of adding serialization support to POROs helped.

回答的问题 #jsonapi for POROs
回答了问题于 2 月前

I'm inching closer. But now I can't get it to include my relationships...

My lame poro:


class Settings
  attr_accessor :id, :foo, :membership, :organization, :user

  def self.model_name
     ||= ActiveModel::Name.new(self)
  end

  def initialize(hash={})
     = hash
  end

  def cache_key
    "#{self.class.name.downcase}/#{self.id}-#{self.updated_at.strftime("%Y%m%d%H%M%S%9N")}"
  end

  def cache_key_with_digest
    "#{cache_key}/#{FILE_DIGEST}"
  end

  def updated_at
    [:updated_at] ||= DateTime.now.to_time
  end

  def read_attribute_for_serialization(name)
    if name == :id || name == 'id'
      id
    else
      [name]
    end
  end

  def id
    [:id] || ['id'] || object_id
  end

  def method_missing(meth, *args)
    if meth.to_s =~ /^(.*)=$/
      [$1.to_sym] = args[0]
    elsif .key?(meth)
      [meth]
    else
      super
    end
  end
end

My serializer:


class SettingsSerializer < ActiveModel::Serializer
  attributes :foo

  has_one :membership, serializer: MembershipSerializerWithOrganization
  has_one :organization, serializer: OrganizationSerializer
  has_one :user, serializer: UserSerializerWithMemberships

end

The result (note that the relationships are always null). Perhaps I no longer have an issue with poros anymore, but its this issue? #1180


{
    "data": {
        "attributes": {
            "foo": null
        },
        "id": "me",
        "relationships": {
            "membership": {
                "data": null
            },
            "organization": {
                "data": null
            },
            "user": {
                "data": null
            }
        },
        "type": "settings"
    }
}
回答的问题 #jsonapi for POROs
回答了问题于 2 月前

Sorry for being so late following up, but yes once I put the include in the serializer options it worked. Thanks! Now I have to figure out why its not wrapping it using "data" and "includes"

回答的问题 #jsonapi for POROs
回答了问题于 2 月前

I'm using grape and grape-active_model_serializers. My grape endpoint returns the PORO, and grape-active_model_serializers calls the serializer/adapter.

Ah, I didn't realize that the convention had changed from the include directive being in the serializer to being on the render. I'm not sure if grape-active_model_serializers will pass that include option along for me, but I can try and I'll get back to you.

回答的问题 #jsonapi for POROs
回答了问题于 2 月前

jsonapi for POROs

I've been unable to use the jsonapi adapter for any object that is not an ActiveRecord object and ActiveModel::SerializerSupport seems to have been removed. Is there any plan for 0.10.x to support POROs?

该提问来源于开源项目:rails-api/active_model_serializers

8回答
发布问题于 2 月前

Here's my model:

 ruby
module Poros
  class Settings
    # include ActiveModel::SerializerSupport
    attr_accessor :id, :membership, :organization, :user

    def initialize(attributes)
       = attributes[:id]
       = attributes[:membership]
       = attributes[:organization]
       = attributes[:user]
    end

    def self.model_name
       ||= ActiveModel::Name.new(self)
    end

    def initialize(hash={})
       = hash
    end

    def cache_key
      "#{self.class.name.downcase}/#{self.id}-#{self.updated_at.strftime("%Y%m%d%H%M%S%9N")}"
    end

    def cache_key_with_digest
      "#{cache_key}/#{FILE_DIGEST}"
    end

    def updated_at
      [:updated_at] ||= DateTime.now.to_time
    end

    def read_attribute_for_serialization(name)
      if name == :id || name == 'id'
        id
      else
        [name]
      end
    end

    def id
      [:id] || ['id'] || object_id
    end

    def method_missing(meth, *args)
      if meth.to_s =~ /^(.*)=$/
        [$1.to_sym] = args[0]
      elsif .key?(meth)
        [meth]
      else
        super
      end
    end
  end
end

Here's my serializer:

 ruby
class SettingsSerializer < ActiveModel::Serializer
  attributes :id
  has_one :membership, embed_in_root: true, serializer: MembershipSerializerWithOrganization
  has_one :organization, embed_in_root: true, serializer: OrganizationSerializer
  has_one :user
end

Here's a sample of the JSON I get as a response. You can see it doesn't look very JSONAPI-like. Additionally, the serializers for the related ActiveModel objects were not used. Those are simple to_json hashes.


{
    "attributes": {
        "id": "me",
        "membership": {
            "created_at": "2015-07-14T14:21:48.559Z",
            "id": "a86b662e-d484-4692-a68b-94a92b3a3968",
            "organization_id": "ca8cf9b0-47fc-4937-99e4-8a7eaa2a42f8",
            "role": "superadmin",
            "updated_at": "2015-07-14T14:21:48.559Z",
            "user_id": "f673f449-681a-4945-9545-9528c2840bab"
        },
        "organization": {
            "country_code": "CA",
            "created_at": "2015-07-14T14:21:48.390Z",
            "id": "ca8cf9b0-47fc-4937-99e4-8a7eaa2a42f8",
            "lft": 1,
            "municipality": "Toronto",
            "name": "Prestige Worldwide",
            "parent_id": null,
            "postal_code": "H0H0H0",
            "properties": null,
            "rgt": 6,
            "status": "active",
            "street_address_1": "80 North St",
            "street_address_2": null,
            "subdivision_code": "ON",
            "updated_at": "2015-07-14T20:12:01.057Z"
        },
        "user": {
            "created_at": "2015-07-14T14:21:48.534Z",
            "email": "superadmin.com",
            "id": "f673f449-681a-4945-9545-9528c2840bab",
            "status": "active",
            "updated_at": "2015-07-14T14:21:48.534Z"
        }
    }
}
回答的问题 #jsonapi for POROs
回答了问题于 2 月前

Hi I actually tried adding these methods to my poro, but I had some difficulty because my poro is just a container for 3 activemodel objects. I can't remember the exact result I got, but it didn't seem to serialize those AM objects properly.

回答的问题 #jsonapi for POROs
回答了问题于 2 月前

Ah yes to_json alone works. I thought I tried that at one point but had trouble. I can submit as a PR. Where would you like it in the namespace?

回答的问题 #JsonApi PaginationLinks doesn't work outside of ActionController
回答了问题于 2 月前

Oh and BTW, my workaround for this problem at the moment was to subclass the JsonApi adapter to simply skip links for now...


module API
  class AmsJsonapiAdapter < ActiveModel::Serializer::Adapter::JsonApi
    def links_for(serializer, options)
      {}
    end
  end
end
回答的问题 #JsonApi PaginationLinks doesn't work outside of ActionController
回答了问题于 2 月前

I was using a fork of grape-active_model_serializers https://github.com/Thanx/grape-active_model_serializers.git, but once I started using the jsonapi adapter, I built my own very simple grape json formatter:


module API
  module AmsFormatter
    class << self
      def call(resource, env)
        serializer_options = {}
        serializer_options.merge!(env['ams_serializer_options']) if env['ams_serializer_options']
        # For some reason serializable_hash doesn't include meta in the response, so I have to use as_json
        ActiveModel::SerializableResource.new(resource, serializer_options).as_json.to_json
      end
    end
  end
end

I also had to create this little grape helper to pass my serializer options to the formatter via the env:


        def render(resources, ams_serializer_options = {})
          env['ams_serializer_options'] = ams_serializer_options
          resources
        end

So now I can implement a grape endpoint like this and put metadata into the jsonapi response:


    formatter :json, API::AmsFormatter

     get ':id' do
       render(Resource.find(params[:id]), meta: { foo: 'bar' })
     end
回答的问题 #JsonApi PaginationLinks doesn't work outside of ActionController
回答了问题于 2 月前

Looking at the code, I can't even see how this would work for ActionController. The SerializableResource filters the adapter options, so that they must be one of [:include, :fields, :adapter, :meta, :meta_key, :links]. Which means there's no way the adapter options could contain a :context entry.

回答的问题 #JsonApi PaginationLinks doesn't work outside of ActionController
回答了问题于 2 月前

JsonApi PaginationLinks doesn't work outside of ActionController

I'm trying to use Grape+Kaminari+AMS 1.0 (head) and I get a stack trace like so...


(NoMethodError)undefined method `query_parameters' for nil:NilClass
/Users/jpaas/.rvm/gems/ruby-2.2.2/bundler/gems/active_model_serializers-da7e6dc795ac/lib/active_model/serializer/adapter/json_api/pagination_links.rb:52:in `query_parameters'
/Users/jpaas/.rvm/gems/ruby-2.2.2/bundler/gems/active_model_serializers-da7e6dc795ac/lib/active_model/serializer/adapter/json_api/pagination_links.rb:17:in `block in serializable_hash'
/Users/jpaas/.rvm/gems/ruby-2.2.2/bundler/gems/active_model_serializers-da7e6dc795ac/lib/active_model/serializer/adapter/json_api/pagination_links.rb:16:in `each'
/Users/jpaas/.rvm/gems/ruby-2.2.2/bundler/gems/active_model_serializers-da7e6dc795ac/lib/active_model/serializer/adapter/json_api/pagination_links.rb:16:in `each_with_object'
/Users/jpaas/.rvm/gems/ruby-2.2.2/bundler/gems/active_model_serializers-da7e6dc795ac/lib/active_model/serializer/adapter/json_api/pagination_links.rb:16:in `serializable_hash'
/Users/jpaas/.rvm/gems/ruby-2.2.2/bundler/gems/active_model_serializers-da7e6dc795ac/lib/active_model/serializer/adapter/json_api.rb:212:in `links_for'
/Users/jpaas/.rvm/gems/ruby-2.2.2/bundler/gems/active_model_serializers-da7e6dc795ac/lib/active_model/serializer/adapter/json_api.rb:103:in `serializable_hash_for_collection'
/Users/jpaas/.rvm/gems/ruby-2.2.2/bundler/gems/active_model_serializers-da7e6dc795ac/lib/active_model/serializer/adapter/json_api.rb:61:in `serializable_hash'
/Users/jpaas/.rvm/gems/ruby-2.2.2/bundler/gems/active_model_serializers-da7e6dc795ac/lib/active_model/serializable_resource.rb:14:in `serializable_hash'

It seems to assume that the context has been set as an ActionDispatch::Request. I would try setting it, but I can't figure out how to get it in Grape.

该提问来源于开源项目:rails-api/active_model_serializers

8回答
发布问题于 2 月前

added rubocop corrections to pull request

回答的问题 #Grape formatter feature requested in #1268
回答了问题于 2 月前

Grape formatter feature requested in #1268

for issue #1258

re: #1268

该提问来源于开源项目:rails-api/active_model_serializers

7回答
发布问题于 2 月前

:umbrella: The latest upstream changes (presumably #4625) made this pull request unmergeable. Please resolve the merge conflicts.

回答的问题 #Resolve respecting Ruby versions without `ruby` in the Gemfile
回答了问题于 2 月前

改了 batch_first 参数,暂时转换没有报错 以后有问题再补充

你好,请问是改torch中的batch_first参数么? nn.LSTM(nIn, nHidden, bidirectional=True,batch_first = True)

你好,请问你改batch_first =True成功了么,我改完还是报同样的错

回答的问题 #ONNX LSTM模型转换失败
回答了问题于 2 月前

that looks solid! perfecto.

回答的问题 #Request: Additional file input
回答了问题于 2 月前

Is it beyond the scope? It already creates a map element that is its own HTML page. It wouldn't be a horrible option and would be super useful for titles. As I'm programmatically building multiple maps, I don't want to hand write any of the files.

One could presumably import the map file into a more robust page. I'm serving them as their own pages individually.

Ex: http://coletownsend.github.io/ben-cole-project/

回答的问题 #Request: Additional file input
回答了问题于 2 月前

Request: Additional file input

It would be awesome if you could insert a CSS file when building this to style the page a bit. Or add additional elements to the webpage itself.

This is my workaround for now:

 python
# inset css file post map creation and title it.
            soup = BeautifulSoup(open("map/{}/index.html".format(year)))
            meta = soup.find('meta')
            css = soup.new_tag('link')
            css['rel'] = "stylesheet"
            css['href'] = "../map.css"
            meta.insert_after(css)

            body = soup.find('body')
            h1 = soup.new_tag('h1')
            h1.string = "TDF {} Map".format(year)
            body.insert_after(h1)

该提问来源于开源项目:python-visualization/folium

0回答
发布问题于 2 月前

Woo thanks!

回答的问题 #CDN links are broken.
回答了问题于 2 月前

Ah sorry man! It works fine when I spin up a local server, but just looking at it locally (i.e. as a file in safari) it doesn't work.

回答的问题 #CDN links are broken.
回答了问题于 2 月前

CDN links are broken.

The links below work, the ones that folium by default builds with doesn't seem to work for me.

 html
   <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css">


   <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

   <link rel="stylesheet" href="//rawgit.com/lvoogdt/Leaflet.awesome-markers/2.0/develop/dist/leaflet.awesome-markers.css">
   <script src="//rawgithub.com/lvoogdt/Leaflet.awesome-markers/2.0/develop/dist/leaflet.awesome-markers.js"></script>

   <script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>

   <link rel="stylesheet" href="//birdage.github.io/Leaflet.awesome-markers/dist/leaflet.awesome.rotate.css">
   <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css">

该提问来源于开源项目:python-visualization/folium

2回答
发布问题于 2 月前

:umbrella: The latest upstream changes (presumably #6531) made this pull request unmergeable. Please resolve the merge conflicts.

回答的问题 #Improve readability of outdated
回答了问题于 2 月前

:umbrella: The latest upstream changes (presumably #5114) made this pull request unmergeable. Please resolve the merge conflicts.

回答的问题 #Improve readability of outdated
回答了问题于 2 月前

Getting this on Android 7.0, Nexus 6p.

回答的问题 #Underflow in restore - more restores than saves : on Android M (6.0)
回答了问题于 2 月前

:sunny: Test successful - status-travis Approved by: indirect Pushing 9ca3afe30272a1403782cce0d600e7411e6cf709 to master...

回答的问题 #Use realpath in clean_load_path
回答了问题于 2 月前

:hourglass: Testing commit 865ec52 with merge 9ca3afe...

回答的问题 #Use realpath in clean_load_path
回答了问题于 2 月前

:pushpin: Commit 865ec52 has been approved by indirect

回答的问题 #Use realpath in clean_load_path
回答了问题于 2 月前

:broken_heart: Test failed - status-travis

回答的问题 #Use realpath in clean_load_path
回答了问题于 2 月前

:hourglass: Testing commit 1afd8df with merge 8129ffb...

回答的问题 #Use realpath in clean_load_path
回答了问题于 2 月前

:broken_heart: Test failed - status-travis

回答的问题 #Use realpath in clean_load_path
回答了问题于 2 月前

:hourglass: Testing commit 1afd8df with merge a534931...

回答的问题 #Use realpath in clean_load_path
回答了问题于 2 月前

:pushpin: Commit 1afd8df has been approved by indirect

回答的问题 #Use realpath in clean_load_path
回答了问题于 2 月前

:bulb: This pull request was already approved, no need to approve it again.

  • This pull request previously failed. You should add more commits to fix the bug, or use retry to trigger a build again.
  • There's another pull request that is currently being tested, blocking this pull request: #6570
回答的问题 #Use realpath in clean_load_path
回答了问题于 2 月前

:broken_heart: Test failed - status-travis

回答的问题 #Use realpath in clean_load_path
回答了问题于 2 月前

:hourglass: Testing commit 1afd8df with merge ff56a6d...

回答的问题 #Use realpath in clean_load_path
回答了问题于 2 月前