Linq к SQL - вершина Возврата n строки

Вам нужно будет найти пересечение между двумя линиями, но формула довольно сложная, см. https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection

[117 ] Вы можете использовать демонстрационный сильфон в качестве отправной точки

    var chart = new OrgChart(document.getElementById("tree"), {
        template: "ula",
        layout: BALKANGraph.mixed,
        mouseScroolBehaviour: BALKANGraph.none,
        scaleInitial: BALKANGraph.match.boundary,
        nodeBinding: {
            field_0: "name",
            field_1: "title",
            img_0: "img"
        },
        nodes: [
            { id: 1, name: "Jack Hill", title: "Chairman and CEO", email: "amber@domain.com", img: "https://balkangraph.com/js/img/1.jpg" },
            { id: 2, pid: 1, name: "Lexie Cole", title: "QA Lead", email: "ava@domain.com", img: "https://balkangraph.com/js/img/2.jpg" },
            { id: 3, pid: 1, name: "Janae Barrett", title: "Technical Director", img: "https://balkangraph.com/js/img/3.jpg" },
            { id: 4, pid: 1, name: "Aaliyah Webb", title: "Manager", email: "jay@domain.com", img: "https://balkangraph.com/js/img/4.jpg" },
            { id: 5, pid: 2, name: "Elliot Ross", title: "QA", img: "https://balkangraph.com/js/img/5.jpg" },
            { id: 6, pid: 2, name: "Anahi Gordon", title: "QA", img: "https://balkangraph.com/js/img/6.jpg" },
            { id: 7, pid: 2, name: "Knox Macias", title: "QA", img: "https://balkangraph.com/js/img/7.jpg" },
            { id: 8, pid: 3, name: "Nash Ingram", title: ".NET Team Lead", email: "kohen@domain.com", img: "https://balkangraph.com/js/img/8.jpg" },
            { id: 9, pid: 3, name: "Sage Barnett", title: "JS Team Lead", img: "https://balkangraph.com/js/img/9.jpg" },
            { id: 10, pid: 8, spids: [2], name: "Alice Gray", title: "Programmer & QA", img: "https://balkangraph.com/js/img/10.jpg" },
            { id: 11, pid: 8, name: "Anne Ewing", title: "Programmer", img: "https://balkangraph.com/js/img/11.jpg" },
            { id: 12, pid: 9, name: "Reuben Mcleod", title: "Programmer", img: "https://balkangraph.com/js/img/12.jpg" },
            { id: 13, pid: 9, name: "Ariel Wiley", title: "Programmer", img: "https://balkangraph.com/js/img/13.jpg" },
            { id: 14, pid: 4, name: "Lucas West", spids: [1], title: "Marketer", img: "https://balkangraph.com/js/img/14.jpg" },
            { id: 15, pid: 4, name: "Adan Travis", title: "Designer", img: "https://balkangraph.com/js/img/15.jpg" },
            { id: 16, pid: 4, name: "Alex Snider", title: "Sales Manager", img: "https://balkangraph.com/js/img/16.jpg" }
        ]
    });
html, body {
    margin: 0px;
    padding: 0px;
    width: 100%;
    height: 100%;
    font-family: Helvetica;
    overflow: hidden;
}

#tree {
    width: 100%;
    height: 100%;
}


80
задан jinsungy 24 April 2009 в 19:47
поделиться

3 ответа

Use the Take extension method.

var query = db.Models.Take(100);
133
ответ дан 24 November 2019 в 09:49
поделиться

Вы хотите использовать Take (N);

var data = (from p in people
           select p).Take(100);

Если вы также хотите пропустить некоторые записи, вы можете использовать Пропустить, будет пропущен первый номер N:

var data = (from p in people
           select p).Skip(100);
57
ответ дан 24 November 2019 в 09:49
поделиться

Использовать Расширение Take ()

Пример:

var query = (from foo in bar).Take(100)
1
ответ дан 24 November 2019 в 09:49
поделиться
Другие вопросы по тегам:

Похожие вопросы: