Tutorial by Examples: co

Recent versions of Delphi ships with the TStopwatch record which is for time interval measurement. Example usage: uses System.Diagnostics; var StopWatch: TStopwatch; ElapsedMillseconds: Int64; begin StopWatch := TStopwatch.StartNew; // do something that requires measurement El...
To make your APK file as small as possible, you should enable shrinking to remove unused code and resources in your release build. This page describes how to do that and how to specify what code and resources to keep or discard during the build. Code shrinking is available with ProGuard, which dete...
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...
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...
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...
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 builds on top of and depends on the raycaster component. If we want to customize the raycasting pieces of the cursor, we can do by changing the raycaster component properties. Say we want set a max distance, check for intersections less frequently, and set which objects are clickable: &l...
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...
The recommended way is to write a component, and attach it to the scene element. The scene and its children will be initialized before this component. AFRAME.registerComponent('do-something', { init: function () { var sceneEl = this.el; } }); <a-scene do-something></a-scene...
Mouse controls are only supported outside the VR modus and could be use for games without a HMD. For more information about mouse controls, you could find in the mouse cursor example. <a-scene> <a-entity camera look-controls mouse-cursor> </a-scene>
$logger = $container->get('logger'); This will fetch the service with the service ID "logger" from the container, an object that implements Psr\Log\LoggerInterface.
##= #= Service::QueryConfig # # USAGE: # ${Service::QueryConfig} "NAME" /DISABLEFSR $0 $1 # # ::QueryConfig = The service's binary path is returned. # NAME = The Service name # /DISABLEFSR = Disables redirection if x64. Use "" to skip. # $0 ...
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...
There are two methods using which you can consume data from AWS S3 bucket. Using sc.textFile (or sc.wholeTextFiles) API: This api can be used for HDFS and local file system as well. aws_config = {} # set your aws credential here sc._jsc.hadoopConfiguration().set("fs.s3n.awsSecretAccessK...
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...
As recently Apple rolled out iOS11 and Xcode-9, we can now debug apps on devices without connecting devices to Xcode through USB. We can take advantage of wireless debugging feature added to this Xcode-9. To enable wireless debugging, we have to configure some steps in Xcode. 1 First connect the ...
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.The Operations can be: Insert Remove Replace For Example Input: str1 = "geek", str2 = "gesek" Ou...
Node js code Sample to start this topic is Node.js server communicating with Arduino via serialport. npm install express --save npm install serialport --save Sample app.js: const express = require('express'); const app = express(); var SerialPort = require("serialport"); var po...

Page 238 of 248