Tutorial by Examples: al

If you want to add all the JARs in directory to the classpath, you can do this concisely using classpath wildcard syntax; for example: someFolder/* This tells the JVM to add all JAR and ZIP files in the someFolder directory to the classpath. This syntax can be used in a -cp argument, a CLASSPA...
The following might have undefined behavior due to incorrect pointer alignment: char *memory_block = calloc(sizeof(uint32_t) + 1, 1); uint32_t *intptr = (uint32_t*)(memory_block + 1); /* possible undefined behavior */ uint32_t mvalue = *intptr; The undefined behavior happens as the pointer...
Gray Level Co-Occurrence Matrix (Haralick et al. 1973) texture is a powerful image feature for image analysis. The glcm package provides a easy-to-use function to calculate such texutral features for RasterLayer objects in R. library(glcm) library(raster) r <- raster("C:/Program Files/R...
The package mmand provides functions for the calculation of Mathematical Morphologies for n-dimensional arrays. With a little workaround, these can also be calculated for raster images. library(raster) library(mmand) r <- raster("C:/Program Files/R/R-3.2.3/doc/html/logo.jpg") plot...
The following uses a variable with a for loop to rename a group of files. SetLocal EnableDelayedExpansion for %%j in (*.*) do ( set filename=%%~nj set filename=!filename:old=new! set filename=Prefix !filename! set filename=!filename! Suffix ren "%%j" "!filename!%%~x...
Sometimes you need to call a Tcl command from your expression. For example, supposing you need the length of a string in it. To do that, you just use a [...] sequence in the expression: set halfTheStringLength [expr { [string length $theString] / 2 }] You can call any Tcl command this way, but i...
When inheriting from any base class, only one partial class needs to have the base class specified. // PartialClass1.cs public partial class PartialClass : BaseClass {} // PartialClass2.cs public partial class PartialClass {} You can specify the same base class in more than one partial clas...
The command set is used to assign values in Tcl. When it is called with two arguments in the following manner, % set tempVar "This is a string." This is a string. it places the second argument ("This is a string.") in the memory space referenced by the first argument (tempVa...
This option enables the use of call profiling for code optimizations. Profiling records useful runtime statistics specific to the application and can—in many cases—increase performance because JVM can then act on those statistics. Note: This option is supported with the JRockit JVM R27.3.0 and la...
Development and Evaluation Installations Alfresco provides a number of different installers for different operating systems and platforms. However, these installers are not recommended for production environments. https://www.alfresco.com/alfresco-community-download https://sourceforge.net/projec...
To print the value of a pointer to an object (as opposed to a function pointer) use the p conversion specifier. It is defined to print void-pointers only, so to print out the value of a non void-pointer it needs to be explicitly converted ("casted*") to void*. #include <stdlib.h> /*...
Sometimes we need to fetch and print the value of a TensorFlow variable to guarantee our program is correct. For example, if we have the following program: import tensorflow as tf import numpy as np a = tf.Variable(tf.random_normal([2,3])) # declare a tensorflow variable b = tf.random_normal([2...
An SKView does not need to fill the whole screen and can share space with other UI controls. You can even have more than one SKView displayed at once if you wish. To create a smaller SKView amongst other controls with Interface Builder, first create a normal ViewController, then drag and drop a new...
A try-finally block may be nested inside a try-except block. try AcquireResources; try UseResource; finally ReleaseResource; end; except on E: EResourceUsageError do begin HandleResourceErrors; end; end; If an exception occurs inside UseResource, then execution...
A try-except block may be nested inside a try-finally block. AcquireResource; try UseResource1; try UseResource2; except on E: EResourceUsageError do begin HandleResourceErrors; end; end; UseResource3; finally ReleaseResource; end; If an EResourceUsageE...
In Tcl itself, a string consisting of a single word does not need to be quoted. In the language of expression strings that expr evaluates, all operands must have an identifiable type. Numeric operands are written without any decoration: expr {455682 / 1.96e4} So are boolean constants: expr {tr...
In order to print the value of a variable such as, set tempVar "This is a string." The argument in the puts statement is preceded by a $ sign, which tells Tcl to use the value of the variable. % set tempVar "This is a string." This is a string. % puts $tempVar This is a s...
Any project that targets netstandard1.X can be packed into a NuGet package by running: dotnet pack The resulting package can be uploaded to NuGet, MyGet, or hosted in a local package source.
One Button Swift class ViewController: UIViewController { @IBAction func showAlertButtonTapped(sender: UIButton) { // create the alert let alert = UIAlertController(title: "My Title", message: "This is my message.", preferredStyle: UIAlertCo...
Below code showcases multiple Producer/Consumer program. Both Producer and Consumer threads share same global queue. import java.util.concurrent.*; import java.util.Random; public class ProducerConsumerWithES { public static void main(String args[]) { BlockingQueue<Integer> ...

Page 98 of 269