小编Waq*_*qas的帖子

什么是整数的最佳压缩算法?

我想要一个随机数列表的最佳压缩算法.

列表示例:

224.19
225.57
226.09
222.74
222.20
222.11
223.14
540.56
538.96
540.14
540.44
336.45
338.47
340.78
156.73
160.02
158.56
156.23
55.08
56.33
54.88
53.45
Run Code Online (Sandbox Code Playgroud)

我可以跳过小数部分.我有很多数字列表,就像上面给出的例子一样,这就是它需要被压缩的原因.

你能推荐什么吗?

compression algorithm data-compression

4
推荐指数
2
解决办法
1022
查看次数

文件路径问题:/ -> \

            // Dividend Limit check or increase the Dividend
        if (dival == 10) {
            writer.println("Divident has reached it Limit !");
            i++;
            // update the file name
            String upath = "channel_" + i;
            System.out.println(path);
            // find channel_1 and replace with the updated path
            if (path.contains("channel_1")) {
                path = "D:/File Compression/Data/low_freq/low_freq/house_1/"
                        + upath + ".dat";
            } else {
                JOptionPane.showMessageDialog(null, "Invalid File Choosen");
                System.exit(0);
            }

            dival = 10;

        } else {
            dival = dival + 10;
            writer.println("Dividen:" + dival);
        }
Run Code Online (Sandbox Code Playgroud)

这些行采用递归方法。第一次给出正确的路径:

D:/File Compression/Data/low_freq/low_freq/house_1/channel_2.dat
Run Code Online (Sandbox Code Playgroud)

但是在第二次调用时,它将正斜杠翻转为反斜杠: …

java string file path

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

JScrollPane中的JTable

我添加JTable了一个JScrollPane然后添加到面板的滚动窗格,然后添加面板到框架,但它不起作用这里是代码.我想在桌子或框架上有滚动条,使桌子可滚动,以便用户可以看到它.我尝试了很多方法,但是对我来说没有工作的是整个代码

public class View extends JFrame {

private static final long serialVersionUID = 1L;

/**
 * Launch the application.
 */
//here in the main method i it adds in the JFrame everything

public static void main(String[] args) {
    EventQueue.invokeLater(new Runnable() {
        public void run() {
            try {
                View frame = new View();
                frame.setVisible(true);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    });
}

public void showData() throws SQLException, ParseException {

    panel = new JPanel();
    panel_1 = …
Run Code Online (Sandbox Code Playgroud)

java swing jtable jscrollpane layout-manager

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

JavaScript中的递归调用不起作用?

我已经定义了一个函数并将其称为递归,它在这里不起作用的是代码

$(document).ready(function () {
//if i remove the slider call here it doesn't even run the function slider     
slider();
    function slider() {
        $("#img2").fadeOut(3000, function () {
            $("#img2").fadeIn(3000);
        });
//recursive call
        slider();
    }
});
Run Code Online (Sandbox Code Playgroud)

javascript recursion jquery

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