小编Vin*_*eet的帖子

TypeError: Object(...) 不是 Vue 中的函数

我是 Vue 的新手并试图处理表单。我正在制作一个网络应用程序来管理会议,为此我有一个多步骤表单来处理访问者和主持人数据。当我单击提交按钮时,出现以下错误:- TypeError: Object(...) is not a function 。我在 stackoverflow 上搜索了它,但找不到太多线索。以下是我的代码:-

scheduleMeeting.js

<template>
    <el-container>
        <el-row>

            <el-col class="desc" :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <img src="../assets/meeting.svg" alt="meeting-image" class="image"/>
                <div>
                    <h1 class="image-caption">Schedule Meetings With Ease!</h1>
                    <p class="image-sub-caption">Managing Meetings Now Much Easier</p>
                    <ul class="feature-list">
                        <li>Get instant meeting confirmation on email and mobile!</li>
                        <li>Schedule meeting from anywhere, anytime!</li>
                        <li>Schedule meeting using your mobile</li>
                        <li>Get check out email on your mailing address</li>
                        <li>Keep Track of All Visitors and Hosts</li>
                    </ul>
                </div>
            </el-col>

            <el-col class="form-div" :xs="24" …
Run Code Online (Sandbox Code Playgroud)

javascript vue.js

10
推荐指数
2
解决办法
3万
查看次数

Airflow 2 - ModuleNotFoundError:没有名为“airflow.operators.text_processing_plugin”的模块

我是新手airflow,正在尝试制作一个用于处理文本的 dag。我有一个由文本处理任务组成的数据管道 - 读取文档、清理文本并将数据加载到 JSON 文件。对于文本处理,每个转换任务都使用自定义运算符,并将它们保存在text_processing_plugin文件夹中。文件夹的完整文件夹结构plugin是:-

\n
\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 airflow.cfg\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 airflow.db\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 airflow-webserver.pid\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 dags\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 d0.py\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 plugins\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 text_processing_plugin\n\xe2\x94\x82\xc2\xa0\xc2\xa0     \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 __init__.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0     \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 operators\n\xe2\x94\x82\xc2\xa0\xc2\xa0     \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 dependency_parsing.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0     \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 entity_detection.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0     \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 __init__.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0     \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 lemmatize.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0     \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 pos_tagging.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0     \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 remove_stop_words.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0     \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 tokenize_doc.pyfolder structure of plugin folder is:-\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 requirements.txt\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 unittests.cfg\n\n
Run Code Online (Sandbox Code Playgroud)\n

其中text_processing_plugin/__init__.py有以下代码:-

\n
from airflow.plugins_manager import AirflowPlugin\nfrom text_processing_plugin.operators.dependency_parsing import DependencyParsingOperator \nfrom text_processing_plugin.operators.entity_detection import DetectEntityOperator\nfrom text_processing_plugin.operators.lemmatize import LemmatizeOperator\nfrom text_processing_plugin.operators.pos_tagging import POSTagOperator\nfrom text_processing_plugin.operators.remove_stop_words import RemoveStopWordsOperator\nfrom …
Run Code Online (Sandbox Code Playgroud)

python python-3.x airflow

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

如何在元流中创建嵌套分支?

我用来metaflow创建一个文本处理管道,如下所示:-

                                 ___F------
                     ______ D---|          |  
                    |           |___G---|  |__>  
          ____B-----|                   |----->H
         |          |______E_________________> ^
      A -|                                     |
         |____C________________________________|
Run Code Online (Sandbox Code Playgroud)

根据文档branch允许并行计算步骤,并用于并行计算 (B, C)、(D, E) 和 (F, G)。最后所有分支都在 H 处连接。以下是实现此逻辑的代码:-

from metaflow import FlowSpec, step

class TextProcessing(FlowSpec):

  @step
  def a(self):
    ....

    self.next(self.b, self.c)

  @step
  def c(self):
    result1 = {}

    ....

    self.next(self.join)

  @step
  def b(self):
    ....

    self.next(self.d, self.e)

  @step
  def e(self):
    result2 = []
    .....

    self.next(self.join)

  @step
  def d(self):
    ....

    self.next(self.f, self.g)

  @step
  def f(self):
    result3 = []
    .... …
Run Code Online (Sandbox Code Playgroud)

python netflix-metaflow

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

如何在VueJS的&lt;router-link&gt;中给出动态URL?

我正在使用 v-for 指令来获取 URL 名称。但是,我在将从 v-for 实例获得的值作为 URL 名称传递时遇到困难。

<template>
  <v-list-tile class="pl-5" v-for="choice in choices" :key="choice.name">
    <v-list-title-content>
      <router-link to="'/' + choice.name">
        <v-list-title-title class="white--text headline">
          {{choice.name}}
        </v-list-title-title>
      </router-link>
    </v-list-title-content>
  </v-list-tile>
</template>

<script>
export default{
  data(){
    return{
      choices:[
         name:'A',
         name:'B',
         name:'C',
         name:'D'
      ]    
    }
  }
}
</script>
Run Code Online (Sandbox Code Playgroud)

vue.js vue-router

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

如何设置 dynamodb 项目的生存时间

我正在尝试批量添加 dynamodb 中的项目。我的表由复合主键组成,即主键和排序键的组合。我已在我的表上启用time to live,但指标显示deletedItemsCount没有变化。

以下是我的代码:-

def generate_item(data):
    item = {
        "pk": data['pk'],
        "ttl": str(int(time.time())), # current time set for testing
        "data": json.dumps({"data": data}),
        "sk": data['sk']
    }

    return item

def put_input_data(input_data, table_name):
    dynamodb = boto3.resource('dynamodb')
    table = dynamodb.Table(table_name)

    data_list = input_data["data"]

    try:
        with table.batch_writer() as writer:
            for index, data in enumerate(data_list):
                writer.put_item(Item=generate_item(data))
    except ClientError as exception_message:
        raise

Run Code Online (Sandbox Code Playgroud)

在查询表时,我可以看到项目已添加到表中,但图表显示deletedItemsCount没有变化。

有人能指出我哪里出错了吗?将不胜感激任何提示。

谢谢

amazon-web-services amazon-dynamodb boto3

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