小编hpi*_*hal的帖子

ASP.NET身份登录

我在MVC 5中有一个使用ASP.NET Identity登录用户的网站.一切都很好.

现在我的合作伙伴需要在他的WinForms应用程序中登录注册用户.有谁知道Identity使用的密码哈希算法或如何在WinForms应用程序中验证用户?

任何提示都会被贬低.

最好的祝福.

asp.net-mvc winforms asp.net-mvc-5 asp.net-identity

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

同时滑动两个div

我试图在同一页面中有两个部分,一个登录部分和一个应用程序部分.

想法是onLoginSubmit()向左滑出登录部分,然后从应用程序部分右侧滑入.

考虑这个HTML:

<section id="login-section">

</section>
<section id="app-section" style="display: none;">

</section>
Run Code Online (Sandbox Code Playgroud)

我正在使用的JS:

$('#login-section').toggle("slide", { direction: "left" }, 500);
$('#app-section').toggle("slide", { direction: "right" }, 500);
Run Code Online (Sandbox Code Playgroud)

会发生的事情是登录部分确实向左滑出但是应用程序部分仅在转换结束后才可见,所以当登录部分离开屏幕时我得到默认背景.

我正在使用jQuery和jQuery UI.任何帮助表示赞赏.

jquery jquery-ui

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

Android Material ListView 分隔线

我正在尝试构建一个遵循谷歌指南的列表视图。

这是我的要求:

  1. 允许组标题
  2. 允许组之间使用全宽分隔线
  3. 允许项目之间有部分分隔线

这是显示标题和项目之间的分隔线的图像。不幸的是,无法查看组之间的全宽分隔线,但这就像普通的分隔线一样。

材质列表视图

我可以构建一个自定义适配器,它接收Item、 、HeaderItem和的子类ContactItem

header.xml简单地说就是

<TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_vertical"
    android:minHeight="48dp"
    android:padding="16dp"
    android:text="Today"
    android:textColor="#8A000000"
    android:textSize="14sp" />
Run Code Online (Sandbox Code Playgroud)

至于contact.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

        <ImageView
            android:id="@+id/friend_profile_picture"
            android:layout_width="40dp"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_centerVertical="true"
            android:layout_margin="16dp"
            android:scaleType="fitStart"
            android:src="@drawable/ic_home" />

            <TextView
                android:id="@+id/friend_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignWithParentIfMissing="true"
                android:layout_toRightOf="@+id/friend_profile_picture"
                android:paddingTop="16dp"
                android:text="random_text"
                android:textAppearance="@style/TextAppearance.AppCompat.Body2" />

            <TextView
                android:id="@+id/friend_state"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/friend_name"
                android:layout_toRightOf="@+id/friend_profile_picture"
                android:paddingBottom="16dp"
                android:text="random_text"
                android:textAppearance="@style/TextAppearance.AppCompat.Body1"
                android:textSize="14sp" />

</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

现在,我的问题是项目分隔符。全宽分隔符将是普通的列表视图分隔符。我只是不确定如何进行部分分隔并使其与普通分隔器一起工作。有什么提示吗?

如果更容易/更好的话,也可以使用RecyclerView和s 来完成。ItemDecorator

android listview material-design

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

我如何使用await关键字?

我有以下"测试"方法:

public async Task<TitaniumUser> FindByIdAsync(string userId)
{
    long id;

    if (!long.TryParse(userId, out id))
        return null;

    return new TitaniumUser(id);
}
Run Code Online (Sandbox Code Playgroud)

我称之为:

var test = await userManager.FindByIdAsync("123");
Run Code Online (Sandbox Code Playgroud)

但我收到以下消息:

'await'运算符只能用于标有'async'修饰符的方法或lambda

我真的会帮助解决这个问题.

c# asynchronous async-await

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