好吧,我试图按照第一杯教程,但我遇到了Glassfish错误.
我应该这样:
1.2.4获取教程的最新更新
使用Java EE 7 SDK附带的更新中心检查本教程的任何更新.
1.2.4.1通过更新中心更新教程打开更新中心并检查教程的任何更新.
在NetBeans IDE中,选择"服务"选项卡,然后展开"服务器"节点.右键单击GlassFish Server实例,然后选择"查看更新中心"以显示"更新工具".在树中,选择"可用更新"以显示更新的包列表.查找First EE for Java EE 7(javaee-firstcup-tutorial)包的更新.如果有First Cup的更新版本,请选择First Cup 7.0 for Java EE 7(javaee-firstcup-tutorial)并单击Install.
问题是,当我尝试打开更新中心时,这就是我得到的:
The software needed for this command (updatetool) is not installed.
If you choose to install Update Tool, your system will be automatically
configured to periodically check for software updates. If you would like
to configure the tool to not check for updates, you can override the
default behavior via the tool's Preferences facility.
Exception in thread …Run Code Online (Sandbox Code Playgroud) 我实现了jplayer播放列表,因为当第一首歌曲完成时它会移动到下一首歌曲.
但问题是,我不希望歌曲名称显示在我的页面上.
如果我删除这段代码:
<div class="jp-playlist">
<ul>
<li></li>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
播放器不会自动播放,需要转到第二首歌然后才能正常播放.我希望它在页面加载时自动播放,提前感谢.
如何设置Bootstrap Glyphicons作为快捷方式图标?
对于我们使用的网站
<link rel="shortcut icon" href="images/logo-small.jpg">
Run Code Online (Sandbox Code Playgroud)
如何设置Bootstrap Glyphicons作为快捷方式图标 glyphicon glyphicon-cloud
我想从问题库构建一个动态表单,就像 angular2 中的动态表单食谱一样。所以我有一个 QuestionComponent:
<div [formGroup]="form">
<ul *ngIf="question.multi" [formArrayName]="question.key">
<li *ngFor="let control of form.get(question.key).controls; let lix=index">
<div>
<app-text-box [controlName]="lix"></app-text-box>
</div>
</li>
</ul>
<div *ngIf="!question.multi">
<app-text-box [controlName]="question.key"></app-text-box>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
基于question.multi有一个单一的FormControl或一个FormArray。表单输入位于 TextBoxComponent 中:
<input class="form-control"
[formControlName]="controlName"
[id]="controlName" type="text">
Run Code Online (Sandbox Code Playgroud)
但这不起作用:
./TextBoxComponent 类 TextBoxComponent 中出现错误 - 内联模板:0:28 原因如下: formControlName 必须与父 formGroup 一起使用
如何将 FormGroup 的信息获取到组件中?
我尝试了这种方式:QuestionComponent:
<div [formGroup]="form" class="col-md-10" >
<ul *ngIf="question.multi" [formArrayName]="question.key" class="list-group">
<li *ngFor="let control of form.get(question.key).controls; let lix=index">
<div>
<app-text-box [form]="form" [arrayName]="question.key" [controlName]="lix"></app-text-box>
</div>
</li>
</ul>
<div *ngIf="!question.multi">
<app-text-box …Run Code Online (Sandbox Code Playgroud) 我想查找并返回由不同列引用的对象id.
据我所知,没有其他类似的方法Task::findOrFail($id)可以引用另一个字段.例如:
Task::findOrFail('column_name' = 'column_data');
我正在使用
Task::where('tid' , '=', $tid)->first();
这可能吗?
我正在尝试使用withTrashed()进行急切加载.我在我的模型中创建了一个新的_withtrashed函数,但查询返回时我的客户端为NULL
客户端型号:
// Client
public function client()
{
return $this->belongsTo('App\Client');
}
// Client (withtrashed for soft deletes)
public function client_withtrashed()
{
return $this->belongsTo('App\Client')->withTrashed();
}
Run Code Online (Sandbox Code Playgroud)
订单管理员:
/**
* Show order.
*/
public function show($id)
{
$order = Order::with('client_withtrashed') ---> it works normally with: Order::with('client') , except I don't get the soft deleted rows
->where('id', '=', $id)
->firstOrFail();
Run Code Online (Sandbox Code Playgroud)
DD($顺序); 显示一个空客户端
#relations: array:1 [
"client_withtrashed" => null
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?我决定使用上面的解决方案因为我无法使用toTrashed()来处理我的急切查询 $order = Order::with('client_withtrashed')->withTrashed()
在我的项目中,我的标题上有两个名为登录和注册按钮的按钮.
我想要实现的是,在成功登录后,我想禁用登录按钮并隐藏注册按钮.
我有一个具有变化的布尔值的服务,我想订阅组件中的布尔值变化。如何才能实现这一目标?
这是我的服务...
private subBoolShowHideSource = new Subject<boolean>();
subBoolShowHide$ = this.subBoolShowHideSource.asObservable();
showHide(eventValue: boolean) {
this.subBoolShowHideSource.next(eventValue);
console.log("show hide service " + eventValue);
}
Run Code Online (Sandbox Code Playgroud)
这是我试图读取布尔值的组件......
boolShowGTMDetails: any;
subscription: Subscription;
constructor(private service: ShowHideService){
this.subscription = this.service.subBoolShowHide$.subscribe(
(data:boolean) => {
this.boolShowGTMDetails = data,
error => console.log(error),
console.log("winner winner chicken dinner");
}
);
}
Run Code Online (Sandbox Code Playgroud)
基本上,更改检测不起作用,我们将不胜感激任何帮助,提前致谢!
我迷失在可观察,承诺和状态的疯狂中.我需要帮助来解决这个问题.
我正在尝试使用Angularfire2模块在angular 2应用程序中实现注册/登录/注册功能.我从登录功能开始.我掌握了基础知识.我可以登录并重定向到新页面.到现在为止还挺好.在我的模板中,我正在检查用户是否已登录.这里开始麻烦了.我很难检查当前用户是否已登录.
Login.components.ts
import { Component, OnInit } from '@angular/core';
import {Validators, FormGroup, FormBuilder } from '@angular/forms';
import { AuthService } from '../auth.service';
import {Router} from '@angular/router';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.css']
})
export class LoginComponent implements OnInit {
form: FormGroup;
error = false;
errorMessage = '';
constructor(private fb:FormBuilder, private authService:AuthService, private router:Router) {}
ngOnInit() {
this.form = this.fb.group({
email: ['', Validators.required],
password: ['', Validators.required]
});
}
onLogin() {
this.authService.loginUser(this.form.value.email, this.form.value.password)
.subscribe(
() => this.router.navigate(['/'])
)
} …Run Code Online (Sandbox Code Playgroud) 我想从facebook喜欢的按钮中删除社交文本,以便适应我剩余的宽度,但我找不到如何在facebook开发者网站上
所以我想删除的是"成为你的第一个喜欢这个的朋友." 文本
如下所示:

我试图在我的socket.io js(index.js)文件中使用jQuery.
每当我尝试做的时候
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script src="index.js"></script>
<script>
var socket = io();
$('form').submit(function(){
socket.emit('chat message', $('#m').val());
$('#m').val('');
return false;
});
socket.on('chat message', function(msg){
$('#messages').append($('<li>').text(msg));
});
socket.on('new user', function(data){
$('#newUserMessage').text(data);
});
</script>
Run Code Online (Sandbox Code Playgroud)
我在控制台中收到此错误
GET http://localhost:3000/index.js
ReferenceError: $ is not defined
Run Code Online (Sandbox Code Playgroud)
我不确定为什么会这样?
但是如果我删除它,我不能在index.js中使用jQuery的函数?
我的index.js文件
var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
var $usernameInput = $('.usernameInput');
app.get('/', function(req, res){
res.sendFile(__dirname + '/index.html');
});
io.on('connection', function(socket){
socket.broadcast.emit('new user', 'New User Joined, Say Hi :D');
socket.on('chat message', function(msg){ …Run Code Online (Sandbox Code Playgroud) 我尝试umat_id使用此SQL查询:
SELECT umat_id FROM msumat WHERE nama = $nama
Run Code Online (Sandbox Code Playgroud)
我将此SQL查询转换为CI的Active Record:
$this->db->select('umat_id');
$terdaftar = $this->db->get_where('msumat', array('nama' => $nama));
Run Code Online (Sandbox Code Playgroud)
所以这个查询应该返回一个字符串(例如:"John").
但是当我试图回应它时出现错误: 类CI_DB_mysql_result的对象无法转换为字符串
我尝试过这样的事情:echo (string)$terdaftar;但是它不起作用.
我只想回应"约翰"
编辑 刚才说我想将"John"插入变量中.怎么做?
$john = ????
Run Code Online (Sandbox Code Playgroud) 我对 Laravel 的本地化系统很着迷,但我不知道我的代码有什么问题。
我刚刚写了一个语言选择器,在文档的头部你会看到一个获取浏览器默认语言的函数,它将获取默认语言。
语言模板默认保存在数组中 /resources/lang/*language*/messages.php-files.
我真的需要你的帮助,因为我看不到任何错误。
<html>
<head>
<?php
//get Browser default language
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
App::setlocale($lang);
?>
</head>
<body>
<div class="container">
@yield('content')
<div class="well text-center">
<h1><?php echo trans('Welcome') ?></h1>
</div>
@section('content.welcome')
<div class="row text-center">
<a href="<?php App::setlocale("de") ?>">Deutsch</a>
<label> | </label>
<a href="<?php App::setlocale("en") ?>">English</a>
<label> | </label>
<a href="<?php App::setlocale("it") ?>">Italiano</a>
<label> | </label>
<a href="<?php App::setlocale("es") ?>">Español</a>
<label> | </label>
<a href="<?php App::setlocale("fr") ?>">Français</a>
<label> | </label>
<a href="<?php App::setlocale("jp") ?>">???</a>
<label> | </label> …Run Code Online (Sandbox Code Playgroud) angular ×3
laravel ×3
html ×2
jquery ×2
laravel-5 ×2
activerecord ×1
angularfire2 ×1
angularjs ×1
codeigniter ×1
css ×1
eloquent ×1
facebook ×1
firebase ×1
forms ×1
glassfish ×1
ionic ×1
java ×1
java-ee ×1
javascript ×1
jplayer ×1
localization ×1
maven ×1
netbeans-7 ×1
node.js ×1
select ×1
social ×1
sockets ×1