我怎样才能使这个工作?我从远程链接服务器运行一个表值函数.我尝试添加没有锁定这4部分命名,但我仍然得到相同的错误.我正在使用mssql-2008
select * from [110.10.10.100].testdbname.dbo.ufn_getdata('4/25/2013') as tb;(NOLOCK)
Run Code Online (Sandbox Code Playgroud) 因为我们被迫放弃stateclient并转移到自定义存储,在我的情况下是一个azure表存储.使用我的storageexplorer,我可以看到它已经在我的azure上保存了对话数据.如何更新我的ff代码以获取过去的聊天记录?在我使用IActivityLogger类来记录对话之前,现在我对如何更新它感到困惑.
全球Asax之前:
protected void Application_Start()
{
var builder = new ContainerBuilder();
builder.RegisterType<Logger>().AsImplementedInterfaces().InstancePerDependency();
builder.Update(Conversation.Container);
GlobalConfiguration.Configure(WebApiConfig.Register);
}
Run Code Online (Sandbox Code Playgroud)
全球Asax之后:
protected void Application_Start()
{
Conversation.UpdateContainer(builder =>
{
builder.RegisterModule(new AzureModule(Assembly.GetExecutingAssembly()));
var store = new TableBotDataStore(ConfigurationManager.ConnectionStrings["StorageConnectionString"].ConnectionString);
builder.Register(c => store)
.Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore)
.AsSelf()
.SingleInstance();
});
GlobalConfiguration.Configure(WebApiConfig.Register);
}
Run Code Online (Sandbox Code Playgroud)
记录器类:
public class Logger:IActivityLogger
{
public static ConcurrentDictionary<string, List<IActivity>> Messages = new ConcurrentDictionary<string, List<IActivity>>();
public Task LogAsync(IActivity activity)
{
try
{
var list = new List<IActivity>() { activity };
Messages.AddOrUpdate(activity.Conversation.Id, list, (k, v) => { v.Add(activity); return v; }); …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用自适应卡,将其添加到我的路易斯响应中,并遵循指南:https://docs.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-add-富卡附件.
为什么我的按钮没有显示在我的机器人模拟器上?我错过了什么吗?看图:
我的代码:
[LuisIntent("Test")]
public async Task Test(IDialogContext context, LuisResult result)
{
Activity replyToConversation = (Activity)context.MakeMessage();
//Activity replyToConversation = message.CreateReply("Should go to conversation");
replyToConversation.Attachments = new List<Attachment>();
AdaptiveCard card = new AdaptiveCard();
// Add text to the card.
card.Body.Add(new TextBlock()
{
Text = "Adaptive Card design session",
Size = TextSize.Large,
Weight = TextWeight.Bolder
});
// Add text to the card.
card.Body.Add(new TextBlock()
{
Text = "Conf Room 112/3377 (10)"
});
// Add text to the card. …Run Code Online (Sandbox Code Playgroud) 我正在使用Ajax updateprogress而且我附加了一个加载gif,问题是我怎么能强迫loading.gif在屏幕的中心,即使你在页面的最底部/顶部?有没有办法让它始终出现在中心?我希望用户在中心看到加载gif始终为他们通知页面仍在加载..
.CenterPB
{
position: absolute;
left: 50%;
top: 50%;
margin-top: -20px; /* make this half your image/element height */
margin-left: -20px; /* make this half your image/element width */
width:auto;
height:auto;
}
<asp:UpdateProgress ID="UpdateProgress1" runat="server" DynamicLayout="false">
<ProgressTemplate>
<div class="CenterPB" style="height: 40px; width: 40px;">
<asp:Image ID="Image1" runat="server" ImageUrl="~/App_Themes/Default/images/progressbar1.gif"
Height="35px" Width="35px" />
Loading ...
</div>
</ProgressTemplate>
</asp:UpdateProgress>
Run Code Online (Sandbox Code Playgroud)
谢谢!
我正在尝试创建一个可以杀死所有被阻止进程的SQL脚本.
我错过了什么吗?
declare @max_count int, @count int, @sqlstring varchar(100)
declare @spid_table table (spid int NOT NULL)
INSERT @spid_table
select spid
from master.dbo.sysprocesses
where spid in (select blocked from master.dbo.sysprocesses where blocked > 0)
select @max_count = MAX(spid) FROM @spid_table
select top 1 @count = spid from @spid_table
while @count <= @max_count
begin
select @sqlstring = 'kill ' + CONVERT(varchar(4), @count)
exec(@sqlstring)
end
Run Code Online (Sandbox Code Playgroud) botframework ×2
c# ×2
sql ×2
sql-server ×2
ajax ×1
chatbot ×1
css ×1
kill ×1
kill-process ×1
nolock ×1
web-chat ×1