我正在用Bootstrap 4编写一个Vue.js应用程序,虽然我按照文档说明但无法加载.
添加到main.js
Vue.use(BootstrapVue);
添加到与App.vue相关的css文件中:
@import '../../node_modules/bootstrap/dist/css/bootstrap.css';
@import '../../node_modules/bootstrap-vue/dist/bootstrap-vue.css';
Run Code Online (Sandbox Code Playgroud)
这是模板:
<div class="main">
<div>
<b-modal id="modal1" title="Something went wrong" v-if="!serverStatusOk">
<p class="my-4">{{msg}}</p>
<p class="my-4">{{statusCode}}</p>
</b-modal>
</div>
<div>
<b-tab title="Players" active>
<br>Players data
</b-tab>
<b-tab title="Tournaments" active>
<br>Tournament data
</b-tab>
</div>
Run Code Online (Sandbox Code Playgroud)
结果:没有css呈现但是在dist目录的css文件中我看到Bootstrap我错过了什么?该项目由vue-cli 3.0-beta创建
我正在进行带注入的Angular 2演示并得到一个错误,我的CustomDirective不能用作入口元素.
所以,我的NgModule
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import AppComponent from './app.component';
import {NgModule} from "@angular/core";
@NgModule({
declarations: [AppComponent],
bootstrap:[AppComponent]
})
export class AppModule{}
const platform = platformBrowserDynamic();
platform.bootstrapModule(AppModule);
Run Code Online (Sandbox Code Playgroud)
AppComponent:
import {Component} from '@angular/core';
import {TIMER_DIRECTIVES} from './timer/timer';
import {TASK_DIRECTIVES} from './tasks/tasks';
import {SHARED_PROVIDERS} from './shared/shared';
@Component({
selector: 'tomato-app',
entryComponents: [TIMER_DIRECTIVES,TASK_DIRECTIVES],
providers: [SHARED_PROVIDERS],
template: `
<nav class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<strong class="navbar-brand">Tomato App</strong>
</div>
</div>
</nav>
<tomato-timer-widget></tomato-timer-widget>
<tomato-tasks></tomato-tasks>`
})
export default class AppComponent{}
Run Code Online (Sandbox Code Playgroud)
而自定义指令本身:
import {Task} from '../shared/shared' …Run Code Online (Sandbox Code Playgroud) 我有以下情况:
模块地址:
module org.abondar.experimental.address {
exports org.abondar.experimental.address;
}
Run Code Online (Sandbox Code Playgroud)
模块人:
module org.abondar.experimental.person {
requires org.abondar.experimental.address;
exports org.abondar.experimental.person;
}
Run Code Online (Sandbox Code Playgroud)
我正在使用Maven构建它们,所以每个模块都有自己的目标目录和jar文件.
我正在尝试运行具有这样的主类的模块Person
java --module-path Address/target/Address-1.0.jar;Person/target/Person-1.0.jar -m org.abondar.experimental.person/org.abondar.experimental.person.Main
Run Code Online (Sandbox Code Playgroud)
但我得到了许可否认.如何设置包含多个模块的模块路径?
我感觉自己被 WebRTC 困住了。我只是尝试虚拟的点对点连接,但远程连接没有收到任何内容。问题是 ontrack 函数没有被触发,我不知道为什么?我怎样才能让它发挥作用?
它不适用于 Chromium 和 Firefox
var localVideo = document.querySelector('#local'),
remoteVideo = document.querySelector('#remote'),
localConnection,remoteConnection;
if (hasUserMedia()){
navigator.getUserMedia({video: true, audio:false},function(stream){
localVideo.srcObject = stream;
if (hasRTCPeerConnection()){
startPeerConnection(stream);
} else {
alert("WebRTC not supported!");
}
},function(error){
alert("Camera capture failed!")
});
} else {
alert("WebRTC not supported!");
}
function startPeerConnection(stream){
var configuration ={
offerToReceiveAudio: true,
offerToReceiveVideo: true
}
localConnection = new RTCPeerConnection(configuration);
remoteConnection = new RTCPeerConnection(configuration);
stream.getTracks().forEach(
function(track) {
localConnection.addTrack(
track,
stream
);
}
);
remoteConnection.ontrack = function(e){
remoteVideo.srcObject = e.streams[0]; …Run Code Online (Sandbox Code Playgroud) 我有一个有趣的担忧.我习惯了多模块Maven项目.现在我正在调查如何做同样的事情,但也使用Jigsaw.是的,每个Maven模块只能有一个Jigsaw模块吗?在IDE中,我无法在同一个Maven模块中创建第二个.
那么,到目前为止,是否有任何约定或解决方法如何组合模块的两面?
我正在尝试使用 Kotlin 上的 Exposed 编写 CRUD 服务。我有一张包含多对一参考的表格。当我尝试插入时,我得到了
java.lang.IllegalStateException:上下文中没有事务。
这是表和实体
object Contacts : IntIdTable("ph_contact"){
var firstName = varchar("first_name",255)
var lastName = varchar("last_name",255)
var phone = varchar("phone",4096)
var email = varchar("email",4096)
var user = reference("user",Users)
}
class ContactEntity (id: EntityID<Int>): IntEntity(id){
companion object : IntEntityClass<ContactEntity>(Contacts)
var firstName by Contacts.firstName
var lastName by Contacts.lastName
var phone by Contacts.phone
var email by Contacts.email
var user by UserEntity referencedOn Contacts.user
fun toContact() = Contact(id.value,user.id.value,firstName,lastName,phone,email)
}
data class Contact(
val id: Int,
val userId: Int,
val …Run Code Online (Sandbox Code Playgroud) javascript ×3
java ×2
java-9 ×2
java-platform-module-system ×2
maven ×2
angular ×1
angularjs ×1
bootstrap-4 ×1
css ×1
kotlin ×1
typescript ×1
vue.js ×1
webrtc ×1