使用它转换flv为mp4转换FFMPEG时显示以下错误
[aac @ 0x2b4b640] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.
Run Code Online (Sandbox Code Playgroud) 我正在使用socket.io和node.js加上mysql的私人聊天应用程序,当我使用socket.on('example', function(data){...});它时抛出这样的错误代码.
node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at PoolConnection.EventEmitter.addListener (events.js:175:15)
at io.on.eventConnection (/Applications/MAMP/htdocs/mysite/node/server.js:72:15)
at Ping.onOperationComplete [as _callback] (/Applications/MAMP/htdocs/mysite/node/node_modules/mysql/lib/Pool.js:99:5)
at Ping.Sequence.end (/Applications/MAMP/htdocs/mysite/node/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
at Ping.Sequence.OkPacket (/Applications/MAMP/htdocs/mysite/node/node_modules/mysql/lib/protocol/sequences/Sequence.js:105:8)
at Protocol._parsePacket (/Applications/MAMP/htdocs/mysite/node/node_modules/mysql/lib/protocol/Protocol.js:280:23)
at Parser.write (/Applications/MAMP/htdocs/mysite/node/node_modules/mysql/lib/protocol/Parser.js:73:12)
at Protocol.write (/Applications/MAMP/htdocs/mysite/node/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket.Connection.connect (/Applications/MAMP/htdocs/mysite/node/node_modules/mysql/lib/Connection.js:96:28)
at Socket.EventEmitter.emit (events.js:96:17)
Run Code Online (Sandbox Code Playgroud)
我在服务器端的代码: -
function fetchMessages(data){
var sql = "SELECT `msg_descr`,`msg_to` FROM `message` WHERE (msg_to="+data[0].iChatUserId+" AND msg_from="+data[1]+") OR (msg_to="+data[1]+" AND msg_from="+data[0].iChatUserId+") ORDER BY msg_created_date DESC LIMIT …Run Code Online (Sandbox Code Playgroud) 我的 MySQL 数据库存储在 AWS RDS 中。我需要将此数据库连接到由另一个提供商托管的我的网站。但我在AWS中没有公共IP。所以他们告诉我通过VPN连接。我怎样才能做到这一点?
我有一个名为的公共组件PreloaderComponent,我已将其包含在另一个组件中.我需要知道如何将一个变量从父组件传递给它PreloaderComponent,以便*ngIf在模板中使用一个语句.
这是我的代码:
<div id="preloader" *ngIf="loader">
<div id="status">
<div class="spinner"></div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud) 我得到无法读取角度 6 中未定义的属性,但它的值显示在模板中。这是我的代码
this.data.post_data('dashboard/gettodaydata','',true)
.subscribe((data:any) => {
this.today_datas =data.data;
});
Run Code Online (Sandbox Code Playgroud)
这是我的模板文件
<span class="counter text-danger">{{ today_datas.total_cpc | number }}</span>
Run Code Online (Sandbox Code Playgroud) 我已经使用httpintercept处理我的角度6项目中的数据服务中的401(未授权)错误.但httpintercept服务不接受我的项目.
这是我的intercept.services.ts文件
export class InterceptService implements HttpInterceptor {
constructor(private authService: AuthService) { }
// intercept request and add token
intercept(request: HttpRequest<any>, next: HttpHandler):Observable<HttpEvent<any>> {
// modify request
request = request.clone({
setHeaders: {
Authorization: `Bearer ${JSON.parse(localStorage.getItem('currentUser')).token}`
}
});
console.log("----request----");
console.log(request);
console.log("--- end of request---");
return next.handle(request)
.pipe(
tap(event => {
if (event instanceof HttpResponse) {
console.log(" all looks good");
// http response status code
console.log(event.status);
}
}, error => {
// http response status code
console.log("----response----");
console.error("status code:");
console.error(error.status);
console.error(error.message);
console.log("--- …Run Code Online (Sandbox Code Playgroud) 我已经用于mat-datepicker我的 Angular 6 项目。但是在日期选择器中显示当前时区日期。而不是这个,我需要显示当前的 UTC 日期。
这是我的代码
.ts 文件
var nowDate = new Date();
this.startdate = nowDate;
this.enddate = nowDate;
Run Code Online (Sandbox Code Playgroud)
.html 文件
<mat-form-field style="margin-right: 25px;">
<input matInput [matDatepicker]="picker_start" placeholder="Start Date" [(ngModel)]="startdate" [ngModelOptions]="{timezone: 'UTC'}">
<mat-datepicker-toggle matSuffix [for]="picker_start"></mat-datepicker-toggle>
<mat-datepicker #picker_start></mat-datepicker>
</mat-form-field>
Run Code Online (Sandbox Code Playgroud) angular ×4
angular6 ×4
amazon-rds ×1
express ×1
ffmpeg ×1
javascript ×1
mysql ×1
node.js ×1
socket.io ×1