Tag: 元数据

Icecast元数据提取在输出audio数据中产生工件

我试图(在NodeJS中 ): 连接到Icecast互联网audiostream。 例如: http : //icecast3.977music.com/comedy parsing响应头并提取icy-metaint值。 将原始audio数据写入文件,同时从audiostream中提取元数据字节,以便: 元数据到达时拦截并parsing。 不要在输出文件中包含元数据字节,以免由于注入的元数据而导致audio失真。 在SmackFu的“非官方”Shoutcast元数据协议页面之后,我已经能够得到这个了: https://gist.github.com/e7474421dcb25e011620 基本上,我能够提取元数据时,预期(只有1个元数据事件在stream转储包括在头脑的最初)。 这部分似乎工作正常。 问题是输出的MP3文件在整个文件中都有明显的audio失真,据推测当元数据字节到达时。 但是,我肯定会提取这些元数据字节,不包括他们在输出文件,所以这是怪异的一部分。 上面的链接中的协议文档没有说输出文件需要做什么,但显然我仍然做错了什么。 有人知道还有什么需要做的audiostream? 提前致谢!

将数据传递给geddy nodejs中的application.html.ejs

即时通讯张贴表格在geddy。 我需要根据发布的数据更新我的元数据的forms,为此我必须通过职位 <%= partial('layout_header', {post: post}); %> <div class="mainContain"> <div class="container"> <div class="wrapper"> <% console.log(post.title); %> <%- displayFlash(flash); %> <%- render(); %> </div> </div> </div> 对于上面的实现,我需要我的'post'数据在application.html.ejs上。 谢谢

为什么queryAsync()会导致添加元数据?

我使用queryAsync()按问题的答案规定,它的工作原理,但它增加了很多额外的元数据到我的查询结果,否则是一个简单的查询。 以下是我用来处理/执行查询并logging结果的内容: var retrieveSettings = Promise.method(function (username, connection) { console.log('User ' + username + ' retrieving settings…'); var q = 'select * from sales_settings'; return connection.queryAsync(q).then(function (rows, fields) { list = []; for (x = 0; x < rows.length; x++) { list.push(rows[x]); } //console.log('Settings: ' + JSON.stringify(list, null, 4)); return list; }); }); 这里是logging的结果: Settings: […]

在nodejs中打开图的刮擦algorithm

我试图从URL使用nodejs(与cheerio),使用下面的代码打开图元数据。 我有这个东西来填充: var result={}; for (var ogCounter = 0; ogCounter < metalist.length; ogCounter++) { if (!utils.isEmpty(metalist[ogCounter].attribs.property) && !utils.isEmpty(metalist[ogCounter].attribs.content)) { if (metalist[ogCounter].attribs.property.indexOf('og') == 0) { var ogname = metalist[ogCounter].attribs.property.split(':'); var property = ogname[1]; var content = metalist[ogCounter].attribs.content; if (utils.isEmpty(result[property])) { result[property] = content; } else { if (result[property].push) { result[property].push(content); } else { result[property] = [result[property], […]

使用节点js获取外部网站内容

在我的网站中,我使用节点js作为后端,html作为前端。 我需要获得外部网站元数据(关键字)。 有任何包获取节点js中的元数据? 例如,我有像这样的100个网站的url。 var arrayName = ["http://www.realsimple.com/food-recipes/9-healthy-predinner-snacks", "http://www.womenshealthmag.com/weight-loss/100-calorie-snacks", "https://www.pinterest.com/explore/healthy-snacks/", "http://www.rd.com/slideshows/healthy-snacks-for-adults/", "http://greatist.com/snacking", "http://www.bodybuilding.com/fun/26-best-healthy-snacks.html"] 我需要特别在元数据的关键字中获取所有的网站元数据。 在节点js有这个包? 我在谷歌find了一些代码。 var options = { host: 'www.google.com', port: 80, path: '/index.html' }; http.get(options, function(res) { console.log("Got response: " + res.statusCode); }).on('error', function(e) { console.log("Got error: " + e.message); }); 有其他的select吗? 预期成果: Array1 = ["keyword1","keyword2","keyword3"]; Array2 = ["keyword1","keyword2","keyword3"]; Array3 = ["keyword1","keyword2","keyword3"]; […]

添加元数据来expression路线

有什么方法可以将元数据添加到路线中? 例如: app.get("/some/route", function(req,res) { // … }, {some: 'meta-data}); 我正在看我的节点应用程序的一种AOP方法,所以我想用身份validation和/或日志logging来代理某些路由。 要做到这一点,我需要能够为每个路由分配一些钩子标识符,以表明它应该被代理,所以AOP一无所知的个别方法和方法对AOP框架一无所知… 然后,不要太多的话题,我会使用像钩子或其他代理库来检查所有路线,其中有some并添加一个thing拦截器。 那么无论如何,有什么最佳做法的方式来做这种事情?

如何添加元数据到nodejs grpc调用

我想知道如何添加元数据到nodejs grpc函数调用。 使用客户端时,我可以使用通道凭证 var client = new proto.Document('some.address:8000', grpc.credentials.createInsecure() ) 当使用client.Send(doc, callback)时候会发送哪些client.Send(doc, callback) ,但是go grpc服务器在调用元数据中查找我必须设置的标识信息。 我尝试使用grpc.credentials.combineChannelCredentials与不安全的连接和一个grpc.Metadata实例,但我找不到正确的方法来做到这一点。 我碰到的错误是TypeError: compose's first argument must be a CallCredentials object 。 我试图遵循它,但它进入C代码,这使我失去了,我不能看到什么JavaScripttypes我必须给comebineChannelCredentials实现我所期待的和文档是如何实现这一点稀疏。