我在SQL中有Query
SELECT COUNT(DISTINCT dbo.Polling_Stations.P_ID) AS [Male Stations]
FROM dbo.Agent INNER JOIN
dbo.Polling_Stations ON dbo.Agent.P_ID = dbo.Polling_Stations.P_ID
GROUP BY dbo.Polling_Stations.Gender
HAVING (dbo.Polling_Stations.Gender = N'Male')
Run Code Online (Sandbox Code Playgroud)
我已将其转换为Access为:
SELECT COUNT(DISTINCT Polling_Stations.P_ID) AS [Male Stations]
FROM Agent INNER JOIN
Polling_Stations ON Agent.P_ID = Polling_Stations.P_ID
GROUP BY Polling_Stations.Gender
HAVING (Polling_Stations.Gender = 'Male')
Run Code Online (Sandbox Code Playgroud)
但它给了我一个错误:查询表达式'Count(DISTINCT Polling_Stations.P_ID)'中的语法错误(缺少运算符).
我有LQ EPSON 300打印机
我想以打印机的默认字体打印一些数据
我认为如果我们使用c#代码打印该打印机的默认字体就可以了.
PrintDocument pd = new PrintDocument();
pd.DefaultPageSettings.PaperSize = new PaperSize("A4", 950, 555);
pd.PrintPage += new PrintPageEventHandler(this.FontAndLocation);
pd.Print();
private void FontAndLocation(object sender, PrintPageEventArgs e)
{
e.Graphics.DrawString(textBox1.Text.ToString(), new Font("Bookman Old Style", 18, FontStyle.Bold), Brushes.Black, 20, 95);
e.Graphics.DrawString(textBox2.Text.ToString(), new Font("Bookman Old Style", 18, FontStyle.Bold), Brushes.Black, 20, 165);
e.Graphics.DrawString(textBox3.Text.ToString(), new Font("Courier New", 18, FontStyle.Bold), Brushes.Black, 20, 265);
}
Run Code Online (Sandbox Code Playgroud)
我尝试通过互联网搜索,但我失败了,我无法解决我的问题我写的代码不打印在草稿/点阵(打印机的默认)字体.我们可以用代码或任何能够以EPSON-LQ 300默认字体打印的代码调用打印机吗?
这是在3中找到最大值的代码,但我想找到最大值的代码5:
Dim a, b, c As Integer
a = InputBox("enter 1st no.")
b = InputBox("enter 2nd no.")
c = InputBox("enter 3rd no.")
If a > b Then
If a > c Then
MsgBox("A is Greater")
Else
MsgBox("C is greater")
End If
Else
If b > c Then
MsgBox("B is Greater")
Else
MsgBox("C is Greater")
End If
End If
Run Code Online (Sandbox Code Playgroud) 计算以下算法的复杂性?
我有以下代码片段:
i = 1;
while (i < n + 1) {
j = 1;
while (j < n + 1) {
j = j * 2;
}
i = i + 1;
}
Run Code Online (Sandbox Code Playgroud)
请详细解释一下
我想知道解决问题的步骤,以便我可以解决这些问题