Giter Club home page Giter Club logo

Comments (7)

kyuridenamida avatar kyuridenamida commented on May 24, 2024

わかりました。現状1つのjsonにデータ全部持ってるんですが、全データダウンロードするのパフォーマンス大丈夫ですかね(あとキャッシュによる不具合とか)

やばそうだったらコンテスト/問題毎にディレクトリとファイル毎にわけてjsonをおくことで対処することも可能です。

from atcoder-tools.

kmyk avatar kmyk commented on May 24, 2024

丸ごとひとつの json の形で大丈夫です。
ただし https://kyuridenamida.github.io/atcoder-tools/manifest.json とほぼ同様に設置されると仮定しています。

1回の通信の容量はいまそのまま解析結果のページを開くのと同じ量なので 300KB と大きくなく 200ms と十分に高速、接続数が増えたとしてもAtCoder のユーザ数程度なら GitHub pages は耐えてくれます。キャッシュも適切に設定されているので、複数ページを開いても重複しての通信はないので安心です。
また、もし最適ではなかったとしても、 userscript の内部で使うAPIなので互換性は気にせず壊すことができるので、問題が起こってから考えても遅くはないです。

from atcoder-tools.

kyuridenamida avatar kyuridenamida commented on May 24, 2024

OKです。ダウンロード出来るようにしてみます。

from atcoder-tools.

kmyk avatar kmyk commented on May 24, 2024

よろしくお願いします。

from atcoder-tools.

kyuridenamida avatar kyuridenamida commented on May 24, 2024

https://kyuridenamida.github.io/atcoder-tools/api/all.json
これでいいですか?型はQualityResult.tsの定義を見てください

import Problem from './Problem'

export default interface QualityResult {
    problem: Problem,
    contest: {
        contest_id: string,
    },
    statement_parse: {
        error: string | null
    },
    format_prediction: {
        error: string | null
    },
    modulo: {
        value: number | null
        error: string | null
    },
    yes_str: {
        error: string | null
        value: string | null
    },
    no_str: {
        error: string | null
        value: string | null
    },
    codes: {
        [lang: string] : string,
    }
}

from atcoder-tools.

kmyk avatar kmyk commented on May 24, 2024

完璧です。
ではuserscriptを書きます

from atcoder-tools.

kyuridenamida avatar kyuridenamida commented on May 24, 2024

いい話

from atcoder-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.