<commit_before>Ext.setup({

    onReady : function() {
        this.ui = new Ext.Panel({
            scroll: 'vertical',
            fullscreen: true,
            layout: 'fit',
            items: [{
                xtype: 'form',
                scroll: 'vertical',
                items: [{
                    xtype: 'fieldset',
                    title: 'Device Orientation Data',
                    items: [{
                        xtype: 'sliderfield',
                        label: 'Alpha',
                        id: 'Alpha',
                        disabled: true,
                        minValue: -180,
                        maxValue: 180
                    }, {
                        xtype: 'sliderfield',
                        label: 'Beta',
                        id: 'Beta',
                        disabled: true,
                        minValue: -90,
                        maxValue: 90
                    }, {
                        xtype: 'sliderfield',
                        label: 'Gamma',
                        id: 'Gamma',
                        disabled: true,
                        minValue: -180,
                        maxValue: 180
                    }]
                }]
            }]
        });

        this.ui.doComponentLayout();

        if (!('ondeviceorientation' in window)) {
            setTimeout(function() {
                Ext.Msg.alert('Not available', 'You need iOS 4.2 device with acceleration API.');
            }, 200);
        } else {
            var orientation;

            window.ondeviceorientation = function(e) {
                orientation = {
                    alpha: e.alpha,
                    beta: e.beta,
                    gamma: e.gamma
                };
            };

            window.setInterval(function() {
                Ext.getCmp('Alpha').setValue(Math.round(orientation.alpha), 200);
                Ext.getCmp('Beta').setValue(Math.round(orientation.beta), 200);
                Ext.getCmp('Gamma').setValue(Math.round(orientation.gamma), 200);<commit_msg>js/deviceorientation: Better wording at the error message<commit_after>Ext.setup({

    onReady : function() {
        this.ui = new Ext.Panel({
            scroll: 'vertical',
            fullscreen: true,
            layout: 'fit',
            items: [{
                xtype: 'form',
                scroll: 'vertical',
                items: [{
                    xtype: 'fieldset',
                    title: 'Device Orientation Data',
                    items: [{
                        xtype: 'sliderfield',
                        label: 'Alpha',
                        id: 'Alpha',
                        disabled: true,
                        minValue: -180,
                        maxValue: 180
                    }, {
                        xtype: 'sliderfield',
                        label: 'Beta',
                        id: 'Beta',
                        disabled: true,
                        minValue: -90,
                        maxValue: 90
                    }, {
                        xtype: 'sliderfield',
                        label: 'Gamma',
                        id: 'Gamma',
                        disabled: true,
                        minValue: -180,
                        maxValue: 180
                    }]
                }]
            }]
        });

        this.ui.doComponentLayout();

        if (!('ondeviceorientation' in window)) {
            setTimeout(function() {
                Ext.Msg.alert('Not available', 'Your browser do not support device orientation.');
            }, 200);
        } else {
            var orientation;

            window.ondeviceorientation = function(e) {
                orientation = {
                    alpha: e.alpha,
                    beta: e.beta,
                    gamma: e.gamma
                };
            };

            window.setInterval(function() {
                Ext.getCmp('Alpha').setValue(Math.round(orientation.alpha), 200);
                Ext.getCmp('Beta').setValue(Math.round(orientation.beta), 200);
                Ext.getCmp('Gamma').setValue(Math.round(orientation.gamma), 200);
{'fraction_non_alphanumeric': 0.10580367805111059, 'fraction_numerical': 0.013852400286601386, 'mean_word_length': 0.8915989159891599, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4901731', 'n_tokens_mistral': 1046, 'n_tokens_neox': 905, 'n_words': 198}