小编Stw*_*eet的帖子

谷歌浏览器中的RTSP h.264

在我们转移到html5和许多浏览器之后,例如谷歌Chrome禁止VLC网络插件....

有没有办法在浏览器中播放h.264/h.265 Rtsp流?

google-chrome video-streaming h.264 html5-video

14
推荐指数
2
解决办法
5万
查看次数

Angular JS生成PDF - 任何创建者 - 制造商模块?

正如标题所说,Angular有任何PDF创建者/生成器吗?

我见过https://github.com/MrRio/jsPDF,但找不到任何Angular.我想制作一个HTML页面到pdf文件下载.

javascript pdf angularjs meanjs

8
推荐指数
2
解决办法
4万
查看次数

无法读取未定义Javascript的属性"推送"

嗨,它接缝像我不能推我的阵列?码:

  $scope.arrResult = [];
  dpd.timesheets.get( function (result) {
    console.log(result);

    for (i = 0, n = result.length; i < n; i++) {
      var item = result[i];
      $scope.arrResult[item.week].push(item);
    }
    console.log($scope.arrResult);

  });
Run Code Online (Sandbox Code Playgroud)

我收到此控制台错误

Uncaught TypeError: Cannot read property 'push' of undefined
Run Code Online (Sandbox Code Playgroud)

如果我设置$scope.arrResult[item.week].push(item); to $scope.arrResult[item.week] = item; 它没有错误但我需要/想要推,但是错了吗?

javascript arrays angularjs

5
推荐指数
1
解决办法
4万
查看次数

msSql hex到base64

我有一个sql数据库,jpeg图像存储为十六进制(0xFFD8 ...)有没有办法进行查询,其中结果将在base64而不是Hex?

试图google tho我找不到类似的东西:/

sql sql-server sql-server-2008 mssql-jdbc

5
推荐指数
2
解决办法
1285
查看次数

网络蓝牙 - 自动连接到配对设备

有没有办法通过网络蓝牙自动连接到配对设备?

这样我就可以摆脱谷歌烦人的弹出设备选择器了。

javascript bluetooth-lowenergy web-bluetooth bluetooth-gatt

4
推荐指数
1
解决办法
2237
查看次数

uiSelect 未知提供者

嗨,我正在尝试实施 uiSelect https://github.com/angular-ui/ui-select

但是当我添加模块 JS

angular.module('projects').controller('ProjectsCreateController', ['$scope', 'Projects', 'Notify', 'CustomersToId', 'Users', '$http', '$q', 'uiSelect',
function($scope, Projects, Notify,Customers, Users, $http, $q, uiSelect) {
Run Code Online (Sandbox Code Playgroud)

HTML

                        <ui-select-match placeholder="Select person...">
                        {{customers.name}} &lt;{{customers._id}}&gt;
                    </ui-select-match>
Run Code Online (Sandbox Code Playgroud)

我在 Chrome 控制台中收到此错误

    Error: [$injector:unpr] Unknown provider: uiSelectProvider <- uiSelect
http://errors.angularjs.org/1.2.27/$injector/unpr?p0=uiSelectProvider%20%3C-%20uiSelect
    at ...lib/angular/angular.js:78:12
    at .../lib/angular/angular.js:3801:19
    at Object.getService [as get] (.../lib/angular/angular.js:3929:39)
    at .../lib/angular/angular.js:3806:45
    at getService (.../lib/angular/angular.js:3929:39)
    at invoke (.../lib/angular/angular.js:3956:13)
    at Object.instantiate (.../lib/angular/angular.js:3976:23)
    at .../lib/angular/angular.js:7307:28
    at .../lib/angular/angular.js:6696:34
    at forEach (.../lib/angular/angular.js:332:20) <div class="modal-content" modal-transclude="">
Run Code Online (Sandbox Code Playgroud)

javascript web angularjs mean-stack meanjs

1
推荐指数
1
解决办法
5459
查看次数

节点 JS 加密“错误的输入字符串”

想从文件中解密一个字符串。

但是当我在 fs 的字符串上使用 nodejs 解密时,它给出了错误“输入字符串错误”

var fs = require('fs');
var crypto = require('crypto');

function decrypt(text){
  var decipher = crypto.createDecipher('aes-256-ctr', 'password')
  var dec = decipher.update(text,'hex','utf8')
  dec += decipher.final('utf8');
  return dec;
}

fs.readFile('./file.json', 'utf8', function (err,data) {
  if (err) return console.log(err);
  console.log(decrypt(data));
});
Run Code Online (Sandbox Code Playgroud)

试着做一个像这样的字符串它可以工作

var stringInFile= "encryptedString";
console.log(decrypt(stringInFile));
Run Code Online (Sandbox Code Playgroud)

来自 fs 的 console.log(data) 也给出了 'encryptedString'

javascript node.js node-crypto

1
推荐指数
1
解决办法
3742
查看次数