小编hip*_*r69的帖子

在 Dockerfile 中为 Postgres 9.6.x 安装 postgresql-dev?

由于我正在尝试运行一个极其过时的 dep,我在互联网上搜索了 2 天,但毫无结果,现在正在寻找一种安装 9.6 版本的 postgresql-dev 的方法。不幸的是,运行以下 Dockerfile 命令:

FROM python:2.7-alpine
ENV PYTHONUNBUFFERED 1
RUN mkdir /app/
RUN mkdir ./app/logs/
RUN mkdir ./app/xxx/
WORKDIR /app/xxx/
ADD requirements.txt /app/xxx/
ADD ./ /app/xxx/
RUN apk --update add python py-pip openssl postgresql-dev ca-certificates py-openssl libffi-dev musl-dev openssl-dev wget build-base gcc python-dev py-pip jpeg-dev zlib-dev libx
ml2 libxslt-dev                                                                                                                                                                 
ENV LIBRARY_PATH=/lib:/usr/lib
RUN pip install --upgrade pip setuptools
RUN pip install psycopg2==2.4.5
Run Code Online (Sandbox Code Playgroud)

给我以下错误:

Collecting psycopg2==2.4.5
  Downloading https://files.pythonhosted.org/packages/36/77/894a5dd9f3f55cfc85682d3e6473ee5103d8d418b95baf4019fad3ffa026/psycopg2-2.4.5.tar.gz (719kB)
    Complete output from command python setup.py egg_info: …
Run Code Online (Sandbox Code Playgroud)

postgresql python-2.7 docker alpine-linux

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

Amplify 的completeNewPassword 方法针对用户数据抛出 TypeError

我尝试将自定义 UI 与 aws Amplify 结合使用,但遇到了 Auth.completeNewPassword 问题。任何使用此方法的尝试都会引发错误Error in v-on handler: "TypeError: Cannot read property 'username' of null

在此之前使用过给定的 UI,我知道当管理员创建 Cognito 用户时,他们会在首次登录时发送到“新密码”表单。但是,Amplify 文档中的示例一旦发现用户需要新密码,signIn 方法就会立即调用completeNewPassword 方法。

以下片段直接来自亚马逊的文档:

import { Auth } from 'aws-amplify';

Auth.signIn(username, password)
.then(user => {
    if (user.challengeName === 'NEW_PASSWORD_REQUIRED') {
        const { requiredAttributes } = user.challengeParam; // the array of required attributes, e.g ['email', 'phone_number']
        Auth.completeNewPassword(
            user,               // the Cognito User Object
            newPassword,       // the new password
            // OPTIONAL, the required attributes
            {
              email: 'xxxx@example.com',
              phone_number: …
Run Code Online (Sandbox Code Playgroud)

authentication amazon-web-services vue.js amazon-cognito aws-amplify

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

如何将此 Vuetify(引导程序)v-col 与其父行的底部对齐?

我已经尝试了我能想到的所有方法,但无法将“阅读更多”超链接放置在父行的底部,因此“阅读更多”位于容器的右下角。对齐或对齐的组合似乎没有帮助。

文章图像应该位于左侧,然后文章标题位于图像的右侧,“阅读更多”位于整个面板的右下角。我认为最简单的方法是将超链接的列与 v 行的底部对齐,然后仅使用 text-right 进行格式化。

在此输入图像描述

  <v-row>
    <v-col>
      <h1 style='display: inline'>{{article.title}}</h1> <span style='font-size: x-small'>{{article.month}}.{{article.day}}.{{article.year}}</span>
    </v-col>
  </v-row>
  <v-row style='padding: 0px; margin-top: -25px; margin-bottom: -15px'>
    <v-col>
      <hr>
    </v-col>
  </v-row>
  <v-row>     
    <v-col md='4' class='text-center'>
      <img :src="article.image" class='article-image'>
    </v-col>      
    <v-col>
      <v-row>
        <v-col>
          <p>{{article.header}}</p>
        </v-col>
      </v-row>
      <v-row>
        <v-col class='text-center'>
          <a>>>> Read More <<<</a>
        </v-col>
      </v-row>
    </v-col>
  </v-row>
Run Code Online (Sandbox Code Playgroud)

最终的解决方案,包括两个阅读部分:

<template>
<v-container fluid class='content-body'>
  <v-row>
    <v-col cols="12">
      <h1 class="ml-2" style="display: inline">{{ item.title }}</h1>
      <span style="font-size: x-small">{{ item.date }}</span>
    </v-col>
    <v-col style='padding: 0; margin-top: -15px; margin-bottom: -15px' cols="12"> …
Run Code Online (Sandbox Code Playgroud)

css-grid vuetify.js nuxtjs

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