小编Man*_*ish的帖子

为大量项目选择2表现

我正在使用带有twitter bootstrap的select2 jquery插件.它适用于较少数量的物品.但是当列表很大(超过1500项)时,它确实会变慢.它在IE中速度最慢.

正常下拉列表工作速度非常快,超过1500项.这种情况有没有解决方法?

jquery jquery-select2

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

有背景颜色和波纹作用的机器人按钮

我有一个Android按钮,我想给它一个背景颜色和两个涟漪效果

我的涟漪xml如下.

<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:color="#BDA0CB"
    tools:targetApi="lollipop">
    <item android:id="@android:id/mask">
        <shape android:shape="rectangle">
            <solid android:color="#BDA0CB" />
        </shape>
    </item>
</ripple>
Run Code Online (Sandbox Code Playgroud)

我的按钮是

 <Button android:id="@+id/Button_activity_login_ViewProfile" style="?android:textAppearanceSmall"
        android:layout_width="fill_parent" android:layout_height="wrap_content"
        android:layout_marginTop="16dp" android:text="Save"
        android:textStyle="bold"
        android:layout_marginLeft="@dimen/margin_left"
        android:layout_marginRight="@dimen/margin_right"
        android:textColor="#ffffffff"
        android:fontFamily="sans-serif"
        android:background="#ff7e51c2" />
Run Code Online (Sandbox Code Playgroud)

要给出涟漪效果,我必须删除背景颜色......有没有办法可以保留两者.

android background ripple

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

如何解析XML字符串c#

我正在尝试将XML字符串解析为列表,结果计数始终为零.

 string result = "";
            string address = "http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml";

            // Create the web request  
            HttpWebRequest request = WebRequest.Create(address) as HttpWebRequest;

            // Get response  
            using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
            {
                // Get the response stream  
                StreamReader reader = new StreamReader(response.GetResponseStream());

                // Read the whole contents and return as a string  
                result = reader.ReadToEnd();
            }

            XDocument doc = XDocument.Parse(result);

            var ListCurr = doc.Descendants("Cube").Select(curr => new CurrencyType() 
                    { Name = curr.Element("currency").Value, Value = float.Parse(curr.Element("rate").Value) }).ToList();
Run Code Online (Sandbox Code Playgroud)

哪里出错了

c# xml webrequest

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

Json.net反序列化返回一个空对象

我正在使用下面的代码进行序列化。

var json = JsonConvert.SerializeObject(new { summary = summary });
Run Code Online (Sandbox Code Playgroud)

summary是类型的自定义对象SplunkDataModel

public class SplunkDataModel
{
    public SplunkDataModel() {}

    public string Category { get; set; }
    public int FailureCount { get; set; }
    public Dictionary<string, SplunkError> FailureEntity { get; set; }
    public Dictionary<string, string> JobInfo { get; set; }
    public string JobStatus { get; set; }
    public int SuccessCount { get; set; }
    public List<string> SuccessEntity { get; set; }
    public int TotalCount { get; set; }
} …
Run Code Online (Sandbox Code Playgroud)

c# json json.net

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

标签 统计

c# ×2

android ×1

background ×1

jquery ×1

jquery-select2 ×1

json ×1

json.net ×1

ripple ×1

webrequest ×1

xml ×1