小编Azo*_*son的帖子

CSS 100%高度,然后滚动DIV不是页面

好的,所以我还没有找到答案的问题,所以我决定自己做.

我正在尝试创建一个100%流畅的布局,技术上我已经完成了. http://stickystudios.ca/sandbox/stickyplanner/layout/index2.php

但是,我现在要做的是将页面100%设置为HEIGHT ...但我不希望页面滚动我希望内部DIV滚动.

所以我简单地相信我希望它能够检测视口屏幕的高度,100%,然后IF内容比屏幕更长,滚动特定的DIV,而不是页面.

我希望这是有道理的.

提前致谢.贾斯汀

html css scroll

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

错误的ERR!拒绝删除/编码EEXIST

我只是运行一个简单的npm install,我得到这个错误.

npm ERR! path /Users/jasonazoulay/Desktop/fabrick.io/delegation/node_modules/@angular/cli/node_modules/webpack/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/.bin/which
npm ERR! code EEXIST
npm ERR! Refusing to delete /Users/jasonazoulay/Desktop/fabrick.io/delegation/node_modules/@angular/cli/node_modules/webpack/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/.bin/which: is outside /Users/jasonazoulay/Desktop/fabrick.io/delegation/node_modules/@angular/cli/node_modules/webpack/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/which and not a link
npm ERR! File exists: /Users/jasonazoulay/Desktop/fabrick.io/delegation/node_modules/@angular/cli/node_modules/webpack/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/.bin/which
npm ERR! Move it away, and try again
Run Code Online (Sandbox Code Playgroud)

这是我第一次收到此错误而且我不知道该怎么做.

node.js npm

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

Play Framework - 开发服务器刷新后关闭

我的问题是,每次运行时sbt run,服务器都会工作,直到我刷新页面.在那之后,我在终端上得到了这个

Uncaught error from thread [play-dev-mode-akka.actor.default-dispatcher-3]: javax/xml/bind/DatatypeConverter, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for for ActorSystem[play-dev-mode]
java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
Run Code Online (Sandbox Code Playgroud)

由于网上没有太多关于游戏和scala的资源,我真的需要这方面的指导.

scala playframework-2.0

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

杂音上传不起作用

我正在使用Multer制作上传文件系统。我按照Github页面上的说明进行操作,但是无法正常工作。我懂了

const express= require('express');
const app = express();
const multer = require('multer');

const storage = multer.diskStorage({
  destination: function (req, file, cb) {
    cb(null, '/uploads');
  },
  filename: function (req, file, cb) {
    cb(null, file.fieldname + '-' + Date.now());
  }
});

const upload = multer({ storage: storage });


app.post('/editPhoto',upload.single('avatar'),function(req,res,next){
  upload(req,res,function(err){   
      if(err){
        res.json({success:false,message:err});

      }
      else{
        res.json({success:true,message:"Photo was updated !"});
      } 

  });
});
Run Code Online (Sandbox Code Playgroud)

我懂了 TypeError: upload is not a function

我究竟做错了什么 ?

编辑

我照你说的那样做,正如医生所说。

var storage = multer.diskStorage({
  destination: function (req, file, cb) { …
Run Code Online (Sandbox Code Playgroud)

node.js express multer

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

<input type="datetime-local"> 如何以 15 分钟为间隔显示分钟

我正在构建某种预订应用程序,我想向用户显示日期时间选择器输入,并且只能每一刻钟进行预订。

例子:

  • 12:00
  • 12:15
  • 12:30
  • 12:45

我找不到用简单的 HTML 来实现的方法。我需要一些指导。

我尝试使用“步骤”,但显然似乎只在单击时增加值。这不是我想要的。我的目标是仅显示季度值

html javascript forms datetimepicker

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

如何使用angular2-tree插件获取检查的树结构值

在这里,我使用我的 json 和 angular2 - 树组件生成动态树结构,直到现在一切正常,当我们选择特定名称必须被选为对象的事件时,我无法生成选择事件广告,如果是孩子在那里,我尝试了这个 URL,在文档中我也没有找到任何获取选定值的方法,所以请建议我。

https://angular2-tree.readme.io/docs

下面是我的代码

options = {
  useCheckbox: true
};
nodes;
data = {
  "info": {
    "laptop": {
    },
    "config": {
      "properties": {
        "ram": {
        },
        "processor": {
        },
        "hdd": {

        }
      }
    },
    "link": {

    },
    "name": {

    },
    "company": {
      "properties": {
        "model": {

        },
        "maker": {
          "type": "integer"
        },
        "country": {
          "type": "text"
        },
        "enterprise": {

        }

      }
    }
  }
};

check(){
  const results = Object.keys(this.data.info).map(k => ({
    name: k,
    children: this.data.info[k].properties …
Run Code Online (Sandbox Code Playgroud)

javascript typescript angular

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

git init不会创建.git目录

我是Git的新手,当我git init在终端中运行时,没有创建.git目录,但是我得到了这个结果Reinitialized existing Git repository in /Users/Desktop/Javascript/sotrustme/.git/

请帮我

git github

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

无法使用 docker run -e 或 --env-file 选项设置环境变量

文件

FROM node:10

# Create app directory
WORKDIR /usr/server

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json /usr/server/

RUN npm install
# If you are building your code for production
# RUN npm ci --only=production

# Bundle app source
COPY . /usr/server/

EXPOSE 3000

CMD [ "node", "./bin/www.js" ]`
Run Code Online (Sandbox Code Playgroud)

然后我跑

    docker run -d -p 3000:3000 chatapp-back 
    -e DB_HOST="mongodb://localhost:27017/" 
    -e DB_USER="user" 
    -e DB_NAME="dbname" 
    -e DB_PASS="dbpass" 
    -e …
Run Code Online (Sandbox Code Playgroud)

environment-variables docker dockerfile

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

Angular2如何更改禁用按钮的颜色

我有这个按钮

<button class="btn" [disabled]="true">
    <i class="fa fa-heart" aria-hidden="true"></i> Like
</button>
Run Code Online (Sandbox Code Playgroud)

我希望它在禁用时变为绿色,但不知道该怎么做

angular

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

离子服务后未找到模块(webpack)/ hot / emitter @ angular-devkit / build-angular-Ionic 4

堆:

  • 节点v10.15.1
  • 离子4.10.1

当我跑步时,ionic serve我得到:

(webpack)/hot/emitter.js [ng]中找不到错误:找不到模块:错误:无法解析“ / zazou / node_modules / @ angular-devkit / build-angular / node_modules / webpack / hot”中的“事件”

编译失败。

找不到答案。

我尝试过了:

  • 更新@ angular-devkit / build-angular
  • npm install webpack-hot-dev-clients
  • npm install -g webpacknpm install -g webpack-dev-server这里建议
  • npm link wepack
  • 我也尝试更新我的角度CLI

类似问题

javascript ionic-framework webpack angular

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

Mongoose populate 不是一个函数

我希望帖子的创建者是用户架构。所以我有2个模式

后.js

const mongoose=require('mongoose');
mongoose.Promise = global.Promise;
const Schema= mongoose.Schema;

const postSchema= new Schema({
    body:{ type: String, required:true, validate:bodyValidators},
    createdBy: { type: Schema.Types.ObjectId,ref:'User'}, // this one
    to: {type:String, default:null },
    createdAt: { type:Date, default:Date.now()},
    likes: { type:Number,default:0},
    likedBy: { type:Array},
    dislikes: { type:Number, default:0},
    dislikedBy: { type:Array},
    comments: [
        {
            comment: { type: String, validate: commentValidators},
            commentator: { type: String}
        }
    ]
});



module.exports = mongoose.model('Post',postSchema);
Run Code Online (Sandbox Code Playgroud)

用户.js

const mongoose=require('mongoose');
mongoose.Promise = global.Promise;
const Schema= mongoose.Schema;

const userSchema=new Schema({
    email: { …
Run Code Online (Sandbox Code Playgroud)

mongoose mongodb mongoose-populate

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