我知道我不是第一个问这个的人,但我在前面的问题中找不到答案.我有一个组件
<div class="col-sm-5">
<laps
[lapsData]="rawLapsData"
[selectedTps]="selectedTps"
(lapsHandler)="lapsHandler($event)">
</laps>
</div>
<map
[lapsData]="rawLapsData"
class="col-sm-7">
</map>
Run Code Online (Sandbox Code Playgroud)
在控制器中rawLapsdata不时变异.
在laps,数据以表格格式输出为HTML.每当rawLapsdata发生变化时,这都
我的map组件需要ngOnChanges用作在Google地图上重绘标记的触发器.问题是当rawLapsData父项中的更改时,ngOnChanges不会触发.我能做什么?
import {Component, Input, OnInit, OnChanges, SimpleChange} from 'angular2/core';
@Component({
selector: 'map',
templateUrl: './components/edMap/edMap.html',
styleUrls: ['./components/edMap/edMap.css']
})
export class MapCmp implements OnInit, OnChanges {
@Input() lapsData: any;
map: google.maps.Map;
ngOnInit() {
...
}
ngOnChanges(changes: { [propName: string]: SimpleChange }) {
console.log('ngOnChanges = ', changes['lapsData']);
if (this.map) this.drawMarkers();
}
Run Code Online (Sandbox Code Playgroud)
更新: ngOnChanges不起作用,但看起来好像正在更新lapsData.在ngInit中,还有一个用于缩放更改的事件侦听器,它也会调用this.drawmarkers.当我改变变焦时,我确实看到了标记的变化.所以唯一的问题是我在输入数据发生变化时没有收到通知.
在父母,我有这条线.(回想一下,变化反映在圈数中,但不反映在地图中). …
我将div的宽度设置为窗口的100%.当我对此div应用边框时,右边框被切断.我是否必须对此进行盒子模型破解?
#textBoxContainer {
width:100%;
height:30%;
position:fixed;
z-index:99;
bottom:0px;
left:0px;
background-color:#999;
border: 4px solid #000;
}Run Code Online (Sandbox Code Playgroud)
<div id="textBoxContainer"></div>Run Code Online (Sandbox Code Playgroud)
目前我正在编写一个将要监听目录的代码.当使用.apk文件更新目录时,我会将带有此.apk文件的邮件发送到gmail帐户.我在我的程序中使用Jnotify和JAVA Mail.
我得到的错误是,
javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; boundary="----=_Part_0_145238.1392728439484"
Run Code Online (Sandbox Code Playgroud)
我在stackoverflow中寻找了解决方案以寻求帮助,但没有一个在哪里有用.
提前致谢
public void fileCreated(int wd, String rootPath, String name) {
print("created " + rootPath + " : " + name);
if (name.contains(".apk"))
SendEmail(name);
else
System.out.println("Not the APK file");
}
void SendEmail(String strname){
String Path = "D:/POC/Email/apk folder/"+strname;
System.out.println("Path->" + Path);
Properties props = new Properties();
props.put("mail.smtp.host","173.194.78.108");
props.put("mail.smtp.socketFactory.port", "465");
props.put("mail.smtp.socketFactory.class","javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.auth","true");
props.put("mail.smtp.port","465");
System.out.println("Properties has been set properly");
Session session = …Run Code Online (Sandbox Code Playgroud) Hiii每个人.
下面是我的HTML.
<!DOCTYPE html>
<html>
<head>
<script src="src/recorder.js"></script>
<script src="src/Fr.voice.js"></script>
<script src="js/jquery.js"></script>
<script src="js/app.js"></script>
</head>
<body>
<div class="center_div">
<span class="recording_label">Please wait...</span>
<span class="loader_bg"></span>
<span class="loader_bg1"></span>
<br/>
<audio controls id="audio"></audio>
</div>
<style>
.center_div {
width: 500px;
height: 150px;
background-color: #f5f5f5;
border: 1px solid #808080;
position:absolute;
top:50%;
left:50%;
margin-left:-250px;/* half width*/
margin-top:-75px;/* half height*/
padding:25px;
}
.recording_label {
display: block;
text-align: center;
padding: 10px;
font-family: sans-serif;
font-size: 1.1em;
margin-bottom: 25px;
}
.loader_bg {
min-width: 100%;
background: #c5c5c5;
min-height: 20px;
display: block;
} …Run Code Online (Sandbox Code Playgroud) SPRING_SECURITY_LAST_EXCEPTION.message当用户尝试使用不正确的凭据登录时,我能够显示("Bad Credentials").
我的登录jsp目前使用以下代码:
<c:if test="${not empty SPRING_SECURITY_LAST_EXCEPTION.message}">
<c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}" />
</c:if>
Run Code Online (Sandbox Code Playgroud)
我的问题是,当用户离开登录页面然后返回时,"Bad Credentials"消息仍然存在.
SPRING_SECURITY_LAST_EXCEPTION.message当用户刷新登录页面时,如何重置?
任何人都可以提供更改进程优先级的代码的Delphi示例吗?
我需要从Windows XP任务管理器获取名称进程,并使用delphi代码更改其优先级.
我正在从AngularJS前端向Laravel Back-end做一个CORS POST请求.
Accept:*/*
Accept-Encoding:gzip, deflate, sdch
Accept-Language:nl-NL,nl;q=0.8,en-US;q=0.6,en;q=0.4
Access-Control-Request-Headers:content-type
Access-Control-Request-Method:POST
Cache-Control:no-cache
Connection:keep-alive
Host:x.local
Origin:http://y.local
Pragma:no-cache
Referer:http://y.local/
Run Code Online (Sandbox Code Playgroud)
Access-Control-Allow-Headers:Origin, X-Requested-With, Content-Type, Accept
Access-Control-Allow-Methods:POST, GET, OPTIONS, PUT
Access-Control-Allow-Origin:*
Cache-Control:no-cache
Connection:keep-alive
Content-Length:16
Content-Type:application/json
Date:Mon, 31 Oct 2016 09:22:51 GMT
Server:nginx/1.11.1
Run Code Online (Sandbox Code Playgroud)
在我获得http状态200 OK(OPTIONS请求)后,Safari挂起.我该怎么办?
我试图ContextEventListener在所有ContextXXXEvent上为每个事件类型创建一个监听器,如下所示(这ContextRefreshedEvent是一个示例):
@Component
public class MyApplicationRefreshedListener implements ApplicationListener<ContextRefreshedEvent> {
@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
logger.info(getClass(), "Event source [{}]", event.getSource());
}
}
Run Code Online (Sandbox Code Playgroud)
无论ContextRefreshedEvent与ContextClosedEvent被抓和他们的听众做了预期的工作.
我试图做同样的事情ContextStartedEvent,ContextClosedEvent但这两个事件听众都没有被捕获.
的event.getSource(在刷新和关闭事件)印刷:
Event source [Root WebApplicationContext: startup date [Tue May 09 10:07:51 IDT 2017]; root of context hierarchy]
Run Code Online (Sandbox Code Playgroud)
(开始和停止)和(刷新和关闭)之间有什么区别吗?
是因为我的应用程序上下文是WebApplicationContext(作为event.getSource()节目吗?)
在 Safari 浏览器上,我需要从下拉列表中选择一个选项。下面的代码适用于除 Mac OS 上的 Safari 之外的所有浏览器。我使用 Safari 10.1.1 和 selenium web 驱动程序版本 3.3.1 我已经用 Java 编写了代码。请参考下面的代码 -
webElement = findElement(field);
if (webElement.isDisplayed())
{
Select select = new Select(webElement);
select.selectByVisibleText(value);
}
Run Code Online (Sandbox Code Playgroud) 嘿,我正在使用Firebase身份验证并启用了Google登录功能.谷歌登录运行良好,我获得了所有信息.但是,当我想将用户保存在Firebase用户列表中时,该getIdToken()值为null:
private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {
//here the acct.getIdToken() is null
AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);
firebaseAuth.signInWithCredential(credential)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (!task.isSuccessful()) {
Toast.makeText(SignIn.this, "Authentication failed.", Toast.LENGTH_SHORT).show();
}
// [START_EXCLUDE]
progressDialog.hide();
// [END_EXCLUDE]
}
});
}
Run Code Online (Sandbox Code Playgroud) java ×3
angular ×2
php ×2
spring ×2
android ×1
audio ×1
border ×1
cors ×1
css ×1
delphi ×1
email ×1
file ×1
file-upload ×1
firebase ×1
google-login ×1
html ×1
ioexception ×1
jakarta-mail ×1
javascript ×1
jnotify ×1
jquery ×1
jsp ×1
laravel-5.3 ×1
login ×1