Tutorial by Examples

Detailed instructions on getting computer-vision set up or installed. For this and following series of computer vision, I will be using Python 2 as a programming language. Python is a common choice for the scientific community, it is free, it has a lot of libraries for free and open-source, and if ...
The Runtime.exec(String ...) and Runtime.exec(String) methods allow you to execute a command as an external process1. In the first version, you supply the command name and the command arguments as separate elements of the string array, and the Java runtime requests the OS runtime system to start th...
Detailed instructions on getting google-closure-compiler set up or installed.
Java Virtual Machines (JVMs) can be run with a SecurityManager installed. The SecurityManager governs what the code running in the JVM is allowed to do, based on factors such as where the code was loaded from and what certificates were used to sign the code. The SecurityManager can be installed by ...
This is a screenshot of a video playing. You see a normal 16:9 video like you would expect to see in any modern video solution. This - the aspect ratio that the viewer sees - is what is called the display aspect ratio or DAR. From the illustrated parameters, we see that DAR = 1280:720 = 16:9 = 1....
Internally, all videos are a just series of pictures. Let's take a look at one such picture. That looks odd, right? Indeed. The pictures that make up a video may have an aspect ratio that are different from the DAR, most often for algorithmic reasons (e.g. only sizes that are a multiple of 16 can...
As the picture aspect ratio example indicates, videos are series of pictures that do not necessarily have the same aspect ratio as the final result to be displayed to the user. So how do you get from those stretched pictures to the normally displayed output? You need a stretching factor! This stret...
This is another name for sample aspect ratio and should be avoided, as the natural acronym (PAR) conflicts with picture aspect ratio.
Consider the following list comprehension Python 2.x2.7 i = 0 a = [i for i in range(3)] print(i) # Outputs 2 This occurs only in Python 2 due to the fact that the list comprehension “leaks” the loop control variable into the surrounding scope (source). This behavior can lead to hard-to-find...
To create a Behavior just extend the CoordinatorLayout.Behavior class. Extend the CoordinatorLayout.Behavior Example: public class MyBehavior<V extends View> extends CoordinatorLayout.Behavior<V> { /** * Default constructor. */ public MyBehavior() { ...
The SwipeDismissBehavior works on any View and implements the functionality of swipe to dismiss in our layouts with a CoordinatorLayout. Just use: final SwipeDismissBehavior<MyView> swipe = new SwipeDismissBehavior(); //Sets the swipe direction for this behavior. ...
You can use the CoordinatorLayout.Behavior to create dependencies between views. You can anchor a View to another View by: using the layout_anchor attribute. creating a custom Behavior and implementing the layoutDependsOn method returning true. For example, in order to create a Behavior for m...
Using a list object you can create a fully functional generic Stack with helper methods such as peeking and checking if the stack is Empty. Check out the official python docs for using list as Stack here. #define a stack class class Stack: def __init__(self): self.items = [] ...
Smack (Java) Using Smack 4.1 It is recommended to include Smack as Maven dependency in your project (e.g. by using gradle or Maven). Otherwhise the following Smack artifacts/jars have to be added manually to the classpath: smack-core, smack-extensions, smack-experimental, smack-im, smnack-tcp,...
Detailed instructions on getting gerrit set up or installed.
When you really need to script ssh connection, piping the password into the ssh command does not work (echo passw0rd | ssh host). It is because the password is not read from standard input, but directly from TTY (teleprinter, teletypewriter, Teletype for historical reasons). But there is sshpass to...
Create a file ckeditor.html with the following content: <!DOCTYPE html> <html> <head> <title>CKEditor Demo!</title> </head> <body> <script src="//cdn.ckeditor.com/4.6.1/basic/ckeditor.js"></script> <div id="e...
Select the project you want to add the reference to Moq. Open Nuget for this project. Select "Browse" than type "moq" at the search box. Select "Moq" and than click on Install. Following these steps will install the Moq package and will add a reference to it i...
#include <iostream> #include <boost/accumulators/accumulators.hpp> #include <boost/accumulators/statistics/stats.hpp> #include <boost/accumulators/statistics/mean.hpp> #include <boost/accumulators/statistics/variance.hpp> int main() { using namespace boost...
Detailed instructions on getting quickblox set up or installed. Go to https://admin.quickblox.com and click on “Register” at the top or just follow the link: https://admin.quickblox.com/register.

Page 797 of 1336