Tutorial by Examples

Functionality in metaclasses can be changed so that whenever a class is built, a string is printed to standard output, or an exception is thrown. This metaclass will print the name of the class being built. class VerboseMetaclass(type): def __new__(cls, class_name, class_parents, class_dict)...
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...
Modules have four associated keywords to make using them in other modules: alias, import, use, and require. alias will register a module under a different (usually shorter) name: defmodule MyModule do # Will make this module available as `CoolFunctions` alias MyOtherModule.CoolFunctions #...
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...
Detailed instructions on getting jvm set up or installed.
For a function or subroutine to be useful it has to be referenced. A subroutine is referenced in a call statement call sub(...) and a function within an expression. Unlike in many other languages, an expression does not form a complete statement, so a function reference is often seen in an ass...
Like the built-in python interactive shell, IPython is a REPL (Read-Evaluate-Print Loop) shell, with a variety of features that make it more pleasant to use for day-to-day Python development than the built-in REPL shell. Installation To install it: pip install ipython Or, via Anaconda: # To i...
Assigned GOTO uses integer variable to which a statement label is assigned using the ASSIGN statement. 100 CONTINUE ... ASSIGN 100 TO ILABEL ... GOTO ILABEL Assigned GOTO is obsolescent in Fortran 90 and deleted in Fortran 95 and later. It can be avoided in modern code by using pro...
Computed GOTO allows branching of the program according to the value of an integer expression. GOTO (label_1, label_2,... label_n) scalar-integer-expression If scalar-integer-expression is equal to 1 the program continues at statement label label_1, if it is equal to 2 it goes to label_2 and so ...
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...
Let's set yourself up to build your own awesome Progressive Web App with Polymer! Before you can start installing Polymer you require the following: Node.js - check out the StackOverflow Installing Node.js Documentation Bower - you can install Bower using the Node Package Manager installe...
Avoid unnecessary operations and method calls wherever you can, especially in a method which is called many times a second, like Update. Distance/Range Checks Use sqrMagnitude instead of magnitude when comparing distances. This avoids unnecessary sqrt operations. Note that when using sqrMagnitude,...
Usage If you have a long running operation that relies on the not-thread-safe Unity API, use Coroutines to split it over multiple frames and keep your application responsive. Coroutines also help performing expensive actions every nth frame instead of running that action each frame. Splitting Lon...
ActiveWorkbook and ThisWorkbook sometimes get used interchangeably by new users of VBA without fully understanding which each object relates to, this can cause undesired behaviour at run-time. Both of these objects belong to the Application Object The ActiveWorkbook object refers to the workbook ...

Page 456 of 1336