Tutorial by Examples

The wrap panel acts in a similar way to stack panel. Except when it recognizes the items will exceed it's size, it would then wrap them to a new row/column, depending on it's orientation. Horizontal orientation <WrapPanel Width="100"> <Button Content="Button"/&g...
Uniform grid will place all it's children in a grid layout, each child in it's own cell. All the cells will have the same size. It can be thought to be a shorthand to a grid where all the row and column definitions are set to * Default rows and columns By default the UniformGrid will try to crea...
public class CustomTextView extends TextView { private float strokeWidth; private Integer strokeColor; private Paint.Join strokeJoin; private float strokeMiter; public CustomTextView(Context context) { super(context); init(null); } public ...
The following code makes the UI unresponsive for a short while after the button click, since too many Platform.runLater calls are used. (Try scrolling the ListView immediately after the button click.) @Override public void start(Stage primaryStage) { ObservableList<Integer> data = FXCol...
The java.util.LinkedList class, while implementing java.util.List is a general-purpose implementation of java.util.Queue interface too operating on a FIFO (First In, First Out) principle. In the example below, with offer() method, the elements are inserted into the LinkedList. This insertion operat...
Detailed instructions on getting performance set up or installed.
XAML controls may have dependency properties that can be bound to objects from DataContext or other controls. When the type of the object being bound is different from the type of the target DependencyProperty, a converter may be used to adapt one type to another. Converters are classes implementin...
Specific for <li> tags within an unordered list (<ul>): list-style: disc; /* A filled circle (default) */ list-style: circle; /* A hollow circle */ list-style: square; /* A filled square */ list-style: '-'; /* any string */ ...
Given a simple PHP class: class Car { private $speed = 0; public getSpeed() { return $this->speed; } public function accelerate($howMuch) { $this->speed += $howMuch; } } You can write a PHPUnit test which tests the behavior of the class unde...
If you plan to host your Django website on Heroku, you can start your project using the Heroku Django Starter Template : django-admin.py startproject --template=https://github.com/heroku/heroku-django-template/archive/master.zip --name=Procfile YourProjectName It has Production-ready configurati...
Mapping URLs to specific templates To fully grasp WordPress themes, you must understand two primary concepts: Permalinks The Template Hierarchy A permalink is a permanent, non-changing URL (or link, to a specific resource. For instance: example.com/about-us/ (a Page in WP) example.com/se...
SELECT Id, Name FROM Account This will return the Id and Name fields from the Account table. No filtering or sorting will be applied.
SELECT Name FROM User WHERE IsActive = true This will return the name of all active Users. SELECT Name, Phone FROM Contact WHERE CreatedDate >= 2016-01-01T00:00:00.000Z This will return Contacts created on or after January 1st, 2016. SELECT Id, Name FROM Account LIMIT 100 This will ret...
SELECT Id, Name FROM User ORDER BY LastName SELECT Id, Name FROM Contact ORDER BY LastModifiedDate DESC SELECT Name, Title FROM User ORDER BY Title ASC NULLS FIRST SELECT Id FROM Contact ORDER BY LastName ASC NULLS LAST, FirstName ASC NULLS FIRST
It is a common operation to need to perform a particular function over each element in a parameter pack. With C++11, the best we can do is: template <class... Ts> void print_all(std::ostream& os, Ts const&... args) { using expander = int[]; (void)expander{0, (void(...
Android 6 (API23) introduced Doze mode which interferes with AlarmManager. It uses certain maintenance windows to handle alarms, so even if you used setExactAndAllowWhileIdle() you cannot make sure that your alarm fires at the desired point of time. You can turn this behavior off for your app using...
var alphabet:Array = [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S...
Another way to implement item click listener is to use interface with several methods, the number of which is equal to the number of clickable views, and use overrided click listeners as you can see below. This method is more flexible, because you can set click listeners to different views and quite...
To support multiple resolutions and aspect ratios Libgdx uses the so called Viewports. There are a few types of Viewports which use different strategies to handle multiple resolutions and aspect ratios. A Viewport uses a Camera under the hood and manages it's viewportHeight and viewportWidth. You ...
HVFL is a language designed to constrain UI elements in a simple and quick fashion. Generally, VFL has an advantage over traditional UI customization in the Interface Builder because it's much more readable, accessible and compact. Here's an example of VFL, in which three UIViews are constrained f...

Page 570 of 1336