martedì 5 ottobre 2010

How to show editable location bar in nautilus

From Ubuntu 10.04 the location bar is displayed by default in "breadcrumbs mode". Clicking on breadcrumbs buttons does not more switch the location bar in the edit mode.
This can be done using the shortcut CTRL+L (or from the menù Go > Location).
With ESC is possible to go back to the breadcrumbs mode.

Rar files support in Ubuntu's Archive Manager

By default Ubuntu's Archive Manager doesn't support opening files in rar format. The unrar package provides this functionality, it can be installed with the command

sudo apt-get install unrar

martedì 4 maggio 2010

Limiting the result sets in Oracle

In Oracle DB the number of rows can be limited using the ROW_NUMBER() function:
SELECT * FROM (
SELECT
ROW_NUMBER() OVER (ORDER BY <ordering_field> DESC) AS ROWNUMBER, <other columns>
FROM <table_name>
[WHERE <conditions>]
)
WHERE ROWNUMBER <= <max_row_number>

Example, retrieve the id of the last modified curve among curves with type equals to "ATT_MENS":

SELECT id_curve FROM (
SELECT
ROW_NUMBER() OVER (ORDER BY sys_modifydate DESC) AS ROWNUMBER, id_curve
FROM curve
where curve_type = 'ATT_MENS'
)
WHERE ROWNUMBER <= 1;

lunedì 29 marzo 2010

How to Fix VirtualBox USB Support

The VirtualBox USB support on linux host doesn't work properly without giving the right permissions to your user.

Follow the illustrated tutorial in http://news.softpedia.com/news/How-to-Fix-VirtualBox-USB-Support-111715.shtml.

Oddly, on my pc, logging out and then logging in wasn't enough to make the changes work, so I've had to completely restart.

mercoledì 24 marzo 2010

Connect to a remote folder via ssh with Nautilus

Nautilus has the capability to connect to a remote folder via ssh. You should use the uri
ssh://user:password@host/path/to/folder
If the password is left out you will be prompted for.

venerdì 5 febbraio 2010

Gestione dei tab nelle viste

Per una migliore gestione dei tab nelle viste, è consigliabile usare i seguenti oggetti:

org.eclipse.swt.custom.CTabFolder;
org.eclipse.swt.custom.CTabItem;


Il "CTabFolder" ha le stesse funzionalità del TabFolder, in più:
permette di non avere bordi nella finestra

CTabFolder tabFolder = new CTabFolder(externalInfoCreComposite, SWT.BOTTOM);

di impostare i colori di sfondo

tabFolder.setSelectionBackground(new Color[]{
Display.getCurrent().getSystemColor(SWT.COLOR_BLUE),
Display.getCurrent().getSystemColor(SWT.COLOR_RED),
Display.getCurrent().getSystemColor(SWT.COLOR_YELLOW) }, new int[]{50, 100 });

Blue= colore del tab selezionato
Rosso e giallo parte del contorno

Sfondo della tabella

tabFolder.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));

Qui sono visualizzabili alcuni esempi: http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/DemonstratesCTabFolder.htm