小编Rae*_*fai的帖子

无法在Ubuntu 14.04上使用sublime text git进行提交

当我尝试从sublime内部提交我的工作时,它给了我以下消息:

fatal: Unable to create 'my_project_path/.git/index.lock': File exists.

If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
Run Code Online (Sandbox Code Playgroud)

我检查过但是index.lock根本不存在!当我在终端进站时,一切都很好.

有任何想法吗?

git sublimetext sublimetext3 ubuntu-14.04

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

如果在角度meteor和集合f中上传faild,如何取消文件上传并自动删除记录?

HTML:

<div
  ngf-select
  ngf-keep="true"
  ng-model="vm.photos"
  ngf-accept="'image/*'"
  ngf-pattern="'image/*'"
  ngf-multiple="true">
  Select
</div>
<button ng-click="vm.uploadPhotos()">Upload</button>
Run Code Online (Sandbox Code Playgroud)

客户端JS:

vm.uploadPhotos = function() {
  _.forEach(vm.photos, function(photo) {
      PhotoCol.insert(photo);
  });
};
Run Code Online (Sandbox Code Playgroud)

服务器JS:

PhotoCol = new FS.Collection('propertyPhoto', {
  stores: [
    new FS.Store.FileSystem('original')
  ],
  filter: {
    allow: {
      contentTypes: ['image/*']
    }
  }
});

PhotoCol.allow({
  insert: function() {
    return true;
  },
  update: function() {
    return true;
  },
  remove: function() {
    return true;
  },
  download: function() {
    return true;
  }
});
Run Code Online (Sandbox Code Playgroud)

上传开始时,我需要一种方法来取消一个或所有上传过程.并且CollectionFS在上传完成之前在数据库中创建记录,因此如果由于某种原因用户在完成上传过程之前终止了浏览器,那么我将有一个没有上传文件的照片条目.在这里,我需要捕获该错误以从DB中删除条目.有任何想法吗?

angularjs meteor collectionfs ng-file-upload angular-meteor

5
推荐指数
0
解决办法
494
查看次数

如何动态渲染pug文件而不是使用静态angular-cli index.html?

我有一个角度2应用程序,我需要渲染index.pug而不是使用angular-cli 的静态index.html.

那么对于这样的事情,最好的做法是什么?

node.js express angular-cli pug angular

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

如何实现与on(实时)emojis的反应?

我有一个关于反应的聊天应用程序.

我需要以下内容:

  • 当用户写一个微笑名称时,例如:smile:应该转换成emojione,而不是unicode.
  • 输入必须如下面的代码.
  • 输入中的表情符号应与在对话中看起来相同.
<div contentEditable
     styles={this.state.messageInputStyle}
     className="message-input">
</div>
Run Code Online (Sandbox Code Playgroud)

javascript emoji reactjs emojione

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