不知道我做错了什么
type Name = String
type Location = (Float,Float)
type RainfallFigures = [Int]
type Place = (Name,Location,RainfallFigures)
rtnClosestDryPlace :: (Location -> Int -> [Place] -> [(Name,Float)]) -> (Name,Float)
rtnClosestDryPlace p1 n ((a,p2,c):xs) = rtnLowestDistance (distanceList p1 (rtnFullDryPlaces ((a,p2,c):xs) n))
Couldn't match expected type ‘(Name, Float)’
with actual type ‘Int
-> [(Name, Location, RainfallFigures)] -> (Name, Float)’
• The equation(s) for ‘rtnClosestDryPlace’ have three arguments,
but its type ‘(Location -> Int -> [Place] -> [(Name, Float)])
-> (Name, Float)’
has only …
Run Code Online (Sandbox Code Playgroud) 考虑以下代码片段:
enum class Bar {
A
};
void foo(Bar) {}
struct Baz {
void foo() {
foo(Bar::A);
}
};
Run Code Online (Sandbox Code Playgroud)
它无法编译,来自 gcc 9.2 的消息是:
:12:19: error: no matching function for call to 'Baz::foo(Bar)'
12 | foo(Bar::A);
|
Run Code Online (Sandbox Code Playgroud)
我不怀疑这是一个错误,因为 clang 10 也失败了。关于这种情况,我有两个问题:
标准在哪里定义了这种重载的行为?
以这种方式指定编译器行为的可能原因是什么?
我试图以迭代方式检查另一项服务的条件后调用一项服务,如下所示:
if (productService.isProductNotExcluded(product)){
List<Properties> properties = propertiesService.getProductDetailProperties(product)
...
}
Run Code Online (Sandbox Code Playgroud)
但自从isProductExcluded
返回以来Mono<Boolean>
,我正在使用这种方法,这看起来很奇怪:
Flux<Properties> properties = productService.isProductNotExcluded(productId)
.filter(notExcluded -> notExcluded)
.map(ok-> propertiesService.getProductDetailProperties(product))
...
Run Code Online (Sandbox Code Playgroud)
处理这种情况的正确方法是什么?
我在剃刀组件中使用ValidationMessage来显示验证消息,如下所示:
<ValidationMessage For="@(() => ViewModel.CompanyNumber)" />
Run Code Online (Sandbox Code Playgroud)
这将生成此 HTML 代码:
<ValidationMessage For="@(() => ViewModel.CompanyNumber)" />
Run Code Online (Sandbox Code Playgroud)
是否可以更改 CSS 类?我想使用除validation-message
. 添加class="myclass"
被控制器忽略。我也试过@attributes
没有成功。
我现在处理这个问题已经快两周了。我尝试了很多解决方法,但似乎没有一个有效。我已经安装angular-fire
并安装firebase
到它的最新版本,尝试过ng add @angular/fire
,配置自定义webpack.config.ts
,尝试回滚到每个建议的先前版本。没有人解决这个问题。
实际错误:
de-10@de10-LIFEBOOK-A555:~/Desktop$ node dist/server.js
internal/modules/cjs/loader.js:797
throw err;
^
Error: Cannot find module 'firebase/app'
Require stack:
- /home/de-10/Desktop/dist/server.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Module.require (internal/modules/cjs/loader.js:849:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/de-10/Desktop/dist/server.js:125276:18)
at __webpack_require__ (/home/de-10/Desktop/dist/server.js:20:30)
at Module.<anonymous> (/home/de-10/Desktop/dist/server.js:125199:70)
at __webpack_require__ (/home/de-10/Desktop/dist/server.js:20:30)
at Module.<anonymous> (/home/de-10/Desktop/dist/server.js:124984:78)
at __webpack_require__ (/home/de-10/Desktop/dist/server.js:20:30) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/home/de-10/Desktop/dist/server.js' ]
}
Run Code Online (Sandbox Code Playgroud)
我不能放弃 Firebase 因为然后我面临:
ERROR in ../node_modules/@angular/fire/auth/auth.d.ts:4:28 - error TS2307: Cannot find module 'firebase/app'.
4 …
Run Code Online (Sandbox Code Playgroud) 对于机器学习 porpuoses,我需要“清理”一些我正在提取的文本,所以我试过这个:
texto = "sdf sdf s _ sfsf sdfs _________ sfsdf"
texto = texto.replace(r"_{2,}"," ")
print(texto)
Run Code Online (Sandbox Code Playgroud)
但结果并不如预期:
sdf sdf s _ sfsf sdfs _________ sfsdf
Run Code Online (Sandbox Code Playgroud)
我想:
sdf sdf s _ sfsf sdfs sfsdf
Run Code Online (Sandbox Code Playgroud) 我如何解决这个问题的描述:虽然相对较新,但我在 Node.js 方面有多年经验,所以我希望能够让库工作。
安装在目录中失败了几次,当文件是 jpg 时,其中一个 mtl 文件引用了 png - 这已更改并且似乎成功。
另一个文件有
import ImageFul from './imageful';
Run Code Online (Sandbox Code Playgroud)
必须改为
import ImageFul from './imageful.jsx';
Run Code Online (Sandbox Code Playgroud)
我更改了,但这是否意味着我缺少工具链的某些部分?
主(Github)页面没有提到库或加载程序方面的任何先决条件(我必须设置和配置babel-plugin-import-glob
)所以我问自己没有安装其他哪些 npm 依赖项react-planner
?
无论如何,经历了一个痛苦的过程,这个包终于被编译了——但什么也没显示,并在 Chrome 控制台中给出了这组错误:
react_devtools_backend.js:6 [BABEL] Note: The code generator has deoptimised the styling of "http://planner.appl/js/dist/main.js" as it exceeds the max of "500KB".
r @ react_devtools_backend.js:6
i @ babel.min.js:10
t @ babel.min.js:10
t.default @ babel.min.js:10
n.generate @ babel.min.js:2
n.transform @ babel.min.js:2
(anonymous) @ babel.min.js:14
n.wrap @ babel.min.js:2
e.transform @ babel.min.js:14
s @ …
Run Code Online (Sandbox Code Playgroud) 我最初的问题是关于取命名范围的单列的平均值。但经过反思,问题概括为“如何从命名范围中提取单个列?”
我正在使用命名范围从大型数据集中提取两列。假设MyRange
从较大的数据集中定义了三行和两列:
... |G |H | ...
+----|----|----|
| ... |
|2000|15.1| 10|
|2001|15.2| 23|
|2002|15.3| 30|
| ... |
Run Code Online (Sandbox Code Playgroud)
使用MyRange
,我将如何取(仅)列的平均值H
?
我尝试过各种类似AVERAGE(MyRange:H)
, 但AVERAGE(INDEX(MyRange 1))
还没有找到正确的语法。
(在上面的示例中,结果应为 21。)
我从 Flutter 开始,并有一些关于放置我的方法的正确位置的问题,在小部件的构建方法内部还是外部?
示例:我有我的小部件并创建了一个方法 showText。如果我将此方法放置在小部件的构建方法内部或外部(作为类本身的方法),是否有区别?
似乎无论哪种方式都有效。
谢谢
我正在创建一个 saml 策略,并创建了一个包含我的密钥的 certs 文件夹。问题是,当我构建项目时,我收到此错误:
[Nest] 14078 - 04/22/2020, 4:33:34 PM [ExceptionHandler] ENOENT: no such file or directory, open '/Users/wilsonsilva/Desktop/EduTec/formations-tool/dist/server-app/src/auth/certs/key.pem' +115ms
Run Code Online (Sandbox Code Playgroud)
因此,当我转到指定的路径(dist 文件夹)时,文件夹certs文件夹确实丢失了。有人可以帮我找到解决方案吗?
我正在使用 Angular 8 和 Ng Universal (NestJS)
angular ×1
angularfire ×1
angularfire2 ×1
asp.net-core ×1
blazor ×1
c++ ×1
dart ×1
firebase ×1
flutter ×1
haskell ×1
name-lookup ×1
nestjs ×1
overloading ×1
python ×1
reactjs ×1
reactor ×1
regex ×1
replace ×1
toolchain ×1