书间行客

文章 评论 浏览 29

书间行客 2025-02-20 19:14:25

根据 for pycairo for pycairo

安装Pycairo需要开罗,包括其标题。有关更多信息,请参见“入门”。

链接页面提供以下说明:

安装Pycairo需要PKG-Config和Cairo,包括其
标题。以下是一些有关如何为某些安装的示例
平台:

  • ubuntu/debian: sudo apt install libcairo2-dev pkg-config python3-dev
  • macos/homebrew: brew install cairo pkg-config
  • Arch Linux: sudo pacman -s cairo pkgconf
  • fedora: sudo dnf安装cairo-devel pkg-config python3-devel
  • opensuse: sudo zypper install cairo-devel pkg-config python3-devel

,我想Fedora说明也适用于RHEL/CENTOS,MODULO可能使用< yum 而不是 dnf

According to the pipy page for pycairo:

Installing Pycairo requires cairo including its headers. For more info see “Getting Started”.

The linked page gives the following instructions:

Installing Pycairo requires pkg-config and cairo including its
headers. Here are some examples on how to install those for some
platforms:

  • Ubuntu/Debian: sudo apt install libcairo2-dev pkg-config python3-dev
  • macOS/Homebrew: brew install cairo pkg-config
  • Arch Linux: sudo pacman -S cairo pkgconf
  • Fedora: sudo dnf install cairo-devel pkg-config python3-devel
  • openSUSE: sudo zypper install cairo-devel pkg-config python3-devel

And I guess that the Fedora instructions will work for RHEL / CentOS too, modulo possibly using yum rather than dnf.

错误在Linux上安装Pycairo:丢失cairo.h

书间行客 2025-02-20 17:04:55

如果我正确理解您,那就不 - 您不必检查它是否不是null。

例如(今天是日期'2022-07-07',2022年7月7日):

SQL> with test (id, date_column) as
  2    (select 1, date '2022-05-25' from dual union all  -- before today
  3     select 2, date '2022-12-13' from dual union all  -- after today
  4     select 3, null              from dual            -- unknown, as there's no value in DATE_COLUMN
  5    )
  6  select *
  7  from test
  8  where date_column >= sysdate;

        ID DATE_COLUM
---------- ----------
         2 2022-12-13

SQL>

如果您包括而不是null null 检查,您将获得相同的结果:

<snip>
  6  select *
  7  from test
  8  where date_column is not null
  9    and date_column >= sysdate;

        ID DATE_COLUM
---------- ----------
         2 2022-12-13

SQL>

If I understood you correctly, then no - you don't have to check whether it is not null.

For example (today is date '2022-07-07', 7th of July 2022):

SQL> with test (id, date_column) as
  2    (select 1, date '2022-05-25' from dual union all  -- before today
  3     select 2, date '2022-12-13' from dual union all  -- after today
  4     select 3, null              from dual            -- unknown, as there's no value in DATE_COLUMN
  5    )
  6  select *
  7  from test
  8  where date_column >= sysdate;

        ID DATE_COLUM
---------- ----------
         2 2022-12-13

SQL>

If you include the not null check, you'll get the same result:

<snip>
  6  select *
  7  from test
  8  where date_column is not null
  9    and date_column >= sysdate;

        ID DATE_COLUM
---------- ----------
         2 2022-12-13

SQL>

Oracle SQL:如果我在日期字段上进行比较操作员,我仍然需要一个不为null

书间行客 2025-02-20 13:26:58

formGroupName =“ i”

您的模板搜索了名为 i 的formGroup,而不是由 i 的内容命名的FormGroup。请更改为

[formGroupName] =“ i”

formGroupName="i"

Your template searches for a formGroup named i, not for the formGroup named by the content of i. Please change to

[formGroupName]="i"

角反应性形式:无法找到路径的控制

书间行客 2025-02-20 11:24:14

向@Teemu大喊。他提出了正确的答案。这就是我为它起作用的工作:

if (tble_row3.cells.length) {
     element.appendChild(tble_row3);
}

正确地显示具有内容并且不是显示空的行的行。

Shoutout to @Teemu. He came up with the correct answer. This is what I did for it to work:

if (tble_row3.cells.length) {
     element.appendChild(tble_row3);
}

This correctly displays rows that have content and does not display rows that are empty.

检查以查看HTML表行元素是否为空

书间行客 2025-02-20 05:05:16

尝试这样做,

CREATE TABLE Accounts (
  id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  reg_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  exp_date TIMESTAMP generated always as (reg_date + interval 4 year)
)

Try this way,

CREATE TABLE Accounts (
  id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  reg_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  exp_date TIMESTAMP generated always as (reg_date + interval 4 year)
)

如何在MySQL中设置未来日期

书间行客 2025-02-19 17:07:10

您最近升级了JDK / JRE吗?

我有相同的错误消息,当我降级到较旧的Java版本时,它已修复。

did you upgrade your JDK / JRE lately?

I had that same error message, when I downgrade to older Java version it was fixed.

java.lang.reflect.inaccessibleObjectException:无法制作受保护的void java.net.urlclassloader.addurl(java.net.url)

书间行客 2025-02-18 09:29:51

就像错误消息告诉您一样, -exec 不是 tar 命令的有效选项。我想您将其与查找混合在一起,该确实提供了这样的选项(或者在特定上下文中,谓词)。

在一般情况下,要将命令的输出作为参数传递给另一个命令,请尝试 XARGS

tar tf MyTar.tar.gz --wildcards "*.jar" |
xargs ls

如果我完全理解您的问题,但是您需要在这里有所不同。 (另外,在脚本中不要使用 ls )或许?

for jar in *.jar; do
    zip -q -d "$jar" \*/Abcd.class
done

如果您想检查 jar 文件是否包含带有该名称的成员,则可以在运行之前不在循环(如果不存在)中将过滤器添加到继续zip -d ,但是在所有文件上运行它都是简单,明显且无害的(尽管您可能会收到有关没有匹配的文件的错误消息)。

处理 jar 文件后,如果您想要它们的格式,则 tar 将它们重新放在一起。

Like the error message tells you, -exec is not a valid option to the tar command. I guess you are mixing it with find, which does provide such an option (or rather, in that specific context, predicate).

In the general case, to pass the output of a command as an argument to another command, try xargs.

tar tf MyTar.tar.gz --wildcards "*.jar" |
xargs ls

If I understand your question at all, you need something different here, though. (Also, don't use ls in scripts.) Something like this maybe?

for jar in *.jar; do
    zip -q -d "$jar" \*/Abcd.class
done

If you wanted to check whether the jar file contains a member with that name, you could add a filter to continue the loop if it's not there before you run the zip -d, but running it on all files is simple, obvious, and harmless (though you might get an error message for files with no matches).

After processing the jar files, you'd tar them back together if that's the format you want them in.

在tar.gz文件中的jar中找到类文件

书间行客 2025-02-18 06:21:06

您可以使用 object.values() redion()与:

const data = [
  {
    id: '10000844',
    text_id: '10000844-01',
  },
  {
    id: '10000844',
    text_id: '10000844-02',
  },
  {
    id: '12000844',
    text_id: '12000844-03',
  },
  {
    id: '12000844',
    text_id: '12000844-07',
  },
  {
    id: '12000814',
    text_id: '12000844-07',
  },
 {
    id: '12002812',
    text_id: '12000844-07',
  },
   {
    id: '12000814',
    text_id: '12000844-08',
  },
]

const result = Object.values(
  data.reduce((res, {id, text_id}) => {
    res[id] ??= {id, text_id}
    return res
  }, {})
)
console.log(result)

更新带有 ?? = 文档

逻辑无效分配(x ?? = y)操作员仅分配如果x为nullish(nullish或null或Undefined)

You can use Object.values() and reduce() same as :

const data = [
  {
    id: '10000844',
    text_id: '10000844-01',
  },
  {
    id: '10000844',
    text_id: '10000844-02',
  },
  {
    id: '12000844',
    text_id: '12000844-03',
  },
  {
    id: '12000844',
    text_id: '12000844-07',
  },
  {
    id: '12000814',
    text_id: '12000844-07',
  },
 {
    id: '12002812',
    text_id: '12000844-07',
  },
   {
    id: '12000814',
    text_id: '12000844-08',
  },
]

const result = Object.values(
  data.reduce((res, {id, text_id}) => {
    res[id] ??= {id, text_id}
    return res
  }, {})
)
console.log(result)

Update with ??= document

The logical nullish assignment (x ??= y) operator only assigns if x is nullish (null or undefined).

在一系列对象中获取第一个重复项JavaScript

书间行客 2025-02-17 20:29:52

这样,

strcpy(ptr, word1);
strcat(ptr, word2);

您需要使用 ptr 进行两个操作,副本和串联。

在您的版本中 strcat(word1,word2) word1 结束之后尝试condenate word2 。但是那里没有可访问的内存,因此您会收到分段故障。

Like this

strcpy(ptr, word1);
strcat(ptr, word2);

You need to use ptr for both operations, the copy and the concatenation.

In your version strcat(word1,word2) tries to concatenate word2after the end of word1. But there is no accessible memory there, so you get a segmentation fault.

C风格字符串

书间行客 2025-02-17 17:09:10

好的,第一件事,让您的代码工作似乎只是msgbox并撤出任何日期:

我不确定为什么但是当我运行此行时,VBA不喜欢这条线:

    For Each source_date In source_month.Offset(1, 0).EntireRow

通过使用:代码来代替:

        For Each source_date In source_month.Offset(1, 0).Resize(, 100)

代码似乎要运行良好(在这里我做100列,但您可以轻松地将其更改为更多)

,接下来您正在填充所有日期,而您只需要具有价值的且想要该值的日期,所以我认为您需要一些东西就像:

                For Each rng In source_date.Resize(100, 0)
                    If rng.Interior.Color = RGB(255, 255, 255) Then
                        hoursWorked = rng.Value
                    End If
                Next rng

RNG是一个范围,RGB是总小时数的背景颜色,

将其放在一起:

Public Sub hour_count_update()

Dim wb_source As Worksheet, wb_dest As Worksheet
Dim source_month As Range
Dim source_date As Range
Dim dest_month As Range
Dim rng As Range


Set wb_source = ActiveWorkbook.Worksheets("Sheet19")
Set wb_dest = ActiveWorkbook.Worksheets("Sheet20")
Set dest_month = wb_dest.Cells(wb_dest.Rows.Count, "B").End(xlUp)

wb_dest.Range("A2:C600").Clear 'cancella dati del foglio RiepilogoOre

For Each source_month In wb_source.Range("A1:A600")
    source_month.Select
    If source_month.Interior.Color = RGB(255, 255, 0) Then
        For Each source_date In source_month.Offset(1, 0).Resize(, 100)
            If IsDate(source_date.Value) Then
            
                For Each rng In source_date.Resize(100, 0)
                    If rng.Interior.Color = RGB(255, 255, 255) Then
                        hoursWorked = rng.Value
                    End If
                Next rng
            
            
                MsgBox "It is a date"
                Set dest_month = dest_month.Offset(1)
                    dest_month.Value = source_date.Value
            End If
        Next source_date
    End If
Next source_month

End Sub

我没有测试工作时间,您可以看到我没有对它们做任何事情,

请让我知道如何您继续前进,或者如果我可以帮助更多!

ok so first thing, getting your code to work which seems to just msgbox and pull out any date:

I'm not sure why but when I run this, VBA doesn't enjoy this line:

    For Each source_date In source_month.Offset(1, 0).EntireRow

by replacing that line with:

        For Each source_date In source_month.Offset(1, 0).Resize(, 100)

the code seems to run fine (here i do 100 columns but you can easily change this to more)

Next at the moment you are populating all dates and you only want ones with a value and you want that value so for that I think you'll need something like:

                For Each rng In source_date.Resize(100, 0)
                    If rng.Interior.Color = RGB(255, 255, 255) Then
                        hoursWorked = rng.Value
                    End If
                Next rng

where rng is a range and the RGB is the background colour of the total hours

putting it together you get:

Public Sub hour_count_update()

Dim wb_source As Worksheet, wb_dest As Worksheet
Dim source_month As Range
Dim source_date As Range
Dim dest_month As Range
Dim rng As Range


Set wb_source = ActiveWorkbook.Worksheets("Sheet19")
Set wb_dest = ActiveWorkbook.Worksheets("Sheet20")
Set dest_month = wb_dest.Cells(wb_dest.Rows.Count, "B").End(xlUp)

wb_dest.Range("A2:C600").Clear 'cancella dati del foglio RiepilogoOre

For Each source_month In wb_source.Range("A1:A600")
    source_month.Select
    If source_month.Interior.Color = RGB(255, 255, 0) Then
        For Each source_date In source_month.Offset(1, 0).Resize(, 100)
            If IsDate(source_date.Value) Then
            
                For Each rng In source_date.Resize(100, 0)
                    If rng.Interior.Color = RGB(255, 255, 255) Then
                        hoursWorked = rng.Value
                    End If
                Next rng
            
            
                MsgBox "It is a date"
                Set dest_month = dest_month.Offset(1)
                    dest_month.Value = source_date.Value
            End If
        Next source_date
    End If
Next source_month

End Sub

I haven't tested the hours worked bit and you can see I haven't done anything with them

Please let me know how you get on or if I can help more!

将值从一个工作簿复制到另一个工作簿

书间行客 2025-02-17 07:31:26

我认为最好的方法应该是在数据库中设置 product_type 字段,并为您的前端元素创建条件显示。

详细说明,您应该为产品和服务类型创建前端。您可以在服务时隐藏产品的前端元素,反之亦然。

I think the best way should be to set up a product_type field in the database and create conditional displays for your front-end elements.

In detail, you should create the front-end for both product and service types. You hide the front-end elements for products when it's a service and vice versa.

在Bubble.io上辨别两个项目的最佳方法

书间行客 2025-02-16 17:49:29

似乎不可能。

但是您可以直接在此处的路线上写组件。

{path:'/*', name:'404', component: function(){window.location.href="http://sf.gg"}}

It seems impossible.

But you can write components directly in the route here.

{path:'/*', name:'404', component: function(){window.location.href="http://sf.gg"}}

VUE路由如何使404页跳到外部站点?

书间行客 2025-02-16 17:00:32
List<Integer>results2=new ArrayList<>();
    for (int result : results) {
        results2.add(result);
    }
    System.out.println("Minimum: " + Collections.min(results2));
    System.out.println("Maximum: " + Collections.max(results2));
    System.out.println("Amount of elements: " + results2.size());
List<Integer>results2=new ArrayList<>();
    for (int result : results) {
        results2.add(result);
    }
    System.out.println("Minimum: " + Collections.min(results2));
    System.out.println("Maximum: " + Collections.max(results2));
    System.out.println("Amount of elements: " + results2.size());

在Java中打印最大,最小和弹出量和数组

书间行客 2025-02-16 12:20:08

使用此插件 imei_plugin: ^1.2.0

在Android 10中获取Android设备的IMEI(国际移动设备身份),而Android的运行时许可则少于Android 10 iOS唯一标识应用程序提供商设备的字母数字字符串。

import 'package:imei_plugin/imei_plugin.dart';


String imei = await ImeiPlugin.getImei();
List<String> multiImei = await ImeiPlugin.getImeiMulti(); //for double-triple SIM phones
String uuid = await ImeiPlugin.getId();


String platformImei = await ImeiPlugin
    .getImei( shouldShowRequestPermissionRationale: false );

Use this plugin imei_plugin: ^1.2.0

Get IMEI (International Mobile Device Identity) for Android devices less than android 10 with runtime permission for android greater than or equal to 10 returns a UUID and get unique identification on ios An alphanumeric string that uniquely identifies a device for the application provider.

import 'package:imei_plugin/imei_plugin.dart';


String imei = await ImeiPlugin.getImei();
List<String> multiImei = await ImeiPlugin.getImeiMulti(); //for double-triple SIM phones
String uuid = await ImeiPlugin.getId();


String platformImei = await ImeiPlugin
    .getImei( shouldShowRequestPermissionRationale: false );

如何在Android 10及更高版本中获取序列号和IMEI号

书间行客 2025-02-15 21:47:19

您需要选择所有 parent 元素,然后迭代每个元素。
有两种类型的文章,最小的和10最小的文章。
在那里您有一些示例代码:

from bs4 import BeautifulSoup
import requests

page = requests.get("https://www.forexcrunch.com/category/forex-weekly-outlook/gbp-usd-outlook/page/24/")
soup = BeautifulSoup(page.content, 'html.parser')

big_article = soup.find("div", class_='col-sm-12 col-md-6')
title = big_article.find("div", class_="post-detail").find("h5")
print("Title: " + title.text)
print("Link: " + title.find("a")["href"])
author_year = big_article.find("div", class_="post-author")
print("Author: " + author_year.find("a").text)
print("Date: " + author_year.find_all("li")[-1].text)
print("---------------------")

all_articles = soup.find_all("div", class_='col-sm-12 col-md-3')
for article in all_articles:
    title_author_link = article.find("div", class_="post-detail").find_all("a")
    print("Title: " + title_author_link[0].text)
    print("Link: " + title_author_link[0]["href"])
    print("Author: " + title_author_link[1].text)
    print("Date: " + article.find_all("li")[-1].text)
    print("---------------------")

输出:

Title: GBP/USD Forecast May 22-26
Link: https://www.forexcrunch.com/gbpusd-forecast-may-22-26/
Author: Kenny Fisher
Date: 5 years
---------------------
Title: GBP/USD Forecast May 15-19
Link: https://www.forexcrunch.com/gbpusd-forecast-may-15-19/
Author: Kenny Fisher
Date: 5 years
---------------------

希望我能够为您提供帮助。

You need to select all parent elements and after iterate each of them.
There are 2 types of articles, big one and 10 smallest.
There you have some example code:

from bs4 import BeautifulSoup
import requests

page = requests.get("https://www.forexcrunch.com/category/forex-weekly-outlook/gbp-usd-outlook/page/24/")
soup = BeautifulSoup(page.content, 'html.parser')

big_article = soup.find("div", class_='col-sm-12 col-md-6')
title = big_article.find("div", class_="post-detail").find("h5")
print("Title: " + title.text)
print("Link: " + title.find("a")["href"])
author_year = big_article.find("div", class_="post-author")
print("Author: " + author_year.find("a").text)
print("Date: " + author_year.find_all("li")[-1].text)
print("---------------------")

all_articles = soup.find_all("div", class_='col-sm-12 col-md-3')
for article in all_articles:
    title_author_link = article.find("div", class_="post-detail").find_all("a")
    print("Title: " + title_author_link[0].text)
    print("Link: " + title_author_link[0]["href"])
    print("Author: " + title_author_link[1].text)
    print("Date: " + article.find_all("li")[-1].text)
    print("---------------------")

OUTPUT:

Title: GBP/USD Forecast May 22-26
Link: https://www.forexcrunch.com/gbpusd-forecast-may-22-26/
Author: Kenny Fisher
Date: 5 years
---------------------
Title: GBP/USD Forecast May 15-19
Link: https://www.forexcrunch.com/gbpusd-forecast-may-15-19/
Author: Kenny Fisher
Date: 5 years
---------------------

I hope I have been able to help you.

简单的网络刮擦

更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

更多

友情链接

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