Tutorial by Examples

npm install --save-dev ember-cli-sass ember install ember-cli-foundation-6-sass
// ember-cli-build.js /* global require, module */ var EmberApp = require('ember-cli/lib/broccoli/ember-app'); module.exports = function(defaults) { var app = new EmberApp(defaults, { // Add options here 'ember-cli-foundation-6-sass': { 'foundationJs': [ ...
{{#bs-form model=this onSubmit=(action "submit") as |form|}} {{#form.element label="Email" placeholder="Email" property="email" as |el|}} <div class="input-group"> <input value={{el.value}} class="form-control" place...
1. Enable Flat Categories and Products One of the top reasons of Magento speed issues with database read speed. To fasten the read speed of the database you should enable Flat Catalog. This will minify the number of database joins done when showing products and due to that the MySQL query complexit...
To discovery all the available print services, we can use the PrintServiceLookup class. Let's see how: import javax.print.PrintService; import javax.print.PrintServiceLookup; public class DiscoveringAvailablePrintServices { public static void main(String[] args) { discoverPrintS...
To discovery the default print service, we can use the PrintServiceLookup class. Let's see how:: import javax.print.PrintService; import javax.print.PrintServiceLookup; public class DiscoveringDefaultPrintService { public static void main(String[] args) { discoverDefaultPrintSer...
A print job is a request of printing something in a specific print service. It consists, basically, by: the data that will be printed (see Building the Doc that will be printed) a set of attributes After picking-up the right print service instance, we can request the creation of a print job...
Doc is an interface and the Java Print Service API provide a simple implementation called SimpleDoc. Every Doc instance is basically made of two aspects: the print data content itself (an E-mail, an image, a document etc) the print data format, called DocFlavor (MIME type + Representation class...

C#

internal sealed class TextToTextCryptography : IDisposable { // This type is not thread-safe because it repeatedly mutates the IV property. private SymmetricAlgorithm _cipher; // The input to Encrypt and the output from Decrypt need to use the same Encoding // so text -> by...
Sometimes we need to determine some aspects of the print request. We will call them attribute. Are examples of print request attributes: amount of copies (1, 2 etc), orientation (portrait or landscape) chromacity (monochrome, color) quality (draft, normal, high) sides (one-sided, two-sided e...
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 ...
If we are given with the two strings we have to find the longest common sub-sequence present in both of them. Example LCS for input Sequences “ABCDGH” and “AEDFHR” is “ADH” of length 3. LCS for input Sequences “AGGTAB” and “GXTXAYB” is “GTAB” of length 4. Implementation in Java public class LC...
Bottom up approach for printing the nth Fibonacci number using Dynamic Programming. Recursive Tree fib(5) / \ fib(4) fib(3) / \ / \ fib(3) fib(2...
Given 2 string str1 and str2 we have to find the length of the longest common substring between them. Examples Input : X = "abcdxyz", y = "xyzabcd" Output : 4 The longest common substring is "abcd" and is of length 4. Input : X = "zxabcdezy", y = "y...
This example illustrates how Go's type system can be used to implement some unit system. package main import ( "fmt" ) type MetersPerSecond float64 type KilometersPerHour float64 func (mps MetersPerSecond) toKilometersPerHour() KilometersPerHour { return KilometersPer...
For example, we can create a ring-shaped cursor fixed to the center of the screen. To fix the cursor to the screen so the cursor is always present no matter where we look, we place it as a child of the active camera entity. We pull it in front of the camera by placing it on the negative Z axis. When...
We’ll first go over gaze-based interactions. Gaze-based interactions rely on rotating our heads and looking at objects to interact with them. This type of interaction is for headsets without a controller. Even with a rotation-only controller (Daydream, GearVR), the interaction is still similar. Sinc...
The cursor primitive is a reticle that allows for clicking and basic interactivity with a scene on devices that do not have a hand controller. The default appearance is a ring geometry. The cursor is usually placed as a child of the camera. <a-scene> <a-camera> <a-cursor>&...

Page 1276 of 1336