Tutorial by Examples: al

Detailed instructions on getting LabVIEW set up or installed.
If your team is following a rebase-based workflow, it may be a advantageous to setup git so that each newly created branch will perform a rebase operation, instead of a merge operation, during a git pull. To setup every new branch to automatically rebase, add the following to your .gitconfig or .gi...
std::optional<float> divide(float a, float b) { if (b!=0.f) return a/b; return {}; } Here we return either the fraction a/b, but if it is not defined (would be infinity) we instead return the empty optional. A more complex case: template<class Range, class Pred> auto find_if...
void print_name( std::ostream& os, std::optional<std::string> const& name ) { std::cout "Name is: " << name.value_or("<name missing>") << '\n'; } value_or either returns the value stored in the optional, or the argument if there is nothing s...
If you have loaded a file into GHCi (e.g. using :l filename.hs) and you have changed the file in an editor outside of GHCi you must reload the file with :r or :reload in order to make use of the changes, hence you don't need to type again the filename. ghci> :r OK, modules loaded: Main. ghci...
You can call an instance method using the . special form: (.trim " hello ") ;;=> "hello" You can call instance methods with arguments like this: (.substring "hello" 0 2) ;;=> "he"
You can call static methods like this: (System/currentTimeMillis) ;;=> 1469493415265 Or pass in arguments, like this: (System/setProperty "foo" "42") ;;=> nil (System/getProperty "foo") ;;=> "42"
You can call a Clojure function from Java code by looking up the function and invoking it: IFn times = Clojure.var("clojure.core", "*"); times.invoke(2, 2); This looks up the * function from the clojure.core namespace and invokes it with the arguments 2 & 2.
Also known as triple equals. This operator does not test equality, but rather tests if the right operand has an IS A relationship with the left operand. As such, the popular name case equality operator is misleading. This SO answer describes it thus: the best way to describe a === b is "if I ...
Goto https://atom.io/ and install the atom editor. Then install some Atom packages for easier Titanium coding: NameTypeFeaturestitanium language javascriptLanguageJS Autocomplete (non alloy)Titanium Alloyadd-onAll-in-one packageJump to definitionOpen relatedTSS HighlightTi-Createadd-onCreate proje...
The permutation method, when called with a block yields a two dimensional array consisting of all ordered sequences of a collection of numbers. If this method is called without a block, it will return an enumerator. To convert to an array, call the to_a method. ExampleResult[1,2,3].permutation#&lt...
function processGoogleDriveFolders() { var arrayAllFolderNames,continuationToken,folders,foldersFromToken,thisFolder;//Declare variable names arrayAllFolderNames = [];//Create an empty array and assign it to this variable name folders = DriveApp.getFolders();//Get all folders from ...
function processGoogleDriveFiles() { var arrayAllFileNames,continuationToken,files,filesFromToken,fileIterator,thisFile;//Declare variable names arrayAllFileNames = [];//Create an empty array and assign it to this variable name files = DriveApp.getFiles();//Get all files from Googl...
Value constructors are functions that return a value of a data type. Because of this, just like any other function, they can take one or more parameters: data Foo = Bar String Int | Biz String Let's check the type of the Bar value constructor. :t Bar prints Bar :: String -> Int -> Foo...
This is an example of something that would have been straight up impossible with labels. If you execute the same label multiple times at the same time and they rely on variables that are being defined within them, they very likely interfere and cause unexpected behavior. Here is how to do it with f...
By running the command stack install Stack will copy a executable file to the folder /Users/<yourusername>/.local/bin/
In Swift, memory management is done for you automatically using Automatic Reference Counting. (See Memory Management) Allocation is the process of reserving a spot in memory for an object, and in Swift understanding the performance of such requires some understanding of the heap and the stack. The h...
While server side-code can run with elevated privileges, there is not an equivalent method to elevate privileges in client-side code (for obvious security reasons). As an alternative, you can specify credentials to emulate the access of a specific user or service account. To specify credentials, bu...
As a good developer you have created following struct with both exported and unexported fields: type MyStruct struct { uuid string Name string } Example in Playground: https://play.golang.org/p/Zk94Il2ANZ Now you want to Marshal() this struct into valid JSON for storage in somet...
BAD CODE Dim f As System.Windows.Forms.Form f.ShowModal() GOOD CODE Dim f As System.Windows.Forms.Form = New System.Windows.Forms.Form ' Dim f As New System.Windows.Forms.Form ' alternative syntax f.ShowModal() EVEN BETTER CODE (Ensure proper disposal of IDisposable object more info) Us...

Page 106 of 269