小编wik*_*0rl的帖子

Laravel 应用程序中的 Bootstrap 模式窗口未显示

我正在编写一个 Laravel 应用程序并尝试实现一个显示元素细节的模式。当我单击链接时,会显示背景但不显示模态窗口。在 chrome 的网络监视器中,它在预览中显示模态窗口。

怎么了?

预先感谢您的帮助!

这是我的代码

index.blade.php

<td>
<a href="{{ route('projects.show', $project->id) }}" class="btn btn-info" data-remote="true">Details</a>
</td>
Run Code Online (Sandbox Code Playgroud)

modal.blade.php

<div class="modal-dialog" role="document">
    <div class="modal-content">
        <div class="modal-header">
            <h5 class="modal-title">@yield('title')</h5>
        </div>
        <div class="modal-body">
          @yield('content')
        </div>
        <div class="modal-footer">
          @yield('footer')
        </div>
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

show.blade.php

@extends('layouts.modal')
@section('title')
Demo Modal
@endsection
@section('content')
<p>test</p>
@endsection
@section('footer')
    <button type="button" data-dismiss="modal">Close</button>
@endsection
Run Code Online (Sandbox Code Playgroud)

远程.js

$(document).on('ajax:success', function(e, xhr){
    if(!$('#modal').length){
        $('body').append($('<div class="modal" id="modal"></div>'))
    }
   $('#modal').html(xhr.responseText).modal('show');
});
Run Code Online (Sandbox Code Playgroud)

项目控制器.php

$(document).on('ajax:success', function(e, xhr){
    if(!$('#modal').length){
        $('body').append($('<div class="modal" id="modal"></div>'))
    }
   $('#modal').html(xhr.responseText).modal('show');
});
Run Code Online (Sandbox Code Playgroud)

php jquery twitter-bootstrap laravel

7
推荐指数
1
解决办法
686
查看次数

AttributeError:“ FasterRcnn”对象没有属性“ inplace_batchnorm_update”

我正在尝试为张量"faster_rcnn_resnet101_kitti"流对象检测API 训练一个预训练模型。

但是每次我尝试跑步

 python3 train.py --logtostderr --train_dir='/training/' --pipeline_config_path='/training/faster_rcnn_resnet101_kitti.config' 
Run Code Online (Sandbox Code Playgroud)

我收到以下错误

Traceback (most recent call last):
   File "train.py", line 167, in <module>
      tf.app.run()
   File "/usr/local/lib/python3.5/dist- packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
   File "train.py", line 163, in main
worker_job_name, is_chief, FLAGS.train_dir)
   File "/usr/local/lib/python3.5/dist-packages/object_detection-0.1-py3.5.egg/object_detection/trainer.py", line 211, in train
detection_model = create_model_fn()
   File "/usr/local/lib/python3.5/dist-packages/object_detection-0.1-py3.5.egg/object_detection/builders/model_builder.py", line 96, in build
add_summaries)
   File "/usr/local/lib/python3.5/dist-packages/object_detection-0.1-py3.5.egg/object_detection/builders/model_builder.py", line 272, in _build_faster_rcnn_model
frcnn_config.inplace_batchnorm_update)
AttributeError: 'FasterRcnn' object has no attribute 'inplace_batchnorm_update'
Run Code Online (Sandbox Code Playgroud)

python tensorflow

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

标签 统计

jquery ×1

laravel ×1

php ×1

python ×1

tensorflow ×1

twitter-bootstrap ×1