小编Jos*_*osh的帖子

无法安装 mono-gmcs 包

我尝试在运行 Kali Linux 的虚拟机上安装 mono-gmcs 软件包,但收到输出

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mono-gmcs : Depends: mono-mcs (= 3.12.1-0xamarin1) but 4.0.4.1-0xamarin1 is to be installed
E: Unable to correct problems, you have held …
Run Code Online (Sandbox Code Playgroud)

linux mono

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

如何在限制行数的同时拆分 Pyspark 数据框?

我正在将数据从数据帧发送到限制为 50,000 行的 API。假设我的数据帧有 70,000 行,如何将其拆分为单独的数据帧,每个数据帧的最大行数为 50,000?这些不必是偶数,并且数据顺序并不重要。

apache-spark pyspark

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

在单独的线程中运行进程,以便其余的Java FX应用程序可用?

我目前正在创建一个Java应用程序,其中包含使用Java FX创建的UI.我的应用程序界面分为三个单独的选项卡.在第一个选项卡上,我有很多按钮可以启动其他应用程序.我的目标是让用户按特定顺序启动这些应用程序,因此在上一个应用程序的进程完成之前,后续按钮被禁用,然后启用它们.我通过使用线条完成了这一点

Process p = Runtime.getRuntime().exec(application);
p.waitFor();
Run Code Online (Sandbox Code Playgroud)

然后控制器启用界面中的下一个按钮.启动的应用程序运行时出现问题.由于我的应用程序等待进程结束,任务管理器显示我的Java应用程序没有响应,并且您无法导航到其他选项卡.当然,当启动的应用程序完成后,我的应用程序正常运行.

我认为这是由于主线程被阻塞,因为它正在等待一个进程完成.最好的解决方案是在单独的线程上运行此进程,以便在等待已启动的进程完成时,应用程序的其余部分是否可用?

java multithreading javafx

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

用Java创建"paint"应用程序

我有一个数组列表,跟踪"点",并使用数组来跟踪不同的大小.通过mouseWheelListener更改大小,并将更改保存在该数组中.但是由于某些原因,所有的点都被调整大小,这不是我想要的.在经历了几次之后,一切看起来都应该有效但我必须错过一些简单的东西.我的代码如下.

//********************************************************************
//  DotsPanel.java           
//  Represents the primary panel for the Dots program.
//********************************************************************

import java.util.ArrayList;

import javax.swing.JPanel;

import java.awt.*;
import java.awt.event.*;

public class DotsPanel extends JPanel
{
    private int SIZE = 10;  // radius of each dot
    private int[] dotSizes = new int[10000];
    int i = 0;

    private ArrayList<Point> pointList;

    //-----------------------------------------------------------------
    //  Constructor: Sets up this panel to listen for mouse events.
    //-----------------------------------------------------------------
    public DotsPanel()
    {
        pointList = new ArrayList<Point>();

        addMouseListener (new DotsListener());
        addMouseMotionListener(new DotsListener());
        addMouseWheelListener(new DotsListener());

        setBackground(Color.red);
        setPreferredSize(new …
Run Code Online (Sandbox Code Playgroud)

java swing paint

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

标签 统计

java ×2

apache-spark ×1

javafx ×1

linux ×1

mono ×1

multithreading ×1

paint ×1

pyspark ×1

swing ×1