weixin_39600616的博客

私信 关注
weixin_39600616
码龄4年
  • 5,728
    被访问量
  • 108
    原创文章
  • 1,418,379
    作者排名
  • 6
    粉丝数量
  • 于 2017-07-24 加入CSDN
获得成就
  • 获得3次点赞
  • 内容获得0次评论
  • 获得13次收藏
荣誉勋章
  • 最近
  • 文章
  • 资源
  • 问答
  • 课程
  • 帖子
  • 收藏
  • 关注/订阅

Java形容一个人的代码_java设计一个人的类

展开全部importjava.util.Random;publicclassPerson{//姓名62616964757a686964616fe78988e69d8331333431346363privateStringname;//性别privateStringsex;//年龄privateintage;publicStringgetName(){returnname...
原创
0阅读
0评论
0点赞
发布博客于 12 天前

spatial java_spatial4j:一个Java的地理空间库

Spatial4j (note: Spatial4j's official home page is at LocationTech: https://www.locationtech.org/projects/technology.spatial4j but this README has richer information)Spatial4j is a general purpose s...
原创
3阅读
0评论
0点赞
发布博客于 15 天前

java home centos_Centos7配置JAVA_HOME

如果开发java应用,经常需要配置JAVA_HOME路径,如果是通过yum安装的jdk(一般系统会自带open-jdk),下面讲述配置过程:A 定位JDK安装路径1. 终端输入:which java输出为:/usr/bin/java2. 终端输入:ls -lr /usr/bin/java输出为:/usr/bin/java ->3. 终端输入ls -lrt /etc/alternatives/...
原创
2阅读
0评论
0点赞
发布博客于 15 天前

java中求一个数的平方根_如何使用java语言求一个正整数的平方根?(不使用库函数)...

今天的这篇文章是我在刷算法题的时候遇到的,最简单的方法是直接调用java里面的Sqrt函数,不过有时候题目中会要求我们不能使用库函数,所以在这里我们自己定义Sqrt方法。最常见的思路有两种,第一种是二分法,第二种是牛顿的微积分思想。没错,想当年大学时候学了很久很痛苦的微积分,被我第一次派上用场了。对于这两种方法我们一个一个看。一、二分法二分法的思想很简单,就是从0到N不断的去缩小范围来找一个一个满...
原创
5阅读
0评论
0点赞
发布博客于 16 天前

python socket编程之双方相互通信简单实例_python实现进程间通信简单实例

本文实例讲解了python实现两个程序之间通信的方法,具体方法如下:该实例采用socket实现,与socket网络编程不一样的是socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)的第一个参数是socket.AF_UNIX而不是 socket.AF_INET例中两个python程序 s.py/c.py 要先运行s.py基于fedor...
原创
4阅读
0评论
0点赞
发布博客于 16 天前

Java多线程Jdbc查询_Java JDBC查询在单独的线程锁父级中

我在理解这个问题上遇到了一些麻烦.这是正在发生的事情.我正在生成一个新的线程,它保存与Oracle数据库的JDBC连接.当我要求它连接到数据库时,父线程在调用start()方法时继续运行但是当我要求子进行查询时(在单独的方法上),父线程被卡住等待子线程的完成工作的方法.有什么猜测如何解决这个问题?提前致谢!public class Main extends Thread{public Main()...
原创
3阅读
0评论
0点赞
发布博客于 19 天前

java 线程开启关闭吗_java代码开启关闭线程(nginx)

importjava.io.BufferedReader;importjava.io.IOException;importjava.io.InputStreamReader;public classdemo3 {/*** @desc 启动进程 10.158 root root*/public static voidstartProc() {System.out.println("开启进程:" + ...
原创
4阅读
0评论
0点赞
发布博客于 19 天前

java 调用shell脚本 权限_Java调用shell脚本解决传参和权限问题的方法

1. java 执行shelljava 通过 Runtime.getRuntime().exec() 方法执行 shell 的命令或 脚本,exec()方法的参数可以是脚本的路径也可以是直接的 shell命令代码如下(此代码是存在问题的。完整代码请看2):/*** 执行shell* @param execCmd 使用命令 或 脚本标志位* @param para 传入参数*/private sta...
原创
3阅读
0评论
0点赞
发布博客于 19 天前

java webservice数组_java 调用webservice的各种方法总结

现在webservice加xml技术已经逐渐成熟,但要真正要用起来还需时日!!由于毕业设计缘故,我看了很多关于webservice方面的知识,今天和大家一起来研究研究webservice的各种使用方法。一、利用jdk web服务api实现,这里使用基于 SOAP message 的 Web 服务1.首先建立一个Web services EndPoint:packageHello;importj...
原创
0阅读
0评论
0点赞
发布博客于 20 天前

centos安装mysql5.6.35_CentOS6.5源码安装MySQL5.6.35

CentOS6.5源码安装MySQL5.6.35一、卸载旧版本1、使用下面的命令检查是否安装有mysql[root@localhost tools]# rpm -qa|grep -i mysql2、有的话就卸载[root@localhost tools]# yum remove MySQL-server-5.6.35-1.el6.i686[root@localhost tools]# yum re...
原创
2阅读
0评论
0点赞
发布博客于 20 天前

java udp 循环_java udp通信程序纠错,关于文件的接收端,接收的时候貌似循环出不来了,求指教...

接收端:publicvoidChat_init(finalHandlerhandler){try{System.out.println("test....");Toast.makeText(context,"开始接收",1000).show();Toast.makeText(context,"DatagramSocket"...接收端:public void Chat_init(final Han...
原创
0阅读
0评论
0点赞
发布博客于 22 天前

java变换变量_Java变量类型间的相互转换 [转]

我们知道,Java的数据类型分为三大类,即布尔型、字符型和数值型,而其中数值型又分为整型和浮点型;相对于数据类型,Java的变量类型为布尔型boolean;字符型char;整型byte、short、int、long;浮点型float、double。其中四种整型变量和两种浮点型变量分别对应于不同的精度和范围。此外,我们还经常用到两种类变量,即String和Date。对于这些变量类型之间的相互转换在我...
原创
2阅读
0评论
0点赞
发布博客于 23 天前

filter java exclude_Java网络编程如何从Filter中排除部分url

Java如何从Filter中排除部分url,默认情况下,只要您为过滤器定义了网址格式,过滤器就不支持排除特定的网址格式,那么与该格式匹配的任何请求都会被过滤器处理,而不会有例外。从过滤器中排除网址的最简单方法是将您的过滤器映射到特定的模式。在早期开发阶段完成时,这是可行的,但是如果您修改生产环境中现有过滤器的URL模式,则必须重新映射所有现有的servlet URL才能达到目的,否则这可能是一个繁...
原创
2阅读
0评论
0点赞
发布博客于 23 天前

linux ant java_Java 8 中使用Ant的 Wsimport 任务

Java 8 中使用Ant的 Wsimport 任务在使用ant构建时,抛出异常:java.lang.AssertionError: org.xml.sax.SAXParseException; systemId: ... schema_reference:Failed to read schema document 'xjc.xsd', because 'file' access is not ...
原创
1阅读
0评论
0点赞
发布博客于 23 天前

redis和mysql图书管理系统_基于SpringSecurity+SSM+SpringBoot+RabbitMQ+Redis+ShardingJdbc--在线图书管理系统...

后续会不断加入技术系统功能说明:​ 用户模块: 用户登录认证 用户授权 用户新增 用户修改 上传头像,验证表单,​ 用户删除, 批量删除, 高级查询 ,表格分页数据导出 等​ 菜单模块: 一级菜单维护 二级菜单维护,页面按钮维护 菜单列表信息​菜单图标选择器 等​ 权限模块: 权...
原创
4阅读
0评论
0点赞
发布博客于 25 天前

mysql dmz_2. 数据库DMZ语句—增删改查

DML语句增删改DML: INSERT, DELETE, UPDATEINSERT:一次插入一行或多行数据语法INSERT [L OW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE][INTO] tbl_name [(col_name,...)]{VALUES | VALUE} ({expr | DEFAULT},...),(...),...[ ON...
原创
2阅读
0评论
0点赞
发布博客于 25 天前

python规范化字符串_如何规范化python中的字符串列表?

从您的输入数据开始:>>> d = (("row a","a long string"))进行一次通过以确定每列的最大大小:>>> col_size = {}>>> for row in d:for i,col in enumerate(row):col_size[i] = max(col_size.get(i,0),len(col))>...
原创
2阅读
0评论
0点赞
发布博客于 25 天前

mysql函数第一次返回字符串_MySql 函数 POSITION 的使用:返回字符串的位置

1、按地区统计数据 select q.psn,t.name,sum(q.quarantinePigCount) from (select RPAD(substring(pigSourceNo,1,2),6,'0') as psn,quarantinePigCount from返回字符串substr在字符串str第一次出现的位置(str不包含substr时返回0)由 admin 在 18 天 之...
原创
9阅读
0评论
0点赞
发布博客于 1 月前

python模拟光照环境_树莓派通过C语言和python读取光照传感器

本实验是树莓派通过C语言和python读取光照传感器BH1750,获取当前环境光照的系数,环境越亮系数越高,并转换成百分比。BH1750FVI是一种用于两线式串行总线接口的数字型光强度传感器集成电路,利用本实验的这种集成电路可以根据收集的光线强度数据来调整液晶或者键盘背景灯的亮度。在笔者的应用就可以用于环境监测。1、接线图运行命令sudo i2cdetect -y 1 查看 地址为地址为0x23,...
原创
19阅读
0评论
0点赞
发布博客于 1 月前

mysql常用操作语句_MySql常用操作SQL语句汇总

MySQL的常见操作在这里先做一下总结,已经整合到代码里面,经过检验无误。代码如下:/*创建一个数据库*/create database xuning_test;/*说明当时使用数据库对象*/use xuning_test;/*向数据库中添加表并且定义表的结构*/create table person(id int not null,name varchar(16) not null,sex va...
原创
6阅读
0评论
0点赞
发布博客于 1 月前

mysql8.0 10亿_2020-01-26:mysql8.0做了什么改进?

福哥答案2020-01-26:2020-01-26:mysql8.0做了什么改进?帐户管理增加了对角色的支持。支持原子数据定义语句(atomic DDL)。支持utf8mb4字符集。InnoDB默认情况下在服务器启动时启用二进制日志。MySQL 8.0的十大新特性今天,让我们看一下MySQL8.0提升数据库管理员工作效率的十大改进。从一大堆特性你们找出十点并不太容易,以下是这十大特性:1.临时表的...
原创
5阅读
0评论
0点赞
发布博客于 1 月前

mysql创建函数function_【MySQL】MySQL创建函数(FUNCTION)

MySQL创建函数(FUNCTION)代码示例代码示例DROP FUNCTION IF EXISTS `getChildID`;DELIMITER ;;CREATE DEFINER=`seul`@`%` FUNCTION `getChildID`(areaId varchar(20)) RETURNS varchar(4000) CHARSET utf8BEGINDECLARE sTemp VAR...
原创
8阅读
0评论
0点赞
发布博客于 1 月前

mysql writeset_writeset参数配置探索——究竟在哪个角色上配置参数?

关于writeset,一直以来我都是所有节点同时配置下面参数:binlog_transaction_dependency_tracking=WRITESETtransaction_write_set_extraction=xxhash64但是这几天在尝试整理的时候,突然发现writeset的概念并不是想象中的那么清晰,也想要验证一下老师提到的结论:8.0的设计是针对从库,主库开启writeset后...
原创
9阅读
0评论
0点赞
发布博客于 1 月前

hbase mysql元数据_hive元数据存储在mysql 字符集utf8 修改

javax.jdo.option.ConnectionURLjdbc:mysql://IP:3306/hive?createDatabaseIfNotExist=true&characterEncoding=UTF-8JDBC connect string for a JDBC metastore表或者字段有中文的时候需要修改hive的元数据库的设置。以mysql为例子,当mysql的字符...
原创
7阅读
0评论
0点赞
发布博客于 1 月前

poco mysql 库_poco c++框架库应用:数据库的连接池

Poco c++中的数据库驱动部分,简洁,干净,工整,和数据库连接,封装成这样,还是比较好用的.下面是连接MySQL连接的方法.一 需求说明与MySQL数据库建立连接池,并在连接池中获得一个连接,实现数据库常用增删改查二 目标说明写出ANSI风格的代码,并输出高度结果到终端,验证程序的有效性三 调试条件:1.系统:ubuntu2.qt 或 其它IDE3.安装了mysql,有正确的访问账户和密码四 ...
原创
11阅读
0评论
0点赞
发布博客于 2 月前

nutz mysql 关键词_nutzboot如何配置mysql连接呢?

使用@Injectprotected Dao dao;后报如下错误信息:org.nutz.ioc.IocException: IocBean[mainLauncher] throw Exception when creatingat org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)at org.nutz.ioc.imp...
原创
7阅读
0评论
0点赞
发布博客于 2 月前

nacos持久化mysql8_Nacos 数据持久化 mysql8.0

一.问题描述直接下载的稳定版本nacos编译后的文件,不支持mysql8及其以上版本,按照官网文档:https://nacos.io/zh-cn/docs/deployment.html执行完成之后启动会报错,如下(错误信息没有截取完整): 二.问题处理下载nacos源码https://github.com/alibaba/nacos选择需要的版本,我这里选择的是1.0.0-R31.修改最外...
原创
8阅读
0评论
0点赞
发布博客于 2 月前

django 业务逻辑写在view里吗?_Django学习之路(2)项目目录文件说明

在上一篇里,我只是初始化了一个空的web项目,并没有对项目进行深入说明,这一篇将详细说明项目目录结构。项目目录结构项目下manage.py文件,这个是管理项目的文件,启动和结束等其他管理动作。项目下的blog文件夹展开,下面有的几个重要文件__init__.py文件,这是一个空文件,它的作用是让一个代码文件夹变成一个可以被import的软件包。settings.py文件,这个是项目的配置...
原创
7阅读
0评论
0点赞
发布博客于 2 月前

mysql http_put_Mysql调用Http接口

一、安装mysql-http-udf1、下载mysql-http-udf-1.0.tar.gz2、安装libcurl,否则会报错yum install -y libcurl*3、编译tar zxvf mysql-udf-http-1.0.tar.gzcd mysql-udf-http-1.0./configure --prefix=/usr/local/mysql-udf-http --with-...
原创
11阅读
0评论
0点赞
发布博客于 2 月前

qt mysql存储过程_qt mysql存储过程

{"moduleinfo":{"card_count":[{"count_phone":1,"count":1}],"search_count":[{"count_phone":4,"count":4}]},"card":[{"des":"阿里云数据库专家保驾护航,为用户的数据库应用系统进行性能和风险评估,参与配合进行数据压测演练,提供数据库优化方面专业建议,在业务高峰期与用户共同保障数据库系统平...
原创
5阅读
0评论
0点赞
发布博客于 2 月前

每隔一段时间执行一次mysql5.6_每隔一段时间查询一次数据库

{"moduleinfo":{"card_count":[{"count_phone":1,"count":1}],"search_count":[{"count_phone":4,"count":4}]},"card":[{"des":"阿里云数据库专家保驾护航,为用户的数据库应用系统进行性能和风险评估,参与配合进行数据压测演练,提供数据库优化方面专业建议,在业务高峰期与用户共同保障数据库系统平...
原创
6阅读
0评论
0点赞
发布博客于 2 月前

修改数据库的mysql密码_修改MySQL数据库用户密码方法大全总结

一:直接使用mysqladmin命令修改root用户密码1):若root用户无密码,则mysqladmin -u root password newpassword;2):若root用户已有密码,则mysqladmin -u root -poldpassword password newpassword;二:登陆数据库修改root密码root用户密码存储在mysql数据库的mysql的user中,...
原创
11阅读
0评论
0点赞
发布博客于 2 月前

单元测试总结反思_单元测试后反思

周四晚上考试第三单元,今天上午补课,讲评完试卷,因为试卷选择题多,批改较快,考试成绩令人非常不满意。讲评试卷效果也太理想。于是反思如何更好的应对各类语文试题?学生平时课本知识的积累不少,为什么一到做题就错误百出?如何更有效的讲评试题?搜索简书文章,得出讲评试卷的经典诀窍:因题施教,因人而评。由点及面,化评为练。澄清方向,锤炼思维。对于阅读理解题可以这样处理1.投影出示“标准答案”,对照自己的答案,...
原创
1阅读
0评论
0点赞
发布博客于 2 月前

android shape 按钮背景_圆形按钮的android更改背景颜色

I have a button in android which I have made circular in shape. Also I have an xml which changes the background color on pressed, but the color goes back to normal after the pressed state is changed.I...
原创
5阅读
0评论
0点赞
发布博客于 2 月前

前后对接数字几_英语这些数字表达的方法,几分之几、倒数第几、年份,有多少人真的懂了...

3秒时间,想出倒数第一的英语是什么?我猜百分之80的人都能想到是last那么5秒时间,倒数第二的英语怎么说?英语中【倒数第几】、【几分之几】【小数的读法】【年份】【日期】【时间】这些很多人不都了解吧?事实上,真正能把这些知识点掌握清楚的很少。 这里梳理分享一下这些知识点。01 倒数第几怎么说倒数第二由于和倒数第一很接近,所以比较特殊,有好几种可以表达,比如:①next to last②last b...
原创
3阅读
0评论
0点赞
发布博客于 2 月前

常规英文字体 电商_最强电商美工逆袭系列1——最全的电商字体应用详解

前言最近还是老样,挺忙!常有朋友来微信找我聊,我觉得交流本身就是挺好的事!其中有一位应届刚出来工作的朋友,挺聊得来,于是有了这篇文章,从学术上不值一提,但也是我多年总结的经验,适用于刚上路不知道如何选择--------------------------------------------------------------------------------------------------一...
原创
5阅读
0评论
0点赞
发布博客于 2 月前

android移动应用开发思维导图_基于react开发的带富文本编辑功能的思维导图编辑器开源啦...

基于react ,immutable.js 以及 slate 构建的思维导图app : react-mindmap 开源啦!!在线演示:https://awehook.github.io/react-mindmap/喜欢的话欢迎点个star啊!!这个项目用到了我开发的思维导图类库blink-mind-react对这块有兴趣的同学欢迎fork, 以及提PRscreentshots:富文本编辑,可以插...
原创
8阅读
0评论
0点赞
发布博客于 2 月前

安卓大json文件解析_Android - JSON数据的封装和解析

听着谢春花的《茶花伴》。--其中的雨生哀 镜尘满 韶颜虽易改。弃脂彩 肠何断 拂手去青苔。写出是一个带着酒气和茶味少女在朦朦小雨☔️下,独自弹着????漫步在陡缓的山路中,似乎好像长期等待⌛️心目中另一半人。然而在旁边的小溪照着水镜,看着美好的年华渐渐流失而感到美好的环境只是又一春天来,内心又一次衷心诉了春过半 平生光影短。让我们在惜别和怀念的时候但愿有茶花伴吧!相信android从事着多json格式的...
原创
4阅读
0评论
0点赞
发布博客于 2 月前

Hi, thanks for your answer, I have tried using double, it is more robust but it doesn't solve, I will prepare a minimal example so the error will be further documented. I can confirm that my net works using other configurations and activation functions.

Moreover, I must say that even with the same data I can run the training several times and I do not always get nan, and I also get different performances (between 80% and 95%). I believe that the variations in the performances depends on the random weights initialization, it should converge increasing epochs and number of neurons. When it goes to 50% it just means that it is not working as it picks classes randomly.

However, what I think is that there should be some nan check in the activation function to detect when a neuron is failing in order to give an exception because that neuron cannot be activated anymore and the error will propagate. This can be an improvement in the robustness of the library.

回答的问题 #cross entropy gives nan
回答了问题于 2 月前

cross entropy gives nan

Dear Developers,

first of all thanks for sharing with the community your amazing work. I have recently started to use this library in one of my projects and I have noted some numerical instability using the cross-entropy loss function with relu activation, sometimes I get NaN in some neurons so the network drops. I am aware of the possible numerical instability exists in the theory, however, is there any function to prevent the instability or at least warn the user that the train did not succeed ?

Does anybody experimented this before?

Thanks Mauro

该提问来源于开源项目:tiny-dnn/tiny-dnn

4回答
发布问题于 2 月前

I faced the issue when upgrading to v0.12.2 from v0.11.3. I guess it's a bug that assume Nilable Marshaler will have Elem at the same time. The following patch can work around, but I',m not sure any other edge cases will happen.

diff
                {{- else if eq ($type.GO | ref) "map[string]interface{}" }}
                    return v.(map[string]interface{}), nil
                {{- else if $type.IsMarshaler }}
-                   {{- if $type.IsNilable }}
+                   {{- if and $type.IsNilable $type.Elem }}
                        var res = new({{ $type.Elem.GO | ref }})
                    {{- else}}
                        var res {{ $type.GO | ref }}
                    {{- end }}
                    err := res.UnmarshalGQL(v)
                    return res, graphql.WrapErrorWithInputPath(ctx, err)
回答的问题 #v0.12.1 crashes inside gotpl where v0.11.3 gives error messages
回答了问题于 2 月前

Support slave and master mode runtime config.

回答的问题 #rockchip: spi: support slave and master mode runtime config
回答了问题于 2 月前

Support slave and master mode runtime config.

回答的问题 #rockchip: spi: support slave and master mode runtime config
回答了问题于 2 月前

rockchip: spi: support slave and master mode runtime config

Change-Id: Iabadbade8997bb8e3adef8ce95f6c45f6bb35329 Signed-off-by: Yifeng Zhao

拉取/合并请求描述:(PR description)

[ Support slave and master mode runtime config. ]

以下的内容不应该在提交PR时的message修改,修改下述message,PR会被直接关闭。请在提交PR后,浏览器查看PR并对以下检查项逐项check,没问题后逐条在页面上打钩。 The following content must not be changed in submitted PR message. Otherwise, the PR will be closed immediately. After submitted PR, please use web browser to visit PR, and check items one by one, and ticked them if no problem.

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • [ ] 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • [x] 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • [x] 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • [ ] 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other style
  • [ ] 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • [ ] 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • [ ] 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • [ ] 本拉取/合并请求代码是高质量的 Code in this PR is of high quality

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

2回答
发布问题于 2 月前

Added PR as issue #74

回答的问题 #secret_key_base not defined
回答了问题于 2 月前

I think so. I'm not sure how to ignore, though. This is the code in railties/lib/rails/application.rb that tries to load the config (and throws the error)


def env_config
   ||= begin
    if config.secret_key_base.nil?
      ActiveSupport::Deprecation.warn "You didn't set config.secret_key_base in config/initializers/secret_token.rb file. " +
        "This should be used instead of the old deprecated config.secret_token in order to use the new EncryptedCookieStore. " +
        "To convert safely to the encrypted store (without losing existing cookies and sessions), see http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#action-pack"

      if config.secret_token.blank?
        raise "You must set config.secret_key_base in your app's config"
      end
    end
  ...

I don't know how to bypass that code from rails-api.

回答的问题 #secret_key_base not defined
回答了问题于 2 月前

secret_key_base not defined

A new rails4 API app raises an error because secret_key_base is not defined.

I've taken a look at the rails code and it seems that secret_key_base or the deprecated secret_token must be defined (correct me if I'm wrong).

Rails-api doesn't define either of them. I'm not sure if it should for an api-only app.

So, should one of those config values be defined in the app skeleton? Or should rails-api try to ignore them for an api-only app?

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

13回答
发布问题于 2 月前

We could put back the removed session middleware but condition its use by the api_only flag, as it is done for the Rails 3 stack. Combined with setting api_only to false could fix problem. (Just guessing, haven't tested it).

回答的问题 #Breaks secure_session_store in Rails 4
回答了问题于 2 月前

Are you using an SPA framework or not?

回答的问题 #Is it possible to ExecuteJavaScript or emulate user actions like key pressing on loaded page?
回答了问题于 2 月前

I run this dotnet electronize build /target win7-x86 and everything seems to work fine. Use the code for your publishing or refer to publishing targets in the documentation

回答的问题 #Applications created with Electron.NET does not launch after a build
回答了问题于 2 月前

Can you share the code or develop a simple sample that produces the problem. If I have been doing my correctly, your output should not show at all.

回答的问题 #Applications created with Electron.NET does not launch after a build
回答了问题于 2 月前

To create an installer is a bit tricky. The shortest way for me is to rather package the ../obj/desktop/win7-x86 folder with electron-packager if you build for win32. It is easier changing the name of the application, setting the icon and providing other useful information.

While i have not tried that, it should be easier to set the update features from there

回答的问题 #Publish / installer / auto update guidance?
回答了问题于 2 月前

The problem is your .csproj. I ran into the same issue today. I had inadvertently modified a part of my csproj i couldn't remember.

Try copying and pasting a working csproj of a different project that works. If the need be, reinstall all nuget packages that will be missing.

Then lastly, avoid updating the netcore packages, e.g. entityframework etc. This project only works with netcore 2 and updating any dependency to a different version can be fatal

回答的问题 #Unable to build (The given key was not present in the dictionary.)
回答了问题于 2 月前

In Rails 4 StrongParameters is in the list of modules included by ActionController::Base. In rails-api it's not. I was tempted to add StrongParameters to the list of modules for ActionController::API but that would probably be a bad idea if used for a Rails 3 API app.

回答的问题 #ActionController:API should include StrongParameters
回答了问题于 2 月前

ActionController:API should include StrongParameters

For a Rails 4 API application, since this is the default way to deal with mass assignment security, shouldn't StrongParameters be included by default?

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

9回答
发布问题于 2 月前

JFX POPUP , when ever I set content(a vbox) in popup it is showing Nullpointer exception.

`
// popup initialize JFXButton b1 = new JFXButton("View"); JFXButton b2 = new JFXButton("Edit"); JFXButton b3 = new JFXButton("Delete"); JFXButton b4 = new JFXButton("Add to");

    b1.setPadding(new Insets(10));
    b2.setPadding(new Insets(10));
    b3.setPadding(new Insets(10));
    b4.setPadding(new Insets(10));

    VBox vbox=new VBox(b1,b2,b3,b4);

     popup.setPopupContent(vbox);
     popup.
 }




private void showPopup(MouseEvent event) {
    if (event.getButton() == MouseButton.SECONDARY) {
        popup.setAutoFix(true);
        popup.show(view,JFXPopup.PopupVPosition.TOP, JFXPopup.PopupHPosition.LEFT, event.getX(), event.getY());
    }
}`

该提问来源于开源项目:jfoenixadmin/JFoenix

2回答
发布问题于 2 月前

Oo my bad. Thanks a ton bro.

回答的问题 #JFX POPUP , when ever I set content(a vbox) in popup it is showing Nullpointer exception.
回答了问题于 2 月前

Thanks in advance bro, but I think I have properly initialized. Have a look at the complete code. `public class LaunchController implements Initializable {

private JFXTextField searchfield;

private JFXHamburger hammenu;

private JFXListView<Label> view;

private JFXButton addtogroup;

private JFXButton delete;

private JFXButton export;

private JFXButton search;

private JFXButton add;

private AnchorPane pane;

private StackPane stackpane;
private JFXPopup popup;

databasehandler databaseHandler1;






public  void initialize(URL url, ResourceBundle rb) {
    try {
        databaseHandler1 = databasehandler.getInstance();  //getting an object 
        String qu = "Select name FROM CONTACT";
        ResultSet rs = databaseHandler1.execQuery(qu);
        if (rs != null) {
            while (rs.next()) {
                String name = rs.getString("name");
                Label lbl = new Label("     " + (name));
                if (new File("D:\\Work\\Programming\\javaFx Projects\\Contact\\src\\contact\\ui\\files\\Profile\\" + name + ".jpg").exists()) {
                    FileInputStream fis = new FileInputStream("D:\\Work\\Programming\\javaFx Projects\\Contact\\src\\contact\\ui\\files\\Profile\\" + name + ".jpg");
                    Image image = new Image(fis, 35, 35, true, true);
                    lbl.setGraphic(new ImageView(image));
                } else {
                    FileInputStream fis = new FileInputStream("D:\\Work\\Programming\\javaFx Projects\\Contact\\src\\contact\\ui\\files\\person.png");
                    Image image = new Image(fis, 35, 35, true, true);
                    lbl.setGraphic(new ImageView(image));
                }

                view.getItems().add(lbl);
            }
        }
    } catch (FileNotFoundException | SQLException ex) {
        Logger.getLogger(LaunchController.class.getName()).log(Level.SEVERE, null, ex);
    }
   initpopup();
}

private void addnewview(MouseEvent event) throws IOException {
    AnchorPane newpane = FXMLLoader.load(getClass().getResource("/contact/ui/addnew/Add new.fxml"));
    pane.getChildren().setAll(newpane);
}

 private void initpopup(){

// popup initialize
    JFXButton b1 = new JFXButton("View");
    JFXButton b2 = new JFXButton("Edit");
    JFXButton b3 = new JFXButton("Delete");
    JFXButton b4 = new JFXButton("Add to");

    b1.setPadding(new Insets(10));
    b2.setPadding(new Insets(10));
    b3.setPadding(new Insets(10));
    b4.setPadding(new Insets(10));

    VBox  vbox=new VBox(b1,b2,b3,b4);

    popup.setPopupContent(vbox);

 }




private void showPopup(MouseEvent event) {

    if (event.getButton() == MouseButton.SECONDARY) {
        popup.setAutoFix(true);
        popup.show(view,JFXPopup.PopupVPosition.TOP, JFXPopup.PopupHPosition.LEFT, event.getX(), event.getY());
    }

}

} `

回答的问题 #JFX POPUP , when ever I set content(a vbox) in popup it is showing Nullpointer exception.
回答了问题于 2 月前

Ignore the popup. line.

回答的问题 #JFX POPUP , when ever I set content(a vbox) in popup it is showing Nullpointer exception.
回答了问题于 2 月前

There is a guide to using a CMK for AMI encryption here: https://aws.amazon.com/blogs/security/how-to-create-a-custom-ami-with-encrypted-amazon-ebs-snapshots-and-share-it-with-other-accounts-and-regions/

This IAM user or role also needs to be able to perform the KMS DescribeKey, CreateGrant, GenerateDataKey and ReEncypt operations on the source account’s KMS CMK, cmkSource.

All of the above operations are supported by aws_kms_grant, note I'm not sure if you need both ReEncryptTo and ReEncryptFrom.

(As a side note, RevokeGrant requires special privileges see the docs, and RetireGrant has the exact same functionality. So if you ever need it in the future you should probably use RetireGrant).

回答的问题 #AWS_KMS_GRANT missing operations
回答了问题于 2 月前

You can see the list of valid operations here: https://docs.aws.amazon.com/cli/latest/reference/kms/create-grant.html

Where valid values are: Decrypt Encrypt GenerateDataKey GenerateDataKeyWithoutPlaintext ReEncryptFrom ReEncryptTo CreateGrant RetireGrant DescribeKey

回答的问题 #AWS_KMS_GRANT missing operations
回答了问题于 2 月前

I will work on this.

回答的问题 #Include a link from 16 blog post to 15.5
回答了问题于 2 月前

looks like the issue has been fixed in #1511

回答的问题 #Click the link will change the original website and open a new tab at the same time
回答了问题于 2 月前

Having the same issue as . I have already set hrefTargetBlank = true. Everything works fine on my localhost:1313 but on the published website (hosted by Netlify) it's error behavior: external site opened in original AND new tab.

Edit: Changing it to false didn't change any behavior either. Did I miss something?

回答的问题 #Click the link will change the original website and open a new tab at the same time
回答了问题于 2 月前

Why not use


use MongoDB\BSON\UTCDateTime;

new UTCDateTime('your date');

$modelResult = [
    'date'=> $obj['date']->toDateTime()
]
回答的问题 #How to store the datetime by unix timestamp
回答了问题于 2 月前

Support insecure mode for https transport

该提问来源于开源项目:elasticsearch-dump/elasticsearch-dump

6回答
发布问题于 2 月前

Same request - the source code hard is to find otherwise.

回答的问题 #No github repo for create-react-class
回答了问题于 2 月前

+1. Rolled back to Laravel v5.3.18, which works.

回答的问题 #Laravel 5.3: Call to a member function supportsSchemaTransactions() on null
回答了问题于 2 月前

Many thanks - that worked a treat. It was in my own code, and now that I see where the problem was, I shouldn't have assumed a blanket search over my own project for the word "title" wouldn't have worked... But this change you've implemented should help other folks experiencing deprecation warnings in the future.

回答的问题 #Getting lots of "deprecated: call #name instead" messages
回答了问题于 2 月前

Thanks for getting back to me. Here goes the gemfile - I am using RefineryCMS and am trying to upgrade to version 3. Had no issues before the upgrade - but the upgrade has affected quite a few gems. I am getting no stack trace for deprecation warnings. Please let me know how I can switch it on for cucumber.


source 'https://rubygems.org'
ruby "2.1.3"

gem 'rails'
gem 'pg'
gem 'fog'
gem 'delayed_job_active_record' #, "=0.3.3"  # without PG 9.1 you get lock errors
gem "workless", "~> 1.1.3"
gem "daemons"
gem 'jquery-rails'
gem 'carmen-rails', '~> 1.0.0'
gem 'gibbon' #, '~> 0.3.5'
gem 'memcachier'
gem 'dalli'
gem 'twitter'
gem 'sass', '~> 3.2.15'  # as per https://github.com/sass/sass/issues/1162, errors while saving cache at Heroku, can't dump anonymous class
gem "acts-as-taggable-on"  # needed for rake tasks for refinerycms-blog

group :development, :test do
  gem 'yaml_db', :git => "git://github.com/lostapathy/yaml_db.git"
  gem 'refinerycms-testing' #, '~> 2.1.2'
end

group :test do
  gem 'cucumber' 
  gem 'cucumber-rails', require: false # required code for refinerycms 2.1.2 upgrade
  gem 'capybara-webkit'
  gem 'launchy'
  gem 'turn', :require => false
  gem 'minitest'
  gem 'email_spec'
  gem 'rspec-activemodel-mocks'
end

group :production, :staging do
  gem 'newrelic_rpm'
  gem 'rails_12factor'
  gem 'heroku-deflater', '0.5.2'  # enables gzip compression for rails on heroku, locked to 0.5.2 because of https://github.com/romanbsd/heroku-deflater/issues/15
  gem "dragonfly-s3_data_store"
end

gem 'unicorn'

# Refinery CMS
gem 'refinerycms', '~>3.0.0'

gem 'refinerycms-blog', :git => 'git://github.com/refinery/refinerycms-blog.git', :branch => 'master'
gem 'refinerycms-inquiries', :git => 'git://github.com/refinery/refinerycms-inquiries.git', :branch => 'master'
gem 'refinerycms-authentication-devise', '~> 1.0'

gem 'refinerycms-prayer_points', :path => 'vendor/extensions'
gem 'refinerycms-tours', :path => 'vendor/extensions'
回答的问题 #Getting lots of "deprecated: call #name instead" messages
回答了问题于 2 月前

Getting lots of "deprecated: call #name instead" messages

I have looked at the source of running_test_case.rb and can see what is causing all these deprecation warnings (three per scenario). Apparently somewhere in my code/config (or in the code of a gem that I am using) something is calling this 'title' method instead of a 'name' method. However, I have no idea quite what piece of code is calling this; it's beyond my current ruby debugging skills! My tests all seem to run fine - but getting three lines of deprecation warning for every scenario creates a lot of noise. The issue seems a little like #232.

该提问来源于开源项目:cucumber/cucumber-ruby

3回答
发布问题于 2 月前

The workaround has been put forth by Dan.

回答的问题 # links appear broken
回答了问题于 2 月前

7 怎么查看文件夹容量_电脑C盘内存空间不足怎么办?壮士莫慌,小妙招轻松解决!【C盘清理篇】...

№电脑C盘内存空间不足怎么办?壮士莫慌,小妙招轻松解决!【C盘清理篇】很多机友在日常使用当中会发现C盘容量用着用着突然就所剩无几了,系统运行变慢,软件变卡等等,C盘空间不足着实让人蛋疼的。原因一般为以下几种「1」.在安装系统的时候,某些快速分区软件是按照 Windows XP 的系统占用空间来分区的,所以造成现在新系统几乎快没有落脚之地。 ...
原创
0阅读
0评论
0点赞
发布博客于 2 月前

ALL_BUILD succeeds with CMake GUI

回答的问题 #Build issue | Xcode 7.2 Apple LLVM version 7.0.2 (clang-700.1.81) Target: x86_64-apple-darwin14.5.0
回答了问题于 2 月前

thanks , let us know if u need any help w/ Travis CI

回答的问题 #Build issue | Xcode 7.2 Apple LLVM version 7.0.2 (clang-700.1.81) Target: x86_64-apple-darwin14.5.0
回答了问题于 2 月前

OK, so I am not closing this. can you flag this as a separate Win issue?

回答的问题 #Build issue | Xcode 7.2 Apple LLVM version 7.0.2 (clang-700.1.81) Target: x86_64-apple-darwin14.5.0
回答了问题于 2 月前

Build issue | Xcode 7.2 Apple LLVM version 7.0.2 (clang-700.1.81) Target: x86_64-apple-darwin14.5.0

CMake generates files properly, but none of the header files is detected at the very start of the of the config.h so i need to point out to the directory manually


#ifndef EASTL_EABASE_DISABLED
    #include <eabase>
#endif
    #include <eabase>
</eabase></eabase>

该提问来源于开源项目:electronicarts/EASTL

13回答
发布问题于 2 月前

之前测试过,可以防撤回,但是不知道什么时候失效了,难道是因为更新的问题?

回答的问题 #撤回不生效,新版本会阻碍打开小程序
回答了问题于 2 月前

撤回不生效,新版本会阻碍打开小程序

1.撤回不生效,测试了一下没有防撤回功能 2.新版本不安装时可以打开小程序,安装后变成打开新账号,tweak会被调用导致无法打开小程序。变成打开新账号了,卸载后可以。

该提问来源于开源项目:Sunnyyoung/WeChatTweak-macOS

7回答
发布问题于 2 月前

I encountered the same problem when trying to convert a customized PyTorch model. Have you solved this problem?

回答的问题 #Error when converting Pytorch model to IR
回答了问题于 2 月前

Convert custom PyTorch models to IR error

Platform (like ubuntu 16.04/win10): Ubuntu 16.04

Python version: 2.7.14

Source framework with version (like Tensorflow 1.4.1 with GPU): PyTorch 0.4.0

Destination framework with version (like CNTK 2.3 with GPU): IR

Pre-trained model path (webpath or webdisk path): customized PyTorch model

Running scripts: mmtoir -f pytorch -d resnet101 --inputShape 3,224,224 -n imagenet_resnet101.pth

I made some modification to the PyTorch ResNet and tried to convert it to IR, but I got the following errors:


Traceback (most recent call last):
  File "/home/bcheng/anaconda2/bin/mmtoir", line 11, in <module>
    load_entry_point('mmdnn==0.2.3', 'console_scripts', 'mmtoir')()
  File "/home/bcheng/anaconda2/lib/python2.7/site-packages/mmdnn/conversion/_script/convertToIR.py", line 192, in _main
    ret = _convert(args)
  File "/home/bcheng/anaconda2/lib/python2.7/site-packages/mmdnn/conversion/_script/convertToIR.py", line 92, in _convert
    parser = PytorchParser(model, inputshape[0])
  File "/home/bcheng/anaconda2/lib/python2.7/site-packages/mmdnn/conversion/pytorch/pytorch_parser.py", line 76, in __init__
    model = torch.load(model_file_name, map_location='cpu')
  File "/home/bcheng/anaconda2/lib/python2.7/site-packages/torch/serialization.py", line 303, in load
    return _load(f, map_location, pickle_module)
  File "/home/bcheng/anaconda2/lib/python2.7/site-packages/torch/serialization.py", line 469, in _load
    result = unpickler.load()
ImportError: No module named models.resnetv1
</module>

I tried

torch.load('imagenet_resnet101.pth')
and it worked fine.
Any suggestions how to convert this model? Thanks!

该提问来源于开源项目:microsoft/MMdnn

2回答
发布问题于 2 月前

It works! Thanks!

回答的问题 #Convert custom PyTorch models to IR error
回答了问题于 2 月前

Thanks, I think my problem is mostly related to #281 but it has not been solved in #281 yet. Do you know why torch.load() cannot load a modified class?

回答的问题 #Convert custom PyTorch models to IR error
回答了问题于 2 月前

thanks for the review. I see some checks failed but I can't see the reasoning. Please let me know if it is anything on my side

回答的问题 #GODRIVER-491: fix local certificate
回答了问题于 2 月前

thanks for the review. I made a change to the PR. Please verify that the changes made are what your thoughts were.

回答的问题 #GODRIVER-491: fix local certificate
回答了问题于 2 月前

A better solution might be the following:

https://github.com/mongodb/mongo-go-driver/blob/4503c54ec045b406a0b3533901c6d7a5614cfef3/mongo/clientopt/clientopt.go#L557


if !c.ConnString.SSLClientCertificateKeyFileSet {
   if ssl.ClientCertificateKeyFile != "" {
      c.ConnString.SSLClientCertificateKeyFile = ssl.ClientCertificateKeyFile
      c.ConnString.SSLClientCertificateKeyFileSet = true 
   }
}

Looking for feedback from the dev team.

回答的问题 #GODRIVER-491: fix local certificate
回答了问题于 2 月前

GODRIVER-491: fix local certificate

Fix for https://jira.mongodb.org/projects/GODRIVER/issues/GODRIVER-491?filter=allopenissues

该提问来源于开源项目:mongodb/mongo-go-driver

3回答
发布问题于 2 月前

I'm seeing this security rule duplicate error somewhat regularly about every other day, I checked with AWS and it seems that terraform is indeed trying to create some duplicate security group rules.

As people have been that have been in the security group rule resource file recently, do you know what might be causing this? I'm having some trouble diagnosing the issue, if you have any hints I'd be happy to investigate further and submit a PR fixing the issue.

回答的问题 #duplicate security group
回答了问题于 2 月前

I'm also seeing this error on:

  • terraform v0.11.7
  • terraform provider aws v1.16.0
回答的问题 #duplicate security group
回答了问题于 2 月前

I've been running into the same issue recently as well. Noticed, the lingering ENIs are almost always previously attached to an ELB. Are you still running into the issue?

回答的问题 #aws_security_group: DependencyViolation: resource sg-XXX has a dependent object
回答了问题于 2 月前

Sorry my poor writing at 1am was to do with malsups attempt at recreation of the issue. The server your sending your () request too would be redirecting also back to your server(or whatever nexturl is). So this issue involves CORS, uploadProgress Handler, and Redirection of CORS request as CORS seems to work without redirection. Its almost as if the xhr forgets how to redirect if you add an uploadProgress handler. ?

回答的问题 #Different submit behavior when using uploadProgress
回答了问题于 2 月前

I am chrome: Version 25.0.1364.172 m on Windows 7 64

回答的问题 #Different submit behavior when using uploadProgress
回答了问题于 2 月前

If it helps.. adding an progress handler makes the cors do a preceeding options request (which passes) where without progress handler it doesn't.

回答的问题 #Different submit behavior when using uploadProgress
回答了问题于 2 月前

Oh after looking at your(malsup's) code to reproduce you should add the 303 redirect as response as that is also in the mix of the problem.

回答的问题 #Different submit behavior when using uploadProgress
回答了问题于 2 月前

I am also having this issue. Using Fiddler I can see that the server is sending a redirect response but the request maintains a pending type and (eventually) cancelled status. The chrome client never sees a response. It eventually turns from pending to cancelled. I also have narrowed it down 100% to adding the handler for uploadProgress as adding/removing the handler will add/remove the issue. I also get a good progress reporting. The response from the server is a 303 with new location(back to my server). Works fine in IE10? (wtf when does that ever happen). File is received fine by S3 (the CORS server).

回答的问题 #Different submit behavior when using uploadProgress
回答了问题于 2 月前

I can confirm that current master fixes the bug. Thanks!

回答的问题 #Migrations error
回答了问题于 2 月前

Assuming we can get AWS to commit to not changing the structure of the pagination token/marker (I can sort that out), would a PR implementing the homegrown DescribeGrant call above be merged?

回答的问题 #Improve asymptotic efficiency of aws_kms_grant
回答了问题于 2 月前

This is definitely worth implementing if AWS can commit to making the pagination token/marker stable.

回答的问题 #Improve asymptotic efficiency of aws_kms_grant
回答了问题于 2 月前

Bug: aws_alb_target_group Doesn't Set Attributes on Creation only Update (deregistration_delay)

If you ack I will submit a PR with a fix.

Terraform Version

terraform version: 0.11.1 terraform provider aws version: 1.5.1

Also tested with latest versions. See the faulty code below on master.

Affected Resource

  • aws_alb_target_group

Terraform Configuration Files

hcl
{
  "resource":[
    {
      "aws_alb_target_group":{
        "example-target-group":{
          "name":"example-target-group",
          "port":443,
          "protocol":"HTTP",
          "vpc_id":"vpc-xxxxxxxx",
          "deregistration_delay": 0
        }
      }
    }
  ]
}

Expected Behavior

The ALB target group should have all attributes set on creation, in particular the deregistration_delay.

Actual Behavior

Instead the dereistration_delay gets set to the default and successive terraform applies cause the resource to be modified. Sample output is attached below:

ALB Target Group Creation:


$ terraform apply -auto-approve
aws_alb_target_group.example-target-group: Creating...
  arn:                  "" => "<computed>"
  arn_suffix:           "" => "<computed>"
  deregistration_delay: "" => "0"
  health_check.#:       "" => "<computed>"
  name:                 "" => "example-target-group"
  port:                 "" => "443"
  protocol:             "" => "HTTP"
  stickiness.#:         "" => "<computed>"
  target_type:          "" => "instance"
  vpc_id:               "" => "vpc-xxxxxxx"
aws_alb_target_group.example-target-group: Creation complete after 0s (ID: arn:aws:elasticloadbalancing:us-east-1:.../example-target-group/b89b5741f81xxxxxx)
</computed></computed></computed></computed>

Terraform Plan after creation:


Terraform will perform the following actions:

  ~ aws_alb_target_group.example-target-group
      deregistration_delay: "300" => "0"


Plan: 0 to add, 1 to change, 0 to destroy.

Steps to Reproduce

Using the sample config above 1. terraform apply 2. terraform apply/plan

该提问来源于开源项目:hashicorp/terraform-provider-aws

3回答
发布问题于 2 月前

Thank you for all the help and comments. I updated the documentation, and replied to your comments. Should be ready to merge. Let me know if you want me to squash the commits.

回答的问题 #New Resource: aws_kms_grant
回答了问题于 2 月前