Tutorial by Examples: apt

a='I am a simple string with digits 1234' pat='(.*) ([0-9]+)' [[ "$a" =~ $pat ]] echo "${BASH_REMATCH[0]}" echo "${BASH_REMATCH[1]}" echo "${BASH_REMATCH[2]}" Output: I am a simple string with digits 1234 I am a simple string with digits 1234
Creating a WebM video from canvas frames and playing in canvas, or upload, or downloading. Example capture and play canvas name = "CanvasCapture"; // Placed into the Mux and Write Application Name fields of the WebM header quality = 0.7; // good quality 1 Best < 0.7 ok to poor fps =...
Functional testing also can include testing processes that leave your environment, such as external API calls and emails. As an example, imagine you're functionally testing the registration process for your website. The final step of this process involves sending an email with an activation link. U...
The Advanced Package Tool, aptly named the 'apt' package manager can handle the installation and removal of software on the Debian, Slackware, and other Linux Distributions. Below are some simple examples of use: update This option retrieves and scans the Packages.gz files, so that information ab...
DASH is the most widely deployed adaptive streaming technology in modern solutions, used to deliver video in a wide variety of scenarios. The best way to understand DASH presentations is to observe the network activity that takes place during playback. This example uses Fiddler to capture and analy...
The substrings captured by capture groups are accessible from RegexMatch objects using indexing notation. For instance, the following regex parses North American phone numbers written in (555)-555-5555 format: julia> phone = r"\((\d{3})\)-(\d{3})-(\d{4})" and suppose we wish to ext...
Installing software via APT (Advanced Package Tool) also know as 'apt-get'. To install Mozilla Firefox: Open a Terminal (Ctrl+Alt+T) Type sudo apt-get install firefox Hit Enter When it asks to install type 'Y' to confirm. Software will be downloaded and installed.
sudo apt-get install libpng-dev on an x86_64 Ubuntu system, this installs libpng version 1.2.x in libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0
What are themes? There are several visual appearance out there for Bootstrap, which can be found from sources, such as Bootswatch, which are modifying the bootstrap.min.css file. You can also create your own theme this way. When to modify themes and when to add new rules to a site.css file? When ...
The UWP applications can run in windowed mode and on several devices. They can be displayed on a wide range of screen sizes from low end phones to the huge surface hub screen. Using relative positioning will be enough for a lot of scenario but as the window size increases, it is always interesting t...
We can add adaptivity to any subclass of UIView which we add on view controller in nib file. Lets take an example of adding adaptivity using size classes to a view. Add a view on view controller as: Now we need to pin this view to it's superview for fixing it's size and position using con...
When you add either of these tracking snippets to your website, you send a pageview for each page your users visit. Google Analytics processes this data and can infer a great deal of information including: The total time a user spends on your site. The time a user spends on each page and in what o...
Show how to use cv::VideoCapture with e.g. a webcam. Capturing frames from webcam and display it. Here is the example code: #include <iostream> #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/core/core.hpp" ...
This example shows how to take image and display it correctly on the Android device. Firstly we have to create sample application with one button and one imageview. Once user clicks on the button camera is launched and after user selects picture it will be displayed with the proper orientation on ...
By default the ArrayAdapter creates a view for each array item by calling toString() on each item and placing the contents in a TextView. Example: ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, myStringArray); where androi...
import numpy as np import cv2 #access a video from your disk #to use the GIF in this example, convert to avi! cap = cv2.VideoCapture('eg_videoRead.avi') #we are going to read 10 frames #we store the frames in a numpy structure #then we'll generate a minimum projection of those frame...
extern crate regex; use regex::Regex; fn main() { let rg = Regex::new(r"was (\d+)").unwrap(); // Regex::captures returns Option<Captures>, // first element is the full match and others // are capture groups match rg.captures("The year was 2016")...
class MyResourceAdapter implements javax.resource.spi.ResourceAdapter { public void start(BootstrapContext ctx){..} public void stop(){..} public void endpointActivation (MessageEndpoingFactory mf, ActivationSpec a){..} public void endpointDeactivation (MessageEndpoingFact...
Convert the interface of a class into another interface clients expect. Adapter (or Wrapper) lets classes work together that couldn't otherwise because of incompatible interfaces. Adapter pattern's motivation is that we can reuse existing software if we can modify the interface. Adapter pattern...
Layout XML <?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android"> <data> </data> <LinearLayout android:orientation="vertical" android:layout_wid...

Page 4 of 6