我在 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) 我在这里不允许出现错误'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) 我正在学习assembly 8086并且我理解assembly程序经常使用寄存器,如何assembly在同一时间运行的2个程序可以使用相同的寄存器而不会相互中断.我想也许PC可以有100套寄存器,所以每个程序都可以使用寄存器而不会中断其他程序.好吧无论如何这只是猜测.
我想根据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) 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)