小编cha*_*age的帖子

如何在 Windows 中将 PostgreSQL 作为服务运行?

我在 windows 7 32 位操作系统中安装了 postgreSQL 二进制文件;我可以从 cmd 启动服务器,但无法将其作为 Windows 服务运行。

这是我尝试手动启动服务时遇到的错误:

"The postgreSQL service on local computer started and then stopped. some services stop automatically if they are not in use by other servces or programs"
Run Code Online (Sandbox Code Playgroud)

我需要做的就是;启动到 Windows 后,当我双击我的 java 应用程序时,我需要顺利运行我的应用程序,没有任何数据库错误。我不能这样做,因为 postgreSQL 没有作为 Windows 服务运行。

我在Windows事件查看器中发现了这个:

The description for Event ID 0 from source PostgreSQL cannot be found.
Either the component that raises this event is not installed on your local computer or the installation is corrupted.
You …
Run Code Online (Sandbox Code Playgroud)

java postgresql windows-services

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

Java swing错误"'void'类型不允许在这里"

我在这里不允许出现错误'void'类型

码:

public void create(JPanel jp){
    jp.add(new JButton().setPreferredSize(new Dimension(40, 40)));        
}
Run Code Online (Sandbox Code Playgroud)

但是当我使用相同的代码而没有.setPreferredSize(new Dimension(40, 40))它工作正常.

工作代码

public void create(JPanel jp){
    jp.add(new JButton());
}
Run Code Online (Sandbox Code Playgroud)

java swing jpanel jbutton

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

2个汇编程序如何使用相同的寄存器

我正在学习assembly 8086并且我理解assembly程序经常使用寄存器,如何assembly在同一时间运行的2个程序可以使用相同的寄存器而不会相互中断.我想也许PC可以有100套寄存器,所以每个程序都可以使用寄存器而不会中断其他程序.好吧无论如何这只是猜测.

assembly cpu-registers

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

错误缺少方法中的return语句

我想根据fragment名称获取数据,但为什么错误描述了缺失的return语句?

public Cursor getName (String nama){
    Cursor c = db.query(Konstanta.NAMA_TABEL, new String[]{
            Konstanta.ID_ARTIS,
            Konstanta.NAMA_ARTIS,
            Konstanta.GENDER_ARTIS_PRIA,
            Konstanta.GENDER_ARTIS_WANITA,
            Konstanta.TGLAHIR}, Konstanta.NAMA_ARTIS + "LIKE '%" + nama + "%'",
            null, null, null, null, null);
    if (c != null){
        c.moveToFirst();
        return c;
    }
}
Run Code Online (Sandbox Code Playgroud)

java database android

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

"/ bin/bash ^ M:错误的解释器:没有这样的文件或目录"从cron作业执行bash脚本时出错

Restore_DB.sh: -

#!/bin/bash
mysql -u user -ppassword DB_name < /home/A/B/SQL_File.sql
Run Code Online (Sandbox Code Playgroud)

我使用上面的代码从cron作业恢复MySQL数据库,但我收到了波纹管错误

/usr/local/cpanel/bin/jailshell: /home/A/B/Restore_DB.sh: /bin/bash^M: bad interpreter: No such file or directory
Run Code Online (Sandbox Code Playgroud)

这是我使用的cron作业命令: -

/home/A/B/Restore_DB.sh
Run Code Online (Sandbox Code Playgroud)

mysql linux bash cron

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