小编Jak*_*sky的帖子

Android - Snackbar vs Toast - 用法和差异

到目前为止,我们一直在我们的应用程序中使用Toasts,因为我们计划采用Support Design Library的一些新功能.我想知道Snackbar与Toast的推荐用法是什么.

我一直在谷歌材料snackbar doc上阅读.

Snackbars在移动设备和桌面左下方的屏幕底部的小弹出窗口中提供有关操作的轻量级反馈.它们首先是屏幕上的元素,包括FAB.

和祝酒词.

Android还提供了一个胶囊形状的吐司,主要用于系统消息传递.Toasts与snackbars类似,但不包含动作,不能在屏幕上滑动.

我明白他们做了什么但我有点困惑何时使用什么.这是否意味着:

  • 如果我不需要用户互动,我会用吐司吗?
  • "系统消息"是什么意思?这适用于在我的应用和Android系统之间发生重要事件时显示信息吗?
  • 我喜欢的是滑动屏幕功能 - 这是开始用小吃棒替换烤面包的原因吗?(虽然这是一个基于意见的问题)

android difference android-toast android-snackbar

90
推荐指数
5
解决办法
5万
查看次数

@ font-face无法通过OpenType嵌入权限检查.权限必须是可安装的

此处发生此异常.您可以在IE11中重现它.到目前为止,我还没有找到问题的原因.有没有想过为什么会这样?

在此输入图像描述

CSS3114:@ font-face失败OpenType嵌入权限检查.权限必须是可安装的.File:53d9eae5-63b4-48d7-a5b8-3419455028bb.ttf

该网站在Azure网站平台上运行,并使用ASP.NET MVC 5.

css fonts css3 font-face

43
推荐指数
3
解决办法
7万
查看次数

ASP.NET MVC - 路由 - 具有文件扩展名的操作

有没有办法实现调用URL http://mywebsite/myarea/mycontroller/myaction.xml 这基本上"假"请求文件,但结果将是一个动作操作,将服务于动态创建的文件?

我试过这个:

context.MapRoute(
                "Xml_filename",
                "Xml/{controller}/{action}.xml"
            );
Run Code Online (Sandbox Code Playgroud)

但是只要URL中有filextension,路由就会失败并且表现就像我直接请求文件一样.

我怀疑这可能是因为使用扩展名更少的url处理程序.

<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
        <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
        <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
Run Code Online (Sandbox Code Playgroud)

谢谢你的任何建议.

的Jakub

c# url file-extension asp.net-mvc-routing asp.net-mvc-3

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

Web API - 动态到XML序列化

我正在编写一个Web API Web服务,它返回动态构造的属性包.是否有任何有效的序列化程序或如何将动态序列化为XML?我试图寻找任何好的建议,但没有发现任何可用的东西.

c# xml dynamic asp.net-web-api

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

Azure Redis缓存 - ConnectionMultiplexer对象池

我们在我们的应用程序中使用C1 Azure Redis Cache.最近我们在GET操作上遇到了很多时间.

根据这篇文章,可能的解决方案之一是实现ConnectionMultiplexer对象池.

另一种可能的解决方案是在客户端中使用ConnectionMultiplexer对象池,并在发送新请求时选择"负载最小"的ConnectionMultiplexer.这应该可以防止单个超时导致其他请求也超时.

如何使用C#实现一个ConnectionMultiplexer对象池?

编辑:

我最近问过的相关问题.

c# caching azure stackexchange.redis azure-redis-cache

9
推荐指数
2
解决办法
3013
查看次数

在WCF项目中设置Web API

我有一点"奇怪的练习"问题.对我们项目架构的要求是在WCF项目中使用(如果可能)所有MVC优势来设置Web API.这意味着WCF和Web API Web服务将在一个项目中相互站立.

这甚至可行吗?我已经给了它一个简短的发现,发现即使合并两个项目的网络配置也很困难.

感谢您的建议和意见,

的Jakub

asp.net-mvc wcf asp.net-web-api

7
推荐指数
2
解决办法
5651
查看次数

Microsoft.SqlServer.Types:加载msvcr120.dll时出错(ErrorCode:5)

在我们的项目中,我们使用以下nuget包:

Microsoft.SqlServer.Types

直到最近,一切都运行良好,没有我明显改变ASP.NET应用程序在以下异常开始时中断的任何重要事项:

加载msvcr120.dll发生错误(ErrorCode:5)

描述:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息.

异常详细信息:System.Exception:加载msvcr120.dll时出错(ErrorCode:5)

堆栈跟踪:

[例外:错误加载msvcr120.dll(错误码:5)]
SqlServerTypes.Utilities.LoadNativeAssembly(字符串nativeBinaryPath,字符串的AssemblyName)在E:\开发\雅各布\ ServerApi\SqlServerTypes\Loader.cs:43个
SqlServerTypes.Utilities.LoadNativeAssemblies(字符串rootApplicationPath)在E:\开发\雅各布\ ServerApi\SqlServerTypes\Loader.cs:28
Jacobo.ServerApi.WebApiApplication.Application_Start()中E:\开发\雅各布\ ServerApi\Global.asax.cs中:26

[HttpException(0x80004005):加载msvcr120.dll时出错(ErrorCode:5)]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context,HttpApplication app)+529
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext,HttpContext context,MethodInfo []处理程序)+185
System.Web.HttpApplication.InitSpecial(HttpApplicationState状态,MethodInfo []处理程序,IntPtr appContext,HttpContext上下文)+172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext,HttpContext context)+421
System.Web.Hosting. PipelineRuntime.InitializeApplication(IntPtr appContext)+359

[HttpException(0x80004005):加载msvcr120.dll时出错(ErrorCode:5)] System.Web.HttpRuntime.FirstRequestInit(HttpContext context)+534 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)+117
System.Web.HttpRuntime.ProcessRequestNotificationPrivate (IIS7WorkerRequest wr,HttpContext context)+726

应用程序在以下方法中断:

private static void LoadNativeAssembly(string nativeBinaryPath, string assemblyName)
        {
            var path = Path.Combine(nativeBinaryPath, assemblyName);
            var ptr = LoadLibrary(path);
            if (ptr == IntPtr.Zero)
            {
                throw new Exception(string.Format(
                    "Error loading {0} (ErrorCode: {1})",
                    assemblyName,
                    Marshal.GetLastWin32Error()));
            }
        }
Run Code Online (Sandbox Code Playgroud)

这是loader.cs的一部分,它是SqlServerTypes nuget包的一部分.

我检查了bin文件夹并找到了那里存在的SqlServerTypes程序集.我真的不确定这里出了什么问题.

在此输入图像描述

.net c# sql-server asp.net

7
推荐指数
2
解决办法
4496
查看次数

Azure SQL 数据库 - Active Directory 集成身份验证

我想实现以下目标:

避免在 Azure 上对我的生产配置进行SQL 身份验证,并使用Active Directory 集成身份验证

当我转到 Azure 的连接字符串部分并复制以下连接字符串时:

Server=[my server name];Initial Catalog=[my db name];Persist Security Info=False;User ID=[my user name];MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Authentication="Active Directory Integrated";
Run Code Online (Sandbox Code Playgroud)

并尝试使用它我得到以下异常:

异常消息:无法将“Authentication=Active Directory Integrated”与“用户 ID”、“UID”、“密码”或“PWD”连接字符串关键字一起使用。异常堆栈跟踪:位于 System.Data.SqlClient.SqlConnectionString..ctor(String ConnectionString)在System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(字符串connectionString,DbConnectionOptions之前)在System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey键,DbConnectionPoolGroupOptions poolOptions,DbConnectionOptions&userConnectionOptions)在System.Data.SqlClient.SqlConnection.ConnectionString_Set( DbConnectionPoolKey 键)

由于我的数据库管理/基础设施经验非常有限,我不知道为什么“用户 ID”在我在 Azure 上获得的连接字符串中明确列出时会破坏所有内容。

有几点需要注意:

  • SQL 身份验证有效
  • 我有 Active Directory 管理员集

azure azure-active-directory azure-sql-database azure-sql-server

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

查找未使用/不必要的assemblyBinding重定向

似乎在我们的web.config中有太多绑定重定向,我要么:

  1. 看起来没必要
  2. 用于程序集,我在解决方案的任何地方都看不到引用

这只是绑定重定向的某些部分的示例:

  <dependentAssembly>
    <assemblyIdentity name="Microsoft.Azure.KeyVault.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-5.8.3.0" newVersion="5.8.3.0" />
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-5.8.3.0" newVersion="5.8.3.0" />
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-5.8.3.0" newVersion="5.8.3.0" />
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-4.0.2.1" newVersion="4.0.2.1" />
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" culture="neutral" />
    <bindingRedirect oldVersion="10.0.0.0-11.0.0.0" …
Run Code Online (Sandbox Code Playgroud)

c# web-config assemblybinding assembly-binding-redirect

7
推荐指数
2
解决办法
1187
查看次数

自动播放器是否可以防止EF延迟加载?

我一直在使用AutoMapper,它似乎得到了我所有的子实体(即使我没有在"Include()"子句中指定它们).是否有任何方法可以使延迟加载成为可能,并且只有在我指定它们时才获取子属性.

谢谢,

的Jakub

entity-framework lazy-loading automapper

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