Tutorial by Examples

There are multiple ways of adding data to a object in fxml: <property> tag A tag with the name of a property can be added as child of an element used for creating a instance. The child of this tag is assigned to the property using the setter or added to the contents of the property (readonly...
Hi everyone! This is a demo I love running for people that get started with BigQuery. So let's run some simple queries to get you started. Setup You will need a Google Cloud project: Go to http://bigquery.cloud.google.com/. If it tells you to create a project, follow the link to create a proje...
Observable.combineLatest(firstName.rx_text, lastName.rx_text) { $0 + " " + $1 } .map { "Greetings, \($0)" } .bindTo(greetingLabel.rx_text) Using the combineLatest operator every time an item is emitted by either of two Observables, combine the latest item emitted by each Obs...
RxSwift provides not only the ways to control your data, but to represent user actions in a reactive way also. RxCocoa contains everything you need. It wraps most of the UI components' properties into Observables, but not really. There are some upgraded Observables called ControlEvents (which repre...
While Runnable provides a means to wrap code to be executed in a different thread, it has a limitation in that it cannot return a result from the execution. The only way to get some return value from the execution of a Runnable is to assign the result to a variable accessible in a scope outside of t...
Prior to Java 5's concurrent package introduction threading was more low level.The introduction of this package provided several higher level concurrent programming aids/constructs. Locks are thread synchronisation mechanisms that essentially serve the same purpose as synchronized blocks or key wor...
To make a jar, you need one or more class files. This should have a main method if it is to be run by a double click. For this example, we will use: import javax.swing.*; import java.awt.Container; public class HelloWorld { public static void main(String[] args) { JFrame f = ne...
#include <gtkmm/application.h> #include <gtkmm/applicationwindow.h> #include <gtkmm/button.h> // main window of the application class HelloWorldWindow : public Gtk::ApplicationWindow { // a simple push button Gtk::Button btn; public: HelloWorldWindow() : ...
Starting with the Support Library version 22.2.1, it's possible to show and hide a FloatingActionButton from scrolling behavior using a FloatingActionButton.Behavior sublclass that takes advantage of the show() and hide() methods. Note that this only works with a CoordinatorLayout in conjunction wi...
A keyword denoting one of the two possible values of type bool. bool ok = true; if (!f()) { ok = false; goto end; }
A keyword denoting one of the two possible values of type bool. bool ok = true; if (!f()) { ok = false; goto end; }
A floating point type. Has the narrowest range out of the three floating point types in C++. float area(float radius) { const float pi = 3.14159f; return pi*radius*radius; }
A floating point type. Its range includes that of float. When combined with long, denotes the long double floating point type, whose range includes that of double. double area(double radius) { const double pi = 3.141592653589793; return pi*radius*radius; }

for

Introduces a for loop or, in C++11 and later, a range-based for loop. // print 10 asterisks for (int i = 0; i < 10; i++) { putchar('*'); }
Jumps to a labelled statement, which must be located in the current function. bool f(int arg) { bool result = false; hWidget widget = get_widget(arg); if (!g()) { // we can't continue, but must do cleanup still goto end; } // ... result = true; end...
Denotes a signed integer type that is at least as long as int, and whose range includes at least -2147483647 to +2147483647, inclusive (that is, -(2^31 - 1) to +(2^31 - 1)). This type can also be written as long int. const long approx_seconds_per_year = 60L*60L*24L*365L; The combination long dou...
Denotes a signed integer type that is at least as long as char, and whose range includes at least -32767 to +32767, inclusive. This type can also be written as short int. // (during the last year) short hours_worked(short days_worked) { return 8*days_worked; }
A specifier that can be applied to the declaration of a non-static, non-reference data member of a class. A mutable member of a class is not const even when the object is const. class C { int x; mutable int times_accessed; public: C(): x(0), times_accessed(0) { } int get...
In R, data objects are manipulated using named data structures. The names of the objects might be called "variables" although that term does not have a specific meaning in the official R documentation. R names are case sensitive and may contain alphanumeric characters(a-z,A-z,0-9), the dot...
This is a mistake that causes real confusion for Java beginners, at least the first time that they do it. Instead of writing this: if (feeling == HAPPY) System.out.println("Smile"); else System.out.println("Frown"); they accidentally write this: if (feeling == HAP...

Page 727 of 1336