Synchronize subtitles with the movie in VLC player

Re-sync by small steps:

g – move subtitles forward +0.5 sec

h – move subtitles back -0.5 sec

Re-sync based on clear sentence:

Press Shift+H to mark the recognizable sentence, when you hear it

Press Shift+J to mark the subtitles for this sentence

Press Shift+K to synchronize the subtitles

If subtitles are ahead of the video, press Shift+J, then Shift+H, and Shift+K to finalize

Re-sync in menu:

Tools -> Track Synchronization -> Subtitle track synchronization

Select negative number if subtitles are ahead of the sound

Command line:

Define delay in 1/10 of the second (negative or positive)

vlc –sub-delay 100 –sub-file myfile.srt file.avi

Permanent changes:

Subtitles editor (open source)

Windows: disable sticky keys

If some keyboard key is pressed several times in the short period of time, the accessibility window will appear.
It’s possible to disable this behaviour.

Just create the following REG-file and import it with the regedit:


Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys]
"Flags"="0"

Alternative: just do it from the command line:

REG ADD "HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys" /v Flags /t REG_SZ /d 0 /f

Restart after the operation could be required.

Oracle Data Modeler: unable to create Java instance

The following error was displayed during the start of Oracle SQL Developer Data Modeler (v3.3.0.734) on Windows:

Unable to create an instance of the Java Virtual Machine
Located at path: ..\..\jdk\jre\bin\client\jvm.dll

This could be fixed by editing the file datamodeler\bin\datamodeler.conf :
try to change the following line
AddVMOption -Xmx768M
to
AddVMOption -Xmx512M

and restart Data Modeler after this.

Oracle Data Modeler: change user interface language

Oracle Data Modeler in the current version (3.3.0.x) does not allow to change the user interface language in “Options” or somewhere else in the GUI.

However, it’s possible to force it to switch to some other language, using datamodeler\bin\datamodeler.conf configuration file.
The following lines should be added to the file for English:

AddVMOption -Duser.language=en
AddVMOption -Duser.country=US

Oracle: error messages for read only database

The old Oracle database (8i) was switched to the read-only mode. The following messages are shown now in alert.log:
***Warning – Executing transaction without active Undo Tablespace

It’s possible, that the error is caused by Oracle bug 3270493 (EXCESSIVE QMNX TRACE FILES WHEN PLACING STANDBY IN READ ONLY MODE). Workaround is to set aq_tm_processes parameter to 0:


ALTER SYSTEM SET aq_tm_processes=0;

Perl: print the name of the input file

The special variable $ARGV could be used to get the name of the input file.
It returns the name of the file or ‘-‘ if the standard input was used.

Here are some examples:


perl -nle 'END { print $ARGV }' /etc/passwd
/etc/passwd


echo test | perl -nle 'print $ARGV'
-


$ (echo test; echo test2) | perl -nle 'print $ARGV'
-
-


perl -nle 'print $ARGV if !$seen{$ARGV}++' /etc/passwd /etc/shells
/etc/passwd
/etc/shells

UNIX: mounting CD

Here are the mount commands for different *nix systems.

HP-UX

nohup /usr/sbin/pfs_mountd &
nohup /usr/sbin/pfsd &
/usr/sbin/pfs_mount -t rrip -x unix /dev/dsk/c5t2d0 /SD_CDROM

AIX

mount -r -v cdrfs /dev/cd0 /cdrom

Solaris Intel

mount -F hsfs -r /dev/dsk/c0t6d0p0 /cdrom

SPARC Solaris

mount -r -F hsfs /dev/dsk/c0t6d0s2 /cdrom

TRU64

mount -t cdfs -r -o nodefperm,noversion,rrip /dev/rz4c /cdrom

Linux

mount -t iso9660 /dev/cdrom /cdrom