[old
presentations]
[old FAQs]
| |
Tips and Tricks
This page is meant to document various tidbits, tips, and tricks. The
items are loosely organized and most are here for my personal benefit.
- Coding
- Matlab
- Reading/writing videos: use my
videoIO
library.
- Simple temporal median filtering for deinterlacing (idea from
the Simulink deinterlace filter
documentation). Assumes the top line is
older than the next line.
for newline=2:2:size(frame,1)-1
frame(newline,:,:) = median(frame(newline-1:newline+1,:,:), 1);
end
- Trying to understand why Matlab includes the extra borders when
using PRINT, HARDCOPY, GETFRAME, or copying figures to the
clipboard? Here are some hints as to why it's often a good
thing and also how to override it if you want. [pptx][pdf]
- C++
-
Add vertical guidelines (telling you where column 80 is, for
example) to Visual Studio. Registry files for
VS2005 and VS2008 (don't use these if you don't know the risks involved
with modifying the Windows registry).
- Use
auto_ptr to simplify pointer deletion
- The C++
Annotations are a good reference on basic C++ and using its most
common unique features properly.
- Building boost 1.34.1 for Visual Studio
- Download boost and the latest bjam
- Get auto_link.hpp and modify user-config.jam from
this discussion.
- Make the changes to msvc.jam, visualc.hpp,
named_slot_map.hpp, and named_slot_map.cpp, as suggested in
this discussion (search for msvc.jam).
- bjam --toolset=msvc-9.0 install --without-python
- Go do something else for an hour or two...
- Manually create links to the bin.v2 directory
(cygwin shell used here)
cd $BOOST_ROOT/bin.v2/libs
cp `find . -name *.lib` $BOOST_ROOT/lib/
cp `find . -name *.dll` $BOOST_ROOT/lib/
- Subversion
- ignore whitespace
using
alias svndw='svn diff --diff-cmd colordiff -x -uw'
- Editors
- emacs
- To
turn off wordwrap
in the current buffer, type M-x toggle-truncate-lines.
- To reflow the current paragraph, type M-q.
- LaTeX
- AMSMath
guide
- GNU / Linux / Unix
- Debian
- To reconfigure an already-installed package <pkg>, run dpkg-reconfigure <pkg>.
- Installing distmake (a distributed version of make)
cd /tmp
wget http://superb-west.dl.sourceforge.net/sourceforge/distmake/distmake-0.5.tar.gz
gunzip distmake-0.5.tar.gz && tar -xf distmake-0.5.tar && sudo mv distmake /usr/local/src
cd /usr/local/src/distmake && ./configure && make -j3 && sudo make install
export DISTMAKE_RSH='ssh -x ' # put this in your shell init file
Note: when you break out of distmake, it often doesn't actually kill the
running jobs. You'll probably have to manually kill them.
- X-Windows
- Nice xterm:
/usr/X11R6/bin/xterm -sl 9999 -sb -rightbar -bg white -fg black -j -e /bin/bash -l &
- PowerPoint and videos
PowerPoint is very temperamental when it comes
to playing videos. I have found that various workarounds work for
different versions of Windows and/or PowerPoint. Here is a set of
things to try if your videos don't play:
- Try playing the video in Windows Media Player. If it fails to
play, you probably need to install the right codec. Use a
program like GSpot to help you
figure out what codec you need. An easy solution is often to install a
collection of codecs via
ffdshow-tryouts or the CCCP Codec Pack. Note that some codec packs
like K-Lite (Kazaa-Lite) illegally use commercial versions. Note that
as of 2009, PowerPoint is 32-bit, so you'll need 32-bit codecs.
- Convert the movie to be a .gif animation. This can work
well for short videos with low frame rates. This does not work so well
for videos that are large, need high color fidelity (.gif files can have at
most 256 colors per frame), or that need to run at normal or high frame
rates (even 30fps can be problematic on some hardware/OS combinations).
- If the file is an .avi file, rename the file so it has a .mpg
extension. There is no need to convert it to use an .mpg
container. You just have to change its extension.
- Unlike images, clip art, text, etc. PowerPoint stores a link to inserted
movies. Otherwise the .PPT files would get huge. Unfortunately,
PowerPoint stores absolute path names instead of relative path names.
This means that when you transfer a presentation to a new computer with a
different directory structure, PowerPoint can no longer find the embedded
videos. Supposedly, it will always check the presentation's directory
when the absolute path fails, but this has never worked for me.
Instead, you may need to remove the video from the presentation and
re-insert it.
- Especially on Windows XP, lowering the video acceleration level
often is required. To do so, launch the "Display" properties from the
Control Panel ("Personalization" then "Display Settings" in Vista).
Click on the "Advanced Settings..." button. Go to the "Troubleshoot"
tab and move the "Video Acceleration" slider all the way to the left.
When you are done giving your presentation, you will almost certainly want
to turn all the acceleration back on.
- If you are transferring the presentation to a new computer and you are
having troubles with fonts or linked files, try the
Export to CD
feature in PowerPoint (even if you'll be transferring the files in a
different way).
|