所有问题
corda - 如何在corda的默认构造函数中设置日期和金额(货币)的值
如何在corda程序中为日期和金额(货币)字段默认构造函数(在模式中)设置值。我尝试评论构造函数,但在 API 中遇到错误。
logging - Load pentaho Log to a field
Pentaho db loggging option has to load log of particular transformation to a field called LOG_FIELD.
I'm trying to create a custom table, where I wanted to load the log to a field. How to extract and load the log at each transformation level??
spring - Passing dynamic queries in spring JPA
I want to know how do we pass a query in spring JPA that has been prepared dynamically while program execution. The required query may vary according to the user input. So after framing the query manually using a for loop how do i execute this query ?
I have tried executing the query using the JDBC concept. but i want something more like :
Is this possible ?
matlab - 对应像素的轮廓
我正在做的是使用内置 MATLAB funktion imregionalmax 进行基于像素的树检测。几个步骤后,我得到一个矩阵,其中包含从 1 到 n 的值,基于检测到的树的数量。每棵树都通过一个唯一的数字表示(见下图)。不属于树的像素通过 NaN 表示。

结果应如下所示:

我得到的最接近上述结果的方法是使用轮廓函数,尽管它并不能很好地完成这项工作,因为它通过像素中间而不是外部绘制轮廓。
编辑:我有一个带有高度值的矩阵(与上面的大小相同),轮廓应该只是一个覆盖。另外,我希望这个轮廓真正位于像素的边缘。
angular - Not running into circular dependency error with actions when using Redux in Angular
We are developing components for an app with Angular 5 and ngrx. Each entity (e.g. Menu, List, Config) consists of
- Component (
*.html,*.scss,*.ts) - Action (
*.ts, Injectable) - Reducer (
*.js) - plus Spec-files
except for entities without a view (e.g. Config), which do not have a component.
We have an Config-Action and Config-Reducer with which we store the options the user selects in the Menu. Because some Actions depend on each other, I recently ran into a circular-dependency-error:
- Clicking on an item in the
Menucalls a List-Action (which shows a List to the user) - Selecting an item from the
Listcalls a Config-Action (to store the selection) - The Config-Action calls a Menu-Action (to write the selection into a field in the menu)
There is our circular dependency and it won't be the last on the Redux-"Call actions to do stuff"-approach. I'm trying to handle it with Injector but this seems like a workaround. I'm looking for a solution which is more clean, as the Actions are not called in the constructor.
Is there a clean way to inject Actions into one another without creating a circular dependency?
r - R - 如何按年使用累积总和并在满足条件时重新启动累积总和
我在 R 中有以下数据框:
我想要另一列计算累积和,如 cumsum 列,然后在 PRECTOT 为 0 时重新开始计数,例如在第 8 行。基本上它应该从第 8 行重新开始累积和,并从那里继续累积和,因此:
在 R 中是否有一种很好且有效的方法?谢谢你。
java - WSO2-APIM 2.1.0 to 2.2.0 upgrading issue: For the table IDN_OIDC_REQ_OBJECT_REFERENCE
I'm using the link for upgrading WSO2-APIM from 2.1.0 to 2.2.0 version.
While performing step 6-g I came across java.sql.SQLSyntaxErrorException for creating a table IDN_OIDC_REQ_OBJECT_REFERENC.
My all other scripts ran successfully but at the time of executing sql scripts from migration-resources\5.5.0\dbscripts\step1\identity\oracle.sql the issue occurred. This file exist inside zip file given in step 6-a.
When I tried running following sql script manually
into oracle db I got following error:
Line 66 is nothing but: FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE,
Let me know what thing I've missed while doing the migration ? Or is it because of existing table are not proper ? Any help will be grateful. Thanks in advance.
python-3.x - Python - 在浅拷贝的情况下,在列表中追加和更改列表中的元素有何不同
好的,所以我对列表中关于浅拷贝的追加和更改操作之间的区别有疑问。
下面是输出:
spring-mvc - Spring JDBC session 导致重复条目异常
在我的 Spring Boot 项目中,有 REST 和 MVC 控制器。MVC 部分应该有会话的地方。这部分很好,但是当您从带有会话的 MVC 页面开始使用 Swagger 从浏览器到 API 时,我开始在 REST API 端点上看到这些消息:
我的安全配置如下所示:
r - 弹性错误:500 - 所有分片都失败
我尝试在 R 中执行以下语句
并收到以下错误消息
错误:500 - 所有分片均失败
如果我使用一切正常
有人知道我必须做什么吗?我记得我在使用 ES v5 时也出现过类似的错误
我正在使用 ES v2.4.3。
javascript - 如何解决 TypeError: environment.teardown is not a function
我无法测试使用 create-react-app 创建的应用程序。
所有指南都说测试默认工作,但是当我尝试“yarn test”时,它需要安装'jest-cli'并且安装后出现错误:
类型错误:environment.teardown 不是函数
laravel - Laravel Show 方法不起作用?
我正在使用 Laravel 5.6,这是我的模型
而且,我从 CareersController@show 方法得到这个输出
和显示方法是
即使我试图从显示的空白区域中获取输出。
python - 使用自托管 GitLab 作为 Oauth Provider
我成功地安装了 django-allauth 并将我的应用程序配置为允许通过 Google Oauth2 进行身份验证,但是当我尝试配置 GitLab Oauth2 集成时,它只是失败并显示以下消息:
The redirect URI included is not valid.
我确实设置
http://xxx.xxx.xx/accounts/gitlab/login/callback/为回调网址
谢谢!
javascript - 如何从月份中减去一天?
如何从this.maxIntervalDurationInMonts中减去最后一天?
data-structures - 在 Fortran 中创建相交树
我想在 Fortran (90) 中创建一棵树,就像这张图片中的树:
这个想法是,我将能够按照以下方式从根开始沿着树的路径。在每个节点上使用存储在那里的值执行检查:通过检查移动到最左边的子节点,不通过或已经到达叶节点移动遍历尚未到达的最高节点。这是一个可能的遍历示例(绿色表示通过测试,红色表示未通过):
重要的是,并不是每个节点都到达(黑色的节点),这实际上是过程的重点。
所以,我认为我需要一个在树中插入节点的子例程,以便构建它,另一个允许我遵循上述类型的路径。
我的问题是,这可能吗?这个数据结构有名字吗?
鉴于我几乎没有构建此类数据结构的经验,Google 并没有提供太多帮助。一个示例代码会很棒,但我很乐意被引用一些我可以学习的阅读材料。
perl - 有人可以解释这个 perl 片段吗?
所以我的问题是为什么在第二次循环迭代中定义了 $bar ?
php - 更改 Laravel 迁移状态
我错误地删除了 Laravel 5.5 中迁移表的记录。现在,当我运行时php artisan migrate:status,它会将每个迁移的状态显示为“未运行”。如何将迁移状态更改为“Y”。我不想运行之前已经运行过的迁移或运行migrate:refresh或migrate:rollback. 使用数据库的备份,我还导入了迁移表的记录,但状态仍然没有改变。
html - 在使用css的页面中隐藏主滚动条
我只想删除顶级滚动条,同时保留页面内的一些滚动条。
我找到了这个,但它删除了所有滚动条。
在身体的 css 上使用overflow: hidden;似乎可以满足我的要求,但我无法向下滚动页面。
总而言之,我只想隐藏主页滚动条,同时保留其余部分并能够滚动?
optimization - 这是我试图在 neo4j 中运行的查询,但运行时间太长:
我正在尝试使用 Neo4j 运行此查询,但运行时间太长(超过 30 分钟,几乎 2500 个节点和 180 万个关系)才能运行:
这:Art是标签下有 2500 个节点,这些节点之间存在双向关系,具有称为 的属性ed_sc。所以基本上我试图通过遍历一、二和三度路径来找到两个节点之间的分数,然后对这些分数求和。
有没有更优化的方法来做到这一点?
java - 多层xmlElements
假设我有这个类,我想使用 JAXB 生成 XML 文件
当我生成 XML 文件时,我得到这样的东西
现在我想用更多元素包装类的每个属性:例如,指示属性的类型。
最终目标必须用不同的 xmlElement 包装类的每个属性。
ios - google sing in 显示项目 ID 而不是项目名称
我已经使用google-signin-react package为我用 ReacNative 编写的移动应用程序配置了 google 登录。对于 android 设备,一切正常,但在 ios 设备中,当您要登录时,它会显示项目编号而不是名称(如屏幕截图所示)。
reactjs - 必须包含查询定义
我是 react-native 和 appsync 的新手,graphql。当我尝试运行它时,我们正在尝试使用 react-native 实现一个 appsync 应用程序抛出一个错误说
14:16:38:必须包含查询定义。* null:null 在 getQueryDefinition - node_modules/apollo-cache-inmemory/lib/bundle.umd.js:649:64 在 diffQueryAgainstStore - node_modules/apollo-cache-inmemory/lib/bundle.umd.js:559:32 在 readQueryFromStore - node_modules/apollo-cache-inmemory/lib/bundle.umd.js:899:38 in read - node_modules/apollo-cache-inmemory/lib/bundle.umd.js:992:23 in readQuery * null:null in update - node_modules/apollo-client/bundle.umd.js:1609:0 in - node_modules/apollo-utilities/lib/bundle.umd.js:818:21 in tryFunctionOrLogError * null:null in - node_modules/apollo-cache-inmemory /lib/bundle.umd.js:961:22 in performTransaction - node_modules/apollo-client/bundle.umd.js:1473:0 in markMutationResult - node_modules/apollo-client/bundle.umd.js:797:
我试图找出阿波罗缓存中的错误,但我找不到。每当我按下发送按钮时都会得到这个。
请帮帮我!在此先感谢
node.js - 快速验证器未安装在节点中
我正在做一个小型节点项目,我需要安装 express 验证器,但它没有安装。我的根文件有 app.js,我在其中导入所有 deps 和一个 package.json 文件,除了 index.ejs 文件。我的 app.js 看起来像这样:
应用程序.js:
包.json:
npm-debug.log:
根据调试日志,我在代理上。但我删除了代理,然后又出现了。请指导我出了什么问题。
firebase - 避免向使用 Firebase 函数构建的 API 发送垃圾邮件
我正在使用 Firebase Functions 为我的应用程序/网站构建一些内部 API。内部 API 让我的应用程序/网站在服务器端处理某些内容,并不意味着向公众开放。
我的应用程序是用 ionic 构建的,网站是用 angular 构建的。
我注意到 Firebase 函数定价计算之一包括“调用”。调用是否意味着每次我调用 API 时都等于 1 调用?如果是,那么最终用户可能会滥用 API,因为他们能够查看网站源并找到 API。
我一直在谷歌搜索解决方案,其中一些建议启用身份验证和 cors,以避免滥用。但是身份验证和 cors 仍然计算调用对吗?
我的代码结构:
- 客户端通过 get/post 方法调用 API,传递从 Firebase Authentication 获取的用户 TOKEN
- 请求到达 Firebase 函数
- 服务器将使用 CORS 检查预检信息,并验证 TOKEN。
- 如果没有通过 (3) 则返回错误,否则继续执行该函数。
所以我假设如果最终用户检查我的网络源代码并获取 API URL,他们可以简单地向我的 API 发送垃圾邮件,对吗?然后我的账单会因为调用的负载而破裂。


