torek, 21. marec 2017
XFCE4 reset panels
xfce4-panel --quit ; pkill xfconfd ; rm -rf ~/.config/xfce4/panel ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml ; xfce4-panel;
ponedeljek, 13. februar 2017
DB2 Terminate LOAD
What tables are in Load Pending State:
How to get TABSCHEMA.TABNAME table out of Load Pending State:
SELECT TABSCHEMA, TABNAME, LOAD_STATUS FROM SYSIBMADM.ADMINTABINFO WHERE LOAD_STATUS = 'PENDING'
How to get TABSCHEMA.TABNAME table out of Load Pending State:
db2 "LOAD FROM /dev/null OF DEL TERMINATE INTO TABSCHEMA.TABNAME NONRECOVERABLE"db2 "SET INTEGRITY FOR TABSCHEMA.TABNAME IMMEDIATE CHECKED"
četrtek, 9. februar 2017
DB2 LOAD from CURSOR
You can do a LOAD from CURSOR in command line. Example is taken from Fast and easy data movement using DB2's LOAD FROM CURSOR feature:
db2 "DECLARE C1 CURSOR FOR SELECT * FROM FECHNER.SALES"
db2 "LOAD FROM C1 OF CURSOR MESSAGES C:\load_sales_tmp.msg INSERT INTO FECHNER.SALES_TMP NONRECOVERABLE"
ponedeljek, 6. februar 2017
How to tell Maven to disregard SSL errors (and trusting all certs)?
Answer at StackOverflow and copied here if it gets removed:
You can disable SSL certificate checking by adding one or more of these command line parameters:
Official documentation: http://maven.apache.org/wagon/wagon-providers/wagon-http/
Here's the oneliner for an easy copy-and-paste:
You can disable SSL certificate checking by adding one or more of these command line parameters:
-Dmaven.wagon.http.ssl.insecure=true - enable use of relaxed SSL check for user generated certificates.-Dmaven.wagon.http.ssl.allowall=true - enable match of the server's X.509 certificate with hostname. If disabled, a browser like check will be used.-Dmaven.wagon.http.ssl.ignore.validity.dates=true - ignore issues with certificate dates.Official documentation: http://maven.apache.org/wagon/wagon-providers/wagon-http/
Here's the oneliner for an easy copy-and-paste:
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
sreda, 31. avgust 2016
SaveAsCapable
In NetBeans Platform you can implement your own SaveAs action like this:
- put this into MyTopComponent.java:
- put this into MyTopComponent.java:
public class MyTopComponent .... {
private final InstanceContent myContent = new InstanceContent();
private final Lookup myLookup = new AbstractLookup(myContent);
private FileObject fo;
MyTopComponent() {
...
editorContent.add(new SQLEditorSaveAs());
associateLookup(editorLookup);
}
public void setFo(FileObject fo) {
this.fo = fo;
// load the file and display it in TextArea
// this is optional, but putting file's DataObject into this TopComponent's lookup
// will make FileChooser for the SaveAS action start in the folder where fo is located
DataObject myDataObject = DataObject.find(this.fo);
myContent.add(myDataObject);
}
private class MySaveAs implements SaveAsCapable {
@Override
public void saveAs(FileObject folder, String name) throws IOException {
// save to file, database, ...
}
}
}
sobota, 25. julij 2015
Bring database out of BACKUP PENDING state ASAP
If you manage to put your database into BACKUP PENDING state and want to bring it out of it ASAP you can do a backup to a NULL device:
db2 backup db MYDB to /dev/nullThe backup will still read the data that should go into the backup image, but it will discard it by writing it into NULL device. In this way you can cut the unwanted downtime by about 50%-60%.
četrtek, 7. maj 2015
BOINC "Show graphics"
I'm using Xubuntu 14.04.2 and BOINC 7.2.42. I'm running SETI@Home and World Community Grid. When I click "Show graphics" on a SETI@Home task nothing happens.
If you run BOINC Manager from command line you get:
ldd on SETI@Home executable shows:
Now you do this:
If you run BOINC Manager from command line you get:
libssl.so.10: cannot open shared object file: No such file or directory
ldd on SETI@Home executable shows:
libssl.so.10 => not found
libcrypto.so.10 => not found
Now you do this:
sudo apt-get install freeglut3 libssl1.0.0I'm using 64-bit Xubuntu and for 32-bit you should look for these libs yourself.
cd /lib/x86_64-linux-gnu
ln -s libssl.so.1.0.0 libssl.so.10
ln -s libcrypto.so.1.0.0 libcrypto.so.10
ponedeljek, 23. marec 2015
DB2 and "Error applying transforms. Verify that the specified transform paths are valid"
You can get "Error applying transforms. Verify that the specified transform paths are valid" when you want to install or uninstall DB2.
These are possible fixes:
These are possible fixes:
- run setup.exe from installation image with /I en parameter: setup.exe /i en
- use a tool to fix your registry. I've used Free Windows Registry Repair.
nedelja, 1. junij 2014
Touchscreen with multiple monitors
I'm using Xubuntu 12.04.4 and have two monitors (one touch and one regular).
I'm using arandr to set the extended desktop (regular monitor is right of touch monitor).
This also messes up touch input, since the system thinks the whole extended desktop is touch.
Recent X.org servers have a property for setting how input device events are translated to screen coordinates. The property is called "Coordinate Transformation Matrix". More on setting it can be found here.
In my case both montiors have resolution of 1366x768 so the transformation matrix looks like: 0.5 0 0 0 1 0 0 0 1 (touch has to work only on half of the extended desktop). You can set the matrix like this:
xinput set-prop TOUCH_DEVICE_ID "Coordinate Transformation Matrix" 0.5 0 0 0 1 0 0 0 1
You can get TOUCH_DEVICE_ID from "xinput --list".
I'm using arandr to set the extended desktop (regular monitor is right of touch monitor).
This also messes up touch input, since the system thinks the whole extended desktop is touch.
Recent X.org servers have a property for setting how input device events are translated to screen coordinates. The property is called "Coordinate Transformation Matrix". More on setting it can be found here.
In my case both montiors have resolution of 1366x768 so the transformation matrix looks like: 0.5 0 0 0 1 0 0 0 1 (touch has to work only on half of the extended desktop). You can set the matrix like this:
xinput set-prop TOUCH_DEVICE_ID "Coordinate Transformation Matrix" 0.5 0 0 0 1 0 0 0 1
You can get TOUCH_DEVICE_ID from "xinput --list".
nedelja, 11. maj 2014
D3GO in VirtualBox
D3GO service from Telemach uses ViewRight plugin for displaying TV picture on your computer. This plugin is not supported on Linux.
Well, I've tried installing Pipelight and using viewright-caiway plugin, but the plugin was constantly crashing.
I installed VirtualBox with Windows XP guest. I've also installed VirtualBox Guest addition in Windows safe mode. While installing Guest additions select 3D support.
When everything is installed go to settings for Windows XP virtual machine and select 2D acceleration, 3D acceleration support and set video RAM to 64 MB.
Now boot Windows XP virtual machine and D3GO should work after you install ViewRight.
EDIT: If you have choppy sound, try setting ALSA Audio Driver in VirtualBox Settings.
EDIT: If you have choppy sound, try setting ALSA Audio Driver in VirtualBox Settings.
ponedeljek, 24. marec 2014
How to remotly restart/shutdown Linux box
Usual commands are:
- force reboot:
You could also try
For all values of /proc/sysrq-trigger go to kernel documentation
sudo rebootBut if those two don't work, you can use this as root:
sudo shutdown -h now
- force reboot:
echo 1 > /proc/sys/kernel/sysrq- force shutdown:
echo b > /proc/sysrq-trigger
echo 1 > /proc/sys/kernel/sysrqWARNING: This does not sync any disks, ....
echo o > /proc/sysrq-trigger
You could also try
echo s > /proc/sysrq-triggerto sync disks before reboot/shutdown.
For all values of /proc/sysrq-trigger go to kernel documentation
sreda, 22. januar 2014
Monitor DB2 rollback progress
If you have a large transaction that is in rollback status and you want to know how much of the work is rollbacked then you can use this:
- get AGENT ID for the connection that is in rollback status (db2 list applications show detail)
- run db2 get snapshot for application agentid YOUR_AGENT_ID | grep Work
- get AGENT ID for the connection that is in rollback status (db2 list applications show detail)
- run db2 get snapshot for application agentid YOUR_AGENT_ID | grep Work
torek, 14. januar 2014
Running NetBeans from Unity launcher gives you two icons for NetBeans
When you add NetBeans desktop file to Unity launcher and run it, you could get two icons for NetBeans.
Steps to solve this:
- remove NetBeans from launcher
- add StartupWMClass=NetBeans IDE 7.4 to desktop file
- add NetBeand back to launcher
This is how my netbeans.desktop files looks like:
[Desktop Entry]
Encoding=UTF-8
Name=NetBeans IDE 7.4
Comment=The Smarter Way to Code
Exec=/bin/sh "PATH_TO_NETBEANS_EXEC"
Icon=PATH_TO_NETBEANS_ICON
Categories=Application;Development;Java;IDE
Version=1.0
Type=Application
Terminal=0
Name[sl]=NetBeans IDE 7.4
StartupWMClass=NetBeans IDE 7.4
OnlyShowIn=Unity;
X-UnityGenerated=true
Steps to solve this:
- remove NetBeans from launcher
- add StartupWMClass=NetBeans IDE 7.4 to desktop file
- add NetBeand back to launcher
This is how my netbeans.desktop files looks like:
[Desktop Entry]
Encoding=UTF-8
Name=NetBeans IDE 7.4
Comment=The Smarter Way to Code
Exec=/bin/sh "PATH_TO_NETBEANS_EXEC"
Icon=PATH_TO_NETBEANS_ICON
Categories=Application;Development;Java;IDE
Version=1.0
Type=Application
Terminal=0
Name[sl]=NetBeans IDE 7.4
StartupWMClass=NetBeans IDE 7.4
OnlyShowIn=Unity;
X-UnityGenerated=true
četrtek, 9. januar 2014
Improving security in Firefox
Today I found a nice website that tells you how secure your TLS/SSL client is.
I'm using Firefox 26.0 and the website said that my TLS client is "Bad".
Btw., Google Chrome 31.0.1650.63 is rated as "Probably OK" from the start.
Hmm, Firefox can't be so much worse than Chrome, right?
So, couple of minutes later that I found another website that helped me bring Firefox to the same level with couple of steps:
- go to about:config
- set security.tls.version.min to 1 (TLS 1.0)
- set security.tls.version.min to 3 (TLS 1.2)
- set security.ssl3.rsa_fips_des_ede3_sha to false to disable SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA chiper, which is known to be insecure
četrtek, 12. december 2013
VirtualBox error: UUID does not match the value ....
When you try and start a VirtualVM VM and get this error:
UUID {SOME_UUID} of the medium 'PATH_TO_VDI' does not match the value {SOME_UUID} stored in the media registry ('PATH/VirtualBox.xml')
then you could solve it with this steps:
- open File - Virtual Media Manager
- do Release on the problematic VDI
- do Remove on the problematic VDI. Don't delete the physical file
- on specific VM attach the VDI back
UUID {SOME_UUID} of the medium 'PATH_TO_VDI' does not match the value {SOME_UUID} stored in the media registry ('PATH/VirtualBox.xml')
then you could solve it with this steps:
- open File - Virtual Media Manager
- do Release on the problematic VDI
- do Remove on the problematic VDI. Don't delete the physical file
- on specific VM attach the VDI back
sreda, 27. november 2013
Faster fetch from DB2 cursor
If you are using cursors in DB2 procedures, for example, and you don't use them to update the data, you can significantly improve fetch performance using FOR READ ONLY:
DECLARE XSQL VARCHAR(10240);
DECLARE XSQLSTATE_1 STATEMENT;
DECLARE XRESULT_SET_1 CURSOR WITH RETURN TO CLIENT FOR XSQLSTATE_1;
SET XSQL = 'SELECT * FROM SYSIBM.SYSDUMMY1 FOR READ ONLY WITH UR';
PREPARE XSQLSTATE_1 FROM XSQL;
OPEN XRESULT_SET_1;
XRESULT_SET_1 is returned back to the client, so it can iterate over the data.
DECLARE XSQL VARCHAR(10240);
DECLARE XSQLSTATE_1 STATEMENT;
DECLARE XRESULT_SET_1 CURSOR WITH RETURN TO CLIENT FOR XSQLSTATE_1;
SET XSQL = 'SELECT * FROM SYSIBM.SYSDUMMY1 FOR READ ONLY WITH UR';
PREPARE XSQLSTATE_1 FROM XSQL;
OPEN XRESULT_SET_1;
XRESULT_SET_1 is returned back to the client, so it can iterate over the data.
No menus in Java applications under Ubuntu
If you run a Java application under Ubuntu and you don't see any menus (when you klick on a menu, you don't see menu items) run the application like this (example for running jmc):
UBUNTU_MENUPROXY= jmc
This will disable menu proxy for this application. More on disabling menu proxy here.
UBUNTU_MENUPROXY= jmc
This will disable menu proxy for this application. More on disabling menu proxy here.
nedelja, 24. november 2013
Disc burning software under Ubuntu
Take my advice and only use k3b. It does install a lot of stuff from KDE, but it is worth it.
I've used brasero, cdw, bashburn, ... but k3b is the only one that works as you'd expect.
I've used brasero, cdw, bashburn, ... but k3b is the only one that works as you'd expect.
Not able to change desktop wallpaper on Ubuntu
sudo apt-get install dconf-tools
dconf-editor
go to org -> gnome -> settings-daemon -> plugins -> background and activate "active" :)
Now you will be able to change desktop backgroup
dconf-editor
go to org -> gnome -> settings-daemon -> plugins -> background and activate "active" :)
Now you will be able to change desktop backgroup
četrtek, 17. oktober 2013
Make java plugin run in Chrome under Linux
If you go to http://www.java.com/verify/ and Chrome want's you to install Java plugin follow this steps:
mkdir /opt/google/chrome/plugins
cd /opt/google/chrome/plugins
ln -s /usr/local/jre1.7.0_45/lib/i386/libnpjp2.so .
mkdir /opt/google/chrome/plugins
cd /opt/google/chrome/plugins
ln -s /usr/local/jre1.7.0_45/lib/i386/libnpjp2.so .
Naročite se na:
Objave (Atom)