城歌

文章 评论 浏览 32

城歌 2025-02-12 13:50:52

没有示例或示例代码/内容,很难确切知道您想要什么。您可能要做的就是创建一个列表并将所需的行附加到它。

result_list = [] # Create an empty list

with open("myfile.txt", "r") as f:
    Lines = f.readlines() # read the lines of the file

for line in Lines: # loop through the lines
    if "desired_string" in line:
        result_list.append(line) # if the line contains the string, the line is added

It's hard to know exactly what you want without an example or sample code/content. What you might do is create a list and append the desired line to it.

result_list = [] # Create an empty list

with open("myfile.txt", "r") as f:
    Lines = f.readlines() # read the lines of the file

for line in Lines: # loop through the lines
    if "desired_string" in line:
        result_list.append(line) # if the line contains the string, the line is added

Python 3:从文档中获取特定数据

城歌 2025-02-12 06:54:36

您的 productCollection.get 仅接受不可用的int,而您的 widget.product.id 可以为null。

如果您的ID为null,则解决此问题的一种方法是不调用该函数的函数:

    updateRoutine() async {
    final productCollection = widget.isar.products;
    await widget.isar.writeTxn((isar) async {
      int? id = widget.product.id;
      if (id != null) {
         final product = await productCollection.get(id);

         product!
           ..name = nameController.text
           ..price = double.parse(priceController.text)
           ..quantity = int.parse(quantityController.text);

         await productCollection.put(product);
      }

    });
  }

或将默认值添加到参数(此示例为0)

    updateRoutine() async {
    final productCollection = widget.isar.products;
    await widget.isar.writeTxn((isar) async {
      final product = await productCollection.get(widget.product.id ?? 0); //ADD ?? 0

      product!
        ..name = nameController.text
        ..price = double.parse(priceController.text)
        ..quantity = int.parse(quantityController.text);

      await productCollection.put(product);

    });
  }

Your productCollection.get only accept a non-nullable int while your widget.product.id can be null.

A way of fixing this is either not call the function if it's null:

    updateRoutine() async {
    final productCollection = widget.isar.products;
    await widget.isar.writeTxn((isar) async {
      int? id = widget.product.id;
      if (id != null) {
         final product = await productCollection.get(id);

         product!
           ..name = nameController.text
           ..price = double.parse(priceController.text)
           ..quantity = int.parse(quantityController.text);

         await productCollection.put(product);
      }

    });
  }

Or add a default value to the parameter if your id is null (0 for this example)

    updateRoutine() async {
    final productCollection = widget.isar.products;
    await widget.isar.writeTxn((isar) async {
      final product = await productCollection.get(widget.product.id ?? 0); //ADD ?? 0

      product!
        ..name = nameController.text
        ..price = double.parse(priceController.text)
        ..quantity = int.parse(quantityController.text);

      await productCollection.put(product);

    });
  }

参数类型; int?'可以将参数类型分配给INT;扑

城歌 2025-02-12 05:37:31

这是一个MRE,可让您将行添加到反应式表中。

library(shiny)
library(tidyverse)

ui <- fluidPage(
    numericInput("a", "A: ", value=NA),
    selectInput("b", "B:", choices=c("X", "Y", "Z")),
    actionButton("add", "Add row"),
    tableOutput("table")
)

server <- function(input, output) {
    rv <- reactiveValues(table=tibble(A=numeric(0), B=character(0)))
    
    output$table <- renderTable({
        rv$table
    })
    
    observeEvent(input$add, {
        rv$table <- rv$table %>% add_row(A=input$a, B=input$b)
    })
}

shinyApp(ui = ui, server = server)

Here's a MRE that allows you to add rows to a reactive table.

library(shiny)
library(tidyverse)

ui <- fluidPage(
    numericInput("a", "A: ", value=NA),
    selectInput("b", "B:", choices=c("X", "Y", "Z")),
    actionButton("add", "Add row"),
    tableOutput("table")
)

server <- function(input, output) {
    rv <- reactiveValues(table=tibble(A=numeric(0), B=character(0)))
    
    output$table <- renderTable({
        rv$table
    })
    
    observeEvent(input$add, {
        rv$table <- rv$table %>% add_row(A=input$a, B=input$b)
    })
}

shinyApp(ui = ui, server = server)

闪亮的更新表

城歌 2025-02-11 16:35:14

它可以进一步归结为

timer(0, 1000).pipe(
  take(4),
  map(x => x*(x <= 1?2 : 3))
);

It can be further boiled down to this

timer(0, 1000).pipe(
  take(4),
  map(x => x*(x <= 1?2 : 3))
);

RXJS条件操作员简化

城歌 2025-02-11 13:21:27

实际上,您的资源管理器窗口已关闭,您可以使用 ctrl + shift + e ,也可以去查看,然后单击“探险家”。

Actually, your explorer window is closed you can use CTRL + SHIFT + E or you can go to view and then click Explorer.

如何在VSCODE上获取文件夹/文件树?

城歌 2025-02-10 19:48:34

您必须在pubspec.yaml中更新版本

version: 1.0.0+1

version: 1.0.0+2 or higher

You have to update the version in pubspec.yaml
From

version: 1.0.0+1

to

version: 1.0.0+2 or higher

未能通过更改OS来安装应用程序的新版本而不删除先前的版本

城歌 2025-02-10 15:23:20

您可以尝试在语句中使用,例如:

def rev(num):
    return int(num != 0) and ((num % 10) * (10**int(math.log(num, 10))) + rev(num // 10))

while res != True: # or any logic that makes sense to your problem
    rand1 = random.randint(999,10000)
    rand2 = random.randint(999,10000)
    randnum = rand1 * rand2 
    res = randnum == rev(randnum)
    print(res)

You could try using the while statement, such as:

def rev(num):
    return int(num != 0) and ((num % 10) * (10**int(math.log(num, 10))) + rev(num // 10))

while res != True: # or any logic that makes sense to your problem
    rand1 = random.randint(999,10000)
    rand2 = random.randint(999,10000)
    randnum = rand1 * rand2 
    res = randnum == rev(randnum)
    print(res)

如何使代码重新重新开始

城歌 2025-02-10 07:05:21

取消的主要问题是,您将信号提供给 fetch 错误。您将信号作为第二个参数提供,但是 fetch 期望在其中有一个“ init”对象,其中 signal 属性属性。

但是,正如@Keith指出的那样,您当前的代码一次正在拨打一个呼叫。这将起作用,但是您可能会从并行进行电话中受益。

类似的事情:

const getOneResult = async ({ lat, lng }, signal) => {
    try {
        const response = await fetch(
            "http://localhost:5000/category/" +
                lat +
                "/" +
                lng +
                "/" +
                searchCategory, // *** Where does this come from?
            { signal }
        );
        if (signal && signal.aborted) {
            throw new DOMException("Request cancelled", "AbortError");
        }
        if (!response.ok) {
            throw new Error(`HTTP error ${response.status}`);
        }
        return response.json();
    } catch (error) {
        if (error.name === "AbortError") {
            return null;
        }
    }
};
const getNearbyHikes = async (coordinates, signal) => {
    controller.abort();
    controller = new AbortController();
    const results = await Promise.all(
        coordinates.map((coord) => getOneResult(coord.coordinates, signal))
    );
    if (signal && signal.aborted) {
        return;
    }
    const businesses = [];
    for (const result of results) {
        businesses.push(...result.businesses);
    }
    setHikes((prevState) => [...prevState, ...businesses]);
};

最后,我会让呼叫者提供信号,而不是为所有调用 gethikes 的呼叫使用全局,

const getOneResult = async ({ lat, lng }, signal) => {
    try {
        const response = await fetch(
            "http://localhost:5000/category/" +
                lat +
                "/" +
                lng +
                "/" +
                searchCategory, // *** Where does this come from?
            { signal }
        );
        if (signal && signal.aborted) {
            throw new DOMException("Request cancelled", "AbortError");
        }
        if (!response.ok) {
            throw new Error(`HTTP error ${response.status}`);
        }
        return response.json();
    } catch (error) {
        if (error.name === "AbortError") {
            return null;
        }
    }
};
let controller = new AbortController();
const getNearbyHikes = async (coordinates) => {
    controller.abort();
    controller = new AbortController();
    const results = await Promise.all(
        coordinates.map((coord) => getOneResult(coord.coordinates, signal))
    );
    if (signal && signal.aborted) {
        return;
    }
    const businesses = [];
    for (const result of results) {
        businesses.push(...result.businesses);
    }
    setHikes((prevState) => [...prevState, ...businesses]);
};

然后呼叫者控制中止请求。但是前者可能对您的用例很好。


旁注:您会看到我在其中添加了 Response.ok 的检查。您的代码假设由于提取实现了承诺,因此HTTP调用有效,但不幸的是,这是 fetch api中的脚步:它仅拒绝其在上的承诺。网络失败,而不是HTTP故障。您必须明确检查后者。

The main problem with the cancellation is that you're providing the signal to fetch incorrectly. You're providing the signal as a second argument, but fetch expects an "init" object there with a signal property on it.

As @Keith points out, though, your current code is making one call at a time. That will work, but you probably would benefit from doing the calls in parallel.

Something like this:

const getOneResult = async ({ lat, lng }, signal) => {
    try {
        const response = await fetch(
            "http://localhost:5000/category/" +
                lat +
                "/" +
                lng +
                "/" +
                searchCategory, // *** Where does this come from?
            { signal }
        );
        if (signal && signal.aborted) {
            throw new DOMException("Request cancelled", "AbortError");
        }
        if (!response.ok) {
            throw new Error(`HTTP error ${response.status}`);
        }
        return response.json();
    } catch (error) {
        if (error.name === "AbortError") {
            return null;
        }
    }
};
const getNearbyHikes = async (coordinates, signal) => {
    controller.abort();
    controller = new AbortController();
    const results = await Promise.all(
        coordinates.map((coord) => getOneResult(coord.coordinates, signal))
    );
    if (signal && signal.aborted) {
        return;
    }
    const businesses = [];
    for (const result of results) {
        businesses.push(...result.businesses);
    }
    setHikes((prevState) => [...prevState, ...businesses]);
};

Finally, I would have the caller supply the signal rather than using a global one for all calls to getHikes:

const getOneResult = async ({ lat, lng }, signal) => {
    try {
        const response = await fetch(
            "http://localhost:5000/category/" +
                lat +
                "/" +
                lng +
                "/" +
                searchCategory, // *** Where does this come from?
            { signal }
        );
        if (signal && signal.aborted) {
            throw new DOMException("Request cancelled", "AbortError");
        }
        if (!response.ok) {
            throw new Error(`HTTP error ${response.status}`);
        }
        return response.json();
    } catch (error) {
        if (error.name === "AbortError") {
            return null;
        }
    }
};
let controller = new AbortController();
const getNearbyHikes = async (coordinates) => {
    controller.abort();
    controller = new AbortController();
    const results = await Promise.all(
        coordinates.map((coord) => getOneResult(coord.coordinates, signal))
    );
    if (signal && signal.aborted) {
        return;
    }
    const businesses = [];
    for (const result of results) {
        businesses.push(...result.businesses);
    }
    setHikes((prevState) => [...prevState, ...businesses]);
};

then the caller controls aborting the request. But the former may be fine for your use case.


Side note: You'll see I've added a check for response.ok in there. Your code was assuming that since the fetch promise was fulfilled, the HTTP call worked, but unfortunately that's a footgun in the fetch API: it only rejects its promise on network failure, not HTTP failure. You have to check for the latter explicitly.

如何中止一批异步提取请求?

城歌 2025-02-10 02:23:09

在build.gradle(app)更新如下:(为我工作)

 kotlinOptions {
        jvmTarget = '1.8'
    }

In build.gradle(app) update as below: (Worked for me)

 kotlinOptions {
        jvmTarget = '1.8'
    }

班级是由Java环境的最新版本编译的

城歌 2025-02-09 21:46:43

这是一个AWS文档,可引导您了解如何在Spring Boot应用中执行此用例。在此示例用例中,使用 Aurora无服务器数据库

Furthermore, to successfully connect to the database using the

请注意,您只能将 rdsdataClient 对象用于Aurora无服务器DB群集或Aurora PostgreSQL。

要使用 rdsDataClient 对象,您需要以下两个Amazon资源名称(ARN)值:

  1. Aurora无服务器数据库的ARN。
  2. AWS Secrets Manager Secret的ARN用于访问数据库。

要读取此示例用例,请参见:

Here is an AWS Doc that walks you through how to perform this use case in a Spring Boot app. In this example use case, an Aurora Serverless database is used.

Furthermore, to successfully connect to the database using the RdsDataClient object (which is part of the AWS SDK for Java V2), you have to set up an AWS Secrets Manager secret that is used for authentication. This doc shows you how to hook this value into the Java logic as well.

Note that you can only use the RdsDataClient object for an Aurora Serverless DB cluster or an Aurora PostgreSQL.

To use the RdsDataClient object, you require the following two Amazon Resource Name (ARN) values:

  1. An ARN of the Aurora Serverless database.
  2. An ARN of the AWS Secrets Manager secret that is used to access the database.

To read this example use case, see:

Creating the Amazon Aurora Serverless application using the AWS SDK for Java

使用AWS Secrets Manager连接到AWS RD

城歌 2025-02-08 23:07:06

迭代解决方案

以上许多解决方案对我不起作用,当地图不可逆转或不快速时失败。

我提出了一种替代的6线迭代解决方案。

def invert_map(F):
    I = np.zeros_like(F)
    I[:,:,1], I[:,:,0] = np.indices(sh)
    P = np.copy(I)
    for i in range(10):
        P += I - cv.remap(F, P, None, interpolation=cv.INTER_LINEAR)
    return P

它的表现如何?
对于我的用例,即用于航空摄影的地形校正图,此方法以10个步骤舒适地收敛到像素的1/10。它也很快,因为所有重型计算都被塞入OpenCV

如何工作?

该方法使用以下想法:如果(x',y')= f(x,y) 是一个映射,然后只要 f 很小。

我们可以继续完善我们的映射,以上是我们的第一个预测(我是“身份映射”):

g_1 = i -f

我们的第二个预测可以从中进行调整:

g_2 = g_1 + i -f(g_1)

等:

g_n + 1 = g_n + i -i -f(g_n)

证明 g_n 收敛到反向 f^-1 很难,但是我们可以轻松证明的是,如果 g 已收敛,它将保持融合。

假设 g_n = f^-1 ,然后我们可以替换为:

g_n + 1 = g_n + i -f(g_n)

,然后获取:

G_n+1 = F^-1 + I - F(F^-1)
G_n+1 = F^-1 + I - I
G_n+1 = F^-1
Q.E.D.

测试脚本< /strong>

import cv2 as cv
from scipy import ndimage as ndi
import numpy as np
from matplotlib import pyplot as plt

# Simulate deformation field
N = 500
sh = (N, N)
t = np.random.normal(size=sh)
dx = ndi.gaussian_filter(t, 40, order=(0,1))
dy = ndi.gaussian_filter(t, 40, order=(1,0))
dx *= 10/dx.max()
dy *= 10/dy.max()

# Test image
img = np.zeros(sh)
img[::10, :] = 1
img[:, ::10] = 1
img = ndi.gaussian_filter(img, 0.5)

# Apply forward mapping
yy, xx = np.indices(sh)
xmap = (xx-dx).astype(np.float32)
ymap = (yy-dy).astype(np.float32)
warped = cv.remap(img, xmap, ymap ,cv.INTER_LINEAR)
plt.imshow(warped, cmap='gray')

输出1“

def invert_map(F: np.ndarray):
    I = np.zeros_like(F)
    I[:,:,1], I[:,:,0] = np.indices(sh)
    P = np.copy(I)
    for i in range(10):
        P += I - cv.remap(F, P, None, interpolation=cv.INTER_LINEAR)
    return P

# F: The function to invert
F = np.zeros((sh[0], sh[1], 2), dtype=np.float32)
F[:,:,0], F[:,:,1] = (xmap, ymap)

# Test the prediction
unwarped = cv.remap(warped, invert_map(F), None, cv.INTER_LINEAR)
plt.imshow(unwarped, cmap='gray')

”在此处输入图像说明”

Iterative solution

Many of the above solutions didn't work for me, failed when the map wasn't invertible, or weren't terribly fast.

I present an alternative, 6-line iterative solution.

def invert_map(F):
    I = np.zeros_like(F)
    I[:,:,1], I[:,:,0] = np.indices(sh)
    P = np.copy(I)
    for i in range(10):
        P += I - cv.remap(F, P, None, interpolation=cv.INTER_LINEAR)
    return P

How well does it do?
For my use case of inverting a terrain correction map for aerial photography, this method converges comfortably in 10 steps to 1/10th of a pixel. It's also blazingly fast, because all the heavy compute is tucked inside OpenCV

How does it work?

The approach uses the idea that if (x', y') = F(x, y) is a mapping, then the inverse can be approximated with (x, y) = -F(x', y'), as long as the gradient of F is small.

We can continue to refine our mapping, the above gets us our first prediction (I is an "identity mapping"):

G_1 = I - F

Our second prediction can be adapted from that:

G_2 = G_1 + I - F(G_1)

and so on:

G_n+1 = G_n + I - F(G_n)

Proving that G_n converges to the inverse F^-1 is hard, but what we can easily prove is that if G has converged, it will stay converged.

Assume G_n = F^-1, then we can substitute into:

G_n+1 = G_n + I - F(G_n)

and then get:

G_n+1 = F^-1 + I - F(F^-1)
G_n+1 = F^-1 + I - I
G_n+1 = F^-1
Q.E.D.

Testing script

import cv2 as cv
from scipy import ndimage as ndi
import numpy as np
from matplotlib import pyplot as plt

# Simulate deformation field
N = 500
sh = (N, N)
t = np.random.normal(size=sh)
dx = ndi.gaussian_filter(t, 40, order=(0,1))
dy = ndi.gaussian_filter(t, 40, order=(1,0))
dx *= 10/dx.max()
dy *= 10/dy.max()

# Test image
img = np.zeros(sh)
img[::10, :] = 1
img[:, ::10] = 1
img = ndi.gaussian_filter(img, 0.5)

# Apply forward mapping
yy, xx = np.indices(sh)
xmap = (xx-dx).astype(np.float32)
ymap = (yy-dy).astype(np.float32)
warped = cv.remap(img, xmap, ymap ,cv.INTER_LINEAR)
plt.imshow(warped, cmap='gray')

output 1

def invert_map(F: np.ndarray):
    I = np.zeros_like(F)
    I[:,:,1], I[:,:,0] = np.indices(sh)
    P = np.copy(I)
    for i in range(10):
        P += I - cv.remap(F, P, None, interpolation=cv.INTER_LINEAR)
    return P

# F: The function to invert
F = np.zeros((sh[0], sh[1], 2), dtype=np.float32)
F[:,:,0], F[:,:,1] = (xmap, ymap)

# Test the prediction
unwarped = cv.remap(warped, invert_map(F), None, cv.INTER_LINEAR)
plt.imshow(unwarped, cmap='gray')

enter image description here

反转实价索引网格

城歌 2025-02-08 10:01:26
public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int i = scan.nextInt();
        scan.nextLine();
        double d = scan.nextDouble();
        scan.nextLine();
        String s = scan.nextLine();

        System.out.println("String: " + s);
        System.out.println("Double: " + d);
        System.out.println("Int: " + i);
    }
public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int i = scan.nextInt();
        scan.nextLine();
        double d = scan.nextDouble();
        scan.nextLine();
        String s = scan.nextLine();

        System.out.println("String: " + s);
        System.out.println("Double: " + d);
        System.out.println("Int: " + i);
    }

使用Next()或NextFoo()之后,Scanner跳过NextLine()?

城歌 2025-02-07 15:37:48

如果我理解您正确地尝试用 v-Radio-group v-tabs

new Vue({
  el: '#app',
  vuetify: new Vuetify(),
  data() {
    return {
      selectedFilterTypeIndex: 0
    }
  }
})
.v-input--selection-controls.v-input {
  flex: auto !important;
}
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.min.css" rel="stylesheet">
<div id="app">
    <v-app>
        <v-card>
            <v-toolbar tile  dense color="blue-grey darken-2">
            <template v-slot:extension>
                <v-radio-group grow v-model="selectedFilterTypeIndex">
                    <v-tabs grow dark   background-color="transparent"
                        slider-size="3" slider-color="yellow"
                        v-model="selectedFilterTypeIndex"
                    >
                        <v-tab :key="index" v-for="(name, index) in ['item1', 'item2']">
                            <v-radio :label="name" :value="index"   />
                        </v-tab>
                    </v-tabs>
                </v-radio-group>
            </template>
        </v-toolbar>
        </v-card>
    </v-app>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.js"></script>

If I understood you correctly try to wrap v-tabs with v-radio-group:

new Vue({
  el: '#app',
  vuetify: new Vuetify(),
  data() {
    return {
      selectedFilterTypeIndex: 0
    }
  }
})
.v-input--selection-controls.v-input {
  flex: auto !important;
}
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.min.css" rel="stylesheet">
<div id="app">
    <v-app>
        <v-card>
            <v-toolbar tile  dense color="blue-grey darken-2">
            <template v-slot:extension>
                <v-radio-group grow v-model="selectedFilterTypeIndex">
                    <v-tabs grow dark   background-color="transparent"
                        slider-size="3" slider-color="yellow"
                        v-model="selectedFilterTypeIndex"
                    >
                        <v-tab :key="index" v-for="(name, index) in ['item1', 'item2']">
                            <v-radio :label="name" :value="index"   />
                        </v-tab>
                    </v-tabs>
                </v-radio-group>
            </template>
        </v-toolbar>
        </v-card>
    </v-app>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.js"></script>

在v-tab中使用v-radio

城歌 2025-02-07 13:40:57

如何确切地为“ frompath”和“ topath”分配收集?

“来自Path”和“ Topath”是不是收集参考,而是文档参考。由于 movefirestoredOcument()方法包含两个参数,因此您必须调用该方法并将两个文档引用作为参数。因此,假设您有两个看起来像这样的集合:

Firestore-root
   |
   --- products (collection)
   |     |
   |     --- $productId (document)
   |            |
   |            --- //Document details.
   |
   --- deletedProducts (collection)
         |
         --- $productId (document)
                |
                --- //Document details.

要将文档从一个集合移至另一个集合,请使用以下代码行:

FirebaseFirestore db = FirebaseFirestore.getInstance();
CollectionReference productsRef = db.collection("products");
DocumentReference fromPath = productsRef.document(productId);
CollectionReference deletedProductsRef = db.collection("deletedProducts");
DocumentReference toPath = deletedProductsRef.document(productId);
moveFirestoreDocument(fromPath, toPath);

How exactly to assign collections for "fromPath" and "toPath"?

The "fromPath" and "toPath" are not collection references, but document references. Since the moveFirestoreDocument() method contains two arguments, you have to call the method and pass two document references as arguments. So assuming you have two collections that look like this:

Firestore-root
   |
   --- products (collection)
   |     |
   |     --- $productId (document)
   |            |
   |            --- //Document details.
   |
   --- deletedProducts (collection)
         |
         --- $productId (document)
                |
                --- //Document details.

To move a document from one collection to the other, please use the following lines of code:

FirebaseFirestore db = FirebaseFirestore.getInstance();
CollectionReference productsRef = db.collection("products");
DocumentReference fromPath = productsRef.document(productId);
CollectionReference deletedProductsRef = db.collection("deletedProducts");
DocumentReference toPath = deletedProductsRef.document(productId);
moveFirestoreDocument(fromPath, toPath);

将数据从Firestore数据库(不是实时数据库)移动到Android Studio中的新收藏

城歌 2025-02-07 10:07:05

此命令应该这样做。

aws apigateway get-rest-apis --no-paginate | jq -r '.items | length'

https://docs.aws.aws.aws.aws.aws.aws.amazon。 com/cli/cliest/reference/apigateway/get-rest-apis.html
https://stedolan.github.io/jq/

This command should do.

aws apigateway get-rest-apis --no-paginate | jq -r '.items | length'

https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-rest-apis.html
https://stedolan.github.io/jq/

我们如何计算通过AWS API网关暴露的API数量?

更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

更多

友情链接

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文