我使用Angular4并且使用我的自定义字体时遇到问题.我尝试使用font-face,但它给我的错误是无法找到font-file.我需要做什么来包含这个文件,以便我可以在我的组件中使用它?
@font-face {
font-family: 'lcd-plain';
src: url('/simaxx-front-end/src/main/webapp/src/assets/fonts/lcd-plain/lcd-plain.eot'); /* For IE */
src: url('/simaxx-front-end/src/main/webapp/src/assets/fonts/lcd-plain/lcd-plain.ttf') format('truetype'), /* For Chrome and Safari */
url('/simaxx-front-end/src/main/webapp/src/assets/fonts/lcd-plain/lcd-plain.woff') format('woff'); /* For FireFox */
/*format("truetype"), url("/simaxx-front-end/src/main/webapp/src/assets/fonts/lcd-plain/lcd-plain.svg#LCD")*/
/*format("svg");*/
}
svg.gauge {
font-family: 'lcd-plain', Helvetica, Arial, sans-serif;
}
Run Code Online (Sandbox Code Playgroud) 我在进行C编程练习时遇到了麻烦.我需要使用getchar() - 方法而不是scanf().当我使用scanf时,当我输入例如7时,一切都很完美.但是当我使用getchar()并输入7时,我将得到7的ASCII码,而不是int 7.如何解决这个问题?
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int i;
printf("Voer een getal in:\n");
fflush(stdout);
i = getchar();
//scanf("%d", &i);
if (i > -1000 && i < +1000) {
printf("het ingevoerde getal is: %d\n", i);
} else {
printf("foutieve invoer\n");
}
return EXIT_SUCCESS;
}
Run Code Online (Sandbox Code Playgroud) 我正在制作一个带有2的程序JButton,但是我有一个MyFrame类,按钮位于另一个名为KnoppenPanel的类中.问题是,当我这样做时,我会得到JButton一个JButton.所以我有2个按钮和另外一个按钮围绕这些.我该如何解决这个问题?
MyFrame:
public class MyFrame extends JFrame {
Uithangbord u = new Uithangbord();
KnoppenPanel kp = new KnoppenPanel();
public MyFrame() {
setLayout(new FlowLayout());
add(u);
add(kp);
setSize(280, 180);
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
}
}
public class KnoppenPanel extends JButton implements ActionListener {
private JButton b, b2;
private JPanel p1;
Uithangbord bord = new Uithangbord();
public KnoppenPanel() {
p1 = new JPanel();
add(p1);
b = new JButton("Open");
p1.add(b);
b.addActionListener(this);
b2 = new JButton("Gesloten");
p1.add(b2);
b2.addActionListener(this);
}
public void …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 PostgreSQL 中进行查询,它应该为我提供一年中的所有月份,按月排序。还有null销售列为空的月份的值。但是我无法显示所有月份,也null根本没有任何值。请帮忙?
这是我的查询:
SELECT
to_char(date_trunc('Month', dateofmonth), 'Month') MON,
sum(sales) SALES
FROM SALES_TABLE
GROUP BY MON;
Run Code Online (Sandbox Code Playgroud)