小编Ami*_*ahi的帖子

在codebehind asp.net中默认选中的checkboxlist项

在我的页面中,我有一个CheckBoxList控件,我有7个项目.我想在我的Page_load代码生成中设置这7个项目.

我的页面:

<asp:CheckBoxList ID="WeeklyCondition" runat="server">
    <asp:ListItem Value="1">Sat</asp:ListItem>
    <asp:ListItem Value="2">Sun</asp:ListItem>
    <asp:ListItem Value="3">Mon</asp:ListItem>
    <asp:ListItem Value="4">Tue</asp:ListItem>
    <asp:ListItem Value="5">Wed</asp:ListItem>
    <asp:ListItem Value="6">Thu</asp:ListItem>
    <asp:ListItem Value="7">Fri</asp:ListItem>

</asp:CheckBoxList>
Run Code Online (Sandbox Code Playgroud)

.net c# asp.net code-behind checkboxlist

8
推荐指数
2
解决办法
2万
查看次数

如何永久存储服务器密钥?openconnect

有没有办法在成功连接后存储服务器密钥,ssh的方式是什么?

无论我连接多少次,我都必须输入" yes "来接受服务器密钥.我希望它能被永久地接受和存储.

###############################
amir@amirpc:~$ sudo openconnect uk.cisadd.com -u myusername
POST https://uk.cisadd.com/
Attempting to connect to server xxx.xxx.xxx.xxx:443
SSL negotiation with uk.cisadd.com
Server certificate verify failed: signer not found

Certificate from VPN server "uk.cisadd.com" failed verification.
Reason: signer not found
Enter 'yes' to accept, 'no' to abort; anything else to view: 

Connected to HTTPS on XXX.XXX.XXX.XXX
###############################
Run Code Online (Sandbox Code Playgroud)

可以编写bash脚本来运行openconnect并转义吗?

bash terminal vpn

8
推荐指数
2
解决办法
9513
查看次数

内连接vs存储过程或函数sql server

我有这个架构:

在此输入图像描述

当我想显示Attend表格时,而不是DoctorIdPatientId,显示员工姓名和患者姓名.

像这样:

  • ID
  • 患者姓名
  • 医生姓名[==员工姓名]
  • 开始
  • 结束

第一种方法是使用内连接:

select 
   a.Id, p.Name, a.Name, a.Start, a.End 
from 
   Patient as p  
inner join 
   (select 
       e.Name, at.Id, at.Start, at.End, at.PatientId
    from 
       Attend as at  
    INNER JOIN 
       Employee as e on at.DoctorId = e.Id) as a on p.Id = a.PatientId
Run Code Online (Sandbox Code Playgroud)

第二种方法是使用函数或存储过程 - 发送id和返回名称

 select 
    a.Id, 
    FindDoctor(a.DoctorId) as Doctor, 
    FindPatient(a.PatientId) as Patient, 
    a.Start, a.EndTime 
 from  
    Attend AS a
Run Code Online (Sandbox Code Playgroud)

哪个更好?哪种是优化方法?

sql stored-procedures inner-join sql-function

1
推荐指数
1
解决办法
1719
查看次数