Tutorial by Examples: v

Dim Value As Variant 'Explicit Dim Value 'Implicit A Variant is a COM data type that is used for storing and exchanging values of arbitrary types, and any other type in VBA can be assigned to a Variant. Variables declared without an explicit type specified by As [Type] default t...
#Modules to use use Cwd 'abs_path'; use Win32::OLE; use Win32::OLE qw(in with); use Win32::OLE::Const "Microsoft Excel"; $Win32::OLE::Warn = 3; #Need to use absolute path for Excel files my $excel_file = abs_path("$Excel_path") or die "Error: the file $Excel_path ha...
In ui-router a state can hold multiple views, each with his own controller and a template .state('dashboard', { name: 'dashboard', url: '/dashboard', views: { "view1": { templateUrl: "path/to/view1.html", controller: "...
You can resolve data into your state when you transition into it, usually it's useful when the state needs to use that data, or to resolve into a state when some provided input needs to be authenticated. When you define your states, you will need to provide a map of values to be resolved into the ....
The response to a CORS request must include an Access-Control-Allow-Origin header, which dictates what origins are allowed to use the CORS resource. This header can take one of three values: An origin. Doing this permits requests from that origin only. The character *. This permits requests from...
When a server receives a preflight request, it must check if it supports the requested method and headers, and send back a response that indicates its ability to support the request, as well as any other permitted data (such as credentials). These are indicated in access-control Allow headers. The ...
Mostly you will use "normal variables": set(VAR TRUE) set(VAR "main.cpp") set(VAR1 ${VAR2}) But CMake does also know global "cached variables" (persisted in CMakeCache.txt). And if normal and cached variables of the same name exist in the current scope, normal var...
The scope outside of any function or class is the global scope. When a PHP script includes another (using include or require) the scope remains the same. If a script is included outside of any function or class, it's global variables are included in the same global scope, but if a script is include...
Sometimes you want to convert your enum to a String, there are two ways to do that. Assume we have: public enum Fruit { APPLE, ORANGE, STRAWBERRY, BANANA, LEMON, GRAPE_FRUIT; } So how do we convert something like Fruit.APPLE to "APPLE"? Convert using name() name() is an inte...
Superglobal variables are defined by PHP and can always be used from anywhere without the global keyword. <?php function getPostValue($key, $default = NULL) { // $_POST is a superglobal and can be used without // having to specify 'global $_POST;' if (isset($_POST[$key])) { ...
Static class properties that are defined with the public visibility are functionally the same as global variables. They can be accessed from anywhere the class is defined. class SomeClass { public static int $counter = 0; } // The static $counter variable can be read/written from anywhere...
Equals is declared in the Object class itself. public virtual bool Equals(Object obj); By default, Equals has the following behavior: If the instance is a reference type, then Equals will return true only if the references are the same. If the instance is a value type, then Equals will...
Vuex is an official plugin for Vue.js which offers a centralised datastore for use within your application. It is heavily influenced by the Flux application architecture which features a unidirectional data flow leading to simpler application design and reasoning. Within a Vuex application the data...
When building large applications such as Single Page Apps (SPA's), which typically consist of many reusable components they can quickly become difficult to build and maintain. The sharing of data and state between these components can also quickly break down and become difficult to debug and maintai...
Most of the time that you'll be using Vuex will be in larger component based applications where you likely be using a module bundler such as Webpack or Browserify in conjunction with Vueify if you're using single files. In this case the easiest way to get Vuex is from NPM. Run the command below to ...
Like any other java program, every swing program starts with a main method. The main method is initiated by the main thread. However, Swing components need to be created and updated on the event dispatch thread (or short: EDT). To illustrate the dynamic between the main thread and the EDT take a loo...
In Java, we can convert between integer values and floating-point values. Also, since every character corresponds to a number in the Unicode encoding, char types can be converted to and from the integer and floating-point types. boolean is the only primitive datatype that cannot be converted to or f...
defmodule Processes do def receiver do receive do {:ok, val} -> IO.puts "Received Value: #{val}" _ -> IO.puts "Received something else" end end end iex(1)> pid = spawn(Processes, ...
Recursion can be used to receive multiple messages defmodule Processes do def receiver do receive do {:ok, val} -> IO.puts "Received Value: #{val}" _ -> IO.puts "Received something else" end...
There are three MonoBehaviour methods that can be made coroutines. Start() OnBecameVisible() OnLevelWasLoaded() This can be used to create, for example, scripts that execute only when the object is visible to a camera. using UnityEngine; using System.Collections; public class RotateObje...

Page 96 of 296