Tutorial by Examples: a

The length of line-wrapping when using the l command is implementation defined. From the standard: Long lines shall be folded, with the point of folding indicated by writing a followed by a ; the length at which folding occurs is unspecified, but should be appropriate for the output device. ...
Up navigation is done in android by adding android:parentActivityName="" in Manifest.xml to the activity tag. Basically with this tag you tell the system about the parent activity of a activity. How is it done? <uses-permission android:name="android.permission.INTERNET" ...
The following example is tested on Windows 8 pro 64-bit operating system with python 2.7 and scrapy v 1.2. Let assume that we have already installed the scrapy framework. MySQL database that we will use in the following tutorial CREATE TABLE IF NOT EXISTS `scrapy_items` ( `id` bigint(20) UNSIGN...
The System.Collections.Immutable NuGet package provides immutable collection classes. Creating and adding items var stack = ImmutableStack.Create<int>(); var stack2 = stack.Push(1); // stack is still empty, stack2 contains 1 var stack3 = stack.Push(2); // stack2 still contains only one, st...
Setup To start unit testing your Android project using JUnit you need to add the JUnit dependency to your project and you need to create a test source-set which is going to contain the source code for the unit tests. Projects created with Android Studio often already include the JUnit dependency an...
Implementation of the Caesar cipher. This implementation performs the shift operation only on upper and lower case alphabets and retains the other characters (such as space as-is). The Caesar cipher is not secure as per current standards. Below example is for illustrative purposes only ! Refer...
The HTML5 file API allows you to restrict which kind of files are accepted by simply setting the accept attribute on a file input, e.g.: <input type="file" accept="image/jpeg"> Specifying multiple MIME types separated by a comma (e.g. image/jpeg,image/png) or using wild...
The following code example implements the Caesar cipher and shows the properties of the cipher. It handles both uppercase and lowercase alpha-numerical characters, leaving all other characters as they were. The following properties of the Caesar cipher are shown: weak keys; low key space; the...
To create an explosion, the following method signatures may be used: boolean createExplosion(double x, double y, double z, float power); boolean createExplosion(double x, double y, double z, float power, boolean setFire); boolean createExplosion(double x, double y, double z, float power, ...
The following methods can be used to drop an Item somewhere in the world: Item dropItem(Location loc, ItemStack is); Item dropItemNaturally(Location loc, ItemStack is); dropItem means dropping an Item exactly at the location, returning an Item object. dropItemNaturally means dropping the Item ...
The following methods can be used to generate a tree naturally (as if it was grown from a sapling) into the world. boolean generateTree(Location loc, TreeType type); boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate); Location is where you want the tree to spawn ...
Basic reading image from java import org.opencv.core.Core; import org.opencv.core.Mat; import org.opencv.imgcodecs.Imgcodecs; //Load native library System.loadLibrary(Core.NATIVE_LIBRARY_NAME); //Mat object used to host the image Mat imageArray; //Read image file from vile system ima...
Where we came from Sometimes we can't provide all of the required metadata needed for the XmlSerializer framework in attribute. Suppose we have a base class of serialized objects, and some of the derived classes are unknown to the base class. We can't place an attribute for all of the classes which...
In Production its good practice to secure your data and only allow operations on it to be undertaken via Stored Procedures. This means your application can't directly run CRUD operations on your data and potentially cause problems. Assigning permissions is a time-consuming, fiddly and generally oner...
Let's say, you have already created a segment tree. You are required to update the values of the array, this will not only change the leaf nodes of your segment tree, but also the minimum/maximum in some nodes. Let's look at this with an example: This is our minimum segment tree of 8 elements. To...
XmlView: <mvc:View controllerName="sap.m.sample.ListCounter.List" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"> <List headerText="Products" items="{products>/Products}"> <!-- Template of ...
What is tidyverse? tidyverse is the fast and elegant way to turn basic R into an enhanced tool, redesigned by Hadley/Rstudio. The development of all packages included in tidyverse follow the principle rules of The tidy tools manifesto. But first, let the authors describe their masterpiece: The t...
In normal mode: gg go to top = then G
In normal mode: gg go to top = then G
Full list of options: ls -a list all files including hidden file starting with '.' ls --color colored list [=always/never/auto] ls -d list directories - with ' */' ls -F add one char of */=>@| to enteries ls -i list file's inode index number ls -l list with long form...

Page 844 of 1099