3/28/2015

Videography Knowledge

How to work with Magic Lantern MLV file on Windows?
Download MLRawViewer. It's very easy to use.

How to work with Magic Lantern MLV file on Mac?
There are two ways:

  • First way: use ~/mlv_rec/mlv_dump to convert the MLV file to DNG file and WAV audio file. Then use After Effect to import the sequence files. Please note: in AE, the FPS in "Interpret footage" must be set correctly. This is the recommended way because it's reliable
    • Example:
      ~/mlv_rec/mlv_dump --dng -o M29-1631/M29-1631 M29-1631.MLV
  • Second way: use MLVFS to mount a folder with MLV files. To mount, right click a folder with MLV files and click MLVFS. A pop up window will ask you to select the mount folder. Please note: the pop up window is hidden behind the Finder window, so you need to move the Finder window to see it. This way is very convenient to preview footages, but it's not very reliable.

3/24/2015

为什么字体有些字打不出来(字库不全?)

这是因为有些字库是繁体的,用繁体就可以打出来了。
有些字库是简体的,用繁体时有些字也打印不出来

6/13/2013

Pidgin Icon disappears on Linux Unity/Cinnamon

Here is how to fix: >> As root (or sudo) from a terminal window: >> >> cd /usr/share/pixmaps/pidgin/tray/hicolor >> mv 16x16 16x16old >> ln -s 22x22 16x16 >> >> Then restart pidgin. >>

6/03/2013

Debug C++ binary from command line

blaze build -c dbg ...
gdb --args binary binary_args

(gdb) run
(gdb) backtrace

Another useful command is ldd, which can be used to check the linking result of a file.

Debug python segment fault:
gdb -ex r --args /usr/bin/python3 test.py

How to debug by using a core file?
==================================
gdb bin_file core_file
(gdb) bt
(gdb) f 8 // function number
Then you can print variable names.

# To show all the libraries of a binary
ldd binary

nm command to check function names
c++filt to unmask a function name
For .so files, use:
nm -D x.so to check the function names.

Another thing to remember is:
when linking static .a files, the link order MATTERS.

# To check all GLIB versions
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIB
readelf -d bazel-bin/common/image/io_utils_test | grep NEEDED

objdump -t libopencv_imgcodecs.a | grep _ZN2cv8imencodeERKNS_6StringERKNS_11_InputArrayERSt6vectorIhSaIhEERKS6_IiSaIiEE

# To check the compiled file type
file ./build_qnx-aarch64/libpng/png.o
./build_qnx-aarch64/libpng/png.o: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), not stripped

# To find the sysroot
gcc -print-sysroot

2/08/2013

Make Scite settings better

Just coy the following settings to User Option File:

position.width=$(scale 1000)
position.height=$(scale 1000)
position.top=0
position.left=$(scale 800)
autocomplete.python.ignorecase=1
autocomplete.python.start.characters=.
autocomplete.python.fillups=(
autocompleteword.automatic=1
calltip.python.ignorecase=1
calltip.python.word.characters=._$(chars.alpha)$(chars.numeric)
toolbar.visible=0
tabbar.hide.one=1
line.margin.visible=1
edge.column=80
edge.mode=1
title.full.path=1
open.dialog.in.file.directory=1
word.characters.*=#_$(chars.alpha)$(chars.numeric)
tabsize=2
indent.size=2
use.tabs=0
strip.trailing.spaces=1
wrap=1

font.monospace=font:Consolas,size:11
font.base=$(font.monospace)
font.small=$(font.monospace)
font.comment=$(font.monospace)
font.text=$(font.monospace)
font.text.comment=$(font.monospace)
font.embedded.base=$(font.monospace)
font.embedded.comment=$(font.monospace)
font.vbs=$(font.monospace)

caret.period=0
caret.fore=#FF0000
caret.width=3

font.quality=4
code.page=65001


all.files=All Files (*)|*|Hidden Files (.*)|.*|
top.filters=$(all.files)$(source.all.filter)


=======================================
为了显示中文正确:
run SciTE, click Option-> Open User Options File, add two lines: 
code.page = 65001 
output.code.page = 65001 
this is UTF-8 encoding, or If you use GBK, GB2312 (usually under Windows), it is: 
code.page = 936 
output.code.page = 936

=======================================
SciTE Keyboard Shortcuts & Hotkeys

SciTE is a wonderful & powerful editor!  I love using it for AutoHotKey, Python, HTML, SPSS, SQL, XML, and more!  Below are SciTE Keyboard Shortcuts & Hotkeys  to use with SciTE .  I’ve bolded a few of the ones that I use very frequently.  You also may like to check out the documentation.   I have custom SciTE Hotkeys that I’ve added however they require updating files like the user.properties file which review in a this post.

SciTE Keyboard Shortcuts & Hotkeys
Ctrl+Keypad+ Magnify text size.
Ctrl+Keypad- Reduce text size.
Ctrl+Keypad/ Restore text size to normal.
Ctrl+Tab Cycle through recent files.
Tab Indent block.
Shift+Tab Dedent block.
Ctrl+BackSpace Delete to start of word.
Ctrl+Delete Delete to end of word.
Ctrl+Shift+BackSpace Delete to start of line.
Ctrl+Shift+Delete Delete to end of line.
Ctrl+Home Go to start of document.
Ctrl+Shift+Home Extend selection to start of document.
Alt+Home Go to start of display line.
Ctrl+End Go to end of document.
Ctrl+Shift+End Extend selection to end of document.
Alt+End Go to end of display line.
Ctrl+Keypad* Expand or contract a fold point.
Alt+F2 Select to next bookmark.
Alt+Shift+F2 Select to previous bookmark.
Ctrl+F3 Find selection.
Ctrl+Shift+F3 Find selection backwards.
Ctrl+Up Scroll up.
Ctrl+Down Scroll down.
Ctrl+L Line cut.
Ctrl+Shift+T Line copy.
Ctrl+Shift+L Line delete.
Ctrl+T Line transpose with previous.
Ctrl+D Selection duplicate.   (Great to use in SciTE editor)
Ctrl+K Find matching preprocessor conditional, skipping nested ones.
Ctrl+Shift+K Select to matching preprocessor conditional.
Ctrl+J Find matching preprocessor conditional backwards, skipping nested ones.
Ctrl+Q Comment out line  (Great to use in SciTE editor)
Ctrl+Shift+J Select to matching preprocessor conditional backwards.
Ctrl+[ Previous paragraph. Shift extends selection.
Ctrl+] Next paragraph. Shift extends selection.
Ctrl+Left Previous word. Shift extends selection.
Ctrl+Right Next word. Shift extends selection.
Ctrl+/ Previous word part. Shift extends selection
Ctrl+\ Next word part. Shift extends selection.
Alt+Shift+Movement Rectangular block selection.
Alt+Shift+Home Extend rectangular selection to start of line.

Alt+Shift+End Extend rectangular selection to end of line.

1/08/2012

Samsung TV UN55C6400 Yamaha Remote Control Code

After several tries, the code turned out to be 0334 To program the codes into the Yamaha remote you need to press the "code set" button using a ball point pen or similar. Then select the input you want to program the code to, then input the code for the device chosen. The transmit light should blink twice if successful or six times if unsuccessful.