To increase the BIOS delay time of your guest OS, open the folder containing your VMWare image (on Windows it should be on C:\Data\Virtual Machines\<YOUR_IMAGE_NAME).
Open with Notepad++ the file with extension .vmx and modify or edit the setting
bios.bootDelay = "5000"
The delay is in milliseconds and the maximum value you can set is 10000 (10 seconds).
Alternatively if you put the line:
bios.forceSetupOnce = "FALSE"
You will get always the BIOS settings. So no crazy fast F2 typing required! This is useful for one-time changes (typically to change the boot sequence).
Another interesting link is this one, that explains how to increase the disk space on the guest os using gparted.
Source:
https://kb.vmware.com/
My Tips and Tricks for C#, C, C++, MatLAB, Java, LaTeX, Python and more!
Saturday, February 27, 2016
Tuesday, February 16, 2016
Restart ORACLE without using sqlplus
In Linux (as root):
To obtain help on the command:
/etc/init.d/oracle-xe help
Usage: ./oracle-xe {start|stop|restart|force-reload|configure|status|enable|disable}
To restart:
/etc/init.d/oracle-xe restart
To obtain help on the command:
/etc/init.d/oracle-xe help
Usage: ./oracle-xe {start|stop|restart|force-reload|configure|status|enable|disable}
To restart:
/etc/init.d/oracle-xe restart
Tuesday, February 9, 2016
Execute a script with sqlplus
To execute a sql-script with sqlplus just insert your this command:
(replace : username, password, connection_string, /path/to/script)
echo exit | sqlplus username/password@connection_string@/path/to/script
Source:
http://serverfault.com/
Monday, February 8, 2016
How to check the exit code of a command (on Linux and Windows)
To check the exit code of an application on Linux and Windows is very easy.
In a Linux' bash, you need to issue the command:
echo "$?"
echo "$?" will return the exit code of the previous command (please note that also an empty line counts as a command!)
In a Windows' command prompt:
echo %errorlevel%
In a Linux' bash, you need to issue the command:
echo "$?"
echo "$?" will return the exit code of the previous command (please note that also an empty line counts as a command!)
In a Windows' command prompt:
echo %errorlevel%
Sunday, February 7, 2016
Qt5 Hello World on CentOS from command line with gcc
Install the libraries (I assume you have
already installed
gcc 4.8.x
):
& friends on your system
The Qt5 (pronounced as cute-five) base components
sudo yum install qt5-qtbase*
sudo yum install mesa-libGL-devel -y
Create your project's folder:
>>mkdir hello_world_qt
>>cd hello_world_qt
Write hello word C++ file:
>> vi hello_world_qt.cpp
with content:
#include <QtWidgets/QApplication>
#include <QtWidgets/QPushButton>
int main(int argc, char **argv)
{
QApplication app (argc, argv);
QPushButton button ("Hello world !");
button.show();
return app.exec();
}
then make a qt project with qmake:
>>qmake-qt5 -project
edit the *new* file hello_world_qt.pro by adding the line QT += widgets before TEMPLATE. The final file will look similar to this:
######################################################################
# Automatically generated by qmake (3.0) Sun Feb 7 15:13:47 2016
######################################################################
QT += widgets
TEMPLATE = app
TARGET = hello2
INCLUDEPATH += .
# Input
SOURCES += hello_world_qt.cpp
Now generate the Makefile with qmake:
>>qmake-qt5 -makefile
Finally, you can compile your program:
>>make
and run it!
>>./hello_world_qt
-------------------------------------------------------
NOTE: I ended up with this solution because I got the errors below (missing libraries)
/home/eddie/QT_HOME/
/hello_world_qt.cpp:20: undefined reference to `QApplication::QApplication(int&, char**, int)' /home/eddie/QT_HOME/
hello_world_
qt
/
hello_world_
qt
hello_world_
qt.cpp:22: undefined reference to `QPushButton::QPushButton(QString const&, QWidget*)' /home/eddie/QT_HOME/
/
hello_world_
qt
hello_world_
qt.cpp:23: undefined reference to `QWidget::show()' /home/eddie/QT_HOME/
/
hello_world_
qt
hello_world_
qt.cpp:25: undefined reference to `QApplication::exec()' /home/eddie/QT_HOME/
/
hello_world_
qt
hello_world_
qt.cpp:22: undefined reference to `QPushButton::~QPushButton()' /home/eddie/QT_HOME/
/
hello_world_
qt
hello_world_
qt.cpp:25: undefined reference to `QApplication::~QApplication()' /home/eddie/QT_HOME/
/
hello_world_
qt
hello_world_
qt.cpp:25: undefined reference to `QApplication::~QApplication()' /home/eddie/QT_HOME/
/
hello_world_
qt
hello_world_
qt.cpp:22: undefined reference to `QPushButton::~QPushButton()' /home/eddie/QT_HOME/
/
hello_world_
qt
hello_world_
qt.cpp:22: undefined reference to `QPushButton::~QPushButton()' collect2: error: ld returned 1 exit status
Sources for this post:
https://csl.name/post/qt-gcc/
http://stackoverflow.com/
Subscribe to:
Posts (Atom)