Tutorial by Examples: an

An inner class which is visible to any outside class can be created from this class as well. The inner class depends on the outside class and requires a reference to an instance of it. To create an instance of the inner class, the new operator only needs to be called on an instance of the outer cla...
npm install --save-dev ember-cli-sass ember install ember-cli-foundation-6-sass
The problem statement is like if we are given two string str1 and str2 then how many minimum number of operations can be performed on the str1 that it gets converted to str2. Implementation in Java public class EditDistance { public static void main(String[] args) { // TODO Auto-generated ...
Adding 3DoF Controllers Controllers with 3 degrees of freedom (3DoF) are limited to rotational tracking. 3DoF controllers have no positional tracking meaning we can’t reach out nor move our hand back-and-forth or up-and-down. Having a controller with only 3DoF is like having a hand and wrist withou...
When the active property gets toggled, the component will notify the camera system to change the current camera used by the renderer: var secondCameraEl = document.querySelector('#second-camera'); secondCameraEl.setAttribute('camera', 'active', true);
To position the camera, set the position on a wrapper . Don’t set the position directly on the camera primitive because controls will quickly override the set position: <a-entity position="0 0 5"> <a-camera></a-camera> </a-entity>
You will need to install node.js - https://nodejs.org/en/ npm install -g @angular/cli - install the CLI by executing this command in the terminal ng new projectname - after executing this command in the terminal, you will create a new sub folder titled projectname in your current folder. cd pro...
In this example, we take a sine curve plot and add more features to it; namely the title, axis labels, title, axis ticks, grid and legend. # Plotting tutorials in Python # Enhancing a plot import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2.0*np.pi, 101) y = np.sin(x) ...
The following are some of the common extensions used in Fortran source files and the functionalities they can work on. Lowercase f in the extension These files do not have the features of preprocessor directives similar to C-programming language. They can be directly compiled to create object file...
Similar to the previous example, here, a sine and a cosine curve are plotted on the same figure using separate plot commands. This is more Pythonic and can be used to get separate handles for each plot. # Plotting tutorials in Python # Adding Multiple plots by superimposition # Good for plots sha...
Because Node.js runs on a single process uncaught exceptions are an issue to be aware of when developing applications. Silently Handling Exceptions Most of the people let node.js server(s) silently swallow up the errors. Silently handling the exception process.on('uncaughtException', functio...
ImageMagick includes a number of command-line utilities for manipulating images. Here we will use compare command-line tool. compare tool is very useful. Suppose you want to test (e.g. layout, color, icons etc.) the difference between your expected design UI HTML file with actual result of JSP...
Suppose we have this source file that we would like to split: cat -n sourcefile 1 On the Ning Nang Nong 2 Where the Cows go Bong! 3 and the monkeys all say BOO! 4 There's a Nong Nang Ning 5 Where the trees go Ping! 6 And the tea pots jibber jabber joo. 7 On the Nong Ning Nang Comma...
public void setCardColorTran(CardView card) { ColorDrawable[] color = {new ColorDrawable(Color.BLUE), new ColorDrawable(Color.RED)}; TransitionDrawable trans = new TransitionDrawable(color); if(Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { card.setB...
public void setCardColorTran(View view) { ColorDrawable[] color = {new ColorDrawable(Color.BLUE), new ColorDrawable(Color.RED)}; TransitionDrawable trans = new TransitionDrawable(color); if(Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) { view.setBackgrou...
Gui, +AlwaysOnTop +Disabled -SysMenu +Owner ; +Owner avoids a taskbar button. Gui, Add, Text,, Some text to display. Gui, Show, NoActivate, Title of Window ; NoActivate avoids deactivating the currently active window.
As already mentioned you can declare an unordered map of any type. Let's have a unordered map named first with string and integer type. unordered_map<string, int> first; //declaration of the map first["One"] = 1; // [] operator used to insert the value first["Two"] = 2...
Suppose you are comparing value with some variable if ( i == 2) //Bad-way { doSomething; } Now suppose you have mistaken == with =. Then it will take your sweet time to figure it out. if( 2 == i) //Good-way { doSomething; } Then, if an equal sign is accidentally left out, the ...
BottomSheet DialogFragment opens up in STATE_COLLAPSED by default. Which can be forced to open to STATE_EXPANDEDand take up the full device screen with help of the following code template. @NonNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) { BottomSheetDialog dialog = ...

Page 293 of 307