5/30/2016

Premiere playback speed

Hold Shift key down, tap L and keep tapping L until the playback speed is where you have optimal clarity and speed.

(Recall how many times you tapped).

If you go too far tap J to pull back a speed.

You could go the other way which may be more efficient:
Tap L twice to go into 2x speed. Which will most likely be too fast.
Hold Shift and tap J a couple times to pull down the speed.

Premiere Creative CC Multi-camera workflow

For videos with different frame sizes:
**Always use Set to Frame Size to scale**
  1. Drag all the media (two camera files, each with reference audio, and one audio file from an external recorder) onto the timeline of a new sequence.
  2. Select the media on the timeline, right-click and pick 'Syncronize', using 'Audio' as the syncronize point.
  3. Delete the audio files which you won't be using.
  4. On the camera which needs to be upscaled, right-click it and select 'Scale to Frame Size'
  5. Now that the two cameras and the one audio file is syncronized (and the 720p is stretched to 1080p), select the media on the timeline, right-click and pick 'Nest'.  Give your nested sequence a name.
  6. Your clips are replaced on the timeline by a nested sequence.  Right-click it, and pick 'Multi-camera > Enable'
  7. Use the multi-camera view (Shift-0) to play back the clips, and the number keys to make the edits between the two cameras.
  8. Then to trim and edit that multi-camera sequence, I have to create another sequence.  In the project, right-click on your multicamera/original sequence, and pick 'Open in source window'.  You can now make edits from it, and drag it onto your new sequence.

For videos with the same frame size:
1. Import videos that have the overlap part.
2. Select them and right click to select "Create Multi Camera ..."
3. Add the newly generated file to the track. Click the icon  to open the multi-camera panel. Play the video and select the camera to use.

5/28/2016

Chroma/Green screen photoshop

1. Open the image and use Color Range to select the background

2. Alt + Create Mask to add a mask. With the mask selected, Select | Modify | Expand 3 pxs. Then Filter | Others | Min Value (5px) to remove the edge.

3. Add a "色相/饱和度". When pressing Alt and click the layer below to apply to it. Change the green saturation to -100.

5/20/2016

Bazel, Eclipse and Java: how to fix the class resolution

Usually the required generated classes are:
bazel-out/local-fastbuild/bin/experimental/examples/protobuf/_javac/address_book_proto_java/libaddress_book_proto_java_classes/


In Eclipse, right click on a project, Properties | Java Build Path | Libraries | Add External Class Folder. Navigate to the generated class folder and add them.

How to add Java project to Eclipse?
1. Create Java Project, say, xelha
2. Create a Source Folder under the project, omap
3. Add a folder in the omap Source Folder. Link the actual location to the folder. Make sure to navigate to the package name folder. For example, if the package name is "package ai.deepmap.hadoop.io;", select the folder ai and link the folder to the ai folder.
4. Do step 3 for other packages you need to add.

5/18/2016

Frequently used Linux screen command

screen -X -S [session id] quit: kill a detached screen session
screen -ls: list all sessions
screen -r: resume a session

General commands
Note: Every screen command begins with Ctrl-a.
Ctrl-a c Create new window (shell)
Ctrl-a k Kill the current window
Ctrl-a w List all windows (the current window is marked with "*")
Ctrl-a 0-9 Go to a window numbered 0-9
Ctrl-a n Go to the next window
Ctrl-a Ctrl-a Toggle between the current and previous window
Ctrl-a [ Start copy mode
Ctrl-a ] Paste copied text
Ctrl-a ?
Help (display a list of commands)
Ctrl-a Ctrl-\ Quit screen
Ctrl-a D (Shift-d) Power detach and logout
Ctrl-a d
Detach but keep shell window open

Press the Spacebar or Enter to end a command.
To copy a block
To get into copy mode, press Ctrl-a [
To move the cursor, press the h, j, k, and l (the letter l) keys. The 0 (the number 0) or ^ (the caret) moves to the start of the line and $ (the dollar sign) moves to the end of the line. Ctrl-b scrolls the cursor back one page and Ctrl-f scrolls forward one page. To set the left and right margins of copy, press c and C (Shift-c). The Spacebar starts selecting the text and ends selecting the text. To abort copy mode, press Ctrl-g.
To paste a block


To paste the copied text to the current window (as many times as you want), press Ctrl-a ].


5/17/2016

Java Servlet Server related info

Tomcat can be run as a standalone server. Tomcat can also be run as an add-on to the Apache HTTP Server (or Microsoft IIS) - as the Java servlet/JSP container. In this combination, Tomcat executes the Java servlets and JSPs, the Apache serves the static HTML pages and performs other server-side functions such as CGI, PHP, SSI, etc. Read "Why should I integrate Apache with Tomcat? (or not)" at Tomcat FAQ (http://wiki.apache.org/tomcat/FAQ/Connectors#Q3).

5/06/2016

Setup Eclipse

(On Windows, cygwin or MinGW gcc must be installed. When creating a new project, Cygwin GCC must be selected.)

How to add an existing GIT project to Eclipse?
Install EGit from Market Place
Open Git Perspective, in Git Repositories | click Add an existing local Git Repository ...

In Project Explorer | Import | Git (Projects From Git) | Existing local repository | select the local Git Repository that was just imported.

Choose "Import using the New Project wizard" | Makefile Project with Existing Code | Fill the name and location of code.

After importing the Git repo, need to use the Exclude Build option to exclude some folders from building.
Right click on the folder | Resource Configurations | Exclude from Build | Select or Deselect | OK

Also need to mark some folders as derived, such as bazel-* folders. Right click on the folder | Resources | Click "Derived"

Also need to remove derived folders from sources. Project Property | C/C++ General | Path and Symbols | Source Location | Edit Filter | Remove bazel-bin,bazel-deepmap,bazel-testlogs etc.

Install Plugins:
Protocol Buffer: Install from Eclipse Marketplace
sudo snap install beautysh: Install Bash editor, then Save Actions: execute command on save beautysh $filename

C++ Formatter:
Install CppStyle from market place and use clang-format.


C++ symbol/function could not be resolved:



NOTE: The project must have the 'includes' folder, which contains the C++ headers, also make sure the static folder has all the necessary header files. If something doesn't resolve, DON'T rebuilt it over and over again. Just make sure the header can be found in the project and click Project | C++ Index | Resolve Un-resolved includes. If it doesn't resolve by doing that, rebuilding the whole thing doesn't help either.

First: Disable build automatically




1. Project Property | Preprocessor Include | Providers | CDT GCC Built-in Compiler Settings | Command to get compiler specs:
Add -std=c++11 to the Command to get compiler specs.

Open Window | Preferences | C/C++ | Build | Settings | Discovery | CDT GCC Build-in Compiler Settings
Append -std=c++11 to the Command to get compiler specs
Press OK

Rebuild the index: Project | C/C++ Index | Rebuild

2. Add third party dependency:
Project Property | C/C++ General | Paths and Symbols | Source Location | Link Folder
Choose the folder that has the third party dependency.

Add protos to the Source Location:
bazel-deepmap/bazel-out/local-fastbuild/genfiles/protos/

Project | Clean then Project | C/C++ Index | Rebuild

3. Enable auto completion
Window | Preferences | C/C++->Editor->Content Assist | Auto-Activation | Advanced
Enable: Help Proposals, Parsing-based Proposals, Template Proposals

Possible issues:
================
1. Column margin (ruler) is at wrong position:
Upgrade to Photon 4.8 version fixed it.

2. Ctrl + Click not working:

To work around the problem, you can disable the Change Log hyperlink by going to Window | Preferences | General | Editors | Text Editors | Hyperlinking, then untick "Changelog Detector"

Change selection color:
General | Editors | Text Editors, change Selection background color to #FF7F00

How to Import existing projects to a new workspace:
===================================================
Import | General | Existing Projects into workspace | Locate the workspace AND CHECK 'Copy projects into workspace'

/bin/cp -rf /mnt/machome/liangzou/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings ~/workspace/.metadata/.plugins/org.eclipse.core.runtime/

.md file editor
================
Use WikiText editor to open it.
Change settings: Colors and Fonts | WikiText | Monospace Font. Change it to Hack 9 (the same as Text Font).
General | Editors | Text Editors | WikiText | Appearance, change all places that use font-family: monospace to font-family: Hack, monospace; font-size: 9pt;

BUILD file editor
=================
TBD

Disable caret blinking
======================
For Ubuntu cinnamon, System settings | Keyboard turn off text cursor blinking
Then in Eclipse settings, search for caret, click Enable custom caret

Setup Java
==========
https://liangzou.blogspot.com/2016/05/bazel-eclipse-and-java-how-to-fix-class.html

Setup Python
============

https://liangzou.blogspot.com/2019/06/how-to-setup-eclipse-pydev-to-run-yapf.html

Enable pydev checking: Preferences | Spelling Add User defined dictionary: /home/liangzou/eclipse-workspace/user-dict.txt
Then click on the word that eclipse doesn't recognize, press ctrl + 1, then use up/down key and enter to select the options.

Setup Go Editor
===========
Need to disable AnyEdit Tools (Format some code on save if that editor doesn't support)






Setup Text Editor
=============
Show white spaces



Change the Transparency level to 255