小编Ber*_*eze的帖子

使用babel和laravel-mix将ES6转换为ES2015

我的Vue组件中有ES6 JavaScript代码。为了支持IE 11,我需要使用babel和laravel-mix将其转换为ES5代码。我怎么做?

这是我的webpack.mix.js文件。

let mix = require('laravel-mix');

mix.js('resources/assets/js/app.js', 'public/js')
.js('resources/assets/js/admin-app.js', 'public/js')
Run Code Online (Sandbox Code Playgroud)

laravel babeljs laravel-mix

5
推荐指数
2
解决办法
6074
查看次数

从相机识别文本时显示Toast消息

我正在尝试从实时摄像头源检测具有特定格式的文本,并在自动检测到该文本时显示Toast消息.我能够检测到文本并在其周围放置一个方框.但是我很难显示吐司的消息.

这是处理器的receiveDetections方法

@Override
public void receiveDetections(Detector.Detections<TextBlock> detections) {
    mGraphicOverlay.clear();
    SparseArray<TextBlock> items = detections.getDetectedItems();
    for (int i = 0; i < items.size(); ++i) {
        TextBlock item = items.valueAt(i);
        if (item != null && item.getValue() != null) {
            Log.d("OcrDetectorProcessor", "Text detected! " + item.getValue());

            // Check if it is the correct format
            if (item.getValue().matches("^\\d{3} \\d{3} \\d{4} \\d{4}")){
                OcrGraphic graphic = new OcrGraphic(mGraphicOverlay, item);
                mGraphicOverlay.add(graphic);

                // Show the toast message

            }
        }


    }
}
Run Code Online (Sandbox Code Playgroud)

- >显示祝酒词不是我的最终目标,如果我能够解决这个问题,我将解决主要问题. - >我正在建立在文本视觉api的代码实验室教程之上

android-vision

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

标签 统计

android-vision ×1

babeljs ×1

laravel ×1

laravel-mix ×1