当我自定义主题来设置字体时...
<mat-card-title> <mat-card-action>
等)<p> <span> <mat-card-content>
)并且默认为 Roboto...那些不应该采用 body-1 风格吗?请注意,我使用 mat-card 作为示例,但其他组件也会发生同样的情况。
https://material.angular.io/guide/typography重现的最少步骤:
$theme-primary: mat.define-palette(mat.$indigo-palette);
$theme-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
$my-typography: mat.define-typography-config(
$font-family: "'Nerko One', cursive",
);
$theme: mat.define-light-theme(
(
color: (
primary: $theme-primary,
accent: $theme-accent,
),
typography: $my-typography,
)
);
@include mat.all-component-themes($theme);
Run Code Online (Sandbox Code Playgroud)
这是一个示例,您可以看到标题等已设置样式,但看不到卡片的内容: https://stackblitz.com/edit/angular-wan6f9 ?file=src/app/card-actions-example.html
我尝试了几种方法,包括配置每个级别,但都不起作用。唯一有效的方法是将默认值硬编码到文档的根目录,但我不想这样做。
这个问题是关于MLlib(Spark 1.2.1+).
操作局部矩阵的最佳方法是什么(中等大小,低于100x100,因此不需要分发).
例如,在计算数据集的SVD之后,我需要执行一些矩阵运算.将RowMatrix
只提供一个多重功能.toBreeze方法返回一个DenseMatrix<Object>
但是API似乎不是Java友好的:
public final <TT,B,That> That $plus(B b, UFunc.UImpl2<OpAdd$,TT,B,That> op)
在Spark + Java中,如何执行以下任何操作:
Javadoc RowMatrix:https://spark.apache.org/docs/latest/api/java/org/apache/spark/mllib/linalg/distributed/RowMatrix.html
RDD<Vector> data = ...;
RowMatrix matrix = new RowMatrix(data);
SingularValueDecomposition<RowMatrix, Matrix> svd = matrix.computeSVD(15, true, 1e-9d);
RowMatrix U = svd.U();
Vector s = svd.s();
Matrix V = svd.V();
//Example 1: How to compute transpose(U)*matrix
//Example 2: How to compute transpose(U(:,1:k))*matrix
Run Code Online (Sandbox Code Playgroud)
编辑:感谢dlwh指出我正确的方向,以下解决方案的工作原理:
import no.uib.cipr.matrix.DenseMatrix;
// ...
RowMatrix U = svd.U();
DenseMatrix …
Run Code Online (Sandbox Code Playgroud)