小编lit*_*ito的帖子

如何使用CSS动画图标fa-circle作为录制视频闪烁红点?

我在CSS中有这个红色图标:

<div><i class="fa fa-circle text-danger"></i>&nbsp; LIVE </div>
Run Code Online (Sandbox Code Playgroud)

如何设置动画以使其间隔闪烁?

你还记得在网络摄像机和录像机中你可以看到一个红点在实际录制时闪烁吗?我想要同样的效果,我怎么能在CSS中做到这一点?难吗?

例如:http: //jsbin.com/loxayazega/edit?html,output

html css

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

如何在Query Parse.com之后将所有对象加载到数组中

我正在使用Parse.com作为我的后端,在Query之后如何用Parse对象中的所有数据填充数组?我怎样才能避免重新映射?例:

$scope.addContList = contacts.map(function(obj) { // re-map!!!!
   return {name: obj.get("name")}; // mapping object using obj.get()
});
Run Code Online (Sandbox Code Playgroud)

我正在逐个映射我的Parse对象的属性:name:obj.get("name")等等有更好的方法吗?

    $scope.addContList = [];
    var ActivityContact = Parse.Object.extend("ActivityContact2");
    var query = new Parse.Query(ActivityContact);
    query.equalTo("activityId", $scope.objId);
    query.find({
        success: function(contacts) {
            console.log("Successfully retrieved " + contacts.length + " contact.");
                $scope.$apply(function() {
                    /*$scope.addContList = contacts.map(function(obj) {
                        return {name: obj.get("name")}; // mapping object using obj.get()
                    });*/
                    for (var i = 0; i < contacts.length; i++) {
                          $scope.addContList.push(contacts.ALL_PROPERTIES); // contacts.ALL_PROPERTIES does not exist, I'm looking a way to do …
Run Code Online (Sandbox Code Playgroud)

javascript angularjs parse-platform

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

AngularJS和AngularUI:绑定时屏蔽或格式化电话号码

我正在使用AngularUI来格式化或"屏蔽"电话号码输入,并且它可以与ng-model一起使用:

<input ng-model="emer.phone" ui-mask="{{'(999) 999-9999'}}" type="text"/>
Run Code Online (Sandbox Code Playgroud)

问题:但是现在如何使用ng-bind以相同的方式应用相同的掩码,我有这样的事情:

<td>{{emer.phone}}</td>
Run Code Online (Sandbox Code Playgroud)

我的问题:ng-model和ng-bind位于不同位置的两个不同文件中,因此使用"$ viewValue"不是我的选择

任何的想法?

关于AngularUI掩码的一些文档:http://angular-ui.github.io/ui-utils/

谢谢!

angularjs angular-ui ng-bind-html

12
推荐指数
3
解决办法
6万
查看次数

在Parse.com JS SDK中,如何从指针数组中删除一个元素?

不是要求Parse.com问题的最佳时刻,但我必须继续使用解析器几个月.这是我的问题:

在Parse.com中我使用的是Javascript SDK.我有一个类User的指针数组:

[{userObject1.id}, {userObject2.id}, {userObject3.id}]

当我只有要删除的对象的id时,如何从数组内部删除对象{userObject2} ?

目前我正在通过使用array.splice(indexDelete,1); 执行forEach循环来删除内部对象.我正在寻找更好的解决方案.

var wasSomethingDeleted = 0;
var MyParseFollow = Parse.Object.extend('Follow');
var query = new Parse.Query(MyParseFollow);
query.equalTo("user", channelUser); // fetch all followers
query.first().then(
    function (Follow) {
        if (Follow){
            if (Follow.get("followedBy").length > 0){ // check if there is any follower
                var listOfFollowers = Follow.get("followedBy"); // get the array of userObjects of followers
                var indexDelete = 0;
                listOfFollowers.forEach(function(user){
                    if( user.id == Parse.User.current().id ){ // I want to remove the …
Run Code Online (Sandbox Code Playgroud)

javascript arrays parse-platform

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

TortoiseSVN,如何转储存储库?

我使用Windows 7,并且我也使用TortoiseSVN来跟踪我的代码(当你需要右键单击鼠标时生活很好),现在我想将我的存储库迁移到云服务,并且需要创建一个*.dump文件,但我找不到创建该死的文件的方法,一些论坛说使用"svnadmin"但我也找不到它.

我的问题是如何使用TortoiseSVN创建*.dump文件?

tortoisesvn

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

当用户在Firefox和Chrome中关闭"物理位置"提示时如何处理?

我正在使用Geolocation对象和getCurrentPosition().

你有没有看到每次你使用getCurrentPosition Firefox和Chrome提示这些按摩?

铬:

Example.com wants to track your physical location [allow] [deny] [ X close ]
Run Code Online (Sandbox Code Playgroud)

火狐:

Example.com wants to know your location [Share Location] [Don't Share] [Close]
Run Code Online (Sandbox Code Playgroud)

我的问题是:当用户没有"允许"或"拒绝"位置选项而是关闭提示时,如何处理?

我有这个JAVASCRIPT代码但是当用户关闭提示时它不起作用:

            if (navigator.geolocation) {
                navigator.geolocation.getCurrentPosition(
                    onSuccess,
                    onError,
                    {
                        //enableHighAccuracy: true,
                        timeout: 5000
                        //maximumAge: 120000
                    }
                );
                    alert("holaaaa");
            } else {
                alert('Geolocation not supported.');
            }
Run Code Online (Sandbox Code Playgroud)

我遇到了一些问题,请帮忙吗?

这个问题与这篇文章有关: 如何在用户允许或拒绝访问"物理位置"时调用函数?

javascript google-chrome geolocation w3c-geolocation

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

如何在apiary.io上格式化POST请求?

感谢您的时间我有一个POST请求,我想在蓝图养蜂场中记录,标题是这样的:

text/html的

_method:POST

数据[用户] [用户名]:

数据[用户] [口令]:

数据[用户] [记住]:0

http://d.pr/i/uRFx

我有类似的东西,但我不知道如何完成它:

## login [/users/login/{username}{password}{remember}{ident}]
Login with a user and password

+ Parameters

    + username (required, string, `myname`) ... the username format should follow CakePHP: data[User][username].
    + password (required, string, `whatever`) ... the password format should follow CakePHP: data[User][password]
    + remember (required, number, `0`) ... the remember format should follow CakePHP: data[User][remember]
    + ident (optional, number, `0`) ... the ident format should follow CakePHP: data[User][ident]

### make login [POST]

+ login …
Run Code Online (Sandbox Code Playgroud)

apiary.io apiblueprint

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

如何在使用AngularJS html5Mode(back4app/Parse-Server)时解析ExpressJS路由

我正在使用使用Parse-Server的back4app BaaS服务.对于ClientSide,我使用html5Mode(true)运行AngularJS;

我的问题是这不起作用:http://app.rizop.tv/dashboard 虽然这样做是正确的:http://app.rizop.tv

知道如何修复expressJS以正确的方式处理我的路线吗?

我有这个配置:

云\ app.js

// Helper modules that will be used
var path = require('path');
var bodyParser = require('body-parser')

// This imports the Router that uses the template engine
var index = require('./routers/index');

// Sets the template engine as EJS
app.set('view engine', 'ejs');

// This defines that the 'views' folder contains the templates
app.set('views', path.join(__dirname, '/views'));

// These options are necessary to 
app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json())

// This bind …
Run Code Online (Sandbox Code Playgroud)

javascript express angularjs parse-server back4app

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

使用nodejs将microsoft文档转换为pdf

您是否知道使用NodeJS将Word(.doc)或Excel(xlsx)等Microsoft Office文档转换为PDF的库?我一直在环顾四周,没有运气.谢谢

pdf pdf-generation ms-office node.js

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

如何在angular-ui中选择一个标签?(AngularJS)

我想选择最后一个标签,任何想法如何做到这一点?只有ng-repeat中的选项卡可供选择,我不会使用ng-repeat,如何在没有ng-repeat的情况下进行?

以下是工作代码:http://plnkr.co/edit/ZJNaAVDBrbr1JjooVMFj?p = preview

<!doctype html>
<html ng-app="ui.bootstrap.demo">

<head>
  <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
</head>

<body>

  <div ng-controller="TabsDemoCtrl">
    <p>Select a tab by setting active binding to true:</p>
    <p>
      <button type="button" class="btn btn-default btn-sm" ng-click="tabs[0].active = true">Select second tab</button>
      <button type="button" class="btn btn-default btn-sm" ng-click="tabs[1].active = true">Select third tab</button>
      <button type="button" class="btn btn-default btn-sm" ng-click="tabs[3].active = true">SELECT LAST TAB!!!</button>
    </p>
    <p>
      <button type="button" class="btn btn-default btn-sm" ng-click="tabs[1].disabled = ! tabs[1].disabled">Enable / Disable third tab</button>
    </p>
    <hr />

    <uib-tabset>
      <uib-tab heading="Static …
Run Code Online (Sandbox Code Playgroud)

javascript angularjs angular-ui

6
推荐指数
1
解决办法
2万
查看次数