小编ani*_*lca的帖子

更改kendo ui下拉列表的选定值

我的视图中有一个kendo ui下拉列表:

$("#Instrument").kendoDropDownList({
    dataTextField: "symbol",
    dataValueField: "symbol",
    dataSource: data,
    index: 0
});
Run Code Online (Sandbox Code Playgroud)

如何使用jQuery更改它的选定值?我试过了:

$("#Instrument").val(symbol);
Run Code Online (Sandbox Code Playgroud)

但它没有按预期工作.

javascript asp.net-mvc jquery telerik kendo-ui

45
推荐指数
4
解决办法
12万
查看次数

隐藏/显示Kendo网格滚动条

我只想在必要的时候显示我的剑道网格的滚动条.这是我的网格初始化:

@(Html.Kendo().Grid<UT.Repo.Core.up_HedgedCustomerLatestTradeListGet_Result>()
    .Name("lastPositionsGrid")
    .Columns(columns =>
    {
        columns.Bound(c => c.ACCOUNT).Title("Hesap").Width(70);
        columns.Bound(c => c.TICKET).Title("Emir");
        columns.Bound(c => c.SIDE).Title("Yön").Width(50);
        columns.Bound(c => c.STATE).Title("Durum").Width(65);
        columns.Bound(c => c.SYMBOL).Title("Sembol");
        columns.Bound(c => c.VOLUME).Title("Hacim").Width(65);
        columns.Bound(c => c.OPENPX).Title("Aç?l??");
        columns.Bound(c => c.CLOSEPX).Title("Kapan??");
        columns.Bound(c => c.P_L).Title("Kar Zarar").Width(75);
        columns.Bound(c => c.SL).Title("Zarar? Durdur");
        columns.Bound(c => c.TP).Title("Kar? Al");
        columns.Bound(c => c.TIME).Title("Zaman").ClientTemplate("#= kendo.toString(TIME, \"dd/MM/yyyy HH:mm:ss\") #").Width(160);
    })
    .Scrollable()
    .Sortable()
    .Resizable(resize => resize.Columns(true))
    .Events(events => events.DataBound("onLastPositionsGridDataBound"))
    .DataSource(dataSource => dataSource
        .Ajax()
        .Sort(sort => sort.Add("TIME").Descending())
        .Read(read => read.Action("HedgedCustomerLatestTradeListGet", "Home"))
    )
)
Run Code Online (Sandbox Code Playgroud)

在数据绑定上我试图设置滚动条的可见性:

function onLastPositionsGridDataBound(e) {
    var gridHeight = $("#lastPositionsGrid").outerHeight();
    var …
Run Code Online (Sandbox Code Playgroud)

javascript css jquery kendo-ui kendo-grid

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

Linq distinct&max

我要查询这个表:

symbol    time
------    ----------
aaa       2013-04-18 09:10:28.000    
bbb       2013-04-18 09:10:27.000    
aaa       2013-04-18 09:10:27.000    
bbb       2013-04-18 09:10:26.000
Run Code Online (Sandbox Code Playgroud)

对于具有最大时间值的所有不同符号,我需要一行.我如何编写linq查询?

提前致谢,

c# linq linq-to-sql

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

从流读取失败 - MySqlException

我正在尝试使用以下代码片段打开与 MySql 数据库的连接:

string connectionString = "Server=ip_number;Database=database_name;Uid=uid;Password=password";
MySqlConnection connection;
connection = new MySqlConnection(connectionString);
connection.Open();
Run Code Online (Sandbox Code Playgroud)

这是我得到的例外:

在此输入图像描述

我正在使用最新的 mysql 连接器(从此处下载)。我缺少什么?

提前致谢,

.net c# mysql connection-string database-connection

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

技术分析 - 抛物线停止和反向指示器

我正在努力建立一个创建SAR系列的课程.但似乎我不太了解这些步骤.我不确定计算的初始值.

这是我的第一次尝试:

public class SAR : IndicatorCalculatorBase
{
    public override List<Ohlc> OhlcList { get; set; }
    public double AccelerationFactor = 0.02;
    public double MaximumAccelerationFactor = 0.2;

    public override IIndicatorSerie Calculate()
    {
        SingleDoubleSerie sarSerie = new SingleDoubleSerie();

        bool trendUp = false, trendChanged = false;
        double instantFactor = AccelerationFactor;

        for (int i = 1; i < OhlcList.Count; i++)
        {
            if (OhlcList[i].Low > OhlcList[i - 1].Low) // uptrend
            {   
                if (!trendUp)
                {
                    trendUp = true;
                    trendChanged = true;
                    instantFactor = AccelerationFactor;
                }
                else …
Run Code Online (Sandbox Code Playgroud)

c# r trading indicator algorithmic-trading

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

如何生成wcf服务库项目的wsdl文件?

我的解决方案中有一些Wcf服务库项目(不是Wcf服务应用程序).我必须将项目的.wsdl文件提供给我的同事,他们将使用这些服务.

我怎样才能做到这一点?

提前致谢,

wcf wsdl visual-studio-2010

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

在代码第一实体框架中定义多对多关系

我在模型中有3个课程,如下所示.

[Table("UserProfile")]
public class UserProfile
{
    [Key]
    [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
    public int Id { get; set; }

    public string UserName { get; set; }

    public ICollection<MartialArtUserProfile> MartialArtUserProfiles { get; set; }
}

[Table("MartialArt")]
public class MartialArt
{
    [Key]
    [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
    public int Id { get; set; }

    public string Name { get; set; }

    public string Description { get; set; }

    public string IconPath { get; set; }

    public string ImagePath { get; set; }

    public ICollection<MartialArtUserProfile> MartialArtUserProfiles { get; set; }
} …
Run Code Online (Sandbox Code Playgroud)

c# entity-framework ef-code-first ef-migrations

5
推荐指数
3
解决办法
9192
查看次数

HRESULT:0x800A03EC - 它在创建Excel文件时适用于我的机器问题

我正在使用来自我的asp.net应用程序中的mssql服务器的数据创建一个excel报告.这是我的方法:

[WebMethod]
public static string ExportToExcel(string sourcetype)
{
    Microsoft.Office.Interop.Excel.Application oXL;
    Microsoft.Office.Interop.Excel._Workbook oWB;
    Microsoft.Office.Interop.Excel._Worksheet oSheet;
    Microsoft.Office.Interop.Excel.Range oRng;

    try
    {
        oXL = new Microsoft.Office.Interop.Excel.Application();
        oXL.Visible = false;

        oWB = (Microsoft.Office.Interop.Excel._Workbook)(oXL.Workbooks.Add(Missing.Value));
        oSheet = (Microsoft.Office.Interop.Excel._Worksheet)oWB.ActiveSheet;

        List<ExcelReport> dataToExport = APIClient.GetExcelReportData(Utility.getCurrentFilterId(), sourcetype);

        oSheet.Cells[1, 1] = "Source";
        oSheet.Cells[1, 2] = "UserName";
        oSheet.Cells[1, 3] = "Name";
        oSheet.Cells[1, 4] = "Message";
        oSheet.Cells[1, 5] = "Title";
        //oSheet.Cells[1, 6] = "Date";

        int activeRow = 2;

        for (int i = 0; i < dataToExport.Count; i++)
        {
            oSheet.Cells[activeRow, 1] = dataToExport[i].Source;
            oSheet.Cells[activeRow, 2] …
Run Code Online (Sandbox Code Playgroud)

c# asp.net security excel iis-7

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

Windows Azure中的服务管理URL

我正在尝试从Visual Studio发布云服务.Visual Studio中的编辑订阅对话框在第4步中询问我:"输入服务管理URL".默认情况下是https://management.core.windows.net/.我在那里写什么?

谢谢,

cloud azure azure-storage azure-diagnostics

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

读取MTOM数据时已超出最大缓冲区大小

我必须使用外部Web服务,但是我收到以下错误:

读取MTOM数据时已超出最大缓冲区大小(65536)

在今天之前,我使用以下配置使用相同的服务:

    <bindings>
        <basicHttpBinding>
            <binding name="BOServiceSoap11Binding">
                <security mode="Transport" />
            </binding>
            <binding name="BOServiceSoap11Binding1" />
        </basicHttpBinding>
        <customBinding>
            <binding name="BOServiceSoap12Binding">
                <mtomMessageEncoding messageVersion="Soap12" />
                <httpsTransport />

            </binding>
        </customBinding>
    </bindings>
Run Code Online (Sandbox Code Playgroud)

这是我的终点:

<endpoint address="https://x.com/live-api/services/BOService.BOServiceHttpsSoap12Endpoint/"
            binding="customBinding" bindingConfiguration="BOServiceSoap12Binding"
            contract="xServiceReference.BOServicePortType" name="BOServiceHttpsSoap12Endpoint" />
Run Code Online (Sandbox Code Playgroud)

我尝试通过向customBinding标记及其子标记添加以下标记来增加MaxReceivedMessageSize:

MaxReceivedMessageSize="2147483647" maxArrayLength="2147483647" maxStringContentLength="2147483647" maxBufferSize="2147483647"
Run Code Online (Sandbox Code Playgroud)

如何配置我的端点以获得正确的响应?

谢谢,

.net wcf soap mtom maxreceivedmessagesize

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