<commit_before>import QtQuick 2.0
import mplane 1.0
import QtQuick.Controls 1.0
import QtQuick.Window 2.0
import QtQuick.Layouts 1.0
import "android"

Rectangle {
    id: root
    width: 400
    height: 500
    color: "#e5e5e5"

    property string title: qsTr("NO INTERNET")
    property string subtitle: qsTr("checking your connection ...")

    Component.onDestruction: statusBar.visible = false

    Binding {
        target: statusBar
        property: "visible"
        value: tester.running || discovery.running || ping.status == Ping.Running
    }

    ListView {
        anchors.fill: parent
        anchors.margins: 10
        spacing: 10

        model: VisualItemModel {
            Card {
                Component.onCompleted: tester.start()

                id: card

                title: "Checking Connection"
                width: ListView.view.width

                ListView {
                    id: listView
                    height: card.expanded ? 330 : 0
                    anchors {
                        left: parent.left
                        right: parent.right
                        leftMargin: 20
                    }
                    anchors.fill: card
                    interactive: false

                    model: ConnectionTesterModel {
                        connectionTester: ConnectionTester {
                            id: tester
                        }<commit_msg>Allow drag-out of unwanted entries.<commit_after>import QtQuick 2.0
import mplane 1.0
import QtQuick.Controls 1.0
import QtQuick.Window 2.0
import QtQuick.Layouts 1.0
import "android"

Rectangle {
    id: root
    width: 400
    height: 500
    color: "#e5e5e5"

    property string title: qsTr("NO INTERNET")
    property string subtitle: qsTr("checking your connection ...")

    Component.onDestruction: statusBar.visible = false

    Binding {
        target: statusBar
        property: "visible"
        value: tester.running || discovery.running || ping.status == Ping.Running
    }

    ListView {
        anchors.fill: parent
        anchors.margins: 10
        spacing: 10

        model: VisualItemModel {
            Card {
                Component.onCompleted: tester.start()

                id: card

                title: "Checking Connection"
                width: ListView.view.width

                Behavior on x {
                    NumberAnimation {
                        duration: 100
                    }
                }

                opacity: (width-Math.abs(x))/width

                Item {
                    SequentialAnimation {
                        id: moveAnimation

                        property real v

                        NumberAnimation {
                            id: moveAnimationCard

                            target: card
                            property: "x"
                            to: v > 0 ? card.width : -card.width
                            duration: 150
                        }

                        ScriptAction {
                            script: {
                                card.visible = false;
                                card.height = 0;
                            }
                        }
                    }
                }

                MouseArea {
                    property Time timer: Time {}

                    anchors.fill: parent
                    drag.target: card
                    drag.axis: Drag.XAxis
                    onPressed: timer.restart()
                    onReleased: {
                        var v = card.x*1000 / timer.elapsed();
                        if ( Math.abs(v) > 500 ) {
                            moveAnimation.v = v;
                            moveAnimation.start();
                        } else {
                            card.x = 0;
                        }
                    }
                }

                ListView {
                    id: listView
                    height: card.expanded ? 330 : 0
                    anchors {
                        left: parent.left
                        right: parent.right
                        leftMargin: 20
                    }
                    anchors.fill: card
                    interactive: false

                    model: ConnectionTesterModel {
                        connectionTester: ConnectionTester {
                            id: tester
                        }
{'fraction_non_alphanumeric': 0.06495841762193752, 'fraction_numerical': 0.01663295122499438, 'mean_word_length': 0.9172770357604481, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5379930', 'n_tokens_mistral': 1130, 'n_tokens_neox': 958, 'n_words': 252}