Monthly Archives: March 2015


Select value from DB table which presents more than one time

If you want to see duplicated column values in DB table use next:

 from doc_pictures
 group by doc_id
 having count(1) > 1

Thanx to

JRebel and JBoss integration with WAR file

You may know about JRebel project. It’s very helpful for development in java world.
The following steps describe how to use JRebel for Web application:

1. Install JRebel plugin for your IDE.

2. Create file descriptor rebel.xml with JRebel plugin in your IDE in WEB-INF\classes folder like:

<?xml version="1.0" encoding="UTF-8"?>

   <dir name="D:/project/idea/out/production/projectUI">

   <link target="/">
   <dir name="D:/project/src/projectUI/src/main/webapp">


3. Add the argument to JBoss AS start script:


Here is the path to jrebel.jar file placed after installation.

4. Deploy your application on JBoss.

5. Change some code and make (recompile) the project.

6. See the changes! Profit!

Thanx, zeroturnaround!

VirtualBox ‘/etc/init.d/vboxdrv setup’ issue after kernel update

It’s too disturbed to run ‘/etc/init.d/vboxdrv setup’ command after kernel update each time. But how can it be fixed?
Fortunately, way is:

sudo apt-get install linux-headers-`uname -r`
sudo dpkg-reconfigure virtualbox-dkms  
sudo modprobe vboxdrv

So, DKMS package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
Thanx to a lot!

Restart, shutsdown, logoff Windows from command line

It’s often need to restart, shutsdown, logoff Windows from command line. For example, if you connect to OS via remote desktop protocol you can’t restart/shutdown it from UI.
In such case you can use next:

shutdown -r
restarts os

shutdown -s
shutdown os

shutdown -l
logoff os

shutdown -t xx
where xx is number of seconds to wait till shutdown/restart/logoff

shutdown -i
gives you a dialog box to fill in what function you want to use

shutdown -a
aborts the previous shutdown command....very handy!

Additional options:

force the selected action

Thanx to