小编D. *_*Rao的帖子

列出与 Helm 部署或 Chart 相关的所有 Kubernetes 资源

我使用部署了一个 Helm Chart helm install,之后我想查看与此部署相关的 pod/services/cms 是否已启动或失败。有办法看到这个吗?

使用kubectl get pods和 grep 查找该名称是有效的,但它不会显示部署此 Helm Chart 时部署的服务和其他资源。

kubernetes kubectl kubernetes-helm

26
推荐指数
3
解决办法
4万
查看次数

java.io.FileNotFoundException,打开失败:ENOENT

出于某种原因,我在fileNotFoundException阅读时都得到了一个.值得注意的是Toast打印"File exists!".我使用BufferedReader底部来测试文件的内容是否正确.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_calendar, container, false);

    recipes = new ArrayMap<>();
    filename = "calendar_recipes.txt";

    bText= (EditText) v.findViewById(R.id.bEditText);
    lText= (EditText) v.findViewById(R.id.lEditText);
    dText= (EditText) v.findViewById(R.id.dEditText);

    cal = (CalendarView) v.findViewById(R.id.calendarView);
    date = cal.getDate();


    File file = getActivity().getFileStreamPath(filename);

    if(file.exists())
    {
        Toast.makeText(getActivity(), "File exists!", Toast.LENGTH_SHORT).show();
        try
        {
            FileInputStream fileInputStream = new FileInputStream(getActivity().getFilesDir()+filename);
            ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream);
            Map recipes = (Map)objectInputStream.readObject();
        }
        catch(ClassNotFoundException | IOException | ClassCastException e) {
            e.printStackTrace(); …
Run Code Online (Sandbox Code Playgroud)

java android filenotfoundexception

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

如何在不更改pandas中的其他列的情况下对一列进行排序?

示例:当前df如下所示:

    df=
    A B
    1 5
    2 6
    3 8
    4 1
Run Code Online (Sandbox Code Playgroud)

我希望得到的df是这样的(B被排序,A保持不变):

    df=
    A B
    1 8
    2 6
    3 5
    4 1
Run Code Online (Sandbox Code Playgroud)

python sorting dataframe pandas

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