Skip to content

Instantly share code, notes, and snippets.

@GrennKren
GrennKren / Java
Created June 29, 2024 18:07
All the Challenges I Faced in Java Netbeans
1) I set up JTable with setAutoCreateRowSorter(true) so that all tables can be sorted by clicking on the column headers. However, I want to exclude some tables from this, but when I try using table.setAutoCreateRowSorter(false), it doesn't work at all.
Solution:
Disable the table header with table.getTableHeader().setEnabled(false);
2)
@GrennKren
GrennKren / Owncloud - sync problem
Last active June 25, 2024 03:53
Owncloud - Sync Problem in Owncloud Client
1) HTTP_OC_CHUCKED OC_Chunked header "is allowed only in webdav endpoint owncloud".
This happen when after set env OWNCLOUD_CHUNKING_NG=0 ?
revert that OWNCLOUD_CHUNKING_NG to OWNCLOUD_CHUNKING_NG=1 or just remove it.
2) Connection Closed
Only works for files below 100mb?
set environment variable OWNCLOUD_MAX_CHUNK_SIZE
e.g :
OWNCLOUD_MAX_CHUNK_SIZE=10737418240 ; for 10GB (default 100000000 or 100MB)
@GrennKren
GrennKren / Update Owncloud Server
Created June 24, 2024 06:38
Update Owncloud Server
Just Self Note:
1 ) turn on maintenance mode (in owncloud folder)
sudo -u www-data php occ maintenance:mode --on
2) turn off apache2 service
sudo systemctl stop apache2
3) rename/move previous owncloud folder to another
sudo mv owncloud owncloud_backup
@GrennKren
GrennKren / convert_and_resize.bat
Last active June 13, 2024 12:05
Convert and Rescale Many Images Using FFMPEG
:: FOR WINDOWS batch
: using for /f "tokens=*" %i in ('dir /aa /b /o-d')
for /f "tokens=*" %%i in ('dir /aa /b /o-d') do ffmpeg -i "%%i" -vf "scale=min'(2000,iw):-1'" "converted_jpg\%%~ni.jpg"