所以我一直在使用 Angular 和 Typescript。我似乎无法找出输入文件的类型是什么。
例如:
<input type="file" (change)="fileChangeEvent($event)">
fileChangeEvent(e:?????){}
Run Code Online (Sandbox Code Playgroud)
所有示例仅使用没有任何类型的事件,我很想知道这种类型是否存在。
我只是想说我还在学习C++所以我从关于类和结构的模块开始,虽然我不了解所有内容,但我觉得我有点对了.编译器给我的错误是:
error: expected primary-expression before '.' token
这是代码:
#include <iostream>
using namespace std;
class Exam{
private:
string module,venue,date;
int numberStudent;
public:
//constructors:
Exam(){
numberStudent = 0;
module,venue,date = "";
}
//accessors:
int getnumberStudent(){ return numberStudent; }
string getmodule(){ return module; }
string getvenue(){ return venue; }
string getdate(){ return date; }
};
int main()
{
cout << "Module in which examination is written"<< Exam.module;
cout << "Venue of examination : " << Exam.venue;
cout << "Number of Students : " …Run Code Online (Sandbox Code Playgroud) 我正在学习德尔福,由于某些原因,他们使用这种旧语言,但无论如何.我需要构建一个转换Celsius和Fahrenheit的Weather应用程序.
用户必须输入7天天气但这个例子我只想弄清第1天
所以我首先创建单选按钮来选择Celsius和Fahrenheit,然后如果他们选择Celsius我必须将Celsius转换为Fahrenheit并且如果他们选择Fahrenheit我必须将其转换为Celsius.
所以这是我的代码:
var
Celsius, Fahrenheit, Day1 : Double;
begin
Day1 := fedDay1;
Celsius := (Day1 - 32)*5/9;
Fahrenheit := Day1 * 9/5 + 32;
if radCelsius.checked then
lblConvertDay1.Caption := FloatToStrF(Fahrenheit, ffFixed, 15, 2);
else
lblConvertDay1.Caption := FloatToStr(Celsius, ffFixed, 15, 2);
end;
Run Code Online (Sandbox Code Playgroud)
它在fedDay1上给出了一个错误.这是一个浮动旋转编辑
请帮忙
我正在构建一个单独的应用程序来计算List中的Min Max和Avg of Values.
它实际上是温度.所以我认为我几乎是正确的,但有2个错误.
var
Count, Average, Sum,i, Max, Min, K : Integer;
Temperatures : Array of Integer;
NoItems : Double;
begin
Count := 0;
Sum := 0;
Max := 0;
Min := 0;
Average := 0;
Count := lstTemp.Items.Count;
{Calculate Sum of Values in the list}
for i := 0 to Count - 1 do
Sum := Sum + StrToInt(lstTemp.Items[i]);
{Calculate Min and Max}
SetLength(Temperatures,Count);
for K:=0 to Count-1 do
Temperatures[K] := lstTemp.Items[K];
if (Temperatures[K] > Max) then …Run Code Online (Sandbox Code Playgroud)