weixin_39987120的博客

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

android java wait_Android/java 多线程(一)-Thread的使用以及源码分析

线程的概念以及状态在学习线程之前,我们需要普及一个概念,每一个程序运行都会有一个父进程,我们的线程就是在此父进程中运行,拿Android来说,默认情况下,启动一个程序,所有的组件程序都运行在同一个进程中,并且会创建一个执行线程在该进程中,俗称"主线程",当我们在该线程中做了耗时的操作造成了程序卡顿,我们就叫“线程阻塞”了,此时就应该另起一个线程来执行耗时操作。要了解线程中方法的使用,就得先了解线程...
原创
0阅读
0评论
0点赞
发布博客于 13 天前

java中cookie的作用域_cookie的作用域

前阵子,接一个用户授权服务时,遇到一个关于cookie的诡异问题,折腾了一天才知道问题出在哪儿,虽然时候才知道这是个小白问题。遇到问题是这样子:比如访问A地址(比如http://localhost/index,http://localhost/test/index)时需要登陆时会跳转到一个登陆页面,登陆成功后,跳转回原页面,这时将用户信息存入到session中,并通过response的Set-Co...
原创
0阅读
0评论
0点赞
发布博客于 13 天前

java 定义类指针_java定义类 对象,引用,指针

java是根据面向对象编程,因此有类和对象的概念,类分为普通类与抽象类。一。定义类类由N个 构造器 成员变量 方法组成,可以不定义,也可以根据语法定义N个。[修饰符] class 类名{构造器*N个成员变量*N个方法*N个}1.类的修饰符只能是public final abstract 三种之一,或者不修饰 ,类名一般大写开头,驼峰命名(一)。成员变量的定义[修饰符] 数据类型 变量名 ;[...
原创
0阅读
0评论
0点赞
发布博客于 13 天前

java图片翻转_java实现图片水平和垂直翻转效果

最近在做小型游戏,遇到了要翻转图片的苦恼,经过我一下午的研究,终于发现了一种好用的方法。部分代码来源于别人,我在这个基础上修改了下,变得更好用了,之前的别人Image输入都是BufferedImage,我改成了Image,也就是加了一个转换。大家如果看不懂代码没关系,会用就行了,我会展示一下怎么用的。ImageRotate类package mypackage;import javax.imagei...
原创
1阅读
0评论
0点赞
发布博客于 13 天前

java operator=_java基础–运算符(operator) | 学步园

java运算符分为4类:算术运算符,关系运算符,逻辑运算符,位运算符。1. 算术运算符java的算术运算符分为一元运算符和二元运算符。算术运算符的操作数必须是数值类型。(1) 一元运算符一元运算符只有1个操作数,一元运算符有:正(+),负(-),加1(++)和减1(--)4个。变量的自加(++),在变量的后面int a = 3;int b = a++;System.out.println(a); ...
原创
0阅读
0评论
0点赞
发布博客于 14 天前

新版jdbc mysql手册_mysql8.x 新版本jdbc连接方式

旧版本,mysql connector/j 5.x 版本的连接方式:url = jdbc:mysql://localhost:3306/thrcloud_db01?useunicode=true&characterencoding=utf8driver-class-name = com.mysql.jdbc.driver新版本,mysql connector/j 6.x之后 的连接方式:u...
原创
1阅读
0评论
0点赞
发布博客于 14 天前

sphinx mysql redis_如何确保在我的Capybara测试中不为每个场景调用Redis和思考sphinx...

我在我的rails应用程序中使用黄瓜黄瓜。我想运行Sphinx reindex和Redis服务器以运行某些特定的测试场景。但这里的缺点是场景非常缓慢,使其运行数小时。这是我的env.rb文件require 'rubygems'ENV["RAILS_ENV"] = "cucumber"require 'cucumber/rails'require 'capybara/cucumber'require...
原创
2阅读
0评论
0点赞
发布博客于 19 天前

寺冈labelnet使用说明_用TensorFlow训练一个目标检测器(手把手教学版)

原标题:用TensorFlow训练一个目标检测器(手把手教学版)TensorFlow内包含了一个强大的物体检测API,我们可以利用这API来训练自己的数据集实现特殊的目标检测。国外一位程序员分享了自己实现可爱的浣熊检测器的经历...
原创
5阅读
0评论
0点赞
发布博客于 21 天前

mysql gui无法连接_用Mysql GUI tool 链接 Mysql 错误 2003 的解决办法

今天在Ubuntu下安装了mysql server, 然后试图在winxp下面用Mysql GUI tool链接,结果总是失败,显示错误号为2003. 下面是探索过程: 1.首先怀疑是Ubuntu下面有防火墙, 在winxp下面ping可以ping通, Ubuntu下面执行 "ufw status" 显示也是inactive的; 说明和防火墙没有关系。 2. 怀疑mysql 没有起来, 在Ubun...
原创
3阅读
0评论
0点赞
发布博客于 21 天前

python中if elif同时成立时_python中if else和if elif else有什么区别?

光学if的简单语句,有的小伙伴已经失去了挑战的感觉。收到各位小伙伴的强烈要求,小编决定用组合的if语句考考大家。同时需要大家发挥自己的火眼金睛,找出两个组合语句之间的不同~(一)if...else... 语句if...else... 语句,当if的条件为True时执行if下的语句块,否则执行else下语句块。if...else... 语句格式如下:if:【if的语句块】else:【else的...
原创
4阅读
0评论
0点赞
发布博客于 23 天前

oracle linux重启mysql_Linux开机启动oracle的设置

1.如何在Linux启动时自动启动Oracle监听和实例 修改/etc/oratab文件,命令如下: [oracle@oracle11g ~]$ vi /etc/oratab 找到:accp:/u01/oracle:N 修改为: accp:/u01/oracle:Y 第二步:把lsnrctl start和dbstart添加到rc.local文件中,命令如下: [oracle@ora1.如何在Lin...
原创
1阅读
0评论
0点赞
发布博客于 23 天前

mysql进阶项目_数据库进阶(MySQL进阶)6

十四:MySQL锁的问题十五:常用SQL技巧十四:MySQL锁的问题锁的概述锁是计算机协调多个进程或线程并发访问某一资源的机制锁的分类从操作粒度分:表锁、行锁从操作类型分:读锁、写锁MySQL的锁MySQL不同存储引擎所支持的锁机制是不同的MyISAM表锁如何加表锁首先,MyISAM会自动给【select】语句加写锁,自动给【update、delete、insert】加写锁,在正常使用SQL时不需...
原创
2阅读
0评论
0点赞
发布博客于 23 天前

yaf mysql_适合初学者对Yaf框架的学习(二)

前言一、Yaf的目录结构1 YafWeb2 index.php #入口文件3 application #应用目录4 Bootstrap.php5 controllers #控制器目录6 Index.php #默认Index控制器7 library #本地类库8 modules #其他模块9 ...
原创
4阅读
0评论
0点赞
发布博客于 27 天前

1414 mysql_MySQL Error Code:1414

在本地写好的存储过程,测试没有问题,之后上传到服务器上后,调用存储过程就会出错:ErrorCode:1414.OUTorINOUTargument19forroutinedb_statistics.p_insert_ad_reportisnotavariableorNEWpseudo-variableinBEFOREtrigger 0.000sec本地的m...
原创
6阅读
0评论
0点赞
发布博客于 1 月前

mysql子查询查询子字段_6.MySQL分组聚合查询,子查询

自己的MySQL阅读笔记,持续更新,直到看书结束。数据库技术可以有效帮助一个组织或者企业科学、有效的管理数据,也是现在很多企业招聘数据分析师的必备要求之一。大家如果看过MySQL的书,也可以看我的知识导图做一个复习,因为是自己的读书笔记,所以有的地方也不是很详尽,但是十分欢迎私下交流共同进步。SQL整理的目录今天有觉悟:专栏索引——个人的数据分析学习(持续更新)​zhuanlan.zhihu.co...
原创
6阅读
0评论
0点赞
发布博客于 1 月前

java用户的登录图片_Java--用户登录(JDBC,MYSQL,Servlet)

Java--用户登录(JDBC,MYSQL,Servlet)博客说明文章所涉及的资料来自互联网整理和个人总结,意在于个人学习和经验汇总,如有什么地方侵权,请联系本人删除,谢谢!用户登录案例需求编写login.html登录页面username & password 两个输入框使用Druid数据库连接池技术,操作mysql,day14数据库中user表使用JdbcTemplate...
原创
5阅读
0评论
0点赞
发布博客于 1 月前

查看mysql5.7修改密码_MySql 5.7密码查看或修改

一、启动命令行,输入:taskkill /f /im mysqld.exe  //关闭mysql二、转入mysql的bin目录下三、输入:mysqld --skip-grant-tables    // 跳过密码检测四、原窗口不关闭,新打开一个,转入mysql的bin目录下五、输入:mysql -u root六、查看原来密码:select host,user,password from mysq...
原创
3阅读
0评论
0点赞
发布博客于 1 月前

docker 查看镜像_分享一个查看xhprof数据文件的docker镜像

php中文网课程每日17点准时技术干货分享xhprof这个工具是一个分析php执行的工具,具体使用方法这里不多说。对于xhprof生成的分析结果包往往需要搭配nginx+graphviz,还需要配置相关文件到指定路径下。但使用windows或者mac时往往不想因为只看一个报告而费力安一个不常用的东西设置还要各种配置,所以一直打算弄个镜像,使用时直接启动然后把数据包拽进去就好。经过断断续续...
原创
6阅读
0评论
0点赞
发布博客于 1 月前

mysql 字符大对象_第02期:MySQL 数据类型的艺术-大对象字段

我以前分享过一篇《MySQL 大对象一例》,今天就来详细说下大对象的优缺点以及使用场景。我们把 MySQL 的大对象类型分 TEXT / BLOB 和 JSON 两部分来说明。一、TEXT / BLOB 类型TEXT 和 BLOB 的区别非常简单。TEXT 存储以明文存储,有对应的字符集和校验规则;BLOB 则以二进制存储,没有字符集和排序规则,所有的对比都是以二进制来进行。示例 1创建一张表 c...
原创
2阅读
0评论
0点赞
发布博客于 1 月前

mysql show tables as_oracle中与mysql中的命令 show databases, show tables, desc table类似的命令集...

mysql> show tables-> ;+----------------+| Tables_in_test |+----------------+| sale_report || test_dysql || union_tab_1 || union_tab_2 || v_sale_report |+----------------+5 rows in ...
原创
0阅读
0评论
0点赞
发布博客于 1 月前

catch抛出异常finally还执行吗_你真的理解 Java 中的 try_catch_finally 吗?

try…catch…finally恐怕是大家再熟悉不过的语句了,而且感觉用起来也是很简单,逻辑上似乎也是很容易理解。不过,我亲自体验的“教训”告诉我,这个东西可不是想象中的那么简单、听话。不信?看几个例子,回顾一下执行顺序例子 1 无异常,finally 中的 return 会导致提前返回public static String test() { try { System....
原创
10阅读
0评论
0点赞
发布博客于 1 月前

安卓背景 阴影遮罩_自定义Dialog弹框和其背景阴影显示方法

昨天研究了一下自定义Dialog的弹框,其实要点都是把自定义好的view用setContentView(view)的方法设置进dialog里,首先我们先看一个简单的自定义Dialog。一、写布局文件:custom_dialog_layout.xml(这个布局就是一个简单的提示内容,下面有一个确定的按钮,请参看评论中的效果图)android:orientation="vertical"android...
原创
3阅读
0评论
0点赞
发布博客于 1 月前

停车场管理(栈和队列的应用)_车牌识别系统在停车场的应用能够大大提高停车场的管理水平...

现在,城市中人们的私家车越来越多,很多停车场以及道路口都设立了车牌识别系统,而车牌识别系统在停车场的应用是最为广泛的,很多小区、商场、园区、学校等场所的停车场都进行了有效的改造,普遍采用道闸车牌识别系统,全方面促进停车场的升级,让车主以及管理者都感受到便利。道闸车牌识别系统可以通过远距离以及蓝牙远距离读卡,并对临时车辆自动发放临时卡进行计时收费。减少了工作人员劳动量,使用感应卡收费可以让车辆的收费...
原创
2阅读
0评论
0点赞
发布博客于 1 月前

excel根据rgb自动填充颜色_根据EXCEL数据自动生成WORD文档

很多时候,您是否有过在WORD里面重复制作某种资料的工作。比如给定了合同模板,需要根据不同合同内容制作出不同的合同,但模板是一样的。一般情况下就是老老实实的一份一份的去填写(还不保证不会有错误)。那么有没有可以自动生完成的办法呢?答案是肯定有,不然我在这哔哔啥呢!接下来言归正传。在此上个大招,接下来就以合同为例:1、制作合同模板文件,把合同变量部分用特殊变量替换。图示如下:2、在EXCEL里面添加...
原创
13阅读
0评论
0点赞
发布博客于 1 月前

android tv闹钟_简单实现Android闹钟功能

闹钟的简单实现,只有显示时间和设置闹钟。AlarmViewpackage com.example.lenovo.clock2;import android.app.AlarmManager;import android.app.PendingIntent;import android.app.TimePickerDialog;import android.content.Context;impor...
原创
0阅读
0评论
0点赞
发布博客于 1 月前

将字符串转为16进制数_了解进制以及JS中的进制转换

进制介绍进制也就是进位计数制,是人为定义的带进位的计数方法(有不带进位的计数方法,比如原始的结绳计数法,唱票时常用的“正”字计数法,以及类似的tally mark计数)。对于任何一种进制—X进制,就表示每一位置上的数运算时都是逢X进一位。十进制是逢十进一,十六进制是逢十六进一,二进制就是逢二进一,以此类推,x进制就是逢x进位。每一种进制的数字运算是按照当位的数字乘以进制底数的对应次方再相...
原创
0阅读
0评论
0点赞
发布博客于 1 月前

getopts 可选参数_shell 命令行参数(getopt和getopts)

getopt 命令使用getopt命令,可以解析任何命令行选项和参数,但是用法比较复杂。getopt的命令用法如下:$ getopt --help用法:getopt optstring parametersgetopt [options] [--] optstring parametersgetopt [options] -o|--options optstring [options] [--] ...
原创
0阅读
0评论
0点赞
发布博客于 1 月前

tarfile读文件python_python编程 tarfile --- 读写tar归档文件

tarfile 模块可以用来读写 tar 归档,包括使用 gzip, bz2 和 lzma 压缩的归档。 请使用 zipfile 模块来读写 .zip 文件,或者使用 shutil 的高层级函数。一些事实和数字:读写 gzip, bz2 和 lzma 解压的归档要求相应的模块可用。支持读取 / 写入 POSIX.1-1988 (ustar) 格式。对 GNU tar 格式的读/写支持,包括 lon...
原创
11阅读
0评论
0点赞
发布博客于 1 月前

如何做电脑桌面应用_win10 如何卸载windows media player

win10 如何卸载自带的windows media player 电脑上太多的自带的软件没有什么用,还占内存空间,一般正常情况是去控制面板的程序或者是其他电脑管家,360卫士去卸载程序。但是有一些电脑自带的不一定可以卸载掉的。那么win10 自带的windows media player播放器软件想要卸载掉,该如何卸载呢? 首先我们在电脑桌面上点开左下角的开始图标,在右侧小齿轮"设置"选项选择打...
原创
8阅读
0评论
0点赞
发布博客于 1 月前

For 1.6.1.x PS, the v2.1.2 fixes the scrolling bug on the Order History page but it ruins pictures handling on a product page. For example, only two miniature pictures are loaded and they do not react to mouse hover at all, and after clicking on each of them its picture is opened into a page with nothing but the picture with such an URL: https://domain/40-thickbox_default/the-picture-name (In other words, the product page is redirected into such an url)

回答的问题 #update jquery.scrollTo.js to v2.1.2. Fixes scrolling not working
回答了问题于 1 月前

I am getting this similar error when trying to run:

npx create-nx-plugin my-org --pluginName my-plugin

I am running this in a parent directory, expecting it to create an entirely new workspace called "my-org"

Here is the error:


$ npx create-nx-plugin nx-duro --pluginName nx-pulumi                                                                             [10:29:32]
npx: installed 193 in 7.87s
Creating a sandbox with Nx...
new nx-duro "--pluginName" "nx-pulumi" --preset=empty --collection=/workspace
Collection "/workspace" cannot be resolved.
(node:45442) UnhandledPromiseRejectionWarning: Error: Command failed: "/var/folders/fj/75j7561x6xvfyk2d5dlcks140000gn/T/tmp-45442guCDtvBL4jKT/node_modules/.bin/tao" new nx-duro "--pluginName" "nx-pulumi" --preset=empty --collection=/workspace
    at checkExecSyncError (child_process.js:630:11)
    at Object.execSync (child_process.js:666:15)
    at createWorkspace (/Users/adamduro/.npm/_npx/45442/lib/node_modules/create-nx-plugin/bin/create-nx-plugin.js:51:21)
    at /Users/adamduro/.npm/_npx/45442/lib/node_modules/create-nx-plugin/bin/create-nx-plugin.js:157:9
(node:45442) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:45442) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
回答的问题 #Collection "@nrwl/workspace" cannot be resolved.
回答了问题于 1 月前

想法不错,想试试了

回答的问题 #[建议]未包含换行符的LRC格式兼容
回答了问题于 1 月前

说实话某些歌词lrc的[]有重复,这是允许的。所以说这不是一蹴而就的事嘛

回答的问题 #[建议]未包含换行符的LRC格式兼容
回答了问题于 1 月前

为啥会造成页面闪退❔

回答的问题 #还没加载完音频,能不能禁止点击进度条和播放按钮,加载完以后才允许
回答了问题于 1 月前

-diao 能否给一个复现demo?codepen和jsbin抑或是jsfiddle都行

回答的问题 #当歌词为空时会有报错
回答了问题于 1 月前

超赞API,fetch.跨域无问题,就是只兼容现代浏览器(包括EDGE14)

回答的问题 #是否支持远程lrc?
回答了问题于 1 月前

It seems OK. Chrome 52.0 && Windows7

回答的问题 #Tracks over 100 minutes not showing lyrics
回答了问题于 1 月前

show a error snapshot? console's err output && screen snapshot. it's better to show your demo.

回答的问题 #Tracks over 100 minutes not showing lyrics
回答了问题于 1 月前

but the author is a little lazy?he is buzy with DPlayer, his new project.

回答的问题 #Add support for Enhanced formated LRC
回答了问题于 1 月前

Is it like a MV's Lyric?

回答的问题 #Add support for Enhanced formated LRC
回答了问题于 1 月前

Hi, guys

What's status of this branch now?

Still failed to generate docs for babel projects.


/Workspace/src/nodejs/documentation/bin/documentation.js:21
    throw err;
    ^

Error: did not recognize object of type "ObjectProperty"
    at Object.getFieldNames (/Workspace/src/nodejs/documentation/node_modules/ast-types/lib/types.js:659:15)
    at visitChildren (/Workspace/src/nodejs/documentation/node_modules/ast-types/lib/path-visitor.js:221:32)
    at Visitor.PVp.visitWithoutReset (/Workspace/src/nodejs/documentation/node_modules/ast-types/lib/path-visitor.js:202:16)
    at Visitor.PVp.visit (/Workspace/src/nodejs/documentation/node_modules/ast-types/lib/path-visitor.js:131:25)
    at Object.visit (/Workspace/src/nodejs/documentation/node_modules/ast-types/lib/path-visitor.js:99:51)
    at Object.inferName (/Workspace/src/nodejs/documentation/lib/infer/name.js:52:11)
    at /Workspace/src/nodejs/documentation/index.js:31:28
    at Array.map (native)
    at /Workspace/src/nodejs/documentation/index.js:94:16
    at /Workspace/src/nodejs/documentation/lib/input/dependency.js:42:5

回答的问题 #Start babel 6 upgrade
回答了问题于 1 月前

Thanks! This is perfect.

回答的问题 #Question: geoNear command.
回答了问题于 1 月前

: Any chance you got this to work and could provide an example of how you ran a geoNear command?

回答的问题 #Question: geoNear command.
回答了问题于 1 月前

as you sugget I added *ngIf="true" in all tabset except the one which already have one ngIf with my condition but it didn't work.

回答的问题 #fix(tabs): order not working with ngIf\dynamic directives
回答了问题于 1 月前

+1 I tried the *ngIf="true" word around but it didn't work.

回答的问题 #fix(tabs): order not working with ngIf\dynamic directives
回答了问题于 1 月前

想法不错,想试试了

回答的问题 #[建议]未包含换行符的LRC格式兼容
回答了问题于 1 月前

说实话某些歌词lrc的[]有重复,这是允许的。所以说这不是一蹴而就的事嘛

回答的问题 #[建议]未包含换行符的LRC格式兼容
回答了问题于 1 月前

您好,IE不支持Symbol的

回答的问题 #IE下报错,Symbol未定义 (Uncaught ReferenceError: Symbol is not defined)
回答了问题于 1 月前

Yes, this is exactly what I wanted! Thanks.

But I think it would be better if it would be a default behavior of the trigger hover event because this is what we expect of an hover.

Bye, Valentin

回答的问题 #feat(dropdown): add mouseleave event as default trigger for closing dropdown
回答了问题于 1 月前

Exactly , looking for a way to close the dropdown at the mouseout event.

Same thing for me the triggers="hover" doesn't work.

回答的问题 #feat(dropdown): add mouseleave event as default trigger for closing dropdown
回答了问题于 1 月前

feat(dropdown): add mouseleave event as default trigger for closing dropdown

Hi,

I would like to have a dropdown which is shown when mouseover, so I have use the triggers input (triggers="mouseover"). It is working great but now I want to toggle the dropdown at the mouseleave event and I haven't find a simple way to do that with your doc.

Have I missed something? I could add an angular ngIf but it would be a shame. ;)

Thanks, valentin

该提问来源于开源项目:valor-software/ngx-bootstrap

7回答
发布问题于 1 月前

超赞API,fetch.跨域无问题,就是只兼容现代浏览器(包括EDGE14)

回答的问题 #是否支持远程lrc?
回答了问题于 1 月前

It seems OK. Chrome 52.0 && Windows7

回答的问题 #Tracks over 100 minutes not showing lyrics
回答了问题于 1 月前

show a error snapshot? console's err output && screen snapshot. it's better to show your demo.

回答的问题 #Tracks over 100 minutes not showing lyrics
回答了问题于 1 月前

aplayer的歌词解析模块对数字判断的问题么

回答的问题 #无法解析只精确到秒的歌词
回答了问题于 1 月前

but the author is a little lazy?he is buzy with DPlayer, his new project.

回答的问题 #Add support for Enhanced formated LRC
回答了问题于 1 月前

Is it like a MV's Lyric?

回答的问题 #Add support for Enhanced formated LRC
回答了问题于 1 月前

为啥会造成页面闪退❔

回答的问题 #还没加载完音频,能不能禁止点击进度条和播放按钮,加载完以后才允许
回答了问题于 1 月前

-diao 能否给一个复现demo?codepen和jsbin抑或是jsfiddle都行

回答的问题 #当歌词为空时会有报错
回答了问题于 1 月前

-V 你把网站按pjax的模式改,不要刷新aplayer的元素就行

回答的问题 #播放器重载的问题
回答了问题于 1 月前

-V 你不准页面刷新不就行了

回答的问题 #播放器重载的问题
回答了问题于 1 月前

Update reference-profiler.md

Fix code indentation

该提问来源于开源项目:reactjs/reactjs.org

4回答
发布问题于 1 月前

, any insight you can provide? This is preventing me from utilizing nested objects within my MongoDB documents as well as Form Model Binding.

回答的问题 #Using nested object fields with Form Model Binding
回答了问题于 1 月前

I don't want to use it as an array. When I save to Mongo on a create, it saves as an object. The problem is, when it comes out of mongo, and is represented as an Eloquent model, it is typed as an associative array in PHP.

This leads me to believe that when the Laravel-MongoDB library converts the object coming out of Mongo I to an Eloquent model, those nested objects are not being typed correctly.

回答的问题 #Using nested object fields with Form Model Binding
回答了问题于 1 月前

Forgive the accidental closing of the issue. That was a mistake.

回答的问题 #Using nested object fields with Form Model Binding
回答了问题于 1 月前

Using nested object fields with Form Model Binding

We have a Mongo Model that has a structure like so:


{
  _id: ObjectId('...'),
  name: 'Model Name',
  address: {
    street1: '555 Fake St.',
    street2: 'Unit 123',
    city: 'Los Angeles',
    state: 'CA',
    zip: '90293'
  }
}

We are trying to use this object with form model binding.

Here is what that form looks like:


{{ Form::model($object, array('route' => 'named.route') }}
{{ Form::text('name') }}
{{ Form::text('address[street1]') }}
{{ Form::text('address[street2]') }}
{{ Form::text('address[city]') }}
{{ Form::text('address[state]') }}
{{ Form::text('address[zip]') }}
{{ Form::submit('save') }}
{{ Form::close() }}

This syntax works just fine for saving a new instance of the object. However, when we try and use the same form to display an existing instance of the object, the name field displays, but none of the nested field that belong to address will display.

I did some digging, and it appears that when the Eloquent object that is returned represents that nested object as an array. The internals of Laravel (Illuminate/Html/FormBuilder->getModelAttribute() ) convert this syntax to dot notation (eg. address.street1 ) and then use an internal function in Illuminate/Support/helpers.php called object_get to traverse the model using that dot syntax looking for the value.

It seems that Laravel does not like the mixing of types. It does not like to use that dot syntax to look inside an object, and then dig into an array to find the next key.

Let me know if I'm not making sense.

It seems to me, that what Laravel wants, is for the address to be an object, not an array.

Is this something that would be possible to adjust in the way Laravel-MongoDB converts nested objects when turning them into Elequent models?

该提问来源于开源项目:jenssegers/laravel-mongodb

5回答
发布问题于 1 月前

since does would add complexity, how about:

is('B').visually.similar.to.thirteen() and is('b').roughly.visually.similar.to.thirteen()

回答的问题 #need support for B
回答了问题于 1 月前

Now the builds are much faster, nice work! 👏

回答的问题 #Fixed duplicate code
回答了问题于 1 月前

Dev build

Implementation for #239 😄

In summary,

gulp: starts dev server, watch & do compilations to .dev folder

in master: gulp build: does compilation, files are generated in the respective folders gulp server: starts server in root to view compiled files after master build

(I removed compiled files of Amaro filter which is currently unavailable. Also did reset for Kelvin filter is_done status, it had got reset in one of the previous commits. Sorry to keep it in the same PR.)

该提问来源于开源项目:una/CSSgram

2回答
发布问题于 1 月前

Hi ,

I have reverted that commit (c38b629) from this PR. (since fd02556fac16f0571593a587dea9a29f54036da5 already have added missing Kelvin).

Now it is clean :)

回答的问题 #Dev build
回答了问题于 1 月前

There are few issues with current master: - Amaro filter doesn't have SCSS file, though CSS files are existing - Kelvin filter is done, but commit 410f2c388541820eb23220565740c9fe6b3cbff7 has reset its is_done status to false

So the last commit in this PR c38b629 is a cleanup for those: - removed Amaro CSS files - made Kelvin's is_done = true

That is why those files are there. Sorry to mix up everything together! 😓 Should I revert that commit from this PR?

回答的问题 #Dev build
回答了问题于 1 月前

For all who are still struggling, the problem is in the CAPSPageMenu.swift file. This approach doesn't work on the newer models: currentOrientationIsPortrait = UIDevice.current.orientation.isPortrait Replace it with this:


currentOrientationIsPortrait = UIDevice.current.orientation.isValidInterfaceOrientation
            ? UIDevice.current.orientation.isPortrait
            : UIApplication.shared.statusBarOrientation.isPortrait
回答的问题 #Screen gets stucked when using on iOS version above 10 & below 11
回答了问题于 1 月前

The latest version does not work... Staying on 0.22.2


import DeviceInfo from 'react-native-device-info'; 

DeviceInfo.getModel(); // Not work!!! Cannot find a method getModel

I am not sure that I am doing something wrong, because on the version of 0.22.2 everything works!

回答的问题 #Device info returning : undefined is not an object
回答了问题于 1 月前

At me after version 0.22.2 at all does not work ((( swears on any exported method... Tin, but if it is not corrected, will make the package...

RN 0.56+

回答的问题 #Device info returning : undefined is not an object
回答了问题于 1 月前

That was really fast, awesome work, and thanks for the help.

回答的问题 #AWS Lambda support missing for dotnetcore2.1.
回答了问题于 1 月前

AWS Lambda support missing for dotnetcore2.1.

Is getting the following error:

expected runtime to be one of [dotnetcore1.0 dotnetcore2.0 go1.x java8 nodejs4.3 nodejs4.3-edge nodejs6.10 nodejs8.10 python2.7 python3.6], got dotnetcore2.1

Not being familiar with go, i'm guessing this is the problem though:

https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/resource_aws_lambda_function.go#L106

Its missing dotnetcore2.1

https://aws.amazon.com/about-aws/whats-new/2018/06/lambda-supports-dotnetcore-twopointone/

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

New or Affected Resource(s)

  • aws_XXXXX

Potential Terraform Configuration

hcl
# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

References

  • 0000

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

4回答
发布问题于 1 月前

Do we miss this "encrypt variables in transit" feature in terraform. Any idea how could this be achieved with terraform

回答的问题 #KMS encrypt variables for AWS Lambda [documentation improvement]
回答了问题于 1 月前

The latest version does not work... Staying on 0.22.2


import DeviceInfo from 'react-native-device-info'; 

DeviceInfo.getModel(); // Not work!!! Cannot find a method getModel

I am not sure that I am doing something wrong, because on the version of 0.22.2 everything works!

回答的问题 #Device info returning : undefined is not an object
回答了问题于 1 月前

At me after version 0.22.2 at all does not work ((( swears on any exported method... Tin, but if it is not corrected, will make the package...

RN 0.56+

回答的问题 #Device info returning : undefined is not an object
回答了问题于 1 月前

I also see the same behaviour with those versions:


% terraform --version
Terraform v0.11.11
+ provider.archive v1.0.3
+ provider.aws v1.41.0
+ provider.template v1.0.0

The "untouched" aws_cloudwatch_metric_alarms are set to 0, but the ones I changed via AWS console are set to 1, and terraform plan foresee the 1 => 0 change for them.

回答的问题 #aws_cloudwatch_metric_alarm: AWS Console sets different default value for datapointsToAlarm
回答了问题于 1 月前

-shen See the PR: https://github.com/appleboy/gorush/pull/424

Thats a year ago so is the still the case

回答的问题 #voip push
回答了问题于 1 月前

-shen I found information about this param So gorush has this param in notification request. Can you please try it and write your result?

I don't have this install yet will try it once I have it install and report the result here

Cheers

回答的问题 #voip push
回答了问题于 1 月前

Hi -shen !

If I read PushKit and Supporting PushKit Notifications in Your App correclty you don't need any changes in your server (or in gorush in this case).

When you implement PushKit for app just send push notification to correct device token and APNs will do all work for you.

do you have to pass the type to apn? as i use onesignal now, they require to pass the push_type as voip to their server

thanks

回答的问题 #voip push
回答了问题于 1 月前

voip push

Hi all

this lib looks really good, just a question, does this support ios voip push? push_type=voip

i couldn't find anything in the docs

any advice would be awesome

thanks advance

Jason

该提问来源于开源项目:appleboy/gorush

3回答
发布问题于 1 月前

i didn't get an invite, can you send me one

回答的问题 #[New Tracker REQ] https://hdf.world/
回答了问题于 1 月前

can you give me an invite ?

回答的问题 #[New Tracker REQ] https://hdf.world/
回答了问题于 1 月前

I has same problem after upgrading to rails 4.2.

You can use temporary solution for this:

 ruby
def index
   = Speaker.all
  render json: ActiveModel::ArraySerializer.new(, root: :speakers)
end

I will try understand whats wrong and fix it.

回答的问题 #Unexpected Array Root Handling
回答了问题于 1 月前

Turned out to be solved by deleting and re-cloning the repository

回答的问题 #Xamarin forms Android debugging always breaks on exceptions even when exception is disabled and handled
回答了问题于 1 月前

I am encountering this issue as well. Just upgraded to Visual Studio Enterprise Edition 16.9.0 Preview 2.0 and that didn't seem to fix the issue. Also just tried with community edition same version and that didn't resolve the issue either.

回答的问题 #Xamarin forms Android debugging always breaks on exceptions even when exception is disabled and handled
回答了问题于 1 月前

The bug is still there. I've set up demonstration repo here: https://github.com/jwilk-forks/github-markup/tree/issue1158

回答的问题 #README symlink shown as plain text despite vim modeline
回答了问题于 1 月前
  • good (thanks to caching?)

Oh well, this one is now bad, too. But I made archived copy back when it was still good.

回答的问题 #README symlink shown as plain text despite vim modeline
回答了问题于 1 月前

README symlink shown as plain text despite vim modeline

I have the following setup in many of my repositories:

  1. doc/README is a document with a vim:ft=rst modeline. As expected, this is rendered by GitHub as reStructuredText.

  2. Top-level README is a symlink to doc/README. This used to rendered by GitHub as reStructuredText until recently. But now it is shown as plain text. :-(

Examples:

  • good (thanks to caching?)

  • bad

I guess it might be an unintended consequence of fixing #1133?

该提问来源于开源项目:github/markup

5回答
发布问题于 1 月前

On version 5.3+ Animation stopped normal working through createAnimatedComponent

RN 0.58+

jsx
const AnimatedG = Animated.createAnimatedComponent(G);

let progress = new Animated.Value(0);

...

<animatedg key="checked" fill="none" fillrule="evenodd" opacity="{progress}">
   ...
</animatedg>

With the 5.2.4 version everything works as expected, the cache NPM brushing tried, does not help

该提问来源于开源项目:react-native-svg/react-native-svg

4回答
发布问题于 1 月前

[Feature Request][security] Support for Bittorrent v2 format / BitErrant attack

I haven't seen any info on whether there's any effort in transmission to support the bittorrent v2 format [1].

Are there any plans or efforts to support it yet? The major reason is the breakage of SHA1, which causes vulnerabilities like the BitErrant attack [2]. The v2 format switches to SHA256 and a Merkle tree structure.

As long as this is unfixed torrents can't be considered as a secure download method that guarantee data integrity.

[1] http://www.bittorrent.org/beps/bep_0052.html [2] https://biterrant.io/

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

5回答
发布问题于 1 月前

I'm using xcape to map capslock to ctrl and escape and I'm having similar issues. Capslock mapped to escape work, Capslock mapped to Ctrl doesn't work. I tried searching for some onivim log but I can't find it?

I can confirm, I have the same issue

回答的问题 #Linux: xcape compatibility - use virtual-key codes for processing keybindings
回答了问题于 1 月前

Question about the implementation of VGG19 Perceptual Loss

According to the implementation of perceptual loss (VGGLoss), this VGG19 network directly uses the model structure & pretrained weights from torchvision.models.VGG19. However, torchvision documents (https://pytorch.org/docs/stable/torchvision/models.html) state that the input to the VGG19 network should be normalized using mean = [0.485, 0.456, 0.406] and std = [0.229, 0.224, 0.225]. But current implementation puts an image that is simply normalized in the scale of -1 ~ 1. Isn't it necessary to renormalize the image input before feeding them into VGG19 network?

该提问来源于开源项目:NVIDIA/pix2pixHD

4回答
发布问题于 1 月前

Do we miss this "encrypt variables in transit" feature in terraform. Any idea how could this be achieved with terraform

回答的问题 #KMS encrypt variables for AWS Lambda [documentation improvement]
回答了问题于 1 月前

That was really fast, awesome work, and thanks for the help.

回答的问题 #AWS Lambda support missing for dotnetcore2.1.
回答了问题于 1 月前

AWS Lambda support missing for dotnetcore2.1.

Is getting the following error:

expected runtime to be one of [dotnetcore1.0 dotnetcore2.0 go1.x java8 nodejs4.3 nodejs4.3-edge nodejs6.10 nodejs8.10 python2.7 python3.6], got dotnetcore2.1

Not being familiar with go, i'm guessing this is the problem though:

https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/resource_aws_lambda_function.go#L106

Its missing dotnetcore2.1

https://aws.amazon.com/about-aws/whats-new/2018/06/lambda-supports-dotnetcore-twopointone/

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

New or Affected Resource(s)

  • aws_XXXXX

Potential Terraform Configuration

hcl
# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

References

  • 0000

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

4回答
发布问题于 1 月前

Any update on this? Just to clarify, this is what we want to achieve: - upon error, red background on form input - but do not show the error message below the input - for both the client/ajax and php validation methods

So for example we may have a CActiveForm that has some input fields that are validated in AJAX but then some other fields that are validated in PHP. The problem occurs in the PHP validation, as it seems to ignore the 'hideErrorMessage' setting.

回答的问题 #'hideErrorMessage' option in CActiveForm->error()
回答了问题于 1 月前