一身仙ぐ女味

文章 评论 浏览 27

一身仙ぐ女味 2025-02-20 20:26:08
const sourceObj = {
  test1: "a",
  test2: "b",
  test3: "c",
  test4: "d",
  test5: "e"
};

const myTable = [];

for(item in sourceObj){
  myTable.push(
    {
      foo : "foo",
      year : sourceObj[item],
      bar : "bar"
    }
  );
}

console.log(myTable);

const sourceObj = {
  test1: "a",
  test2: "b",
  test3: "c",
  test4: "d",
  test5: "e"
};

const myTable = [];

for(item in sourceObj){
  myTable.push(
    {
      foo : "foo",
      year : sourceObj[item],
      bar : "bar"
    }
  );
}

console.log(myTable);

如何迭代对象并动态分配值

一身仙ぐ女味 2025-02-20 18:16:23

没有更多的代码/类型,我无法让您的榜样工作,因此我稍微更改了该方法,并且可能无法完全回答问题。将Mergemap与MergeAll和阵列一起提供嵌套结构。

  setTools() {
    return this.getTools().pipe(
      mergeAll(),
      mergeMap(tool =>
        this.getFeatures(tool.id).pipe(
          mergeAll(),
          mergeMap(feature=>
             this.getViews(feature.id).pipe(
                 map((views) => ({...feature, views }))
             )
          ),
          toArray(),
          map((features)=>({...tool, features}))
        )
      ),
      toArray(),
    );
  }

请参阅Stackblitz: https://stackblitz.com/edit/angular-ivy-ee1myv?file=src/app/app/app/app.component.ts

I could not get your example to work without more code/types, so I've changed the approach slightly and might not answer the question completely. Using mergeMap with mergeAll and to Array gives the nested structure.

  setTools() {
    return this.getTools().pipe(
      mergeAll(),
      mergeMap(tool =>
        this.getFeatures(tool.id).pipe(
          mergeAll(),
          mergeMap(feature=>
             this.getViews(feature.id).pipe(
                 map((views) => ({...feature, views }))
             )
          ),
          toArray(),
          map((features)=>({...tool, features}))
        )
      ),
      toArray(),
    );
  }

See stackblitz: https://stackblitz.com/edit/angular-ivy-ee1myv?file=src/app/app.component.ts

嵌套合并组合组合

一身仙ぐ女味 2025-02-20 13:50:44

我建议 pystdf

从我的经验来看,该库完全没有错误,尽管大文件的性能有些慢。而且您仍然必须理解和整理所有记录以进行数据分析目的。

在下面使用示例(此片段将多个STDF文件读取到每种记录类型的PANDAS DataFrames中)。

import os
import pandas as pd
from io import StringIO
import pystdf.V4 as v4
from pystdf.IO import Parser
from pystdf.Writers import TextWriter


def stdf_to_dfs(filelist):
    ''' Takes a list of stdf files, and returns individual dataframes for each record type, separated per file.
    Also, prepends the line number from the atdf (as well as the source file).'''

    record_dfs = {}
    for file in filelist:
        filename = os.path.basename(file)
        p = Parser(inp=open(file, 'rb'))
        captured_std_out = StringIO()
        p.addSink(TextWriter(captured_std_out))
        p.parse()
        atdf = captured_std_out.getvalue()

        # prepend line number and source file name to captured_std_out so it can be sorted later
        # line number is 2nd field... 1st field is record_type
        atdf = atdf.split('\n')
        for n, l in enumerate(atdf):
            atdf[n] = l[:4] + str(n) + '|' + filename + '|' + l[4:]

        # read each record type into a seperate dataframe
        for record_type in v4.records:
            record_name = record_type.name.split('.')[-1].upper()
            curr = [line for line in atdf if line.startswith(record_name)]
            curr = '\n'.join(curr)
            if curr not in '':
                header_names = ['Record', 'LineNum', 'SourceFile'] + list(list(zip(*record_type.fieldMap))[0])
                if record_name not in record_dfs:
                    record_dfs[record_name] = pd.DataFrame()
                record_dfs[record_name] = pd.concat([record_dfs[record_name], pd.read_csv(
                    StringIO(curr), header=None, names=header_names, delimiter='|')])

    # drop empty record dataframes
    record_dfs = {k: v for k, v in record_dfs.items() if (v is not None)}

    return record_dfs

I suggest pystdf.

From my experience, that library is completely bug-free although the performance is somewhat slow on big files. And you'll still have to understand and sort through all the records for data analysis purposes.

Sample use below (this snippet reads multiple stdf files into pandas dataframes for each record type).

import os
import pandas as pd
from io import StringIO
import pystdf.V4 as v4
from pystdf.IO import Parser
from pystdf.Writers import TextWriter


def stdf_to_dfs(filelist):
    ''' Takes a list of stdf files, and returns individual dataframes for each record type, separated per file.
    Also, prepends the line number from the atdf (as well as the source file).'''

    record_dfs = {}
    for file in filelist:
        filename = os.path.basename(file)
        p = Parser(inp=open(file, 'rb'))
        captured_std_out = StringIO()
        p.addSink(TextWriter(captured_std_out))
        p.parse()
        atdf = captured_std_out.getvalue()

        # prepend line number and source file name to captured_std_out so it can be sorted later
        # line number is 2nd field... 1st field is record_type
        atdf = atdf.split('\n')
        for n, l in enumerate(atdf):
            atdf[n] = l[:4] + str(n) + '|' + filename + '|' + l[4:]

        # read each record type into a seperate dataframe
        for record_type in v4.records:
            record_name = record_type.name.split('.')[-1].upper()
            curr = [line for line in atdf if line.startswith(record_name)]
            curr = '\n'.join(curr)
            if curr not in '':
                header_names = ['Record', 'LineNum', 'SourceFile'] + list(list(zip(*record_type.fieldMap))[0])
                if record_name not in record_dfs:
                    record_dfs[record_name] = pd.DataFrame()
                record_dfs[record_name] = pd.concat([record_dfs[record_name], pd.read_csv(
                    StringIO(curr), header=None, names=header_names, delimiter='|')])

    # drop empty record dataframes
    record_dfs = {k: v for k, v in record_dfs.items() if (v is not None)}

    return record_dfs

如何将数据从STDF文件传输到Python中的Pandas DataFrame

一身仙ぐ女味 2025-02-20 11:18:50

一种方法是使用 set.isdisjoint 。请注意,这仅在您的元素是可用的(整数)时才有效。

arr = [2, 5, 7]
if not {1, 2, 3}.isdisjoint(arr):
    print("true")
else: 
    print("false")

正如其他答案所说,您无法轻松地制作在这里做您想做的事。

One way to do this is with set.isdisjoint. Note that this only works if your elements are hashable (which integers are).

arr = [2, 5, 7]
if not {1, 2, 3}.isdisjoint(arr):
    print("true")
else: 
    print("false")

As the other answer has said, you can't easily make or do what you want here.

有没有办法告诉Python停止短路评估?

一身仙ぐ女味 2025-02-20 03:45:00

有一个通过nuget安装的库, spectre.console.console.console ,如果您了解如何与简单的类一起工作,这会使生活更轻松。

Spectre.Console软件包已安装后,您需要使用语句使用Spectre.Console; for All类使用以下。关于课程,我只为员工模型做了三个属性,如果对此解决方案感兴趣,则需要添加其余属性。如果您被卡住了,请参见

从代表菜单项的模型/类开始

public class MenuItem
{
    public int Id { get; set; }
    public string Text { get; set; }
    public override string ToString() => Text;

}

介绍菜单

public class MenuOperations
{
    public static SelectionPrompt<MenuItem> MainMenu()
    {
        SelectionPrompt<MenuItem> menu = new()
        {
            HighlightStyle = new Style(
                Color.DodgerBlue1, 
                Color.Black, 
                Decoration.None)
        };

        menu.Title("Select an [B]option[/]");
        menu.AddChoices(new List<MenuItem>()
        {
            new MenuItem() {Id = 0, Text = "List employees"},
            new MenuItem() {Id = 1, Text = "Add manager"},
            new MenuItem() {Id = 2, Text = "Add Engineer"},
            new MenuItem() {Id = 3, Text = "Delete"},
            new MenuItem() {Id = -1, Text = "Exit"},
        });

        return menu;
    }
}

创建一个类,用于在program.cs中 主代码。遵循这种模式,有一条清晰的途径来处理各种操作和退出。

class Program
{
    static void Main(string[] args)
    {
        MenuItem menuItem = new MenuItem();

        List<Employee> EmployeesList = new List<Employee>();

        while (menuItem.Id > -1)
        {

            AnsiConsole.Clear();
            menuItem = AnsiConsole.Prompt(MenuOperations.MainMenu());
            switch (menuItem.Id)
            {
                case 0:
                    Operations.List(EmployeesList);
                    break;
                case 1:
                    Console.WriteLine("Add manager");
                    EmployeesList.Add(Operations.AddEmployee());
                    break;
                case 2:
                    Console.WriteLine("Add Engineer");
                    Console.ReadLine();
                    break;
                case 3:
                    Console.WriteLine("Delete");
                    Console.ReadLine();
                    break;
            }
        }
    }
}

要了解如何处理添加新项目并在列表中列出项目以下代码显示如何。

  • 首先和姓氏不能为空的,提示在那里留在那里。您可以添加一条验证消息(请参阅文档)
  • 薪水必须是双重的,

因此您有一些简单的验证。

public class Operations
{

    public static Employee AddEmployee()
    {
        Employee employee = new Employee
        {
            FirstName = GetFirstName(),
            LastName = GetLastName(),
            Salary = GetSalary()
        };

        return employee;
    }

    public static string GetFirstName() =>
        AnsiConsole.Prompt(
            new TextPrompt<string>("[white]First name[/]?")
                .PromptStyle("yellow")
                .ValidationErrorMessage("[red]Please enter your first name[/]"));

    public static string GetLastName() =>
        AnsiConsole.Prompt(
            new TextPrompt<string>("[white]Last name[/]?")
                .PromptStyle("yellow")
                .ValidationErrorMessage("[red]Please enter your last name[/]"));

    public static double GetSalary() =>
        AnsiConsole.Prompt(
            new TextPrompt<double>("[white]Salary[/]?")
                .PromptStyle("yellow")
                .ValidationErrorMessage("[red]Please enter salary (numbers only)[/]"));

    public static void List(List<Employee> list)
    {
        if (list.Count == 0)
        {
            AnsiConsole.MarkupLine("Nothing is list, press [b]ENTER[/] to return to menu");
            Console.ReadLine();
            return;
        }

        var table = new Table()
            .RoundedBorder()
            .AddColumn("[b]First[/]")
            .AddColumn("[b]Last[/]")
            .AddColumn("[b]Salary[/]")
            .Alignment(Justify.Center)
            .BorderColor(Color.LightSlateGrey)
            .Title("[yellow]Employee list[/]");

        foreach (var employee in list)
        {
            table.AddRow(employee.FirstName, employee.LastName, employee.Salary.ToString("C"));
        }

        AnsiConsole.Write(table);
        AnsiConsole.MarkupLine("Press [b]ENTER[/] to return to menu");
        Console.ReadLine();
    }
}

某些屏幕截图

There is a library installed via NuGet, Spectre.Console which makes life easier if you understand how to work with simple classes.

Once the Spectre.Console package has been installed you need the following using statement using Spectre.Console; for all classes. In regard to classes I only did three properties for the Employee model, you need to add the remaining properties if interest in this solution. If you get stuck, see full source but for learning try not to use that code.

Start off with a model/class which represents menu items

public class MenuItem
{
    public int Id { get; set; }
    public string Text { get; set; }
    public override string ToString() => Text;

}

Create a class for presenting the menu

public class MenuOperations
{
    public static SelectionPrompt<MenuItem> MainMenu()
    {
        SelectionPrompt<MenuItem> menu = new()
        {
            HighlightStyle = new Style(
                Color.DodgerBlue1, 
                Color.Black, 
                Decoration.None)
        };

        menu.Title("Select an [B]option[/]");
        menu.AddChoices(new List<MenuItem>()
        {
            new MenuItem() {Id = 0, Text = "List employees"},
            new MenuItem() {Id = 1, Text = "Add manager"},
            new MenuItem() {Id = 2, Text = "Add Engineer"},
            new MenuItem() {Id = 3, Text = "Delete"},
            new MenuItem() {Id = -1, Text = "Exit"},
        });

        return menu;
    }
}

Main code in Program.cs. Following this pattern there is a clear cut path to handling various operations and exiting.

class Program
{
    static void Main(string[] args)
    {
        MenuItem menuItem = new MenuItem();

        List<Employee> EmployeesList = new List<Employee>();

        while (menuItem.Id > -1)
        {

            AnsiConsole.Clear();
            menuItem = AnsiConsole.Prompt(MenuOperations.MainMenu());
            switch (menuItem.Id)
            {
                case 0:
                    Operations.List(EmployeesList);
                    break;
                case 1:
                    Console.WriteLine("Add manager");
                    EmployeesList.Add(Operations.AddEmployee());
                    break;
                case 2:
                    Console.WriteLine("Add Engineer");
                    Console.ReadLine();
                    break;
                case 3:
                    Console.WriteLine("Delete");
                    Console.ReadLine();
                    break;
            }
        }
    }
}

To get an idea how to handle adding a new item and listing items in the list the following code shows how.

  • First and last name can not be empty else the prompt stays there. You can add a validation message (see the docs)
  • Salary must be a double

With the above in mind you have some simple validation.

public class Operations
{

    public static Employee AddEmployee()
    {
        Employee employee = new Employee
        {
            FirstName = GetFirstName(),
            LastName = GetLastName(),
            Salary = GetSalary()
        };

        return employee;
    }

    public static string GetFirstName() =>
        AnsiConsole.Prompt(
            new TextPrompt<string>("[white]First name[/]?")
                .PromptStyle("yellow")
                .ValidationErrorMessage("[red]Please enter your first name[/]"));

    public static string GetLastName() =>
        AnsiConsole.Prompt(
            new TextPrompt<string>("[white]Last name[/]?")
                .PromptStyle("yellow")
                .ValidationErrorMessage("[red]Please enter your last name[/]"));

    public static double GetSalary() =>
        AnsiConsole.Prompt(
            new TextPrompt<double>("[white]Salary[/]?")
                .PromptStyle("yellow")
                .ValidationErrorMessage("[red]Please enter salary (numbers only)[/]"));

    public static void List(List<Employee> list)
    {
        if (list.Count == 0)
        {
            AnsiConsole.MarkupLine("Nothing is list, press [b]ENTER[/] to return to menu");
            Console.ReadLine();
            return;
        }

        var table = new Table()
            .RoundedBorder()
            .AddColumn("[b]First[/]")
            .AddColumn("[b]Last[/]")
            .AddColumn("[b]Salary[/]")
            .Alignment(Justify.Center)
            .BorderColor(Color.LightSlateGrey)
            .Title("[yellow]Employee list[/]");

        foreach (var employee in list)
        {
            table.AddRow(employee.FirstName, employee.LastName, employee.Salary.ToString("C"));
        }

        AnsiConsole.Write(table);
        AnsiConsole.MarkupLine("Press [b]ENTER[/] to return to menu");
        Console.ReadLine();
    }
}

Some screenshots

enter image description here

从用户输入和打印列表中添加项目到控制台

一身仙ぐ女味 2025-02-20 03:38:32

您忘了将 Enctype =“ Multipart/form-data” 放在表单标签中。文件只能与该编码一起以表格附加。

  <form action="handler-att.php" method="post" enctype= "multipart/form-data">

You forgot to put the enctype="multipart/form-data" in the form tag. Files can only be attached in forms with that encoding.

  <form action="handler-att.php" method="post" enctype= "multipart/form-data">

phpmailer文件上传的问题是什么?

一身仙ぐ女味 2025-02-19 15:32:24

如果您使用:

Arch -X86_64 POD安装

您应该将其更改为:

POD安装

之后,您不需要将排除的架构更改为 ARM64

if you installed your pod using:

arch -x86_64 pod install

you should change it to:

pod install

after doing that you don not need to change your Excluded Architecture to arm64

找不到模块&#x27;翠鸟&#x27;对于目标&#x86_64-apple-ios-simulator&#x27;

一身仙ぐ女味 2025-02-19 08:58:37

尝试此更改:

Runner.path("classpath:features")
    .tags(Arrays.asList("@tag1,@tag2", "@ignore"))
    .outputCucumberJson(true)
    .backupReportDir(false)
    .parallel(5);

有关更多信息: https://stackoverflow.com/a/66685944/143475

Try this change:

Runner.path("classpath:features")
    .tags(Arrays.asList("@tag1,@tag2", "@ignore"))
    .outputCucumberJson(true)
    .backupReportDir(false)
    .parallel(5);

For further info: https://stackoverflow.com/a/66685944/143475

空手道 - 两种测试的结果AREN&#x27; t在将版本从0.9.3升级到1.2.0之后再合并了

一身仙ぐ女味 2025-02-19 05:13:07

您可以实现这一目标的一种方法是使用缩放术曲curvedanimation 。以下是一个简单的示例。

当用户点击图标时,我会更改图标的外观,以便显示最新的状态(活动/不活动),并且使其更小一些。当这种过渡结束时,我再次使图标重大。这类似于按下按钮在现实世界中的行为。我希望这就是您的想法。

class LikeButton extends StatefulWidget {
  const LikeButton({Key? key}) : super(key: key);

  @override
  State<LikeButton> createState() => _LikeButtonState();
}

class _LikeButtonState extends State<LikeButton>
    with SingleTickerProviderStateMixin {
  late final AnimationController _controller = AnimationController(
      duration: const Duration(milliseconds: 200), vsync: this, value: 1.0);

  bool _isFavorite = false;

  @override
  void dispose() {
    super.dispose();
    _controller.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        setState(() {
          _isFavorite = !_isFavorite;
        });
        _controller
            .reverse()
            .then((value) => _controller.forward());
      },
      child: ScaleTransition(
        scale: Tween(begin: 0.7, end: 1.0).animate(
            CurvedAnimation(parent: _controller, curve: Curves.easeOut)),
        child: _isFavorite
            ? const Icon(
          Icons.favorite,
          size: 30,
          color: Colors.red,
        )
            : const Icon(
          Icons.favorite_border,
          size: 30,
        ),
      ),
    );
  }
}

One way you can achieve this is by using ScaleTransition and a CurvedAnimation. Below is a simple example.

When the user taps the icon, I change the look of the icon so it shows the latest state (active/not active) and I make it a little smaller. When this transition ends I make the icon big again. This is similar to how a button behaves in the real world when you press it. I hope this is what you had in mind.

class LikeButton extends StatefulWidget {
  const LikeButton({Key? key}) : super(key: key);

  @override
  State<LikeButton> createState() => _LikeButtonState();
}

class _LikeButtonState extends State<LikeButton>
    with SingleTickerProviderStateMixin {
  late final AnimationController _controller = AnimationController(
      duration: const Duration(milliseconds: 200), vsync: this, value: 1.0);

  bool _isFavorite = false;

  @override
  void dispose() {
    super.dispose();
    _controller.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        setState(() {
          _isFavorite = !_isFavorite;
        });
        _controller
            .reverse()
            .then((value) => _controller.forward());
      },
      child: ScaleTransition(
        scale: Tween(begin: 0.7, end: 1.0).animate(
            CurvedAnimation(parent: _controller, curve: Curves.easeOut)),
        child: _isFavorite
            ? const Icon(
          Icons.favorite,
          size: 30,
          color: Colors.red,
        )
            : const Icon(
          Icons.favorite_border,
          size: 30,
        ),
      ),
    );
  }
}

在颤动中如何像按钮一样动画

一身仙ぐ女味 2025-02-18 17:02:37

空手道1.0对报告系统进行了大修,并进行了以下关键更改。

  • Runner 完成后,您可以按摩结果,甚至可以重新尝试一些测试,
  • 您可以注入自定义的HTML报告渲染器,

这将需要您介绍详细信息(其中一些尚未记录在案)和编写一些Java代码。如果这不是一个选择,则必须考虑到您的要求是空手道不支持的。

如果您愿意走这条路,这是您需要开始的链接。

a)呈现报告之前如何“发布过程”结果数据的示例: retrytest.java ,另请参见 https://stackoverflow.com/a/a/67971681/143475

b)b)负责“可插拔”报告的代码,您可以在其中实现新的 suetereports < /a>理论上。在 Runner 中,有一个 suitereports()您可以调用以提供您的实现。

另请注意,有一个实验性的“ DOC”关键字,您可以将自定义的HTML注入测试报告: https://twitter.com/getkarate/status/133889292932691070976

另请参见:

Karate 1.0 has overhauled the reporting system with the following key changes.

  • after the Runner completes you can massage the results and even re-try some tests
  • you can inject a custom HTML report renderer

This will require you to get into the details (some of this is not documented yet) and write some Java code. If that is not an option, you have to consider that what you are asking for is not supported by Karate.

If you are willing to go down that path, here are the links you need to get started.

a) Example of how to "post process" result-data before rendering a report: RetryTest.java and also see https://stackoverflow.com/a/67971681/143475

b) The code responsible for "pluggable" reports, where you can implement a new SuiteReports in theory. And in the Runner, there is a suiteReports() method you can call to provide your implementation.

Also note that there is an experimental "doc" keyword, by which you can inject custom HTML into a test-report: https://twitter.com/getkarate/status/1338892932691070976

Also see: https://twitter.com/KarateDSL/status/1427638609578967047

如何在黄瓜报告中添加选项以删除具有一定标签的方案

一身仙ぐ女味 2025-02-18 09:33:07

您可以尝试将param传递到 api ,可以帮助您从其他位置获得 weastelid ,包括 useparams

export const api = async (vesselId) => {
  try {
    const res = await axios.get(
      // here
      `http://127.0.0.1:8000/api/maintenance/${vesselId}`
    );
    return res.data;
  } catch (error) {
    console.log(error);
  }
};

这就是我们如何称呼它的

const vesselId = useParams();
api(vesselId);

You can try to pass a param to api that would help you have vesselId from other places including useParams

export const api = async (vesselId) => {
  try {
    const res = await axios.get(
      // here
      `http://127.0.0.1:8000/api/maintenance/${vesselId}`
    );
    return res.data;
  } catch (error) {
    console.log(error);
  }
};

Here is how we call it

const vesselId = useParams();
api(vesselId);

USEPARAM外部反应组件

一身仙ぐ女味 2025-02-18 02:01:47

如果您希望红色触摸蓝色组合时具有连锁反应,则可以使用共享的 Interactionsource 来触发不同组合的交互,

// 

If you want red one to have ripple effect when you touch blue Composable you can use a shared InteractionSource to trigger interaction for different composables

// ???? This interaction source is set by inner composable to trigger ripple on outer one
val interactionSource = MutableInteractionSource()
val coroutineScope = rememberCoroutineScope()

Box(
    modifier = Modifier.fillMaxSize(),
    contentAlignment = Alignment.Center
) {
    Surface(
        modifier = Modifier
            .size(200.dp)
            .clickable(
                interactionSource = interactionSource,
                indication = rememberRipple(),
                onClick = {

                }

            ),
        color = Color.Red
    ) {}
    Surface(
        modifier = Modifier
            .size(50.dp)
            .clickable {
                coroutineScope.launch {
                    val press = PressInteraction.Press(Offset.Zero)
                    interactionSource.emit(
                        press
                    )
                    interactionSource.emit(
                        PressInteraction.Release(press)
                    )
                }
            },
        color = Color.Blue
    ) {}
}

The issue you will get here with blue Composable's ripple is it will start from Offset.Zero. You can set center of blue Composable manually. I don't know if there is a way to get exact position of press from InteractionSource or Interaction.

如何单击JetPack组成的任何组件背后的组件?

一身仙ぐ女味 2025-02-17 01:11:34

解决方案是在创建托管的Kubernetes群集时不启用“私人网络”(“RéseauPrivéstacté”)。

如果您已经付费了节点或配置的DNS或其他任何内容,则可以选择当前的Kubernetes群集,然后选择“重置您的群集”(“Réinitialiservotre cluster”),然后选择“保留和重新安装节点”(“ Conserver etréinstallerles noeuds noeuds noeuds noeuds ”)和在“私人网络附件”(“réseauprivéstacté”)选项中,选择“无(public ips)”(“ aucun(ips publiques)”),

我面临相同的用例和问题,以及经过一些研究,然后进行了一些研究和问题。实验,从这个对话框上的小评论中得到了提示:

默认情况下,您的工人节点具有公共IPv4。如果您选择一个专用网络,这些节点的公共IP将专门用于管理/链接到Kubernetes控制平面,您的节点将在您选择的专用网络的VLAN上分配一个IP

>

现在我得到了我的Traefikikik使用 hostnetwork 作为登录作为登录,即使在低端口上也可以直接到达(如您所见,默认安全组是打开的)

The solution is to NOT enable "Private network attached" ("réseau privé attaché") when you create the managed Kubernetes cluster.

If you already paid your nodes or configured DNS or anything, you can select your current Kubernetes cluster, and select "Reset your cluster" ("réinitialiser votre cluster"), and then "Keep and reinstall nodes" ("conserver et réinstaller les noeuds") and at the "Private network attached" ("Réseau privé attaché") option, choose "None (public IPs)" ("Aucun (IPs publiques)")

I faced the same use case and problem, and after some research and experimentation, got the hint from the small comment on this dialog box:

By default, your worker nodes have a public IPv4. If you choose a private network, the public IPs of these nodes will be used exclusively for administration/linking to the Kubernetes control plane, and your nodes will be assigned an IP on the vLAN of the private network you have chosen

Now i got my Traefik ingress as a DaemonSet using hostNetwork and every node is reachable directly even on low ports (as you saw yourself, the default security group is open)

可以在OVH托管Kubernetes群集中访问nodeport服务

一身仙ぐ女味 2025-02-16 22:43:20

您可能应该在tileMap渲染器中使用层的顺序,并将其设置为负值。对不起,如果它不起作用,我对Unity是新手。

You should probably use the order in layer in the tilemap renderer and set it to a negative value.Im sorry if it doesnt work I am new to unity.

TILEMAP覆盖浮动文本Unity 2D

一身仙ぐ女味 2025-02-16 17:55:30

我认为您应该使用Apache Spark流

  1. 通过Spark流从Kafka使用此读取数据,
  2. 在Spark中执行聚合/转换
  3. 将消毒数据推入所需的下游主题,

我不确定是否可以在Kafka中完成此操作

I think you should use Apache Spark streaming to use this

  1. Read data from Kafka through spark streaming
  2. Perform aggregations/transformations in spark
  3. Push the sanitized data into desired downstream topics

I am not sure if this can be done in Kafka

驱逐KAFKA钥匙值状态商店的数据

更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

更多

友情链接

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